Class ListPipelinesResponse

java.lang.Object
org.sourcelab.buildkite.api.client.response.ListPipelinesResponse
All Implemented Interfaces:
PageableResponse<ListPipelinesResponse>

public class ListPipelinesResponse extends Object implements PageableResponse<ListPipelinesResponse>
Represents the results from the v2/organizations/{org.slug}/pipelines API end point.
  • Constructor Details

    • ListPipelinesResponse

      public ListPipelinesResponse(PagingLinks pagingLinks, List<Pipeline> pipelines, ListPipelinesRequest originalRequest)
      Constructor.
      Parameters:
      pagingLinks - Paging links for results.
      pipelines - All pipelines returned in the response.
      originalRequest - The original request used to retrieve these results.
  • Method Details

    • getPagingLinks

      public PagingLinks getPagingLinks()
      Paging Link references for the results.
      Specified by:
      getPagingLinks in interface PageableResponse<ListPipelinesResponse>
      Returns:
      Paging Link references for the results.
    • getOriginalRequest

      public PageableRequest<ListPipelinesResponse> getOriginalRequest()
      Description copied from interface: PageableResponse
      Get the original underlying Request used to generate this response.
      Specified by:
      getOriginalRequest in interface PageableResponse<ListPipelinesResponse>
      Returns:
      Original underlying Request.
    • getPipelines

      public List<Pipeline> getPipelines()
      All of the Pipelines returned from the API response.
      Returns:
      All of the Pipelines returned from the API response.
    • count

      public int count()
      The total number of pipelines found.
      Returns:
      The total number of pipelines found.
    • getPipelineIds

      public List<String> getPipelineIds()
      Get all pipeline Ids.
      Returns:
      All pipeline ids.
    • getPipelineNames

      public List<String> getPipelineNames()
      Get all pipeline names.
      Returns:
      All pipeline names.
    • getPipelineSlugIds

      public List<String> getPipelineSlugIds()
      Get all organization slugs.
      Returns:
      All organization slugs.
    • getPipelineById

      public Optional<Pipeline> getPipelineById(String pipelineId)
      Given an pipeline Id, return the pipeline associated with the Id.
      Parameters:
      pipelineId - Id of the pipeline to retrieve.
      Returns:
      pipeline by pipeline id.
    • getPipelineByName

      public Optional<Pipeline> getPipelineByName(String pipelineName)
      Given an pipeline name, return the pipeline associated with the Name.
      Parameters:
      pipelineName - Name of the pipeline to retrieve.
      Returns:
      pipeline by pipeline name.
    • getPipelineBySlug

      public Optional<Pipeline> getPipelineBySlug(String slug)
      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

      public String toString()
      Overrides:
      toString in class Object