Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
f5d685f
issue-1168 adding interface and model for CreateOrganizationQuotaDefi…
Aug 22, 2025
ec7e9b1
issue-1168 adding interface and model for GetOrganizationQuotaDefinition
Aug 22, 2025
ab8bf51
issue-1168 adding interface and model for ListOrganizationQuotaDefini…
Aug 22, 2025
6a5e675
issue-1168 adding interface and model for UpdateOrganizationQuotaDefi…
Aug 22, 2025
8249d70
issue-1168 adding interface and model for DeleteOrganizationQuotaDefi…
Aug 22, 2025
e6570c2
issue-1168 adding reactor implementation for Create, Get, List, Updat…
Aug 22, 2025
07b697c
minor fix for DeleteOrganizationRequestTest to test appropriate builder
Aug 22, 2025
1e85cb7
Merge branch 'main' into feature/implement-organizationquotas-version…
Aug 24, 2025
fdc5305
Pull request #5: minor fix for DeleteOrganizationRequestTest to test …
Aug 24, 2025
c429295
issue-1168 adding integration test for version 3 implementation of Or…
Aug 25, 2025
80a4cb9
Pull request #6: issue-1168 implement organizationquotas version 3 api
Sep 10, 2025
c53cf2c
adding model, interface and implementation for CreateSpaceQuotaDefin…
Sep 10, 2025
4a6840a
adding model, interface and implementation for GetSpaceQuotaDefinition
Sep 10, 2025
ce92dab
adding model, interface and implementation for ListSpaceQuotaDefinition
Sep 10, 2025
d0876ee
adding model, interface and implementation for UpdateSpaceQuotaDefin…
Sep 10, 2025
76d5ae6
adding model, interface and implementation for DeleteSpaceQuotaDefin…
Sep 12, 2025
c4cc742
unit test for ReactorSpaceQuotaDefinitionsV3 covering create, get, li…
Sep 12, 2025
d14263e
integration test for SpaceQuotaDefinitionsV3 covering create, get, li…
Sep 15, 2025
1d27f96
running spotless:apply to fix formatting issues
Sep 15, 2025
7cb5cc1
running spotless:apply to format the files
Sep 16, 2025
d9e98fb
merging changes from main and resolving all conflicts
Oct 23, 2025
0db8b78
enhancing SpaceQuotaDefinitionsTest integration test
Oct 23, 2025
d7fac5b
running mvn spotless:apply and removed unnecessary properties
Oct 23, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

package org.cloudfoundry.reactor.client;

import jakarta.annotation.PostConstruct;
import org.cloudfoundry.client.CloudFoundryClient;
import org.cloudfoundry.client.v2.applications.ApplicationsV2;
import org.cloudfoundry.client.v2.applicationusageevents.ApplicationUsageEvents;
Expand All @@ -34,8 +35,6 @@
import org.cloudfoundry.client.v2.routemappings.RouteMappings;
import org.cloudfoundry.client.v2.routes.Routes;
import org.cloudfoundry.client.v2.securitygroups.SecurityGroups;
import org.cloudfoundry.client.v3.organizationquotadefinitions.OrganizationQuotaDefinitionsV3;
import org.cloudfoundry.client.v3.securitygroups.SecurityGroupsV3;
import org.cloudfoundry.client.v2.servicebindings.ServiceBindingsV2;
import org.cloudfoundry.client.v2.servicebrokers.ServiceBrokers;
import org.cloudfoundry.client.v2.serviceinstances.ServiceInstances;
Expand All @@ -60,17 +59,20 @@
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.resourcematch.ResourceMatchV3;
import org.cloudfoundry.client.v3.roles.RolesV3;
import org.cloudfoundry.client.v3.routes.RoutesV3;
import org.cloudfoundry.client.v3.serviceinstances.ServiceInstancesV3;
import org.cloudfoundry.client.v3.securitygroups.SecurityGroupsV3;
import org.cloudfoundry.client.v3.servicebindings.ServiceBindingsV3;
import org.cloudfoundry.client.v3.servicebrokers.ServiceBrokersV3;
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.spacequotadefinitions.SpaceQuotaDefinitionsV3;
import org.cloudfoundry.client.v3.spaces.SpacesV3;
import org.cloudfoundry.client.v3.stacks.StacksV3;
import org.cloudfoundry.client.v3.tasks.Tasks;
Expand All @@ -93,8 +95,6 @@
import org.cloudfoundry.reactor.client.v2.routemappings.ReactorRouteMappings;
import org.cloudfoundry.reactor.client.v2.routes.ReactorRoutes;
import org.cloudfoundry.reactor.client.v2.securitygroups.ReactorSecurityGroups;
import org.cloudfoundry.reactor.client.v3.organizationquotadefinitions.ReactorOrganizationQuotaDefinitionsV3;
import org.cloudfoundry.reactor.client.v3.securitygroups.ReactorSecurityGroupsV3;
import org.cloudfoundry.reactor.client.v2.servicebindings.ReactorServiceBindingsV2;
import org.cloudfoundry.reactor.client.v2.servicebrokers.ReactorServiceBrokers;
import org.cloudfoundry.reactor.client.v2.serviceinstances.ReactorServiceInstances;
Expand All @@ -119,24 +119,26 @@
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.organizations.ReactorOrganizationsV3;
import org.cloudfoundry.reactor.client.v3.packages.ReactorPackages;
import org.cloudfoundry.reactor.client.v3.processes.ReactorProcesses;
import org.cloudfoundry.reactor.client.v3.resourcematch.ReactorResourceMatchV3;
import org.cloudfoundry.reactor.client.v3.roles.ReactorRolesV3;
import org.cloudfoundry.reactor.client.v3.routes.ReactorRoutesV3;
import org.cloudfoundry.reactor.client.v3.securitygroups.ReactorSecurityGroupsV3;
import org.cloudfoundry.reactor.client.v3.servicebindings.ReactorServiceBindingsV3;
import org.cloudfoundry.reactor.client.v3.servicebrokers.ReactorServiceBrokersV3;
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.spacequotadefinition.ReactorSpaceQuotaDefinitionsV3;
import org.cloudfoundry.reactor.client.v3.spaces.ReactorSpacesV3;
import org.cloudfoundry.reactor.client.v3.stacks.ReactorStacksV3;
import org.cloudfoundry.reactor.client.v3.tasks.ReactorTasks;
import org.immutables.value.Value;
import reactor.core.publisher.Mono;

