Whether the Instance should be automatically restarted whenever it is
terminated by Compute Engine (not terminated by user).
This configuration is identical to automaticRestart field in Compute
Engine create instance under scheduling.
It was changed to an enum (instead of a boolean) to match the default
value in Compute Engine which is automatic restart.
Whether the Instance should be automatically restarted whenever it is
terminated by Compute Engine (not terminated by user).
This configuration is identical to automaticRestart field in Compute
Engine create instance under scheduling.
It was changed to an enum (instead of a boolean) to match the default
value in Compute Engine which is automatic restart.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[],[],null,["# Interface ComputeSchedulingOrBuilder (0.16.0)\n\nVersion latestkeyboard_arrow_down\n\n- [0.16.0 (latest)](/java/docs/reference/google-cloudevent-types/latest/com.google.events.cloud.vmmigration.v1.ComputeSchedulingOrBuilder)\n- [0.15.0](/java/docs/reference/google-cloudevent-types/0.15.0/com.google.events.cloud.vmmigration.v1.ComputeSchedulingOrBuilder)\n- [0.14.1](/java/docs/reference/google-cloudevent-types/0.14.1/com.google.events.cloud.vmmigration.v1.ComputeSchedulingOrBuilder) \n\n public interface ComputeSchedulingOrBuilder extends MessageOrBuilder\n\nImplements\n----------\n\n[MessageOrBuilder](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.MessageOrBuilder.html)\n\nMethods\n-------\n\n### getMinNodeCpus()\n\n public abstract int getMinNodeCpus()\n\nThe minimum number of virtual CPUs this instance will consume when\nrunning on a sole-tenant node. Ignored if no node_affinites are\nconfigured.\n\n`int32 min_node_cpus = 4;`\n\n### getNodeAffinities(int index)\n\n public abstract SchedulingNodeAffinity getNodeAffinities(int index)\n\nA set of node affinity and anti-affinity configurations for sole tenant\nnodes.\n\n`repeated .google.events.cloud.vmmigration.v1.SchedulingNodeAffinity node_affinities = 3;\n`\n\n### getNodeAffinitiesCount()\n\n public abstract int getNodeAffinitiesCount()\n\nA set of node affinity and anti-affinity configurations for sole tenant\nnodes.\n\n`repeated .google.events.cloud.vmmigration.v1.SchedulingNodeAffinity node_affinities = 3;\n`\n\n### getNodeAffinitiesList()\n\n public abstract List\u003cSchedulingNodeAffinity\u003e getNodeAffinitiesList()\n\nA set of node affinity and anti-affinity configurations for sole tenant\nnodes.\n\n`repeated .google.events.cloud.vmmigration.v1.SchedulingNodeAffinity node_affinities = 3;\n`\n\n### getNodeAffinitiesOrBuilder(int index)\n\n public abstract SchedulingNodeAffinityOrBuilder getNodeAffinitiesOrBuilder(int index)\n\nA set of node affinity and anti-affinity configurations for sole tenant\nnodes.\n\n`repeated .google.events.cloud.vmmigration.v1.SchedulingNodeAffinity node_affinities = 3;\n`\n\n### getNodeAffinitiesOrBuilderList()\n\n public abstract List\u003c? extends SchedulingNodeAffinityOrBuilder\u003e getNodeAffinitiesOrBuilderList()\n\nA set of node affinity and anti-affinity configurations for sole tenant\nnodes.\n\n`repeated .google.events.cloud.vmmigration.v1.SchedulingNodeAffinity node_affinities = 3;\n`\n\n### getOnHostMaintenance()\n\n public abstract ComputeScheduling.OnHostMaintenance getOnHostMaintenance()\n\nHow the instance should behave when the host machine undergoes\nmaintenance that may temporarily impact instance performance.\n\n`\n.google.events.cloud.vmmigration.v1.ComputeScheduling.OnHostMaintenance on_host_maintenance = 1;\n`\n\n### getOnHostMaintenanceValue()\n\n public abstract int getOnHostMaintenanceValue()\n\nHow the instance should behave when the host machine undergoes\nmaintenance that may temporarily impact instance performance.\n\n`\n.google.events.cloud.vmmigration.v1.ComputeScheduling.OnHostMaintenance on_host_maintenance = 1;\n`\n\n### getRestartType()\n\n public abstract ComputeScheduling.RestartType getRestartType()\n\nWhether the Instance should be automatically restarted whenever it is\nterminated by Compute Engine (not terminated by user).\nThis configuration is identical to `automaticRestart` field in Compute\nEngine create instance under scheduling.\nIt was changed to an enum (instead of a boolean) to match the default\nvalue in Compute Engine which is automatic restart.\n\n`.google.events.cloud.vmmigration.v1.ComputeScheduling.RestartType restart_type = 5;\n`\n\n### getRestartTypeValue()\n\n public abstract int getRestartTypeValue()\n\nWhether the Instance should be automatically restarted whenever it is\nterminated by Compute Engine (not terminated by user).\nThis configuration is identical to `automaticRestart` field in Compute\nEngine create instance under scheduling.\nIt was changed to an enum (instead of a boolean) to match the default\nvalue in Compute Engine which is automatic restart.\n\n`.google.events.cloud.vmmigration.v1.ComputeScheduling.RestartType restart_type = 5;\n`"]]