code: public PagedList<RedisPatchScheduleInner> listByRedisResource(final String resourceGroupName, final String cacheName) {
          ServiceResponse<Page<RedisPatchScheduleInner>> response = listByRedisResourceSinglePageAsync(resourceGroupName, cacheName).toBlocking().single();
          return new PagedList<RedisPatchScheduleInner>(response.body()) {
              @Override
              public Page<RedisPatchScheduleInner> nextPage(String nextPageLink) {
                  return listByRedisResourceNextSinglePageAsync(nextPageLink).toBlocking().single().body();
              }
          };
      }
docs: Gets all patch schedules in the specified redis cache (there is only one).
  
  @param resourceGroupName The name of the resource group.
  @param cacheName The name of the Redis cache.
  @throws IllegalArgumentException thrown if parameters fail the validation
  @throws CloudException thrown if the request is rejected by server
  @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
  @return the PagedList&lt;RedisPatchScheduleInner&gt; object if successful.