AllocationRequest constructor
AllocationRequest({
- String? namespace,
- MultiClusterSetting? multiClusterSetting,
- @Deprecated('This field is deprecated.') GameServerSelector? requiredGameServerSelector,
- @Deprecated('This field is deprecated.') Iterable<
GameServerSelector> ? preferredGameServerSelectors, - AllocationRequest_SchedulingStrategy? scheduling,
- MetaPatch? metaPatch,
- MetaPatch? metadata,
- Iterable<
GameServerSelector> ? gameServerSelectors,
Implementation
factory AllocationRequest({
$core.String? namespace,
MultiClusterSetting? multiClusterSetting,
@$core.Deprecated('This field is deprecated.')
GameServerSelector? requiredGameServerSelector,
@$core.Deprecated('This field is deprecated.')
$core.Iterable<GameServerSelector>? preferredGameServerSelectors,
AllocationRequest_SchedulingStrategy? scheduling,
MetaPatch? metaPatch,
MetaPatch? metadata,
$core.Iterable<GameServerSelector>? gameServerSelectors,
}) {
final _result = create();
if (namespace != null) {
_result.namespace = namespace;
}
if (multiClusterSetting != null) {
_result.multiClusterSetting = multiClusterSetting;
}
if (requiredGameServerSelector != null) {
// ignore: deprecated_member_use_from_same_package
_result.requiredGameServerSelector = requiredGameServerSelector;
}
if (preferredGameServerSelectors != null) {
// ignore: deprecated_member_use_from_same_package
_result.preferredGameServerSelectors.addAll(preferredGameServerSelectors);
}
if (scheduling != null) {
_result.scheduling = scheduling;
}
if (metaPatch != null) {
_result.metaPatch = metaPatch;
}
if (metadata != null) {
_result.metadata = metadata;
}
if (gameServerSelectors != null) {
_result.gameServerSelectors.addAll(gameServerSelectors);
}
return _result;
}