@com.fasterxml.jackson.annotation.JsonIgnore public Builder copy(WorkRequestResource o) { Builder copiedBuilder = actionType(o.getActionType()) .entityType(o.getEntityType()) .identifier(o.getIdentifier()) .entityUri(o.getEntityUri()); copiedBuilder.__explicitlySet__.retainAll(o.__explicitlySet__); return copiedBuilder; } }
public WorkRequestResource build() { WorkRequestResource __instance__ = new WorkRequestResource(actionType, entityType, identifier, entityUri); __instance__.__explicitlySet__.addAll(__explicitlySet__); return __instance__; }
/** * Get cluster ID * * @param GetWorkRequestResponse The work request response for getting cluster ID * * @return cluster ID * * @throws Exception if there is an error */ private static String getClusterId(GetWorkRequestResponse getWorkRequestResponse) { String clusterId = null; List<WorkRequestResource> resources = getWorkRequestResponse.getWorkRequest().getResources(); for (WorkRequestResource resource : resources) { if (resource.getEntityType().equals("cluster")) { clusterId = resource.getIdentifier(); break; } } return clusterId; }
/** * Get the first work request resource ID that match the entity type * * @param GetWorkRequestResponse The work request response for getting work request resource ID * @param entityType resource entity type * * @return work request resource ID */ private static String getWorkRequestResourceId( final GetWorkRequestResponse getWorkRequestResponse, final String entityType) { String resourceId = null; List<WorkRequestResource> resources = getWorkRequestResponse.getWorkRequest().getResources(); for (WorkRequestResource resource : resources) { if (resource.getEntityType().equals(entityType)) { resourceId = resource.getIdentifier(); break; } } return resourceId; }