@Mapping(source = "message", target = "text") Destination sourceToDestination(Source source); }
@Mapping(source = "environmentId.accountId", target = "accountId") @Mapping(source = "environmentId.cluster", target = "clusterName") @Mapping(source = "environmentId.environmentName", target = "environmentName") @Mapping(source = "environmentType", target = "type") @Mapping(source = "environmentHealth", target = "health") @Mapping(source = "environmentStatus", target = "status") @Mapping(target = "recordVersion", ignore = true) @Mapping( target = "accountIdCluster", expression = "java(environment.getEnvironmentId().generateAccountIdCluster())" ) EnvironmentDDBRecord toEnvironmentDDBRecord(Environment environment);
@Mapping(target = "environmentId.accountId", source = "context.accountId") @Mapping(target = "environmentId.cluster", source = "cluster") @Mapping(target = "environmentId.environmentName", source = "request.environmentName") CreateEnvironmentRequest toDataServiceRequest( ApiGatewayRequestContext context, String cluster, CreateEnvironment.CreateEnvironmentRequest request);
@Mapping(target = "environmentId.accountId", source = "context.accountId") @Mapping(target = "environmentId.cluster", source = "cluster") @Mapping(target = "environmentId.environmentName", source = "environmentName") DeleteEnvironmentRequest toDataServiceRequest( ApiGatewayRequestContext context, String cluster, String environmentName, boolean forceDelete);
@Mapping(target = "environmentId.accountId", source = "context.accountId") @Mapping(target = "environmentId.cluster", source = "environment.cluster") @Mapping(target = "environmentId.environmentName", source = "environment.environmentName") // TODO: Add timestamps and status to frontend @Mapping(target = "createdTime", ignore = true) @Mapping(target = "lastUpdatedTime", ignore = true) @Mapping(target = "environmentStatus", ignore = true) Environment toDataService( ApiGatewayRequestContext context, com.amazonaws.blox.frontend.models.Environment environment);
@Mapping(target = "environmentId.accountId", source = "context.accountId") @Mapping(target = "environmentId.cluster", source = "cluster") @Mapping(target = "environmentId.environmentName", source = "environmentName") StartDeploymentRequest toDataServiceRequest( ApiGatewayRequestContext context, String cluster, String environmentName, String environmentRevisionId);
@Mapping(target = "createdTime", ignore = true) @Mapping(target = "lastUpdatedTime", ignore = true) @Mapping(target = "environmentStatus", ignore = true) @Mapping(target = "environmentHealth", ignore = true) @Mapping(target = "activeEnvironmentRevisionId", ignore = true) @Mapping(target = "latestEnvironmentRevisionId", ignore = true) @Mapping(target = "validEnvironment", ignore = true) Environment toEnvironment(CreateEnvironmentRequest createEnvironmentRequest);
@Mapping( target = "environmentNames", expression = "java(response.getEnvironmentIds().stream().map(e -> e.getEnvironmentName()).collect(java.util.stream.Collectors.toList()))" ) ListEnvironments.ListEnvironmentsResponse fromDataServiceResponse( ListEnvironmentsResponse response); }
@Mapping(target = "environmentId.accountId", source = "context.accountId") @Mapping(target = "environmentId.cluster", source = "cluster") @Mapping(target = "environmentId.environmentName", source = "environmentName") DescribeEnvironmentRevisionRequest toDataServiceRequest( ApiGatewayRequestContext context, String cluster, String environmentName, String environmentRevisionId);
@Mapping(target = "environmentId.accountId", source = "context.accountId") @Mapping(target = "environmentId.cluster", source = "cluster") @Mapping(target = "environmentId.environmentName", source = "environmentName") UpdateEnvironmentRequest toDataServiceRequest( ApiGatewayRequestContext context, String cluster, String environmentName, UpdateEnvironment.UpdateEnvironmentRequest request);
@Mapping(target = "environmentId.accountId", source = "context.accountId") @Mapping(target = "environmentId.cluster", source = "cluster") @Mapping(target = "environmentId.environmentName", source = "environmentName") DescribeEnvironmentRequest toDataServiceRequest( ApiGatewayRequestContext context, String cluster, String environmentName);
@Mapping(source = "environmentId.cluster", target = "clusterName") @Mapping(source = "environmentId.environmentName", target = "environmentName") @Mapping( target = "accountIdClusterEnvironmentName", expression = "java(environmentRevision.getEnvironmentId().generateAccountIdClusterEnvironmentName())" ) @Mapping(source = "instanceGroup.attributes", target = "attributes") @Mapping(target = "recordVersion", ignore = true) EnvironmentRevisionDDBRecord toEnvironmentRevisionDDBRecord( EnvironmentRevision environmentRevision);
@Mapping(target = "counts", ignore = true) EnvironmentRevision fromDataService( com.amazonaws.blox.dataservicemodel.v1.model.EnvironmentRevision environmentRevision); }
@Mapping(source = "environmentRevision.environmentRevisionId", target = "environmentRevisionId") CreateEnvironment.CreateEnvironmentResponse fromDataServiceResponse( com.amazonaws.blox.dataservicemodel.v1.model.wrappers.CreateEnvironmentResponse response); }
@InheritInverseConfiguration @Mapping( target = "environmentId.accountId", expression = "java(EnvironmentId.getAccountIdFromAccountIdCluster(environmentDDBRecord.getAccountIdCluster()))" ) @Mapping( target = "environmentId.cluster", expression = "java(EnvironmentId.getClusterFromAccountIdCluster(environmentDDBRecord.getAccountIdCluster()))" ) // TODO map deploymentConfiguration @Mapping(target = "deploymentConfiguration", ignore = true) Environment toEnvironment(EnvironmentDDBRecord environmentDDBRecord);
@InheritInverseConfiguration @Mapping( target = "environmentId.accountId", expression = "java(EnvironmentId.getAccountIdFromAccountIdClusterEnvironmentName(environmentRevisionDDBRecord.getAccountIdClusterEnvironmentName()))" ) EnvironmentRevision toEnvironmentRevision( EnvironmentRevisionDDBRecord environmentRevisionDDBRecord);
@Mapping(target = "fish.kind", source = "fish.type") @Mapping(target = "fish.name", constant = "Nemo") @Mapping(target = "ornament", ignore = true ) @Mapping(target = "material.materialType", source = "material") @Mapping(target = "material.manufacturer", constant = "MMM" ) @Mapping(target = "quality", ignore = true) FishTankDto map(FishTank source);
@Mappings({ @Mapping(source = "id", target = "id"), @Mapping(source = "type", target = "type"), @Mapping(source = "severity", target = "severity"), @Mapping(source = "reductionKey", target = "reductionKey"), @Mapping(source = "description", target = "description"), @Mapping(source = "lastEvent.eventUei", target = "uei"), @Mapping(source = "nodeLabel", target = "nodeLabel"), @Mapping(source = "logMsg", target = "logMessage"), }) public abstract AlarmSummaryDTO alarmToAlarmSummaryDTO(OnmsAlarm alarm);