@Test public void translateForRead() { DescribeTypeResponse response = DescribeTypeResponse.builder() .arn("arn:aws:cloudformation:us-west-2:123456789012:type/resource/AWS-Test-Resource/00000002") .defaultVersionId("00000003") .description("some resource") .documentationUrl("https: .executionRoleArn("arn:aws:iam::123456789012:role/AppRole") .provisioningType(ProvisioningType.FULLY_MUTABLE) .schema("{ schema }") .sourceUrl("https: .type(RegistryType.RESOURCE) .typeName("AWS::Test::Resource") .visibility(Visibility.PRIVATE) .defaultVersionId("1") .build(); ResourceModel model = Translator.translateFromReadResponse(response); assertThat(model.getArn()).isEqualTo(response.arn()); assertThat(model.getVersionId()).isEqualTo(response.defaultVersionId()); assertThat(model.getTypeName()).isEqualTo(response.typeName()); }
static ResourceModel translateFromReadResponse(@NonNull final DescribeTypeResponse awsResponse) { return ResourceModel.builder() .arn(awsResponse.arn()) .versionId(awsResponse.defaultVersionId()) .typeName(awsResponse.typeName()) .build(); }
Translator { static ResourceModel translateFromReadResponse(@NonNull final DescribeTypeResponse awsResponse) { return ResourceModel.builder() .arn(awsResponse.arn()) .versionId(awsResponse.defaultVersionId()) .typeName(awsResponse.typeName()) .build(); } }
Translator { static ResourceModel translateFromReadResponse(@NonNull final DescribeTypeResponse awsResponse) { return ResourceModel.builder() .arn(awsResponse.arn()) .versionId(awsResponse.defaultVersionId()) .typeName(awsResponse.typeName()) .build(); }  }
Translator { static ResourceModel translateFromReadResponse(@NonNull final DescribeTypeResponse awsResponse) { return ResourceModel.builder() .arn(awsResponse.arn()) .versionId(awsResponse.defaultVersionId()) .typeName(awsResponse.typeName()) .build(); }   }
Translator { static ResourceModel translateFromReadResponse(@NonNull final DescribeTypeResponse awsResponse) { return ResourceModel.builder() .arn(awsResponse.arn()) .versionId(awsResponse.defaultVersionId()) .typeName(awsResponse.typeName()) .build(); }    }