use of com.hubspot.singularity.api.SingularityUpdateGroupsRequest in project Singularity by HubSpot.
the class SingularityClient method checkAuthForRequestGroupsUpdate.
public boolean checkAuthForRequestGroupsUpdate(String requestId, SingularityUpdateGroupsRequest updateGroupsRequest) {
final Function<String, String> requestUri = (host) -> String.format(REQUEST_GROUPS_UPDATE_AUTH_CHECK_FORMAT, getApiBase(host), requestId);
final HttpResponse response = post(requestUri, String.format("check auth for update authorized groups of request %s", requestId), Optional.of(updateGroupsRequest));
return response.isSuccess();
}
use of com.hubspot.singularity.api.SingularityUpdateGroupsRequest in project Singularity by HubSpot.
the class SingularityClient method updateAuthorizedGroups.
public SingularityPendingRequestParent updateAuthorizedGroups(String requestId, SingularityUpdateGroupsRequest updateGroupsRequest) {
final Function<String, String> requestUri = (host) -> String.format(REQUEST_GROUPS_UPDATE_FORMAT, getApiBase(host), requestId);
final HttpResponse response = post(requestUri, String.format("update authorized groups of request %s", requestId), Optional.of(updateGroupsRequest));
return response.getAs(SingularityPendingRequestParent.class);
}
Aggregations