Search in sources :

Example 6 with ReferencedBigQueryDatasetResource

use of bio.terra.workspace.service.resource.referenced.cloud.gcp.bqdataset.ReferencedBigQueryDatasetResource in project terra-workspace-manager by DataBiosphere.

the class ReferencedGcpResourceController method getBigQueryDatasetReferenceByName.

@Override
public ResponseEntity<ApiGcpBigQueryDatasetResource> getBigQueryDatasetReferenceByName(UUID id, String name) {
    AuthenticatedUserRequest userRequest = getAuthenticatedInfo();
    ReferencedBigQueryDatasetResource referenceResource = referenceResourceService.getReferenceResourceByName(id, name, userRequest).castByEnum(WsmResourceType.REFERENCED_GCP_BIG_QUERY_DATASET);
    return new ResponseEntity<>(referenceResource.toApiResource(), HttpStatus.OK);
}
Also used : ResponseEntity(org.springframework.http.ResponseEntity) AuthenticatedUserRequest(bio.terra.workspace.service.iam.AuthenticatedUserRequest) ReferencedBigQueryDatasetResource(bio.terra.workspace.service.resource.referenced.cloud.gcp.bqdataset.ReferencedBigQueryDatasetResource)

Aggregations

ReferencedBigQueryDatasetResource (bio.terra.workspace.service.resource.referenced.cloud.gcp.bqdataset.ReferencedBigQueryDatasetResource)6 ResponseEntity (org.springframework.http.ResponseEntity)5 AuthenticatedUserRequest (bio.terra.workspace.service.iam.AuthenticatedUserRequest)4 BaseUnitTest (bio.terra.workspace.common.BaseUnitTest)1 ApiCloneReferencedGcpBigQueryDatasetResourceResult (bio.terra.workspace.generated.model.ApiCloneReferencedGcpBigQueryDatasetResourceResult)1 ApiGcpBigQueryDatasetAttributes (bio.terra.workspace.generated.model.ApiGcpBigQueryDatasetAttributes)1 ApiResourceAttributesUnion (bio.terra.workspace.generated.model.ApiResourceAttributesUnion)1 ApiResourceDescription (bio.terra.workspace.generated.model.ApiResourceDescription)1 CloningInstructions (bio.terra.workspace.service.resource.model.CloningInstructions)1 ReferencedResource (bio.terra.workspace.service.resource.referenced.cloud.gcp.ReferencedResource)1 Test (org.junit.jupiter.api.Test)1