private ViewPermissionResponse getResponse(PermissionEntity entity, ResourceTypeEntity resourceType, ViewEntity viewEntity) {

    String viewName = viewEntity.getCommonName();
    String version = viewEntity.getVersion();
    Integer permissionId = entity.getId();
    String permissionName = entity.getPermissionName();
    String resourceName = resourceType.getName();
    ViewPermissionResponse.ViewPermissionInfo viewPermissionInfo  = new ViewPermissionResponse.ViewPermissionInfo(viewName,version,
                                                                    permissionId, permissionName, resourceName);

    return new ViewPermissionResponse(viewPermissionInfo);
  }
Returns response schema instance for REST endpoint /views/{viewName}/versions/{version}/permissions
@param entity         permission entity {@link PermissionEntity}
@param resourceType   resource type {@link ResourceTypeEntity}
@param viewEntity     view entity {@link ViewEntity}
@return {@link ViewPermissionResponse}
ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ViewPermissionResourceProvider.java