Skip to content

Commit ab8bf51

Browse files
issue-1168 adding interface and model for ListOrganizationQuotaDefinition
1 parent ec7e9b1 commit ab8bf51

File tree

5 files changed

+149
-0
lines changed

5 files changed

+149
-0
lines changed

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,13 @@ Mono<CreateOrganizationQuotaDefinitionResponse> create(
4343
Mono<GetOrganizationQuotaDefinitionResponse> get(
4444
GetOrganizationQuotaDefinitionRequest request);
4545

46+
/**
47+
* Makes the <a href="https://v3-apidocs.cloudfoundry.org/version/3.200.0/index.html#list-organization-quotas">List all Organization Quota Definitions</a>
48+
* request
49+
*
50+
* @param request the List all Organization Quota Definitions request
51+
* @return the response from the List all Organization Quota Definitions request
52+
*/
53+
Mono<ListOrganizationQuotaDefinitionsResponse> list(
54+
ListOrganizationQuotaDefinitionsRequest request);
4655
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
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.cloudfoundry.Nullable;
20+
import org.cloudfoundry.client.v3.FilterParameter;
21+
import org.cloudfoundry.client.v3.PaginatedRequest;
22+
import org.immutables.value.Value;
23+
24+
import java.util.List;
25+
26+
/**
27+
* The request payload for the List all Organization Quota Definitions operation
28+
*/
29+
@Value.Immutable
30+
abstract class _ListOrganizationQuotaDefinitionsRequest extends PaginatedRequest {
31+
32+
/**
33+
* list of organization quota guids to filter by
34+
*/
35+
@FilterParameter("guids")
36+
@Nullable
37+
abstract List<String> getGuids();
38+
39+
/**
40+
* list of organization quota names to filter by
41+
*/
42+
@FilterParameter("names")
43+
@Nullable
44+
abstract List<String> getNames();
45+
46+
/**
47+
* list of organization guids to filter by
48+
*/
49+
@FilterParameter("organization_guids")
50+
@Nullable
51+
abstract List<String> getOrganizationGuids();
52+
53+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
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.cloudfoundry.client.v3.PaginatedResponse;
21+
import org.immutables.value.Value;
22+
23+
/**
24+
* The response payload for the List all Organization Quota Definitions operation
25+
*/
26+
@JsonDeserialize
27+
@Value.Immutable
28+
abstract class _ListOrganizationQuotaDefinitionsResponse extends PaginatedResponse<OrganizationQuotaDefinitionResource> {
29+
30+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
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+
* Base class for resources that contain Organization Quota Definitions
24+
*/
25+
@JsonDeserialize
26+
@Value.Immutable
27+
abstract class _OrganizationQuotaDefinitionResource extends OrganizationQuotaDefinition {
28+
29+
}
30+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
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+
public class ListOrganizationQuotaDefinitionsRequestTest {
22+
23+
@Test
24+
void valid() {
25+
ListOrganizationQuotaDefinitionsRequest.builder().build();
26+
}
27+
}

0 commit comments

Comments
 (0)