[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-18 UTC."],[],[],null,["# Interface AllocationAffinityOrBuilder (0.31.0)\n\nVersion latestkeyboard_arrow_down\n\n- [0.31.0 (latest)](/java/docs/reference/google-cloud-backupdr/latest/com.google.cloud.backupdr.v1.AllocationAffinityOrBuilder)\n- [0.29.0](/java/docs/reference/google-cloud-backupdr/0.29.0/com.google.cloud.backupdr.v1.AllocationAffinityOrBuilder)\n- [0.27.0](/java/docs/reference/google-cloud-backupdr/0.27.0/com.google.cloud.backupdr.v1.AllocationAffinityOrBuilder)\n- [0.26.0](/java/docs/reference/google-cloud-backupdr/0.26.0/com.google.cloud.backupdr.v1.AllocationAffinityOrBuilder)\n- [0.23.0](/java/docs/reference/google-cloud-backupdr/0.23.0/com.google.cloud.backupdr.v1.AllocationAffinityOrBuilder)\n- [0.22.0](/java/docs/reference/google-cloud-backupdr/0.22.0/com.google.cloud.backupdr.v1.AllocationAffinityOrBuilder)\n- [0.21.0](/java/docs/reference/google-cloud-backupdr/0.21.0/com.google.cloud.backupdr.v1.AllocationAffinityOrBuilder)\n- [0.19.0](/java/docs/reference/google-cloud-backupdr/0.19.0/com.google.cloud.backupdr.v1.AllocationAffinityOrBuilder)\n- [0.18.0](/java/docs/reference/google-cloud-backupdr/0.18.0/com.google.cloud.backupdr.v1.AllocationAffinityOrBuilder)\n- [0.17.0](/java/docs/reference/google-cloud-backupdr/0.17.0/com.google.cloud.backupdr.v1.AllocationAffinityOrBuilder)\n- [0.16.0](/java/docs/reference/google-cloud-backupdr/0.16.0/com.google.cloud.backupdr.v1.AllocationAffinityOrBuilder)\n- [0.15.0](/java/docs/reference/google-cloud-backupdr/0.15.0/com.google.cloud.backupdr.v1.AllocationAffinityOrBuilder)\n- [0.14.0](/java/docs/reference/google-cloud-backupdr/0.14.0/com.google.cloud.backupdr.v1.AllocationAffinityOrBuilder)\n- [0.13.0](/java/docs/reference/google-cloud-backupdr/0.13.0/com.google.cloud.backupdr.v1.AllocationAffinityOrBuilder)\n- [0.12.0](/java/docs/reference/google-cloud-backupdr/0.12.0/com.google.cloud.backupdr.v1.AllocationAffinityOrBuilder)\n- [0.11.0](/java/docs/reference/google-cloud-backupdr/0.11.0/com.google.cloud.backupdr.v1.AllocationAffinityOrBuilder)\n- [0.10.0](/java/docs/reference/google-cloud-backupdr/0.10.0/com.google.cloud.backupdr.v1.AllocationAffinityOrBuilder)\n- [0.8.0](/java/docs/reference/google-cloud-backupdr/0.8.0/com.google.cloud.backupdr.v1.AllocationAffinityOrBuilder)\n- [0.7.0](/java/docs/reference/google-cloud-backupdr/0.7.0/com.google.cloud.backupdr.v1.AllocationAffinityOrBuilder)\n- [0.6.0](/java/docs/reference/google-cloud-backupdr/0.6.0/com.google.cloud.backupdr.v1.AllocationAffinityOrBuilder)\n- [0.5.0](/java/docs/reference/google-cloud-backupdr/0.5.0/com.google.cloud.backupdr.v1.AllocationAffinityOrBuilder)\n- [0.4.0](/java/docs/reference/google-cloud-backupdr/0.4.0/com.google.cloud.backupdr.v1.AllocationAffinityOrBuilder)\n- [0.3.0](/java/docs/reference/google-cloud-backupdr/0.3.0/com.google.cloud.backupdr.v1.AllocationAffinityOrBuilder)\n- [0.2.0](/java/docs/reference/google-cloud-backupdr/0.2.0/com.google.cloud.backupdr.v1.AllocationAffinityOrBuilder)\n- [0.1.0](/java/docs/reference/google-cloud-backupdr/0.1.0/com.google.cloud.backupdr.v1.AllocationAffinityOrBuilder) \n\n public interface AllocationAffinityOrBuilder 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### getConsumeAllocationType()\n\n public abstract AllocationAffinity.Type getConsumeAllocationType()\n\nOptional. Specifies the type of reservation from which this instance can\nconsume\n\n`\noptional .google.cloud.backupdr.v1.AllocationAffinity.Type consume_allocation_type = 1 [json_name = \"consumeReservationType\", (.google.api.field_behavior) = OPTIONAL];\n`\n\n### getConsumeAllocationTypeValue()\n\n public abstract int getConsumeAllocationTypeValue()\n\nOptional. Specifies the type of reservation from which this instance can\nconsume\n\n`\noptional .google.cloud.backupdr.v1.AllocationAffinity.Type consume_allocation_type = 1 [json_name = \"consumeReservationType\", (.google.api.field_behavior) = OPTIONAL];\n`\n\n### getKey()\n\n public abstract String getKey()\n\nOptional. Corresponds to the label key of a reservation resource.\n\n`optional string key = 2 [(.google.api.field_behavior) = OPTIONAL];`\n\n### getKeyBytes()\n\n public abstract ByteString getKeyBytes()\n\nOptional. Corresponds to the label key of a reservation resource.\n\n`optional string key = 2 [(.google.api.field_behavior) = OPTIONAL];`\n\n### getValues(int index)\n\n public abstract String getValues(int index)\n\nOptional. Corresponds to the label values of a reservation resource.\n\n`repeated string values = 3 [(.google.api.field_behavior) = OPTIONAL];`\n\n### getValuesBytes(int index)\n\n public abstract ByteString getValuesBytes(int index)\n\nOptional. Corresponds to the label values of a reservation resource.\n\n`repeated string values = 3 [(.google.api.field_behavior) = OPTIONAL];`\n\n### getValuesCount()\n\n public abstract int getValuesCount()\n\nOptional. Corresponds to the label values of a reservation resource.\n\n`repeated string values = 3 [(.google.api.field_behavior) = OPTIONAL];`\n\n### getValuesList()\n\n public abstract List\u003cString\u003e getValuesList()\n\nOptional. Corresponds to the label values of a reservation resource.\n\n`repeated string values = 3 [(.google.api.field_behavior) = OPTIONAL];`\n\n### hasConsumeAllocationType()\n\n public abstract boolean hasConsumeAllocationType()\n\nOptional. Specifies the type of reservation from which this instance can\nconsume\n\n`\noptional .google.cloud.backupdr.v1.AllocationAffinity.Type consume_allocation_type = 1 [json_name = \"consumeReservationType\", (.google.api.field_behavior) = OPTIONAL];\n`\n\n### hasKey()\n\n public abstract boolean hasKey()\n\nOptional. Corresponds to the label key of a reservation resource.\n\n`optional string key = 2 [(.google.api.field_behavior) = OPTIONAL];`"]]