import jakarta.annotation.PostConstruct;
import java.util.Collections;
import java.util.Map;

Expand Down Expand Up @@ -457,6 +459,13 @@ public SpaceQuotaDefinitions spaceQuotaDefinitions() {
getRequestTags());
}

@Override
@Value.Derived
public SpaceQuotaDefinitionsV3 spaceQuotaDefinitionsV3() {
return new ReactorSpaceQuotaDefinitionsV3(getConnectionContext(), getRootV3(), getTokenProvider(),
getRequestTags());
}

@Override
@Value.Derived
public Spaces spaces() {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
/*
* 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.spacequotadefinition;

import java.util.Map;
import org.cloudfoundry.client.v3.spacequotadefinitions.CreateSpaceQuotaDefinitionRequest;
import org.cloudfoundry.client.v3.spacequotadefinitions.CreateSpaceQuotaDefinitionResponse;
import org.cloudfoundry.client.v3.spacequotadefinitions.DeleteSpaceQuotaDefinitionRequest;
import org.cloudfoundry.client.v3.spacequotadefinitions.GetSpaceQuotaDefinitionRequest;
import org.cloudfoundry.client.v3.spacequotadefinitions.GetSpaceQuotaDefinitionResponse;
import org.cloudfoundry.client.v3.spacequotadefinitions.ListSpaceQuotaDefinitionsRequest;
import org.cloudfoundry.client.v3.spacequotadefinitions.ListSpaceQuotaDefinitionsResponse;
import org.cloudfoundry.client.v3.spacequotadefinitions.SpaceQuotaDefinitionsV3;
import org.cloudfoundry.client.v3.spacequotadefinitions.UpdateSpaceQuotaDefinitionRequest;
import org.cloudfoundry.client.v3.spacequotadefinitions.UpdateSpaceQuotaDefinitionResponse;
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 ReactorSpaceQuotaDefinitionsV3}
*/
public class ReactorSpaceQuotaDefinitionsV3 extends AbstractClientV3Operations
implements SpaceQuotaDefinitionsV3 {

/**
* 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 ReactorSpaceQuotaDefinitionsV3(
ConnectionContext connectionContext,
Mono<String> root,
TokenProvider tokenProvider,
Map<String, String> requestTags) {
super(connectionContext, root, tokenProvider, requestTags);
}

@Override
public Mono<CreateSpaceQuotaDefinitionResponse> create(
CreateSpaceQuotaDefinitionRequest request) {
return post(
request,
CreateSpaceQuotaDefinitionResponse.class,
builder -> builder.pathSegment("space_quotas"))
.checkpoint();
}

@Override
public Mono<GetSpaceQuotaDefinitionResponse> get(GetSpaceQuotaDefinitionRequest request) {
return get(
request,
GetSpaceQuotaDefinitionResponse.class,
builder ->
builder.pathSegment(
"space_quotas", request.getSpaceQuotaDefinitionId()))
.checkpoint();
}

@Override
public Mono<ListSpaceQuotaDefinitionsResponse> list(ListSpaceQuotaDefinitionsRequest request) {
return get(
request,
ListSpaceQuotaDefinitionsResponse.class,
builder -> builder.pathSegment("space_quotas"))
.checkpoint();
}

@Override
public Mono<UpdateSpaceQuotaDefinitionResponse> update(
UpdateSpaceQuotaDefinitionRequest request) {
return patch(
request,
UpdateSpaceQuotaDefinitionResponse.class,
builder ->
builder.pathSegment(
"space_quotas", request.getSpaceQuotaDefinitionId()))
.checkpoint();
}

@Override
public Mono<String> delete(DeleteSpaceQuotaDefinitionRequest request) {
return delete(
request,
builder ->
builder.pathSegment(
"space_quotas", request.getSpaceQuotaDefinitionId()))
.checkpoint();
}
}
Loading