File tree Expand file tree Collapse file tree 4 files changed +89
-0
lines changed
cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v3/spacequotadefinition
main/java/org/cloudfoundry/client/v3/spacequotadefinitions
test/java/org/cloudfoundry/client/v3/spacequotadefinitions Expand file tree Collapse file tree 4 files changed +89
-0
lines changed Original file line number Diff line number Diff line change 1818
1919import org .cloudfoundry .client .v3 .spacequotadefinitions .CreateSpaceQuotaDefinitionRequest ;
2020import org .cloudfoundry .client .v3 .spacequotadefinitions .CreateSpaceQuotaDefinitionResponse ;
21+ import org .cloudfoundry .client .v3 .spacequotadefinitions .DeleteSpaceQuotaDefinitionRequest ;
2122import org .cloudfoundry .client .v3 .spacequotadefinitions .GetSpaceQuotaDefinitionRequest ;
2223import org .cloudfoundry .client .v3 .spacequotadefinitions .GetSpaceQuotaDefinitionResponse ;
2324import org .cloudfoundry .client .v3 .spacequotadefinitions .ListSpaceQuotaDefinitionsRequest ;
@@ -92,4 +93,13 @@ public Mono<UpdateSpaceQuotaDefinitionResponse> update(UpdateSpaceQuotaDefinitio
9293 .checkpoint ();
9394 }
9495
96+ @ Override
97+ public Mono <String > delete (DeleteSpaceQuotaDefinitionRequest request ) {
98+ return delete (
99+ request ,
100+ builder ->
101+ builder .pathSegment ("organization_quotas" , request .getSpaceQuotaDefinitionId ()))
102+ .checkpoint ();
103+ }
104+
95105}
Original file line number Diff line number Diff line change @@ -62,4 +62,13 @@ Mono<ListSpaceQuotaDefinitionsResponse> list(
6262 Mono <UpdateSpaceQuotaDefinitionResponse > update (
6363 UpdateSpaceQuotaDefinitionRequest request );
6464
65+ /**
66+ * Makes the <a href="https://v3-apidocs.cloudfoundry.org/version/3.123.0/index.html#delete-a-space-quota">Delete Space Quota Definition</a>
67+ * request
68+ *
69+ * @param request the Delete Space Quota Definition request
70+ * @return the response from the Space Organization Quota Definition request
71+ */
72+ Mono <String > delete (
73+ DeleteSpaceQuotaDefinitionRequest request );
6574}
Original file line number Diff line number Diff line change 1+ /*
2+ * Copyright 2013-2025 the original author or authors.
3+ *
4+ * Licensed under the Apache License, Version 2.0 (the "License");
5+ * you may not use this file except in compliance with the License.
6+ * You may obtain a copy of the License at
7+ *
8+ * http://www.apache.org/licenses/LICENSE-2.0
9+ *
10+ * Unless required by applicable law or agreed to in writing, software
11+ * distributed under the License is distributed on an "AS IS" BASIS,
12+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+ * See the License for the specific language governing permissions and
14+ * limitations under the License.
15+ */
16+
17+ package org .cloudfoundry .client .v3 .spacequotadefinitions ;
18+
19+ import com .fasterxml .jackson .annotation .JsonIgnore ;
20+ import org .immutables .value .Value ;
21+
22+ /**
23+ * The request payload for the Delete an Space Quota Definition operation
24+ */
25+ @ Value .Immutable
26+ abstract class _DeleteSpaceQuotaDefinitionRequest {
27+
28+ /**
29+ * The quota definition id
30+ */
31+ @ JsonIgnore
32+ abstract String getSpaceQuotaDefinitionId ();
33+
34+ }
Original file line number Diff line number Diff line change 1+ /*
2+ * Copyright 2013-2025 the original author or authors.
3+ *
4+ * Licensed under the Apache License, Version 2.0 (the "License");
5+ * you may not use this file except in compliance with the License.
6+ * You may obtain a copy of the License at
7+ *
8+ * http://www.apache.org/licenses/LICENSE-2.0
9+ *
10+ * Unless required by applicable law or agreed to in writing, software
11+ * distributed under the License is distributed on an "AS IS" BASIS,
12+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+ * See the License for the specific language governing permissions and
14+ * limitations under the License.
15+ */
16+
17+ package org .cloudfoundry .client .v3 .spacequotadefinitions ;
18+
19+ import org .junit .jupiter .api .Test ;
20+
21+ import static org .junit .jupiter .api .Assertions .assertThrows ;
22+
23+ final class DeleteSpaceQuotaDefinitionRequestTest {
24+
25+ @ Test
26+ void noSpaceQuotaDefinitionId () {
27+ assertThrows (
28+ IllegalStateException .class ,
29+ () -> DeleteSpaceQuotaDefinitionRequest .builder ().build ());
30+ }
31+
32+ @ Test
33+ void valid () {
34+ DeleteSpaceQuotaDefinitionRequest .builder ().spaceQuotaDefinitionId ("test-id" ).build ();
35+ }
36+ }
You can’t perform that action at this time.
0 commit comments