Class ListOrganizationsResponse
java.lang.Object
org.sourcelab.buildkite.api.client.response.ListOrganizationsResponse
- All Implemented Interfaces:
PageableResponse<ListOrganizationsResponse>
public class ListOrganizationsResponse
extends Object
implements PageableResponse<ListOrganizationsResponse>
Represents the results from the /v2/build API end point.
-
Constructor Summary
ConstructorsConstructorDescriptionListOrganizationsResponse(PagingLinks pagingLinks, List<Organization> organizations, ListOrganizationsRequest originalRequest) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionintcount()The total number of builds found.getOrganizationById(String organizationId) Given an organization Id, return the organization associated with the Id.getOrganizationByName(String organizationName) Given an organization name, return the organization associated with the Name.getOrganizationBySlug(String slug) Given an organization slug, return the organization associated with the slug.Get all organization Ids.Get all organization names.All of the Organizations returned from the API response.Get all organization slugs.Get the original underlyingRequestused to generate this response.Paging Link references for the results.toString()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.sourcelab.buildkite.api.client.response.PageableResponse
hasFirstPage, hasLastPage, hasNextPage, hasPreviousPage
-
Constructor Details
-
ListOrganizationsResponse
public ListOrganizationsResponse(PagingLinks pagingLinks, List<Organization> organizations, ListOrganizationsRequest originalRequest) Constructor.- Parameters:
pagingLinks- Paging links for results.organizations- All organizations returned in the response.originalRequest- The original request used to retrieve these results.
-
-
Method Details
-
getPagingLinks
Paging Link references for the results.- Specified by:
getPagingLinksin interfacePageableResponse<ListOrganizationsResponse>- Returns:
- Paging Link references for the results.
-
getOriginalRequest
Description copied from interface:PageableResponseGet the original underlyingRequestused to generate this response.- Specified by:
getOriginalRequestin interfacePageableResponse<ListOrganizationsResponse>- Returns:
- Original underlying Request.
-
getOrganizations
All of the Organizations returned from the API response.- Returns:
- All of the Organizations returned from the API response.
-
count
public int count()The total number of builds found.- Returns:
- The total number of builds found.
-
getOrganizationIds
Get all organization Ids.- Returns:
- All organization ids.
-
getOrganizationNames
Get all organization names.- Returns:
- All organization names.
-
getOrganizationSlugIds
Get all organization slugs.- Returns:
- All organization slugs.
-
getOrganizationById
Given an organization Id, return the organization associated with the Id.- Parameters:
organizationId- Id of the organization to retrieve.- Returns:
- Organization by organizationId.
-
getOrganizationByName
Given an organization name, return the organization associated with the Name.- Parameters:
organizationName- Name of the organization to retrieve.- Returns:
- Organization by organization name.
-
getOrganizationBySlug
Given an organization slug, return the organization associated with the slug.- Parameters:
slug- slug of the organization to retrieve.- Returns:
- Organization by organization slug.
-
toString
-