diff --git a/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/_ReactorCloudFoundryClient.java b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/_ReactorCloudFoundryClient.java index 769e278aad..d131ea8a49 100644 --- a/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/_ReactorCloudFoundryClient.java +++ b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/_ReactorCloudFoundryClient.java @@ -59,7 +59,7 @@ import org.cloudfoundry.client.v3.droplets.Droplets; import org.cloudfoundry.client.v3.isolationsegments.IsolationSegments; import org.cloudfoundry.client.v3.jobs.JobsV3; -import org.cloudfoundry.client.v3.organizationquotadefinitions.OrganizationQuotaDefinitionsV3; +import org.cloudfoundry.client.v3.quotas.organizations.OrganizationQuotasV3; import org.cloudfoundry.client.v3.organizations.OrganizationsV3; import org.cloudfoundry.client.v3.packages.Packages; import org.cloudfoundry.client.v3.processes.Processes; @@ -72,7 +72,7 @@ import org.cloudfoundry.client.v3.serviceinstances.ServiceInstancesV3; import org.cloudfoundry.client.v3.serviceofferings.ServiceOfferingsV3; import org.cloudfoundry.client.v3.serviceplans.ServicePlansV3; -import org.cloudfoundry.client.v3.spacequotas.SpaceQuotasV3; +import org.cloudfoundry.client.v3.quotas.spaces.SpaceQuotasV3; import org.cloudfoundry.client.v3.spaces.SpacesV3; import org.cloudfoundry.client.v3.stacks.StacksV3; import org.cloudfoundry.client.v3.tasks.Tasks; @@ -119,7 +119,7 @@ import org.cloudfoundry.reactor.client.v3.droplets.ReactorDroplets; import org.cloudfoundry.reactor.client.v3.isolationsegments.ReactorIsolationSegments; import org.cloudfoundry.reactor.client.v3.jobs.ReactorJobsV3; -import org.cloudfoundry.reactor.client.v3.organizationquotadefinitions.ReactorOrganizationQuotaDefinitionsV3; +import org.cloudfoundry.reactor.client.v3.quotas.organizations.ReactorOrganizationQuotasV3; import org.cloudfoundry.reactor.client.v3.organizations.ReactorOrganizationsV3; import org.cloudfoundry.reactor.client.v3.packages.ReactorPackages; import org.cloudfoundry.reactor.client.v3.processes.ReactorProcesses; @@ -132,7 +132,7 @@ import org.cloudfoundry.reactor.client.v3.serviceinstances.ReactorServiceInstancesV3; import org.cloudfoundry.reactor.client.v3.serviceofferings.ReactorServiceOfferingsV3; import org.cloudfoundry.reactor.client.v3.serviceplans.ReactorServicePlansV3; -import org.cloudfoundry.reactor.client.v3.spacequotas.ReactorSpaceQuotasV3; +import org.cloudfoundry.reactor.client.v3.quotas.spaces.ReactorSpaceQuotasV3; import org.cloudfoundry.reactor.client.v3.spaces.ReactorSpacesV3; import org.cloudfoundry.reactor.client.v3.stacks.ReactorStacksV3; import org.cloudfoundry.reactor.client.v3.tasks.ReactorTasks; @@ -284,8 +284,8 @@ public OrganizationQuotaDefinitions organizationQuotaDefinitions() { @Override @Value.Derived - public OrganizationQuotaDefinitionsV3 organizationQuotaDefinitionsV3() { - return new ReactorOrganizationQuotaDefinitionsV3(getConnectionContext(), getRootV3(), getTokenProvider(), + public OrganizationQuotasV3 organizationQuotasV3() { + return new ReactorOrganizationQuotasV3(getConnectionContext(), getRootV3(), getTokenProvider(), getRequestTags()); } diff --git a/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v3/organizationquotadefinitions/ReactorOrganizationQuotaDefinitionsV3.java b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v3/organizationquotadefinitions/ReactorOrganizationQuotaDefinitionsV3.java deleted file mode 100644 index 4d4fb69a49..0000000000 --- a/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v3/organizationquotadefinitions/ReactorOrganizationQuotaDefinitionsV3.java +++ /dev/null @@ -1,113 +0,0 @@ -/* - * Copyright 2013-2025 the original author or 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 - * - * http://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. - */ - -package org.cloudfoundry.reactor.client.v3.organizationquotadefinitions; - -import java.util.Map; -import org.cloudfoundry.client.v3.organizationquotadefinitions.CreateOrganizationQuotaDefinitionRequest; -import org.cloudfoundry.client.v3.organizationquotadefinitions.CreateOrganizationQuotaDefinitionResponse; -import org.cloudfoundry.client.v3.organizationquotadefinitions.DeleteOrganizationQuotaDefinitionRequest; -import org.cloudfoundry.client.v3.organizationquotadefinitions.GetOrganizationQuotaDefinitionRequest; -import org.cloudfoundry.client.v3.organizationquotadefinitions.GetOrganizationQuotaDefinitionResponse; -import org.cloudfoundry.client.v3.organizationquotadefinitions.ListOrganizationQuotaDefinitionsRequest; -import org.cloudfoundry.client.v3.organizationquotadefinitions.ListOrganizationQuotaDefinitionsResponse; -import org.cloudfoundry.client.v3.organizationquotadefinitions.OrganizationQuotaDefinitionsV3; -import org.cloudfoundry.client.v3.organizationquotadefinitions.UpdateOrganizationQuotaDefinitionRequest; -import org.cloudfoundry.client.v3.organizationquotadefinitions.UpdateOrganizationQuotaDefinitionResponse; -import org.cloudfoundry.reactor.ConnectionContext; -import org.cloudfoundry.reactor.TokenProvider; -import org.cloudfoundry.reactor.client.v3.AbstractClientV3Operations; -import reactor.core.publisher.Mono; - -/** - * The Reactor-based implementation of {@link ReactorOrganizationQuotaDefinitionsV3} - */ -public class ReactorOrganizationQuotaDefinitionsV3 extends AbstractClientV3Operations - implements OrganizationQuotaDefinitionsV3 { - - /** - * Creates an instance - * - * @param connectionContext the {@link ConnectionContext} to use when communicating with the server - * @param root the root URI of the server. Typically, something like {@code https://api.run.pivotal.io}. - * @param tokenProvider the {@link TokenProvider} to use when communicating with the server - * @param requestTags map with custom http headers which will be added to web request - */ - public ReactorOrganizationQuotaDefinitionsV3( - ConnectionContext connectionContext, - Mono root, - TokenProvider tokenProvider, - Map requestTags) { - super(connectionContext, root, tokenProvider, requestTags); - } - - @Override - public Mono create( - CreateOrganizationQuotaDefinitionRequest request) { - return post( - request, - CreateOrganizationQuotaDefinitionResponse.class, - builder -> builder.pathSegment("organization_quotas")) - .checkpoint(); - } - - @Override - public Mono get( - GetOrganizationQuotaDefinitionRequest request) { - return get( - request, - GetOrganizationQuotaDefinitionResponse.class, - builder -> - builder.pathSegment( - "organization_quotas", - request.getOrganizationQuotaDefinitionId())) - .checkpoint(); - } - - @Override - public Mono list( - ListOrganizationQuotaDefinitionsRequest request) { - return get( - request, - ListOrganizationQuotaDefinitionsResponse.class, - builder -> builder.pathSegment("organization_quotas")) - .checkpoint(); - } - - @Override - public Mono update( - UpdateOrganizationQuotaDefinitionRequest request) { - return patch( - request, - UpdateOrganizationQuotaDefinitionResponse.class, - builder -> - builder.pathSegment( - "organization_quotas", - request.getOrganizationQuotaDefinitionId())) - .checkpoint(); - } - - @Override - public Mono delete(DeleteOrganizationQuotaDefinitionRequest request) { - return delete( - request, - builder -> - builder.pathSegment( - "organization_quotas", - request.getOrganizationQuotaDefinitionId())) - .checkpoint(); - } -} diff --git a/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v3/quotas/organizations/ReactorOrganizationQuotasV3.java b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v3/quotas/organizations/ReactorOrganizationQuotasV3.java new file mode 100644 index 0000000000..2981f0b0f2 --- /dev/null +++ b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v3/quotas/organizations/ReactorOrganizationQuotasV3.java @@ -0,0 +1,97 @@ +/* + * Copyright 2013-2025 the original author or 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 + * + * http://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. + */ + +package org.cloudfoundry.reactor.client.v3.quotas.organizations; + +import java.util.Map; +import org.cloudfoundry.client.v3.quotas.organizations.*; +import org.cloudfoundry.reactor.ConnectionContext; +import org.cloudfoundry.reactor.TokenProvider; +import org.cloudfoundry.reactor.client.v3.AbstractClientV3Operations; +import reactor.core.publisher.Mono; + +/** + * The Reactor-based implementation of {@link ReactorOrganizationQuotasV3} + */ +public class ReactorOrganizationQuotasV3 extends AbstractClientV3Operations + implements OrganizationQuotasV3 { + + /** + * Creates an instance + * + * @param connectionContext the {@link ConnectionContext} to use when communicating with the server + * @param root the root URI of the server. Typically, something like {@code https://api.run.pivotal.io}. + * @param tokenProvider the {@link TokenProvider} to use when communicating with the server + * @param requestTags map with custom http headers which will be added to web request + */ + public ReactorOrganizationQuotasV3( + ConnectionContext connectionContext, + Mono root, + TokenProvider tokenProvider, + Map requestTags) { + super(connectionContext, root, tokenProvider, requestTags); + } + + @Override + public Mono create(CreateOrganizationQuotaRequest request) { + return post( + request, + CreateOrganizationQuotaResponse.class, + builder -> builder.pathSegment("organization_quotas")) + .checkpoint(); + } + + @Override + public Mono get(GetOrganizationQuotaRequest request) { + return get( + request, + GetOrganizationQuotaResponse.class, + builder -> + builder.pathSegment( + "organization_quotas", request.getOrganizationQuotaId())) + .checkpoint(); + } + + @Override + public Mono list(ListOrganizationQuotasRequest request) { + return get( + request, + ListOrganizationQuotasResponse.class, + builder -> builder.pathSegment("organization_quotas")) + .checkpoint(); + } + + @Override + public Mono update(UpdateOrganizationQuotaRequest request) { + return patch( + request, + UpdateOrganizationQuotaResponse.class, + builder -> + builder.pathSegment( + "organization_quotas", request.getOrganizationQuotaId())) + .checkpoint(); + } + + @Override + public Mono delete(DeleteOrganizationQuotaRequest request) { + return delete( + request, + builder -> + builder.pathSegment( + "organization_quotas", request.getOrganizationQuotaId())) + .checkpoint(); + } +} diff --git a/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v3/spacequotas/ReactorSpaceQuotasV3.java b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v3/quotas/spaces/ReactorSpaceQuotasV3.java similarity index 94% rename from cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v3/spacequotas/ReactorSpaceQuotasV3.java rename to cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v3/quotas/spaces/ReactorSpaceQuotasV3.java index efbcc82676..93e8182a00 100644 --- a/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v3/spacequotas/ReactorSpaceQuotasV3.java +++ b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v3/quotas/spaces/ReactorSpaceQuotasV3.java @@ -14,11 +14,10 @@ * limitations under the License. */ -package org.cloudfoundry.reactor.client.v3.spacequotas; +package org.cloudfoundry.reactor.client.v3.quotas.spaces; import java.util.Map; -import org.cloudfoundry.client.v3.spacequotas.*; -import org.cloudfoundry.client.v3.spacequotas.CreateSpaceQuotaResponse; +import org.cloudfoundry.client.v3.quotas.spaces.*; import org.cloudfoundry.reactor.ConnectionContext; import org.cloudfoundry.reactor.TokenProvider; import org.cloudfoundry.reactor.client.v3.AbstractClientV3Operations; diff --git a/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v3/organizationquotadefinitions/ReactorOrganizationQuotaDefinitionsV3Test.java b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v3/quotas/organizations/ReactorOrganizationQuotasV3Test.java similarity index 69% rename from cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v3/organizationquotadefinitions/ReactorOrganizationQuotaDefinitionsV3Test.java rename to cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v3/quotas/organizations/ReactorOrganizationQuotasV3Test.java index 60cd7eebdb..9d2485153e 100644 --- a/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v3/organizationquotadefinitions/ReactorOrganizationQuotaDefinitionsV3Test.java +++ b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v3/quotas/organizations/ReactorOrganizationQuotasV3Test.java @@ -14,12 +14,9 @@ * limitations under the License. */ -package org.cloudfoundry.reactor.client.v3.organizationquotadefinitions; +package org.cloudfoundry.reactor.client.v3.quotas.organizations; -import static io.netty.handler.codec.http.HttpMethod.DELETE; -import static io.netty.handler.codec.http.HttpMethod.GET; -import static io.netty.handler.codec.http.HttpMethod.PATCH; -import static io.netty.handler.codec.http.HttpMethod.POST; +import static io.netty.handler.codec.http.HttpMethod.*; import static io.netty.handler.codec.http.HttpResponseStatus.ACCEPTED; import static io.netty.handler.codec.http.HttpResponseStatus.OK; @@ -29,21 +26,8 @@ import org.cloudfoundry.client.v3.Pagination; import org.cloudfoundry.client.v3.Relationship; import org.cloudfoundry.client.v3.ToManyRelationship; -import org.cloudfoundry.client.v3.organizationquotadefinitions.Apps; -import org.cloudfoundry.client.v3.organizationquotadefinitions.CreateOrganizationQuotaDefinitionRequest; -import org.cloudfoundry.client.v3.organizationquotadefinitions.CreateOrganizationQuotaDefinitionResponse; -import org.cloudfoundry.client.v3.organizationquotadefinitions.DeleteOrganizationQuotaDefinitionRequest; -import org.cloudfoundry.client.v3.organizationquotadefinitions.Domains; -import org.cloudfoundry.client.v3.organizationquotadefinitions.GetOrganizationQuotaDefinitionRequest; -import org.cloudfoundry.client.v3.organizationquotadefinitions.GetOrganizationQuotaDefinitionResponse; -import org.cloudfoundry.client.v3.organizationquotadefinitions.ListOrganizationQuotaDefinitionsRequest; -import org.cloudfoundry.client.v3.organizationquotadefinitions.ListOrganizationQuotaDefinitionsResponse; -import org.cloudfoundry.client.v3.organizationquotadefinitions.OrganizationQuotaDefinitionRelationships; -import org.cloudfoundry.client.v3.organizationquotadefinitions.OrganizationQuotaDefinitionResource; -import org.cloudfoundry.client.v3.organizationquotadefinitions.Routes; -import org.cloudfoundry.client.v3.organizationquotadefinitions.Services; -import org.cloudfoundry.client.v3.organizationquotadefinitions.UpdateOrganizationQuotaDefinitionRequest; -import org.cloudfoundry.client.v3.organizationquotadefinitions.UpdateOrganizationQuotaDefinitionResponse; +import org.cloudfoundry.client.v3.quotas.*; +import org.cloudfoundry.client.v3.quotas.organizations.*; import org.cloudfoundry.reactor.InteractionContext; import org.cloudfoundry.reactor.TestRequest; import org.cloudfoundry.reactor.TestResponse; @@ -52,10 +36,10 @@ import org.junit.jupiter.api.Test; import reactor.test.StepVerifier; -class ReactorOrganizationQuotaDefinitionsV3Test extends AbstractClientApiTest { +class ReactorOrganizationQuotasV3Test extends AbstractClientApiTest { - private final ReactorOrganizationQuotaDefinitionsV3 organizationQuotaDefinitionsV3 = - new ReactorOrganizationQuotaDefinitionsV3( + private final ReactorOrganizationQuotasV3 organizationQuotasV3 = + new ReactorOrganizationQuotasV3( CONNECTION_CONTEXT, this.root, TOKEN_PROVIDER, Collections.emptyMap()); @Test @@ -77,12 +61,12 @@ void create() { .build()) .build()); - this.organizationQuotaDefinitionsV3 - .create(CreateOrganizationQuotaDefinitionRequest.builder().name("my-quota").build()) + this.organizationQuotasV3 + .create(CreateOrganizationQuotaRequest.builder().name("my-quota").build()) .as(StepVerifier::create) .expectNext( - CreateOrganizationQuotaDefinitionResponse.builder() - .from(expectedOrganizationQuotaDefinitionResource1()) + CreateOrganizationQuotaResponse.builder() + .from(expectedOrganizationQuotaResource1()) .build()) .expectComplete() .verify(Duration.ofSeconds(5)); @@ -106,10 +90,10 @@ void delete() { .build()) .build()); - this.organizationQuotaDefinitionsV3 + this.organizationQuotasV3 .delete( - DeleteOrganizationQuotaDefinitionRequest.builder() - .organizationQuotaDefinitionId("test-organization-quota-id") + DeleteOrganizationQuotaRequest.builder() + .organizationQuotaId("test-organization-quota-id") .build()) .as(StepVerifier::create) .expectNext("test-job-id") @@ -135,16 +119,15 @@ void get() { .build()) .build()); - this.organizationQuotaDefinitionsV3 + this.organizationQuotasV3 .get( - GetOrganizationQuotaDefinitionRequest.builder() - .organizationQuotaDefinitionId( - "24637893-3b77-489d-bb79-8466f0d88b52") + GetOrganizationQuotaRequest.builder() + .organizationQuotaId("24637893-3b77-489d-bb79-8466f0d88b52") .build()) .as(StepVerifier::create) .expectNext( - GetOrganizationQuotaDefinitionResponse.builder() - .from(expectedOrganizationQuotaDefinitionResource1()) + GetOrganizationQuotaResponse.builder() + .from(expectedOrganizationQuotaResource1()) .build()) .expectComplete() .verify(Duration.ofSeconds(5)); @@ -167,11 +150,11 @@ void list() { .build()) .build()); - this.organizationQuotaDefinitionsV3 - .list(ListOrganizationQuotaDefinitionsRequest.builder().build()) + this.organizationQuotasV3 + .list(ListOrganizationQuotasRequest.builder().build()) .as(StepVerifier::create) .expectNext( - ListOrganizationQuotaDefinitionsResponse.builder() + ListOrganizationQuotasResponse.builder() .pagination( Pagination.builder() .totalResults(2) @@ -188,14 +171,12 @@ void list() { .build()) .build()) .resource( - OrganizationQuotaDefinitionResource.builder() - .from( - expectedOrganizationQuotaDefinitionResource1()) + OrganizationQuotaResource.builder() + .from(expectedOrganizationQuotaResource1()) .build()) .resource( - OrganizationQuotaDefinitionResource.builder() - .from( - expectedOrganizationQuotaDefinitionResource2()) + OrganizationQuotaResource.builder() + .from(expectedOrganizationQuotaResource2()) .build()) .build()) .expectComplete() @@ -222,40 +203,37 @@ void update() { .build()) .build()); - this.organizationQuotaDefinitionsV3 + this.organizationQuotasV3 .update( - UpdateOrganizationQuotaDefinitionRequest.builder() - .organizationQuotaDefinitionId( - "24637893-3b77-489d-bb79-8466f0d88b52") + UpdateOrganizationQuotaRequest.builder() + .organizationQuotaId("24637893-3b77-489d-bb79-8466f0d88b52") .build()) .as(StepVerifier::create) .expectNext( - UpdateOrganizationQuotaDefinitionResponse.builder() - .from(expectedOrganizationQuotaDefinitionResource1()) + UpdateOrganizationQuotaResponse.builder() + .from(expectedOrganizationQuotaResource1()) .build()) .expectComplete() .verify(Duration.ofSeconds(5)); } @NotNull - private static OrganizationQuotaDefinitionResource - expectedOrganizationQuotaDefinitionResource1() { - return buildOrganizationQuotaDefinitionResource( + private static OrganizationQuotaResource expectedOrganizationQuotaResource1() { + return buildOrganizationQuotaResource( "24637893-3b77-489d-bb79-8466f0d88b52", "my-quota", "9b370018-c38e-44c9-86d6-155c76801104"); } - private static OrganizationQuotaDefinitionResource - expectedOrganizationQuotaDefinitionResource2() { - return buildOrganizationQuotaDefinitionResource( + private static OrganizationQuotaResource expectedOrganizationQuotaResource2() { + return buildOrganizationQuotaResource( "bb49bf20-ad98-4729-93ae-38fbc564b630", "my-quota-2", "144251f2-a202-4ffe-ab47-9046c4077e99"); } @NotNull - private static OrganizationQuotaDefinitionResource buildOrganizationQuotaDefinitionResource( + private static OrganizationQuotaResource buildOrganizationQuotaResource( String id, String name, String relatedOrganizationId) { Apps apps = @@ -280,12 +258,12 @@ private static OrganizationQuotaDefinitionResource buildOrganizationQuotaDefinit Collections.singletonList( Relationship.builder().id(relatedOrganizationId).build())) .build(); - OrganizationQuotaDefinitionRelationships relationships = - OrganizationQuotaDefinitionRelationships.builder() + OrganizationQuotaRelationships relationships = + OrganizationQuotaRelationships.builder() .organizations(organizationRelationships) .build(); - return OrganizationQuotaDefinitionResource.builder() + return OrganizationQuotaResource.builder() .createdAt("2016-05-04T17:00:41Z") .id(id) .link( diff --git a/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v3/spacequotas/ReactorSpaceQuotasV3Test.java b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v3/quotas/spaces/ReactorSpaceQuotasV3Test.java similarity index 98% rename from cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v3/spacequotas/ReactorSpaceQuotasV3Test.java rename to cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v3/quotas/spaces/ReactorSpaceQuotasV3Test.java index 957f8a21bd..34231e9426 100644 --- a/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v3/spacequotas/ReactorSpaceQuotasV3Test.java +++ b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v3/quotas/spaces/ReactorSpaceQuotasV3Test.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.cloudfoundry.reactor.client.v3.spacequotas; +package org.cloudfoundry.reactor.client.v3.quotas.spaces; import static io.netty.handler.codec.http.HttpMethod.DELETE; import static io.netty.handler.codec.http.HttpMethod.GET; @@ -30,8 +30,8 @@ import org.cloudfoundry.client.v3.Relationship; import org.cloudfoundry.client.v3.ToManyRelationship; import org.cloudfoundry.client.v3.ToOneRelationship; -import org.cloudfoundry.client.v3.spacequotas.*; -import org.cloudfoundry.client.v3.spacequotas.SpaceQuotaResource; +import org.cloudfoundry.client.v3.quotas.*; +import org.cloudfoundry.client.v3.quotas.spaces.*; import org.cloudfoundry.reactor.InteractionContext; import org.cloudfoundry.reactor.TestRequest; import org.cloudfoundry.reactor.TestResponse; diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/CloudFoundryClient.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/CloudFoundryClient.java index d7b9b7612f..bfd4f1bd2a 100644 --- a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/CloudFoundryClient.java +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/CloudFoundryClient.java @@ -57,10 +57,11 @@ import org.cloudfoundry.client.v3.droplets.Droplets; import org.cloudfoundry.client.v3.isolationsegments.IsolationSegments; import org.cloudfoundry.client.v3.jobs.JobsV3; -import org.cloudfoundry.client.v3.organizationquotadefinitions.OrganizationQuotaDefinitionsV3; import org.cloudfoundry.client.v3.organizations.OrganizationsV3; import org.cloudfoundry.client.v3.packages.Packages; import org.cloudfoundry.client.v3.processes.Processes; +import org.cloudfoundry.client.v3.quotas.organizations.OrganizationQuotasV3; +import org.cloudfoundry.client.v3.quotas.spaces.SpaceQuotasV3; import org.cloudfoundry.client.v3.resourcematch.ResourceMatchV3; import org.cloudfoundry.client.v3.roles.RolesV3; import org.cloudfoundry.client.v3.routes.RoutesV3; @@ -70,7 +71,6 @@ import org.cloudfoundry.client.v3.serviceinstances.ServiceInstancesV3; import org.cloudfoundry.client.v3.serviceofferings.ServiceOfferingsV3; import org.cloudfoundry.client.v3.serviceplans.ServicePlansV3; -import org.cloudfoundry.client.v3.spacequotas.SpaceQuotasV3; import org.cloudfoundry.client.v3.spaces.SpacesV3; import org.cloudfoundry.client.v3.stacks.StacksV3; import org.cloudfoundry.client.v3.tasks.Tasks; @@ -191,9 +191,9 @@ public interface CloudFoundryClient { OrganizationQuotaDefinitions organizationQuotaDefinitions(); /** - * Main entry point to the Cloud Foundry Quota Definitions V3 Client API + * Main entry point to the Cloud Foundry Quota V3 Client API */ - OrganizationQuotaDefinitionsV3 organizationQuotaDefinitionsV3(); + OrganizationQuotasV3 organizationQuotasV3(); /** * Main entry point to the Cloud Foundry Organizations V2 Client API diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/organizationquotadefinitions/_Apps.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/organizationquotadefinitions/_Apps.java deleted file mode 100644 index e9ca31725e..0000000000 --- a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/organizationquotadefinitions/_Apps.java +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Copyright 2013-2025 the original author or 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 - * - * http://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. - */ - -package org.cloudfoundry.client.v3.organizationquotadefinitions; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import org.cloudfoundry.Nullable; -import org.immutables.value.Value; - -/** - * Quotas that affect applications and application sub-resources - */ -@JsonDeserialize -@Value.Immutable -abstract class _Apps { - - /** - * Maximum memory for a single process or task - */ - @JsonProperty("per_process_memory_in_mb") - @Nullable - abstract Integer getPerProcessMemoryInMb(); - - /** - * Total memory allowed for all the started processes and running tasks in an organization - */ - @JsonProperty("total_memory_in_mb") - @Nullable - abstract Integer getTotalMemoryInMb(); - - /** - * Total instances of all the started processes allowed in an organization - */ - @JsonProperty("total_instances") - @Nullable - abstract Integer getTotalInstances(); - - /** - * Total log rate limit allowed for all the started processes and running tasks in an organization - */ - @JsonProperty("log_rate_limit_in_bytes_per_second") - @Nullable - abstract Integer getLogRateLimitInBytesPerSecond(); - - /** - * Maximum number of running tasks in an organization - */ - @JsonProperty("per_app_tasks") - @Nullable - abstract Integer getPerAppTasks(); - -} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/organizationquotadefinitions/_Routes.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/organizationquotadefinitions/_Routes.java deleted file mode 100644 index 9ca4398379..0000000000 --- a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/organizationquotadefinitions/_Routes.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright 2013-2025 the original author or 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 - * - * http://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. - */ - -package org.cloudfoundry.client.v3.organizationquotadefinitions; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import org.cloudfoundry.Nullable; -import org.immutables.value.Value; - -/** - * Quotas that affect routes - */ -@JsonDeserialize -@Value.Immutable -abstract class _Routes { - - /** - * Total number of routes allowed in an organization - * - * @return the total number of routes allowed in an organization - */ - @JsonProperty("total_routes") - @Nullable - abstract Integer getTotalRoutes(); - - /** - * Total number of ports that are reservable by routes in an organization - * - * @return the total number of reserved ports allowed in an organization - */ - @JsonProperty("total_reserved_ports") - @Nullable - abstract Integer getTotalReservedPorts(); - -} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/organizationquotadefinitions/_Services.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/organizationquotadefinitions/_Services.java deleted file mode 100644 index 2e7e96cb13..0000000000 --- a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/organizationquotadefinitions/_Services.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright 2013-2025 the original author or 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 - * - * http://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. - */ - -package org.cloudfoundry.client.v3.organizationquotadefinitions; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import org.cloudfoundry.Nullable; -import org.immutables.value.Value; - -/** - * Quotas that affect services - */ -@JsonDeserialize -@Value.Immutable -abstract class _Services { - - /** - * Specifies whether instances of paid service plans can be created - * @return true if instances of paid service plans can be created, false otherwise - */ - @JsonProperty("paid_services_allowed") - abstract boolean isPaidServicesAllowed(); - - /** - * Total number of service instances allowed in an organization - * @return the total number of service instances allowed in an organization - */ - @JsonProperty("total_service_instances") - @Nullable - abstract Integer getTotalServiceInstances(); - - /** - * Total number of service keys allowed in an organization - * @return the total number of service keys allowed in an organization - */ - @JsonProperty("total_service_keys") - @Nullable - abstract Integer getTotalServiceKeys(); -} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/spacequotas/_Apps.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/_Apps.java similarity index 84% rename from cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/spacequotas/_Apps.java rename to cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/_Apps.java index 0b61bd3df8..d25b705ccd 100644 --- a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/spacequotas/_Apps.java +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/_Apps.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.cloudfoundry.client.v3.spacequotas; +package org.cloudfoundry.client.v3.quotas; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; @@ -37,34 +37,34 @@ abstract class _Apps { abstract Integer getPerProcessMemoryInMb(); /** - * Total memory allowed for all the started processes and running tasks in a space - * @return the total memory allowed for all the started processes and running tasks in a space + * Total memory allowed for all the started processes and running tasks + * @return the total memory allowed for all the started processes and running tasks */ @JsonProperty("total_memory_in_mb") @Nullable abstract Integer getTotalMemoryInMb(); /** - * Total instances of all the started processes allowed in a space - * @return the total instances of all the started processes allowed in a space + * Total instances of all the started processes allowed + * @return the total instances of all the started processes allowed */ @JsonProperty("total_instances") @Nullable abstract Integer getTotalInstances(); /** - * Total log rate limit allowed for all the started processes and running tasks in a space + * Total log rate limit allowed for all the started processes and running tasks + * @return the total log rate limit allowed for all the started processes and running tasks */ @JsonProperty("log_rate_limit_in_bytes_per_second") @Nullable abstract Integer getLogRateLimitInBytesPerSecond(); /** - * Maximum number of running tasks in a space - * @return the maximum number of running tasks in a space + * Maximum number of running tasks + * @return the maximum number of running tasks */ @JsonProperty("per_app_tasks") @Nullable abstract Integer getPerAppTasks(); - -} +} \ No newline at end of file diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/spacequotas/_Routes.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/_Routes.java similarity index 79% rename from cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/spacequotas/_Routes.java rename to cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/_Routes.java index 03451f2d18..14f1d38eb1 100644 --- a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/spacequotas/_Routes.java +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/_Routes.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.cloudfoundry.client.v3.spacequotas; +package org.cloudfoundry.client.v3.quotas; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; @@ -29,18 +29,18 @@ abstract class _Routes { /** - * Total number of routes allowed in a space + * Total number of routes allowed * - * @return the total number of routes allowed in a space + * @return the total number of routes allowed */ @JsonProperty("total_routes") @Nullable abstract Integer getTotalRoutes(); /** - * Total number of ports that are reservable by routes in a space + * Total number of ports that are reservable by routes * - * @return the total number of reserved ports allowed in a space + * @return the total number of reserved ports allowed */ @JsonProperty("total_reserved_ports") @Nullable diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/spacequotas/_Services.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/_Services.java similarity index 82% rename from cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/spacequotas/_Services.java rename to cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/_Services.java index 311e51b86a..7ec674a4ca 100644 --- a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/spacequotas/_Services.java +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/_Services.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.cloudfoundry.client.v3.spacequotas; +package org.cloudfoundry.client.v3.quotas; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; @@ -36,16 +36,16 @@ abstract class _Services { abstract boolean isPaidServicesAllowed(); /** - * Total number of service instances allowed in a space - * @return the total number of service instances allowed in a space + * Total number of service instances allowed + * @return the total number of service instances allowed */ @JsonProperty("total_service_instances") @Nullable abstract Integer getTotalServiceInstances(); /** - * Total number of service keys allowed in a space - * @return the total number of service keys allowed in a space + * Total number of service keys allowed + * @return the total number of service keys allowed */ @JsonProperty("total_service_keys") @Nullable diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/organizationquotadefinitions/OrganizationQuotaDefinition.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/organizations/OrganizationQuota.java similarity index 83% rename from cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/organizationquotadefinitions/OrganizationQuotaDefinition.java rename to cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/organizations/OrganizationQuota.java index ca295d7e9f..a7afd76366 100644 --- a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/organizationquotadefinitions/OrganizationQuotaDefinition.java +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/organizations/OrganizationQuota.java @@ -14,16 +14,19 @@ * limitations under the License. */ -package org.cloudfoundry.client.v3.organizationquotadefinitions; +package org.cloudfoundry.client.v3.quotas.organizations; import com.fasterxml.jackson.annotation.JsonProperty; import org.cloudfoundry.Nullable; import org.cloudfoundry.client.v3.Resource; +import org.cloudfoundry.client.v3.quotas.Apps; +import org.cloudfoundry.client.v3.quotas.Routes; +import org.cloudfoundry.client.v3.quotas.Services; /** * Base class for responses that are organization quota definitions */ -public abstract class OrganizationQuotaDefinition extends Resource { +public abstract class OrganizationQuota extends Resource { /** * Name of the quota @@ -64,5 +67,5 @@ public abstract class OrganizationQuotaDefinition extends Resource { */ @JsonProperty("relationships") @Nullable - abstract OrganizationQuotaDefinitionRelationships getRelationships(); + abstract OrganizationQuotaRelationships getRelationships(); } diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/organizationquotadefinitions/OrganizationQuotaDefinitionsV3.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/organizations/OrganizationQuotasV3.java similarity index 50% rename from cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/organizationquotadefinitions/OrganizationQuotaDefinitionsV3.java rename to cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/organizations/OrganizationQuotasV3.java index 6a8b3eef51..cb6f9a4223 100644 --- a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/organizationquotadefinitions/OrganizationQuotaDefinitionsV3.java +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/organizations/OrganizationQuotasV3.java @@ -14,59 +14,56 @@ * limitations under the License. */ -package org.cloudfoundry.client.v3.organizationquotadefinitions; +package org.cloudfoundry.client.v3.quotas.organizations; import reactor.core.publisher.Mono; /** - * Main entry point to the Cloud Foundry Organization Quota Definitions Client API + * Main entry point to the Cloud Foundry Organization Quota Client API */ -public interface OrganizationQuotaDefinitionsV3 { +public interface OrganizationQuotasV3 { /** - * Makes the Create Organization Quota Definition + * Makes the Create Organization Quota * request * - * @param request the Create Organization Quota Definition request - * @return the response from the Create Organization Quota Definition request + * @param request the Create Organization Quota request + * @return the response from the Create Organization Quota request */ - Mono create( - CreateOrganizationQuotaDefinitionRequest request); + Mono create(CreateOrganizationQuotaRequest request); /** - * Makes the Get Organization Quota Definition + * Makes the Get Organization Quota * request * - * @param request the Get Organization Quota Definition request - * @return the response from the Get Organization Quota Definition request + * @param request the Get Organization Quota request + * @return the response from the Get Organization Quota request */ - Mono get(GetOrganizationQuotaDefinitionRequest request); + Mono get(GetOrganizationQuotaRequest request); /** - * Makes the List all Organization Quota Definitions + * Makes the List all Organization Quota s * request * - * @param request the List all Organization Quota Definitions request - * @return the response from the List all Organization Quota Definitions request + * @param request the List all Organization Quotas request + * @return the response from the List all Organization Quotas request */ - Mono list( - ListOrganizationQuotaDefinitionsRequest request); + Mono list(ListOrganizationQuotasRequest request); - /** Makes the Update Organization Quota Definition + /** Makes the Update Organization Quota * request * - * @param request the Update Organization Quota Definition request - * @return the response from the Update Organization Quota Definition request + * @param request the Update Organization Quota request + * @return the response from the Update Organization Quota request */ - Mono update( - UpdateOrganizationQuotaDefinitionRequest request); + Mono update(UpdateOrganizationQuotaRequest request); /** - * Makes the Delete Organization Quota Definition + * Makes the Delete Organization Quota * request * - * @param request the Delete Organization Quota Definition request - * @return the response from the Delete Organization Quota Definition request + * @param request the Delete Organization Quota request + * @return the response from the Delete Organization Quota request */ - Mono delete(DeleteOrganizationQuotaDefinitionRequest request); + Mono delete(DeleteOrganizationQuotaRequest request); } diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/organizationquotadefinitions/_CreateOrganizationQuotaDefinitionRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/organizations/_CreateOrganizationQuotaRequest.java similarity index 81% rename from cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/organizationquotadefinitions/_CreateOrganizationQuotaDefinitionRequest.java rename to cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/organizations/_CreateOrganizationQuotaRequest.java index 401a3e3cb2..5f3477153c 100644 --- a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/organizationquotadefinitions/_CreateOrganizationQuotaDefinitionRequest.java +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/organizations/_CreateOrganizationQuotaRequest.java @@ -14,19 +14,22 @@ * limitations under the License. */ -package org.cloudfoundry.client.v3.organizationquotadefinitions; +package org.cloudfoundry.client.v3.quotas.organizations; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.databind.annotation.JsonSerialize; import org.cloudfoundry.Nullable; +import org.cloudfoundry.client.v3.quotas.Apps; +import org.cloudfoundry.client.v3.quotas.Routes; +import org.cloudfoundry.client.v3.quotas.Services; import org.immutables.value.Value; /** - * The request payload to creates a new organization quota + * The request payload to create a new Organization Quota */ @JsonSerialize @Value.Immutable -abstract class _CreateOrganizationQuotaDefinitionRequest { +abstract class _CreateOrganizationQuotaRequest { /** * Name of the quota @@ -67,6 +70,6 @@ abstract class _CreateOrganizationQuotaDefinitionRequest { */ @JsonProperty("relationships") @Nullable - abstract OrganizationQuotaDefinitionRelationships getRelationships(); + abstract OrganizationQuotaRelationships getRelationships(); } diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/organizationquotadefinitions/_CreateOrganizationQuotaDefinitionResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/organizations/_CreateOrganizationQuotaResponse.java similarity index 76% rename from cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/organizationquotadefinitions/_CreateOrganizationQuotaDefinitionResponse.java rename to cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/organizations/_CreateOrganizationQuotaResponse.java index 65eb015f87..8dc16b1971 100644 --- a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/organizationquotadefinitions/_CreateOrganizationQuotaDefinitionResponse.java +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/organizations/_CreateOrganizationQuotaResponse.java @@ -14,16 +14,16 @@ * limitations under the License. */ -package org.cloudfoundry.client.v3.organizationquotadefinitions; +package org.cloudfoundry.client.v3.quotas.organizations; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import org.immutables.value.Value; /** - * The response payload for the Create an Organization Quota Definition operation + * The response payload for the Create an Organization Quota */ @JsonDeserialize @Value.Immutable -abstract class _CreateOrganizationQuotaDefinitionResponse extends OrganizationQuotaDefinition { +abstract class _CreateOrganizationQuotaResponse extends OrganizationQuota { } diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/organizationquotadefinitions/_DeleteOrganizationQuotaDefinitionRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/organizations/_DeleteOrganizationQuotaRequest.java similarity index 72% rename from cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/organizationquotadefinitions/_DeleteOrganizationQuotaDefinitionRequest.java rename to cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/organizations/_DeleteOrganizationQuotaRequest.java index d1ce45f83e..4e0b746d0a 100644 --- a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/organizationquotadefinitions/_DeleteOrganizationQuotaDefinitionRequest.java +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/organizations/_DeleteOrganizationQuotaRequest.java @@ -14,21 +14,21 @@ * limitations under the License. */ -package org.cloudfoundry.client.v3.organizationquotadefinitions; +package org.cloudfoundry.client.v3.quotas.organizations; import com.fasterxml.jackson.annotation.JsonIgnore; import org.immutables.value.Value; /** - * The request payload for the Delete an Organization Quota Definition operation + * The request payload for the Delete an Organization Quota */ @Value.Immutable -abstract class _DeleteOrganizationQuotaDefinitionRequest { +abstract class _DeleteOrganizationQuotaRequest { /** - * The quota definition id + * The Organization Quota id */ @JsonIgnore - abstract String getOrganizationQuotaDefinitionId(); + abstract String getOrganizationQuotaId(); } diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/organizationquotadefinitions/_Domains.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/organizations/_Domains.java similarity index 94% rename from cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/organizationquotadefinitions/_Domains.java rename to cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/organizations/_Domains.java index 10e2f217bc..a6aec9d18c 100644 --- a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/organizationquotadefinitions/_Domains.java +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/organizations/_Domains.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.cloudfoundry.client.v3.organizationquotadefinitions; +package org.cloudfoundry.client.v3.quotas.organizations; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/organizationquotadefinitions/_GetOrganizationQuotaDefinitionRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/organizations/_GetOrganizationQuotaRequest.java similarity index 77% rename from cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/organizationquotadefinitions/_GetOrganizationQuotaDefinitionRequest.java rename to cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/organizations/_GetOrganizationQuotaRequest.java index 92bd4dee5b..91cbb7b66d 100644 --- a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/organizationquotadefinitions/_GetOrganizationQuotaDefinitionRequest.java +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/organizations/_GetOrganizationQuotaRequest.java @@ -14,21 +14,21 @@ * limitations under the License. */ -package org.cloudfoundry.client.v3.organizationquotadefinitions; +package org.cloudfoundry.client.v3.quotas.organizations; import com.fasterxml.jackson.annotation.JsonIgnore; import org.immutables.value.Value; /** - * The request payload for the Retrieve a Particular Organization Quota Definition operation + * The request payload for the Retrieve a Particular Organization Quota */ @Value.Immutable -abstract class _GetOrganizationQuotaDefinitionRequest { +abstract class _GetOrganizationQuotaRequest { /** - * The quota definition id + * The Organization Quota id */ @JsonIgnore - abstract String getOrganizationQuotaDefinitionId(); + abstract String getOrganizationQuotaId(); } diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/organizationquotadefinitions/_GetOrganizationQuotaDefinitionResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/organizations/_GetOrganizationQuotaResponse.java similarity index 81% rename from cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/organizationquotadefinitions/_GetOrganizationQuotaDefinitionResponse.java rename to cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/organizations/_GetOrganizationQuotaResponse.java index c98b39ecb2..d25fb070e2 100644 --- a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/organizationquotadefinitions/_GetOrganizationQuotaDefinitionResponse.java +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/organizations/_GetOrganizationQuotaResponse.java @@ -14,16 +14,16 @@ * limitations under the License. */ -package org.cloudfoundry.client.v3.organizationquotadefinitions; +package org.cloudfoundry.client.v3.quotas.organizations; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import org.immutables.value.Value; /** - * The response payload for the Retrieve a Particular Organization Quota Definition operation + * The response payload for the Retrieve a Particular Organization Quota */ @JsonDeserialize @Value.Immutable -abstract class _GetOrganizationQuotaDefinitionResponse extends OrganizationQuotaDefinition { +abstract class _GetOrganizationQuotaResponse extends OrganizationQuota { } diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/organizationquotadefinitions/_ListOrganizationQuotaDefinitionsRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/organizations/_ListOrganizationQuotasRequest.java similarity index 85% rename from cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/organizationquotadefinitions/_ListOrganizationQuotaDefinitionsRequest.java rename to cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/organizations/_ListOrganizationQuotasRequest.java index d5102ed43a..2073657f18 100644 --- a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/organizationquotadefinitions/_ListOrganizationQuotaDefinitionsRequest.java +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/organizations/_ListOrganizationQuotasRequest.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.cloudfoundry.client.v3.organizationquotadefinitions; +package org.cloudfoundry.client.v3.quotas.organizations; import org.cloudfoundry.Nullable; import org.cloudfoundry.client.v3.FilterParameter; @@ -24,10 +24,10 @@ import java.util.List; /** - * The request payload for the List all Organization Quota Definitions operation + * The request payload for the List all Organization Quota */ @Value.Immutable -abstract class _ListOrganizationQuotaDefinitionsRequest extends PaginatedRequest { +abstract class _ListOrganizationQuotasRequest extends PaginatedRequest { /** * list of organization quota guids to filter by diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/organizationquotadefinitions/_ListOrganizationQuotaDefinitionsResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/organizations/_ListOrganizationQuotasResponse.java similarity index 75% rename from cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/organizationquotadefinitions/_ListOrganizationQuotaDefinitionsResponse.java rename to cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/organizations/_ListOrganizationQuotasResponse.java index 504b93fff8..a0e6c28d51 100644 --- a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/organizationquotadefinitions/_ListOrganizationQuotaDefinitionsResponse.java +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/organizations/_ListOrganizationQuotasResponse.java @@ -14,17 +14,17 @@ * limitations under the License. */ -package org.cloudfoundry.client.v3.organizationquotadefinitions; +package org.cloudfoundry.client.v3.quotas.organizations; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import org.cloudfoundry.client.v3.PaginatedResponse; import org.immutables.value.Value; /** - * The response payload for the List all Organization Quota Definitions operation + * The response payload for the List all Organization Quota */ @JsonDeserialize @Value.Immutable -abstract class _ListOrganizationQuotaDefinitionsResponse extends PaginatedResponse { +abstract class _ListOrganizationQuotasResponse extends PaginatedResponse { } diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/organizationquotadefinitions/_OrganizationQuotaDefinitionRelationships.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/organizations/_OrganizationQuotaRelationships.java similarity index 84% rename from cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/organizationquotadefinitions/_OrganizationQuotaDefinitionRelationships.java rename to cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/organizations/_OrganizationQuotaRelationships.java index 4e677758c1..e5bdc07228 100644 --- a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/organizationquotadefinitions/_OrganizationQuotaDefinitionRelationships.java +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/organizations/_OrganizationQuotaRelationships.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.cloudfoundry.client.v3.organizationquotadefinitions; +package org.cloudfoundry.client.v3.quotas.organizations; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; @@ -23,12 +23,12 @@ import org.immutables.value.Value; /** - * The relationships for the OrganizationQuotaDefinition entity + * The relationships for the Organization Quota entity */ @Value.Immutable @JsonDeserialize -abstract class _OrganizationQuotaDefinitionRelationships { +abstract class _OrganizationQuotaRelationships { /** * The quota relationship diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/organizationquotadefinitions/_OrganizationQuotaDefinitionResource.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/organizations/_OrganizationQuotaResource.java similarity index 77% rename from cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/organizationquotadefinitions/_OrganizationQuotaDefinitionResource.java rename to cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/organizations/_OrganizationQuotaResource.java index edebd290e8..2455745a5c 100644 --- a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/organizationquotadefinitions/_OrganizationQuotaDefinitionResource.java +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/organizations/_OrganizationQuotaResource.java @@ -14,17 +14,17 @@ * limitations under the License. */ -package org.cloudfoundry.client.v3.organizationquotadefinitions; +package org.cloudfoundry.client.v3.quotas.organizations; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import org.immutables.value.Value; /** - * Base class for resources that contain Organization Quota Definitions + * Base class for resources that contain Organization Quota */ @JsonDeserialize @Value.Immutable -abstract class _OrganizationQuotaDefinitionResource extends OrganizationQuotaDefinition { +abstract class _OrganizationQuotaResource extends OrganizationQuota { } diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/organizationquotadefinitions/_UpdateOrganizationQuotaDefinitionRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/organizations/_UpdateOrganizationQuotaRequest.java similarity index 80% rename from cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/organizationquotadefinitions/_UpdateOrganizationQuotaDefinitionRequest.java rename to cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/organizations/_UpdateOrganizationQuotaRequest.java index ed9f950cb0..2c7f97b708 100644 --- a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/organizationquotadefinitions/_UpdateOrganizationQuotaDefinitionRequest.java +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/organizations/_UpdateOrganizationQuotaRequest.java @@ -14,26 +14,29 @@ * limitations under the License. */ -package org.cloudfoundry.client.v3.organizationquotadefinitions; +package org.cloudfoundry.client.v3.quotas.organizations; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.databind.annotation.JsonSerialize; import org.cloudfoundry.Nullable; +import org.cloudfoundry.client.v3.quotas.Apps; +import org.cloudfoundry.client.v3.quotas.Routes; +import org.cloudfoundry.client.v3.quotas.Services; import org.immutables.value.Value; /** - * The request payload to update an organization quota + * The request payload to update an Organization Quota */ @JsonSerialize @Value.Immutable -abstract class _UpdateOrganizationQuotaDefinitionRequest { +abstract class _UpdateOrganizationQuotaRequest { /** - * The quota definition id + * The Organization Quota id */ @JsonIgnore - abstract String getOrganizationQuotaDefinitionId(); + abstract String getOrganizationQuotaId(); /** * Name of the quota diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/organizationquotadefinitions/_UpdateOrganizationQuotaDefinitionResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/organizations/_UpdateOrganizationQuotaResponse.java similarity index 76% rename from cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/organizationquotadefinitions/_UpdateOrganizationQuotaDefinitionResponse.java rename to cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/organizations/_UpdateOrganizationQuotaResponse.java index 0bb4f02ed7..78b4f1bfb3 100644 --- a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/organizationquotadefinitions/_UpdateOrganizationQuotaDefinitionResponse.java +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/organizations/_UpdateOrganizationQuotaResponse.java @@ -14,16 +14,16 @@ * limitations under the License. */ -package org.cloudfoundry.client.v3.organizationquotadefinitions; +package org.cloudfoundry.client.v3.quotas.organizations; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import org.immutables.value.Value; /** - * The response payload for the Update an Organization Quota Definition operation + * The response payload for the Update an Organization Quota */ @JsonDeserialize @Value.Immutable -abstract class _UpdateOrganizationQuotaDefinitionResponse extends OrganizationQuotaDefinition { +abstract class _UpdateOrganizationQuotaResponse extends OrganizationQuota { } diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/spacequotas/SpaceQuota.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/spaces/SpaceQuota.java similarity index 89% rename from cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/spacequotas/SpaceQuota.java rename to cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/spaces/SpaceQuota.java index 4125369e1f..e73e2ca272 100644 --- a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/spacequotas/SpaceQuota.java +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/spaces/SpaceQuota.java @@ -14,11 +14,14 @@ * limitations under the License. */ -package org.cloudfoundry.client.v3.spacequotas; +package org.cloudfoundry.client.v3.quotas.spaces; import com.fasterxml.jackson.annotation.JsonProperty; import org.cloudfoundry.Nullable; import org.cloudfoundry.client.v3.Resource; +import org.cloudfoundry.client.v3.quotas.Apps; +import org.cloudfoundry.client.v3.quotas.Routes; +import org.cloudfoundry.client.v3.quotas.Services; /** * Base class for responses that are Space Quotas diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/spacequotas/SpaceQuotasV3.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/spaces/SpaceQuotasV3.java similarity index 98% rename from cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/spacequotas/SpaceQuotasV3.java rename to cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/spaces/SpaceQuotasV3.java index 8d0ebe48b9..cf34330e8c 100644 --- a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/spacequotas/SpaceQuotasV3.java +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/spaces/SpaceQuotasV3.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.cloudfoundry.client.v3.spacequotas; +package org.cloudfoundry.client.v3.quotas.spaces; import reactor.core.publisher.Mono; diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/spacequotas/_CreateSpaceQuotaRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/spaces/_CreateSpaceQuotaRequest.java similarity index 89% rename from cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/spacequotas/_CreateSpaceQuotaRequest.java rename to cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/spaces/_CreateSpaceQuotaRequest.java index 6c54d0e583..3504105c0c 100644 --- a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/spacequotas/_CreateSpaceQuotaRequest.java +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/spaces/_CreateSpaceQuotaRequest.java @@ -14,11 +14,14 @@ * limitations under the License. */ -package org.cloudfoundry.client.v3.spacequotas; +package org.cloudfoundry.client.v3.quotas.spaces; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.databind.annotation.JsonSerialize; import org.cloudfoundry.Nullable; +import org.cloudfoundry.client.v3.quotas.Apps; +import org.cloudfoundry.client.v3.quotas.Routes; +import org.cloudfoundry.client.v3.quotas.Services; import org.immutables.value.Value; /** diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/spacequotas/_CreateSpaceQuotaResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/spaces/_CreateSpaceQuotaResponse.java similarity index 94% rename from cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/spacequotas/_CreateSpaceQuotaResponse.java rename to cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/spaces/_CreateSpaceQuotaResponse.java index daaa0ca8ff..80dae76d79 100644 --- a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/spacequotas/_CreateSpaceQuotaResponse.java +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/spaces/_CreateSpaceQuotaResponse.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.cloudfoundry.client.v3.spacequotas; +package org.cloudfoundry.client.v3.quotas.spaces; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import org.immutables.value.Value; diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/spacequotas/_DeleteSpaceQuotaRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/spaces/_DeleteSpaceQuotaRequest.java similarity index 94% rename from cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/spacequotas/_DeleteSpaceQuotaRequest.java rename to cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/spaces/_DeleteSpaceQuotaRequest.java index 0ee5210677..e5f582ae2b 100644 --- a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/spacequotas/_DeleteSpaceQuotaRequest.java +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/spaces/_DeleteSpaceQuotaRequest.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.cloudfoundry.client.v3.spacequotas; +package org.cloudfoundry.client.v3.quotas.spaces; import com.fasterxml.jackson.annotation.JsonIgnore; import org.immutables.value.Value; diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/spacequotas/_GetSpaceQuotaRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/spaces/_GetSpaceQuotaRequest.java similarity index 94% rename from cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/spacequotas/_GetSpaceQuotaRequest.java rename to cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/spaces/_GetSpaceQuotaRequest.java index 80dfe3e2d0..e1857575db 100644 --- a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/spacequotas/_GetSpaceQuotaRequest.java +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/spaces/_GetSpaceQuotaRequest.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.cloudfoundry.client.v3.spacequotas; +package org.cloudfoundry.client.v3.quotas.spaces; import com.fasterxml.jackson.annotation.JsonIgnore; import org.immutables.value.Value; diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/spacequotas/_GetSpaceQuotaResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/spaces/_GetSpaceQuotaResponse.java similarity index 94% rename from cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/spacequotas/_GetSpaceQuotaResponse.java rename to cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/spaces/_GetSpaceQuotaResponse.java index 03b9cb677c..5bf9bf8614 100644 --- a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/spacequotas/_GetSpaceQuotaResponse.java +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/spaces/_GetSpaceQuotaResponse.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.cloudfoundry.client.v3.spacequotas; +package org.cloudfoundry.client.v3.quotas.spaces; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import org.immutables.value.Value; diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/spacequotas/_ListSpaceQuotasRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/spaces/_ListSpaceQuotasRequest.java similarity index 97% rename from cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/spacequotas/_ListSpaceQuotasRequest.java rename to cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/spaces/_ListSpaceQuotasRequest.java index f2728981b9..c524c226ce 100644 --- a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/spacequotas/_ListSpaceQuotasRequest.java +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/spaces/_ListSpaceQuotasRequest.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.cloudfoundry.client.v3.spacequotas; +package org.cloudfoundry.client.v3.quotas.spaces; import org.cloudfoundry.Nullable; import org.cloudfoundry.client.v3.FilterParameter; diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/spacequotas/_ListSpaceQuotasResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/spaces/_ListSpaceQuotasResponse.java similarity index 95% rename from cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/spacequotas/_ListSpaceQuotasResponse.java rename to cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/spaces/_ListSpaceQuotasResponse.java index 428078e538..53d39cd58d 100644 --- a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/spacequotas/_ListSpaceQuotasResponse.java +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/spaces/_ListSpaceQuotasResponse.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.cloudfoundry.client.v3.spacequotas; +package org.cloudfoundry.client.v3.quotas.spaces; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import org.cloudfoundry.client.v3.PaginatedResponse; diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/spacequotas/_SpaceQuotaRelationships.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/spaces/_SpaceQuotaRelationships.java similarity index 96% rename from cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/spacequotas/_SpaceQuotaRelationships.java rename to cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/spaces/_SpaceQuotaRelationships.java index 2f1fd6d595..54aba0ac67 100644 --- a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/spacequotas/_SpaceQuotaRelationships.java +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/spaces/_SpaceQuotaRelationships.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.cloudfoundry.client.v3.spacequotas; +package org.cloudfoundry.client.v3.quotas.spaces; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/spacequotas/_SpaceQuotaResource.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/spaces/_SpaceQuotaResource.java similarity index 94% rename from cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/spacequotas/_SpaceQuotaResource.java rename to cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/spaces/_SpaceQuotaResource.java index 54f13c8a7b..52ea290c71 100644 --- a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/spacequotas/_SpaceQuotaResource.java +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/spaces/_SpaceQuotaResource.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.cloudfoundry.client.v3.spacequotas; +package org.cloudfoundry.client.v3.quotas.spaces; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import org.immutables.value.Value; diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/spacequotas/_UpdateSpaceQuotaRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/spaces/_UpdateSpaceQuotaRequest.java similarity index 89% rename from cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/spacequotas/_UpdateSpaceQuotaRequest.java rename to cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/spaces/_UpdateSpaceQuotaRequest.java index 73728bf8b6..2fd7b339fe 100644 --- a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/spacequotas/_UpdateSpaceQuotaRequest.java +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/spaces/_UpdateSpaceQuotaRequest.java @@ -14,12 +14,15 @@ * limitations under the License. */ -package org.cloudfoundry.client.v3.spacequotas; +package org.cloudfoundry.client.v3.quotas.spaces; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.databind.annotation.JsonSerialize; import org.cloudfoundry.Nullable; +import org.cloudfoundry.client.v3.quotas.Apps; +import org.cloudfoundry.client.v3.quotas.Routes; +import org.cloudfoundry.client.v3.quotas.Services; import org.immutables.value.Value; /** diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/spacequotas/_UpdateSpaceQuotaResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/spaces/_UpdateSpaceQuotaResponse.java similarity index 94% rename from cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/spacequotas/_UpdateSpaceQuotaResponse.java rename to cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/spaces/_UpdateSpaceQuotaResponse.java index e16a1d077d..82d57fd80e 100644 --- a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/spacequotas/_UpdateSpaceQuotaResponse.java +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/spaces/_UpdateSpaceQuotaResponse.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.cloudfoundry.client.v3.spacequotas; +package org.cloudfoundry.client.v3.quotas.spaces; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import org.immutables.value.Value; diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/organizationquotadefinitions/CreateOrganizationQuotaDefinitionRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/quotas/organizations/CreateOrganizationQuotaRequestTest.java similarity index 74% rename from cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/organizationquotadefinitions/CreateOrganizationQuotaDefinitionRequestTest.java rename to cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/quotas/organizations/CreateOrganizationQuotaRequestTest.java index ea2c622021..082b814e55 100644 --- a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/organizationquotadefinitions/CreateOrganizationQuotaDefinitionRequestTest.java +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/quotas/organizations/CreateOrganizationQuotaRequestTest.java @@ -14,23 +14,23 @@ * limitations under the License. */ -package org.cloudfoundry.client.v3.organizationquotadefinitions; +package org.cloudfoundry.client.v3.quotas.organizations; import static org.junit.jupiter.api.Assertions.assertThrows; import org.junit.jupiter.api.Test; -final class CreateOrganizationQuotaDefinitionRequestTest { +final class CreateOrganizationQuotaRequestTest { @Test void noName() { assertThrows( IllegalStateException.class, - () -> CreateOrganizationQuotaDefinitionRequest.builder().build()); + () -> CreateOrganizationQuotaRequest.builder().build()); } @Test void valid() { - CreateOrganizationQuotaDefinitionRequest.builder().name("test-quota").build(); + CreateOrganizationQuotaRequest.builder().name("test-quota").build(); } } diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/organizationquotadefinitions/DeleteOrganizationQuotaDefinitionRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/quotas/organizations/DeleteOrganizationQuotaRequestTest.java similarity index 68% rename from cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/organizationquotadefinitions/DeleteOrganizationQuotaDefinitionRequestTest.java rename to cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/quotas/organizations/DeleteOrganizationQuotaRequestTest.java index b1743c58f2..1626d86b79 100644 --- a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/organizationquotadefinitions/DeleteOrganizationQuotaDefinitionRequestTest.java +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/quotas/organizations/DeleteOrganizationQuotaRequestTest.java @@ -14,25 +14,23 @@ * limitations under the License. */ -package org.cloudfoundry.client.v3.organizationquotadefinitions; +package org.cloudfoundry.client.v3.quotas.organizations; import static org.junit.jupiter.api.Assertions.assertThrows; import org.junit.jupiter.api.Test; -final class DeleteOrganizationQuotaDefinitionRequestTest { +final class DeleteOrganizationQuotaRequestTest { @Test - void noOrganizationId() { + void noOrganizationQuotaId() { assertThrows( IllegalStateException.class, - () -> DeleteOrganizationQuotaDefinitionRequest.builder().build()); + () -> DeleteOrganizationQuotaRequest.builder().build()); } @Test void valid() { - DeleteOrganizationQuotaDefinitionRequest.builder() - .organizationQuotaDefinitionId("test-id") - .build(); + DeleteOrganizationQuotaRequest.builder().organizationQuotaId("test-id").build(); } } diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/organizationquotadefinitions/UpdateOrganizationQuotaDefinitionRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/quotas/organizations/GetOrganizationQuotaRequestTest.java similarity index 64% rename from cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/organizationquotadefinitions/UpdateOrganizationQuotaDefinitionRequestTest.java rename to cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/quotas/organizations/GetOrganizationQuotaRequestTest.java index 21c82d6005..2f1892937e 100644 --- a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/organizationquotadefinitions/UpdateOrganizationQuotaDefinitionRequestTest.java +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/quotas/organizations/GetOrganizationQuotaRequestTest.java @@ -14,25 +14,22 @@ * limitations under the License. */ -package org.cloudfoundry.client.v3.organizationquotadefinitions; +package org.cloudfoundry.client.v3.quotas.organizations; import static org.junit.jupiter.api.Assertions.assertThrows; import org.junit.jupiter.api.Test; -final class UpdateOrganizationQuotaDefinitionRequestTest { +final class GetOrganizationQuotaRequestTest { @Test - void noOrganizationQuotaDefinitionId() { + void noOrganizationQuotaId() { assertThrows( - IllegalStateException.class, - () -> UpdateOrganizationQuotaDefinitionRequest.builder().build()); + IllegalStateException.class, () -> GetOrganizationQuotaRequest.builder().build()); } @Test void valid() { - UpdateOrganizationQuotaDefinitionRequest.builder() - .organizationQuotaDefinitionId("test-id") - .build(); + GetOrganizationQuotaRequest.builder().organizationQuotaId("test-id").build(); } } diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/organizationquotadefinitions/ListOrganizationQuotaDefinitionsRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/quotas/organizations/ListOrganizationQuotasRequestTest.java similarity index 78% rename from cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/organizationquotadefinitions/ListOrganizationQuotaDefinitionsRequestTest.java rename to cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/quotas/organizations/ListOrganizationQuotasRequestTest.java index 03054a4060..18a5a9da45 100644 --- a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/organizationquotadefinitions/ListOrganizationQuotaDefinitionsRequestTest.java +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/quotas/organizations/ListOrganizationQuotasRequestTest.java @@ -14,14 +14,14 @@ * limitations under the License. */ -package org.cloudfoundry.client.v3.organizationquotadefinitions; +package org.cloudfoundry.client.v3.quotas.organizations; import org.junit.jupiter.api.Test; -public class ListOrganizationQuotaDefinitionsRequestTest { +public class ListOrganizationQuotasRequestTest { @Test void valid() { - ListOrganizationQuotaDefinitionsRequest.builder().build(); + ListOrganizationQuotasRequest.builder().build(); } } diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/organizationquotadefinitions/GetOrganizationQuotaDefinitionRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/quotas/organizations/UpdateOrganizationQuotaRequestTest.java similarity index 68% rename from cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/organizationquotadefinitions/GetOrganizationQuotaDefinitionRequestTest.java rename to cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/quotas/organizations/UpdateOrganizationQuotaRequestTest.java index dd52243e8a..3b1b606f62 100644 --- a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/organizationquotadefinitions/GetOrganizationQuotaDefinitionRequestTest.java +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/quotas/organizations/UpdateOrganizationQuotaRequestTest.java @@ -14,25 +14,23 @@ * limitations under the License. */ -package org.cloudfoundry.client.v3.organizationquotadefinitions; +package org.cloudfoundry.client.v3.quotas.organizations; import static org.junit.jupiter.api.Assertions.assertThrows; import org.junit.jupiter.api.Test; -final class GetOrganizationQuotaDefinitionRequestTest { +final class UpdateOrganizationQuotaRequestTest { @Test - void noOrganizationQuotaDefinitionId() { + void noOrganizationQuotaId() { assertThrows( IllegalStateException.class, - () -> GetOrganizationQuotaDefinitionRequest.builder().build()); + () -> UpdateOrganizationQuotaRequest.builder().build()); } @Test void valid() { - GetOrganizationQuotaDefinitionRequest.builder() - .organizationQuotaDefinitionId("test-id") - .build(); + UpdateOrganizationQuotaRequest.builder().organizationQuotaId("test-id").build(); } } diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/spacequotas/CreateSpaceQuotaRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/quotas/spaces/CreateSpaceQuotaRequestTest.java similarity index 97% rename from cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/spacequotas/CreateSpaceQuotaRequestTest.java rename to cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/quotas/spaces/CreateSpaceQuotaRequestTest.java index be290c5957..70972980d6 100644 --- a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/spacequotas/CreateSpaceQuotaRequestTest.java +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/quotas/spaces/CreateSpaceQuotaRequestTest.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.cloudfoundry.client.v3.spacequotas; +package org.cloudfoundry.client.v3.quotas.spaces; import static org.junit.jupiter.api.Assertions.assertThrows; diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/spacequotas/DeleteSpaceQuotaRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/quotas/spaces/DeleteSpaceQuotaRequestTest.java similarity index 95% rename from cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/spacequotas/DeleteSpaceQuotaRequestTest.java rename to cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/quotas/spaces/DeleteSpaceQuotaRequestTest.java index 8216851d0c..dc682c01ac 100644 --- a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/spacequotas/DeleteSpaceQuotaRequestTest.java +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/quotas/spaces/DeleteSpaceQuotaRequestTest.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.cloudfoundry.client.v3.spacequotas; +package org.cloudfoundry.client.v3.quotas.spaces; import static org.junit.jupiter.api.Assertions.assertThrows; diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/spacequotas/GetSpaceQuotaRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/quotas/spaces/GetSpaceQuotaRequestTest.java similarity index 95% rename from cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/spacequotas/GetSpaceQuotaRequestTest.java rename to cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/quotas/spaces/GetSpaceQuotaRequestTest.java index befab21151..bd9a36181b 100644 --- a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/spacequotas/GetSpaceQuotaRequestTest.java +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/quotas/spaces/GetSpaceQuotaRequestTest.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.cloudfoundry.client.v3.spacequotas; +package org.cloudfoundry.client.v3.quotas.spaces; import static org.junit.jupiter.api.Assertions.assertThrows; diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/spacequotas/ListSpaceQuotasRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/quotas/spaces/ListSpaceQuotasRequestTest.java similarity index 94% rename from cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/spacequotas/ListSpaceQuotasRequestTest.java rename to cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/quotas/spaces/ListSpaceQuotasRequestTest.java index 699c0451d5..5e65214896 100644 --- a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/spacequotas/ListSpaceQuotasRequestTest.java +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/quotas/spaces/ListSpaceQuotasRequestTest.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.cloudfoundry.client.v3.spacequotas; +package org.cloudfoundry.client.v3.quotas.spaces; import org.junit.jupiter.api.Test; diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/spacequotas/UpdateSpaceQuotaRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/quotas/spaces/UpdateSpaceQuotaRequestTest.java similarity index 95% rename from cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/spacequotas/UpdateSpaceQuotaRequestTest.java rename to cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/quotas/spaces/UpdateSpaceQuotaRequestTest.java index 1b9b833f23..0c80b5ec54 100644 --- a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/spacequotas/UpdateSpaceQuotaRequestTest.java +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/quotas/spaces/UpdateSpaceQuotaRequestTest.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.cloudfoundry.client.v3.spacequotas; +package org.cloudfoundry.client.v3.quotas.spaces; import static org.junit.jupiter.api.Assertions.assertThrows; diff --git a/integration-test/src/test/java/org/cloudfoundry/client/v3/OrganizationQuotaDefinitionsTest.java b/integration-test/src/test/java/org/cloudfoundry/client/v3/OrganizationQuotasTest.java similarity index 70% rename from integration-test/src/test/java/org/cloudfoundry/client/v3/OrganizationQuotaDefinitionsTest.java rename to integration-test/src/test/java/org/cloudfoundry/client/v3/OrganizationQuotasTest.java index 38e1808747..15b0239c96 100644 --- a/integration-test/src/test/java/org/cloudfoundry/client/v3/OrganizationQuotaDefinitionsTest.java +++ b/integration-test/src/test/java/org/cloudfoundry/client/v3/OrganizationQuotasTest.java @@ -23,17 +23,8 @@ import org.cloudfoundry.CloudFoundryVersion; import org.cloudfoundry.IfCloudFoundryVersion; import org.cloudfoundry.client.CloudFoundryClient; -import org.cloudfoundry.client.v3.organizationquotadefinitions.Apps; -import org.cloudfoundry.client.v3.organizationquotadefinitions.CreateOrganizationQuotaDefinitionRequest; -import org.cloudfoundry.client.v3.organizationquotadefinitions.CreateOrganizationQuotaDefinitionResponse; -import org.cloudfoundry.client.v3.organizationquotadefinitions.DeleteOrganizationQuotaDefinitionRequest; -import org.cloudfoundry.client.v3.organizationquotadefinitions.GetOrganizationQuotaDefinitionRequest; -import org.cloudfoundry.client.v3.organizationquotadefinitions.GetOrganizationQuotaDefinitionResponse; -import org.cloudfoundry.client.v3.organizationquotadefinitions.ListOrganizationQuotaDefinitionsRequest; -import org.cloudfoundry.client.v3.organizationquotadefinitions.OrganizationQuotaDefinitionResource; -import org.cloudfoundry.client.v3.organizationquotadefinitions.Routes; -import org.cloudfoundry.client.v3.organizationquotadefinitions.Services; -import org.cloudfoundry.client.v3.organizationquotadefinitions.UpdateOrganizationQuotaDefinitionRequest; +import org.cloudfoundry.client.v3.quotas.*; +import org.cloudfoundry.client.v3.quotas.organizations.*; import org.cloudfoundry.util.JobUtils; import org.cloudfoundry.util.PaginationUtils; import org.junit.jupiter.api.Test; @@ -43,7 +34,7 @@ import reactor.test.StepVerifier; @IfCloudFoundryVersion(greaterThanOrEqualTo = CloudFoundryVersion.PCF_2_8) -public final class OrganizationQuotaDefinitionsTest extends AbstractIntegrationTest { +public final class OrganizationQuotasTest extends AbstractIntegrationTest { @Autowired private CloudFoundryClient cloudFoundryClient; @@ -60,9 +51,9 @@ public void create() { Services.builder().isPaidServicesAllowed(false).totalServiceInstances(10).build(); Routes organizationQuotaRouteLimits = Routes.builder().totalRoutes(10).build(); this.cloudFoundryClient - .organizationQuotaDefinitionsV3() + .organizationQuotasV3() .create( - CreateOrganizationQuotaDefinitionRequest.builder() + CreateOrganizationQuotaRequest.builder() .name(organizationQuotaName) .apps(organizationQuotaAppLimits) .services(organizationQuotaServiceLimits) @@ -74,16 +65,16 @@ public void create() { .single() .as(StepVerifier::create) .assertNext( - organizationQuotaDefinitionResource -> { - assertThat(organizationQuotaDefinitionResource).isNotNull(); - assertThat(organizationQuotaDefinitionResource.getId()).isNotNull(); - assertThat(organizationQuotaDefinitionResource.getName()) + organizationQuotaResource -> { + assertThat(organizationQuotaResource).isNotNull(); + assertThat(organizationQuotaResource.getId()).isNotNull(); + assertThat(organizationQuotaResource.getName()) .isEqualTo(organizationQuotaName); - assertThat(organizationQuotaDefinitionResource.getApps()) + assertThat(organizationQuotaResource.getApps()) .isEqualTo(organizationQuotaAppLimits); - assertThat(organizationQuotaDefinitionResource.getServices()) + assertThat(organizationQuotaResource.getServices()) .isEqualTo(organizationQuotaServiceLimits); - assertThat(organizationQuotaDefinitionResource.getRoutes()) + assertThat(organizationQuotaResource.getRoutes()) .isEqualTo(organizationQuotaRouteLimits); }) .expectComplete() @@ -98,11 +89,10 @@ public void delete() { .flatMap( organizationQuotaId -> this.cloudFoundryClient - .organizationQuotaDefinitionsV3() + .organizationQuotasV3() .delete( - DeleteOrganizationQuotaDefinitionRequest.builder() - .organizationQuotaDefinitionId( - organizationQuotaId) + DeleteOrganizationQuotaRequest.builder() + .organizationQuotaId(organizationQuotaId) .build()) .flatMap( job -> @@ -126,13 +116,12 @@ public void get() { .flatMap( organizationQuotaId -> this.cloudFoundryClient - .organizationQuotaDefinitionsV3() + .organizationQuotasV3() .get( - GetOrganizationQuotaDefinitionRequest.builder() - .organizationQuotaDefinitionId( - organizationQuotaId) + GetOrganizationQuotaRequest.builder() + .organizationQuotaId(organizationQuotaId) .build())) - .map(GetOrganizationQuotaDefinitionResponse::getName) + .map(GetOrganizationQuotaResponse::getName) .as(StepVerifier::create) .expectNext(organizationQuotaName) .expectComplete() @@ -148,10 +137,9 @@ public void list() { PaginationUtils.requestClientV3Resources( page -> this.cloudFoundryClient - .organizationQuotaDefinitionsV3() + .organizationQuotasV3() .list( - ListOrganizationQuotaDefinitionsRequest - .builder() + ListOrganizationQuotasRequest.builder() .page(page) .build()))) .filter(resource -> organizationQuotaName.equals(resource.getName())) @@ -170,11 +158,10 @@ public void update() { .flatMap( organizationQuotaId -> this.cloudFoundryClient - .organizationQuotaDefinitionsV3() + .organizationQuotasV3() .update( - UpdateOrganizationQuotaDefinitionRequest.builder() - .organizationQuotaDefinitionId( - organizationQuotaId) + UpdateOrganizationQuotaRequest.builder() + .organizationQuotaId(organizationQuotaId) .apps( Apps.builder() .totalMemoryInMb( @@ -195,19 +182,13 @@ public void update() { this.cloudFoundryClient, organizationQuotaName)) .as(StepVerifier::create) .consumeNextWith( - organizationQuotaDefinitionResource -> { - assertThat( - organizationQuotaDefinitionResource - .getApps() - .getTotalMemoryInMb()) + organizationQuotaResource -> { + assertThat(organizationQuotaResource.getApps().getTotalMemoryInMb()) .isEqualTo(totalMemoryLimit); - assertThat( - organizationQuotaDefinitionResource - .getRoutes() - .getTotalRoutes()) + assertThat(organizationQuotaResource.getRoutes().getTotalRoutes()) .isEqualTo(100); assertThat( - organizationQuotaDefinitionResource + organizationQuotaResource .getServices() .getTotalServiceInstances()) .isEqualTo(100); @@ -219,27 +200,27 @@ public void update() { private static Mono createOrganizationQuotaId( CloudFoundryClient cloudFoundryClient, String organizationQuotaName) { return createOrganizationQuota(cloudFoundryClient, organizationQuotaName) - .map(CreateOrganizationQuotaDefinitionResponse::getId); + .map(CreateOrganizationQuotaResponse::getId); } - private static Mono createOrganizationQuota( + private static Mono createOrganizationQuota( CloudFoundryClient cloudFoundryClient, String organizationQuotaName) { return cloudFoundryClient - .organizationQuotaDefinitionsV3() + .organizationQuotasV3() .create( - CreateOrganizationQuotaDefinitionRequest.builder() + CreateOrganizationQuotaRequest.builder() .name(organizationQuotaName) .build()); } - private static Flux requestListOrganizationQuotas( + private static Flux requestListOrganizationQuotas( CloudFoundryClient cloudFoundryClient, String organizationName) { return PaginationUtils.requestClientV3Resources( page -> cloudFoundryClient - .organizationQuotaDefinitionsV3() + .organizationQuotasV3() .list( - ListOrganizationQuotaDefinitionsRequest.builder() + ListOrganizationQuotasRequest.builder() .name(organizationName) .page(page) .build())); diff --git a/integration-test/src/test/java/org/cloudfoundry/client/v3/SpaceQuotasTest.java b/integration-test/src/test/java/org/cloudfoundry/client/v3/SpaceQuotasTest.java index e66f27ead7..ede877a34c 100644 --- a/integration-test/src/test/java/org/cloudfoundry/client/v3/SpaceQuotasTest.java +++ b/integration-test/src/test/java/org/cloudfoundry/client/v3/SpaceQuotasTest.java @@ -25,15 +25,8 @@ import org.cloudfoundry.client.CloudFoundryClient; import org.cloudfoundry.client.v3.organizations.CreateOrganizationRequest; import org.cloudfoundry.client.v3.organizations.Organization; -import org.cloudfoundry.client.v3.spacequotas.*; -import org.cloudfoundry.client.v3.spacequotas.CreateSpaceQuotaResponse; -import org.cloudfoundry.client.v3.spacequotas.DeleteSpaceQuotaRequest; -import org.cloudfoundry.client.v3.spacequotas.GetSpaceQuotaRequest; -import org.cloudfoundry.client.v3.spacequotas.GetSpaceQuotaResponse; -import org.cloudfoundry.client.v3.spacequotas.ListSpaceQuotasRequest; -import org.cloudfoundry.client.v3.spacequotas.SpaceQuotaRelationships; -import org.cloudfoundry.client.v3.spacequotas.SpaceQuotaResource; -import org.cloudfoundry.client.v3.spacequotas.UpdateSpaceQuotaRequest; +import org.cloudfoundry.client.v3.quotas.*; +import org.cloudfoundry.client.v3.quotas.spaces.*; import org.cloudfoundry.client.v3.spaces.CreateSpaceRequest; import org.cloudfoundry.client.v3.spaces.Space; import org.cloudfoundry.client.v3.spaces.SpaceRelationships;