Skip to content

Commit 8249d70

Browse files
issue-1168 adding interface and model for DeleteOrganizationQuotaDefinition
1 parent 6a5e675 commit 8249d70

File tree

3 files changed

+80
-0
lines changed

3 files changed

+80
-0
lines changed

cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/organizationquotadefinitions/OrganizationQuotaDefinitionsV3.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,4 +61,14 @@ Mono<ListOrganizationQuotaDefinitionsResponse> list(
6161
*/
6262
Mono<UpdateOrganizationQuotaDefinitionResponse> update(
6363
UpdateOrganizationQuotaDefinitionRequest request);
64+
65+
/**
66+
* Makes the <a href="https://v3-apidocs.cloudfoundry.org/version/3.200.0/index.html#delete-organization-quota-definition">Delete Organization Quota Definition</a>
67+
* request
68+
*
69+
* @param request the Delete Organization Quota Definition request
70+
* @return the response from the Delete Organization Quota Definition request
71+
*/
72+
Mono<String> delete(
73+
DeleteOrganizationQuotaDefinitionRequest request);
6474
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
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.organizationquotadefinitions;
18+
19+
import com.fasterxml.jackson.annotation.JsonIgnore;
20+
import org.immutables.value.Value;
21+
22+
/**
23+
* The request payload for the Delete an Organization Quota Definition operation
24+
*/
25+
@Value.Immutable
26+
abstract class _DeleteOrganizationQuotaDefinitionRequest {
27+
28+
/**
29+
* The quota definition id
30+
*/
31+
@JsonIgnore
32+
abstract String getOrganizationQuotaDefinitionId();
33+
34+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
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.organizationquotadefinitions;
18+
19+
import org.junit.jupiter.api.Test;
20+
21+
import static org.junit.jupiter.api.Assertions.assertThrows;
22+
23+
final class DeleteOrganizationQuotaDefinitionRequestTest {
24+
25+
@Test
26+
void noOrganizationId() {
27+
assertThrows(
28+
IllegalStateException.class,
29+
() -> DeleteOrganizationQuotaDefinitionRequest.builder().build());
30+
}
31+
32+
@Test
33+
void valid() {
34+
DeleteOrganizationQuotaDefinitionRequest.builder().organizationQuotaDefinitionId("test-id").build();
35+
}
36+
}

0 commit comments

Comments
 (0)