use of bio.terra.workspace.generated.model.ApiResourceAttributesUnion in project terra-workspace-manager by DataBiosphere.
the class ControlledAiNotebookInstanceResource method toApiAttributesUnion.
@Override
public ApiResourceAttributesUnion toApiAttributesUnion() {
ApiResourceAttributesUnion union = new ApiResourceAttributesUnion();
union.gcpAiNotebookInstance(toApiAttributes());
return union;
}
use of bio.terra.workspace.generated.model.ApiResourceAttributesUnion in project terra-workspace-manager by DataBiosphere.
the class ControlledAzureNetworkResource method toApiAttributesUnion.
@Override
public ApiResourceAttributesUnion toApiAttributesUnion() {
ApiResourceAttributesUnion union = new ApiResourceAttributesUnion();
union.azureNetwork(toApiAttributes());
return union;
}
use of bio.terra.workspace.generated.model.ApiResourceAttributesUnion in project terra-workspace-manager by DataBiosphere.
the class ControlledAzureRelayNamespaceResource method toApiAttributesUnion.
@Override
public ApiResourceAttributesUnion toApiAttributesUnion() {
ApiResourceAttributesUnion union = new ApiResourceAttributesUnion();
union.azureRelayNamespace(toApiAttributes());
return union;
}
use of bio.terra.workspace.generated.model.ApiResourceAttributesUnion in project terra-workspace-manager by DataBiosphere.
the class ControlledAzureStorageResource method toApiAttributesUnion.
@Override
public ApiResourceAttributesUnion toApiAttributesUnion() {
ApiResourceAttributesUnion union = new ApiResourceAttributesUnion();
union.azureStorage(toApiAttributes());
return union;
}
use of bio.terra.workspace.generated.model.ApiResourceAttributesUnion in project terra-workspace-manager by DataBiosphere.
the class MakeApiResourceDescriptionTest method mapReferencedDataRepoSnapshotTest.
@Test
public void mapReferencedDataRepoSnapshotTest() throws Exception {
String snapshotId = UUID.randomUUID().toString();
String instanceName = RandomStringUtils.randomAlphabetic(5);
var resource = new ReferencedDataRepoSnapshotResource(workspaceId, resourceId, resourceName, description, cloning, instanceName, snapshotId);
ApiResourceDescription resourceDescription = resourceController.makeApiResourceDescription(resource);
validateWsmResource(resourceDescription);
ApiResourceAttributesUnion union = resourceDescription.getResourceAttributes();
ApiDataRepoSnapshotAttributes attributes = union.getGcpDataRepoSnapshot();
assertThat(attributes, is(notNullValue()));
assertEquals(attributes.getInstanceName(), instanceName);
assertEquals(attributes.getSnapshot(), snapshotId);
}
Aggregations