Skip to content

Commit ec7e9b1

Browse files
issue-1168 adding interface and model for GetOrganizationQuotaDefinition
1 parent f5d685f commit ec7e9b1

File tree

4 files changed

+110
-0
lines changed

4 files changed

+110
-0
lines changed

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

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,15 @@ public interface OrganizationQuotaDefinitionsV3 {
3232
*/
3333
Mono<CreateOrganizationQuotaDefinitionResponse> create(
3434
CreateOrganizationQuotaDefinitionRequest request);
35+
36+
/**
37+
* Makes the <a href="https://v3-apidocs.cloudfoundry.org/version/3.200.0/index.html#get-organization-quota-definition">Get Organization Quota Definition</a>
38+
* request
39+
*
40+
* @param request the Get Organization Quota Definition request
41+
* @return the response from the Get Organization Quota Definition request
42+
*/
43+
Mono<GetOrganizationQuotaDefinitionResponse> get(
44+
GetOrganizationQuotaDefinitionRequest request);
45+
3546
}
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 Retrieve a Particular Organization Quota Definition operation
24+
*/
25+
@Value.Immutable
26+
abstract class _GetOrganizationQuotaDefinitionRequest {
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,29 @@
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.databind.annotation.JsonDeserialize;
20+
import org.immutables.value.Value;
21+
22+
/**
23+
* The response payload for the Retrieve a Particular Organization Quota Definition operation
24+
*/
25+
@JsonDeserialize
26+
@Value.Immutable
27+
abstract class _GetOrganizationQuotaDefinitionResponse extends OrganizationQuotaDefinition {
28+
29+
}
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 GetOrganizationQuotaDefinitionRequestTest {
24+
25+
@Test
26+
void noOrganizationQuotaDefinitionId() {
27+
assertThrows(
28+
IllegalStateException.class,
29+
() -> GetOrganizationQuotaDefinitionRequest.builder().build());
30+
}
31+
32+
@Test
33+
void valid() {
34+
GetOrganizationQuotaDefinitionRequest.builder().organizationQuotaDefinitionId("test-id").build();
35+
}
36+
}

0 commit comments

Comments
 (0)