use of com.google.api.expr.v1alpha1.ListValue in project osate2 by osate.
the class DeploymentProperties method getPriorityMap.
public static Optional<List<PriorityMapping>> getPriorityMap(NamedElement lookupContext, Optional<Mode> mode) {
Property property = getPriorityMap_Property(lookupContext);
try {
PropertyExpression value = CodeGenUtil.lookupProperty(property, lookupContext, mode);
PropertyExpression resolved = CodeGenUtil.resolveNamedValue(value, lookupContext, mode);
return Optional.of(((ListValue) resolved).getOwnedListElements().stream().map(element1 -> {
PropertyExpression resolved1 = CodeGenUtil.resolveNamedValue(element1, lookupContext, mode);
return new PriorityMapping(resolved1, lookupContext, mode);
}).collect(Collectors.toList()));
} catch (PropertyNotPresentException e) {
return Optional.empty();
}
}
use of com.google.api.expr.v1alpha1.ListValue in project osate2 by osate.
the class DeploymentProperties method getProvidedConnectionQualityOfService.
public static Optional<List<SupportedConnectionQos>> getProvidedConnectionQualityOfService(NamedElement lookupContext, Optional<Mode> mode) {
Property property = getProvidedConnectionQualityOfService_Property(lookupContext);
try {
PropertyExpression value = CodeGenUtil.lookupProperty(property, lookupContext, mode);
PropertyExpression resolved = CodeGenUtil.resolveNamedValue(value, lookupContext, mode);
return Optional.of(((ListValue) resolved).getOwnedListElements().stream().map(element1 -> {
PropertyExpression resolved1 = CodeGenUtil.resolveNamedValue(element1, lookupContext, mode);
return SupportedConnectionQos.valueOf(resolved1);
}).collect(Collectors.toList()));
} catch (PropertyNotPresentException e) {
return Optional.empty();
}
}
use of com.google.api.expr.v1alpha1.ListValue in project osate2 by osate.
the class DeploymentProperties method getActualFunctionBinding.
public static Optional<List<InstanceObject>> getActualFunctionBinding(NamedElement lookupContext, Optional<Mode> mode) {
Property property = getActualFunctionBinding_Property(lookupContext);
try {
PropertyExpression value = CodeGenUtil.lookupProperty(property, lookupContext, mode);
PropertyExpression resolved = CodeGenUtil.resolveNamedValue(value, lookupContext, mode);
return Optional.of(((ListValue) resolved).getOwnedListElements().stream().map(element1 -> {
PropertyExpression resolved1 = CodeGenUtil.resolveNamedValue(element1, lookupContext, mode);
return ((InstanceReferenceValue) resolved1).getReferencedInstanceObject();
}).collect(Collectors.toList()));
} catch (PropertyNotPresentException e) {
return Optional.empty();
}
}
use of com.google.api.expr.v1alpha1.ListValue in project osate2 by osate.
the class DeploymentProperties method getRequiredVirtualBusClass.
public static Optional<List<Classifier>> getRequiredVirtualBusClass(NamedElement lookupContext, Optional<Mode> mode) {
Property property = getRequiredVirtualBusClass_Property(lookupContext);
try {
PropertyExpression value = CodeGenUtil.lookupProperty(property, lookupContext, mode);
PropertyExpression resolved = CodeGenUtil.resolveNamedValue(value, lookupContext, mode);
return Optional.of(((ListValue) resolved).getOwnedListElements().stream().map(element1 -> {
PropertyExpression resolved1 = CodeGenUtil.resolveNamedValue(element1, lookupContext, mode);
return ((ClassifierValue) resolved1).getClassifier();
}).collect(Collectors.toList()));
} catch (PropertyNotPresentException e) {
return Optional.empty();
}
}
use of com.google.api.expr.v1alpha1.ListValue in project osate2 by osate.
the class DeploymentProperties method getAllowedPeriod.
public static Optional<List<IntegerRangeWithUnits<TimeUnits>>> getAllowedPeriod(NamedElement lookupContext, Optional<Mode> mode) {
Property property = getAllowedPeriod_Property(lookupContext);
try {
PropertyExpression value = CodeGenUtil.lookupProperty(property, lookupContext, mode);
PropertyExpression resolved = CodeGenUtil.resolveNamedValue(value, lookupContext, mode);
return Optional.of(((ListValue) resolved).getOwnedListElements().stream().map(element1 -> {
PropertyExpression resolved1 = CodeGenUtil.resolveNamedValue(element1, lookupContext, mode);
return new IntegerRangeWithUnits<>(resolved1, TimeUnits.class, lookupContext, mode);
}).collect(Collectors.toList()));
} catch (PropertyNotPresentException e) {
return Optional.empty();
}
}
Aggregations