# Interface ComputeEngineTargetDefaultsOrBuilder (0.16.0)

<button class="button button-with-icon cloud-select-dropdown__button " aria-haspopup="true">Version latest</button>

- [0.16.0 (latest)](https://docs.cloud.google.com/java/docs/reference/google-cloudevent-types/latest/com.google.events.cloud.vmmigration.v1.ComputeEngineTargetDefaultsOrBuilder)
- [0.15.0](https://docs.cloud.google.com/java/docs/reference/google-cloudevent-types/0.15.0/com.google.events.cloud.vmmigration.v1.ComputeEngineTargetDefaultsOrBuilder)
- [0.14.1](https://docs.cloud.google.com/java/docs/reference/google-cloudevent-types/0.14.1/com.google.events.cloud.vmmigration.v1.ComputeEngineTargetDefaultsOrBuilder)

    public interface ComputeEngineTargetDefaultsOrBuilder extends MessageOrBuilder

## Implements

[MessageOrBuilder](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.MessageOrBuilder.html)

## Methods

### containsLabels(String key)

    public abstract boolean containsLabels(String key)

A map of labels to associate with the VM.

`map<string, string> labels = 10;`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `key` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |   |

### containsMetadata(String key)

    public abstract boolean containsMetadata(String key)

The metadata key/value pairs to assign to the VM.

`map<string, string> metadata = 16;`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `key` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |   |

### getAdditionalLicenses(int index)

    public abstract String getAdditionalLicenses(int index)

Additional licenses to assign to the VM.

`repeated string additional_licenses = 17;`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `index` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` The index of the element to return. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` | The additionalLicenses at the given index. |

### getAdditionalLicensesBytes(int index)

    public abstract ByteString getAdditionalLicensesBytes(int index)

Additional licenses to assign to the VM.

`repeated string additional_licenses = 17;`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `index` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` The index of the value to return. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` | The bytes of the additionalLicenses at the given index. |

### getAdditionalLicensesCount()

    public abstract int getAdditionalLicensesCount()

Additional licenses to assign to the VM.

`repeated string additional_licenses = 17;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | The count of additionalLicenses. |

### getAdditionalLicensesList()

    public abstract List<String> getAdditionalLicensesList()

Additional licenses to assign to the VM.

`repeated string additional_licenses = 17;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/util/List.html<https://docs.oracle.com/javase/8/docs/api/java/lang/String.html>` | A list containing the additionalLicenses. |

### getAppliedLicense()

    public abstract AppliedLicense getAppliedLicense()

Output only. The OS license returned from the adaptation module report.

`.google.events.cloud.vmmigration.v1.AppliedLicense applied_license = 12;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloudevent-types/latest/com.google.events.cloud.vmmigration.v1.AppliedLicense` | The appliedLicense. |

### getAppliedLicenseOrBuilder()

    public abstract AppliedLicenseOrBuilder getAppliedLicenseOrBuilder()

Output only. The OS license returned from the adaptation module report.

`.google.events.cloud.vmmigration.v1.AppliedLicense applied_license = 12;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloudevent-types/latest/com.google.events.cloud.vmmigration.v1.AppliedLicenseOrBuilder` |   |

### getBootOption()

    public abstract ComputeEngineBootOption getBootOption()

Output only. The VM Boot Option, as set in the source vm.

`.google.events.cloud.vmmigration.v1.ComputeEngineBootOption boot_option = 15;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloudevent-types/latest/com.google.events.cloud.vmmigration.v1.ComputeEngineBootOption` | The bootOption. |

### getBootOptionValue()

    public abstract int getBootOptionValue()

Output only. The VM Boot Option, as set in the source vm.

`.google.events.cloud.vmmigration.v1.ComputeEngineBootOption boot_option = 15;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | The enum numeric value on the wire for bootOption. |

### getComputeScheduling()

    public abstract ComputeScheduling getComputeScheduling()

Compute instance scheduling information (if empty default is used).

`.google.events.cloud.vmmigration.v1.ComputeScheduling compute_scheduling = 13;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloudevent-types/latest/com.google.events.cloud.vmmigration.v1.ComputeScheduling` | The computeScheduling. |

### getComputeSchedulingOrBuilder()

    public abstract ComputeSchedulingOrBuilder getComputeSchedulingOrBuilder()

Compute instance scheduling information (if empty default is used).

`.google.events.cloud.vmmigration.v1.ComputeScheduling compute_scheduling = 13;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloudevent-types/latest/com.google.events.cloud.vmmigration.v1.ComputeSchedulingOrBuilder` |   |

### getDiskType()

    public abstract ComputeEngineDiskType getDiskType()

The disk type to use in the VM.

`.google.events.cloud.vmmigration.v1.ComputeEngineDiskType disk_type = 9;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloudevent-types/latest/com.google.events.cloud.vmmigration.v1.ComputeEngineDiskType` | The diskType. |

### getDiskTypeValue()

    public abstract int getDiskTypeValue()

The disk type to use in the VM.

`.google.events.cloud.vmmigration.v1.ComputeEngineDiskType disk_type = 9;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | The enum numeric value on the wire for diskType. |

### getHostname()

    public abstract String getHostname()

The hostname to assign to the VM.

`string hostname = 18;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` | The hostname. |

### getHostnameBytes()

    public abstract ByteString getHostnameBytes()

The hostname to assign to the VM.

`string hostname = 18;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` | The bytes for hostname. |

### getLabels()

    public abstract Map<String,String> getLabels()

Use [#getLabelsMap()](https://docs.cloud.google.com/java/docs/reference/google-cloudevent-types/latest/com.google.events.cloud.vmmigration.v1.ComputeEngineTargetDefaultsOrBuilder#com_google_events_cloud_vmmigration_v1_ComputeEngineTargetDefaultsOrBuilder_getLabelsMap__) instead.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/util/Map.html<https://docs.oracle.com/javase/8/docs/api/java/lang/String.html,https://docs.oracle.com/javase/8/docs/api/java/lang/String.html>` |   |

### getLabelsCount()

    public abstract int getLabelsCount()

A map of labels to associate with the VM.

`map<string, string> labels = 10;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |   |

### getLabelsMap()

    public abstract Map<String,String> getLabelsMap()

A map of labels to associate with the VM.

`map<string, string> labels = 10;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/util/Map.html<https://docs.oracle.com/javase/8/docs/api/java/lang/String.html,https://docs.oracle.com/javase/8/docs/api/java/lang/String.html>` |   |

### getLabelsOrDefault(String key, String defaultValue)

    public abstract String getLabelsOrDefault(String key, String defaultValue)

A map of labels to associate with the VM.

`map<string, string> labels = 10;`

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `key` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` |
| `defaultValue` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` |   |

### getLabelsOrThrow(String key)

    public abstract String getLabelsOrThrow(String key)

A map of labels to associate with the VM.

`map<string, string> labels = 10;`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `key` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` |   |

### getLicenseType()

    public abstract ComputeEngineLicenseType getLicenseType()

The license type to use in OS adaptation.

`.google.events.cloud.vmmigration.v1.ComputeEngineLicenseType license_type = 11;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloudevent-types/latest/com.google.events.cloud.vmmigration.v1.ComputeEngineLicenseType` | The licenseType. |

### getLicenseTypeValue()

    public abstract int getLicenseTypeValue()

The license type to use in OS adaptation.

`.google.events.cloud.vmmigration.v1.ComputeEngineLicenseType license_type = 11;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | The enum numeric value on the wire for licenseType. |

### getMachineType()

    public abstract String getMachineType()

The machine type to create the VM with.

`string machine_type = 5;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` | The machineType. |

### getMachineTypeBytes()

    public abstract ByteString getMachineTypeBytes()

The machine type to create the VM with.

`string machine_type = 5;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` | The bytes for machineType. |

### getMachineTypeSeries()

    public abstract String getMachineTypeSeries()

The machine type series to create the VM with.

`string machine_type_series = 4;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` | The machineTypeSeries. |

### getMachineTypeSeriesBytes()

    public abstract ByteString getMachineTypeSeriesBytes()

The machine type series to create the VM with.

`string machine_type_series = 4;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` | The bytes for machineTypeSeries. |

### getMetadata()

    public abstract Map<String,String> getMetadata()

Use [#getMetadataMap()](https://docs.cloud.google.com/java/docs/reference/google-cloudevent-types/latest/com.google.events.cloud.vmmigration.v1.ComputeEngineTargetDefaultsOrBuilder#com_google_events_cloud_vmmigration_v1_ComputeEngineTargetDefaultsOrBuilder_getMetadataMap__) instead.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/util/Map.html<https://docs.oracle.com/javase/8/docs/api/java/lang/String.html,https://docs.oracle.com/javase/8/docs/api/java/lang/String.html>` |   |

### getMetadataCount()

    public abstract int getMetadataCount()

The metadata key/value pairs to assign to the VM.

`map<string, string> metadata = 16;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |   |

### getMetadataMap()

    public abstract Map<String,String> getMetadataMap()

The metadata key/value pairs to assign to the VM.

`map<string, string> metadata = 16;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/util/Map.html<https://docs.oracle.com/javase/8/docs/api/java/lang/String.html,https://docs.oracle.com/javase/8/docs/api/java/lang/String.html>` |   |

### getMetadataOrDefault(String key, String defaultValue)

    public abstract String getMetadataOrDefault(String key, String defaultValue)

The metadata key/value pairs to assign to the VM.

`map<string, string> metadata = 16;`

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `key` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` |
| `defaultValue` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` |   |

### getMetadataOrThrow(String key)

    public abstract String getMetadataOrThrow(String key)

The metadata key/value pairs to assign to the VM.

`map<string, string> metadata = 16;`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `key` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` |   |

### getNetworkInterfaces(int index)

    public abstract NetworkInterface getNetworkInterfaces(int index)

List of NICs connected to this VM.

`repeated .google.events.cloud.vmmigration.v1.NetworkInterface network_interfaces = 7;
`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `index` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloudevent-types/latest/com.google.events.cloud.vmmigration.v1.NetworkInterface` |   |

### getNetworkInterfacesCount()

    public abstract int getNetworkInterfacesCount()

List of NICs connected to this VM.

`repeated .google.events.cloud.vmmigration.v1.NetworkInterface network_interfaces = 7;
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |   |

### getNetworkInterfacesList()

    public abstract List<NetworkInterface> getNetworkInterfacesList()

List of NICs connected to this VM.

`repeated .google.events.cloud.vmmigration.v1.NetworkInterface network_interfaces = 7;
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/util/List.html<https://docs.cloud.google.com/java/docs/reference/google-cloudevent-types/latest/com.google.events.cloud.vmmigration.v1.NetworkInterface>` |   |

### getNetworkInterfacesOrBuilder(int index)

    public abstract NetworkInterfaceOrBuilder getNetworkInterfacesOrBuilder(int index)

List of NICs connected to this VM.

`repeated .google.events.cloud.vmmigration.v1.NetworkInterface network_interfaces = 7;
`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `index` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloudevent-types/latest/com.google.events.cloud.vmmigration.v1.NetworkInterfaceOrBuilder` |   |

### getNetworkInterfacesOrBuilderList()

    public abstract List<? extends NetworkInterfaceOrBuilder> getNetworkInterfacesOrBuilderList()

List of NICs connected to this VM.

`repeated .google.events.cloud.vmmigration.v1.NetworkInterface network_interfaces = 7;
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/util/List.html<? extends com.google.events.cloud.vmmigration.v1.NetworkInterfaceOrBuilder>` |   |

### getNetworkTags(int index)

    public abstract String getNetworkTags(int index)

A map of network tags to associate with the VM.

`repeated string network_tags = 6;`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `index` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` The index of the element to return. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` | The networkTags at the given index. |

### getNetworkTagsBytes(int index)

    public abstract ByteString getNetworkTagsBytes(int index)

A map of network tags to associate with the VM.

`repeated string network_tags = 6;`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `index` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` The index of the value to return. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` | The bytes of the networkTags at the given index. |

### getNetworkTagsCount()

    public abstract int getNetworkTagsCount()

A map of network tags to associate with the VM.

`repeated string network_tags = 6;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | The count of networkTags. |

### getNetworkTagsList()

    public abstract List<String> getNetworkTagsList()

A map of network tags to associate with the VM.

`repeated string network_tags = 6;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/util/List.html<https://docs.oracle.com/javase/8/docs/api/java/lang/String.html>` | A list containing the networkTags. |

### getSecureBoot()

    public abstract boolean getSecureBoot()

Defines whether the instance has Secure Boot enabled.
This can be set to true only if the vm boot option is EFI.

`bool secure_boot = 14;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | The secureBoot. |

### getServiceAccount()

    public abstract String getServiceAccount()

The service account to associate the VM with.

`string service_account = 8;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` | The serviceAccount. |

### getServiceAccountBytes()

    public abstract ByteString getServiceAccountBytes()

The service account to associate the VM with.

`string service_account = 8;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` | The bytes for serviceAccount. |

### getTargetProject()

    public abstract String getTargetProject()

The full path of the resource of type TargetProject which represents the
Compute Engine project in which to create this VM.

`string target_project = 2;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` | The targetProject. |

### getTargetProjectBytes()

    public abstract ByteString getTargetProjectBytes()

The full path of the resource of type TargetProject which represents the
Compute Engine project in which to create this VM.

`string target_project = 2;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` | The bytes for targetProject. |

### getVmName()

    public abstract String getVmName()

The name of the VM to create.

`string vm_name = 1;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` | The vmName. |

### getVmNameBytes()

    public abstract ByteString getVmNameBytes()

The name of the VM to create.

`string vm_name = 1;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` | The bytes for vmName. |

### getZone()

    public abstract String getZone()

The zone in which to create the VM.

`string zone = 3;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` | The zone. |

### getZoneBytes()

    public abstract ByteString getZoneBytes()

The zone in which to create the VM.

`string zone = 3;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` | The bytes for zone. |

### hasAppliedLicense()

    public abstract boolean hasAppliedLicense()

Output only. The OS license returned from the adaptation module report.

`.google.events.cloud.vmmigration.v1.AppliedLicense applied_license = 12;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the appliedLicense field is set. |

### hasComputeScheduling()

    public abstract boolean hasComputeScheduling()

Compute instance scheduling information (if empty default is used).

`.google.events.cloud.vmmigration.v1.ComputeScheduling compute_scheduling = 13;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the computeScheduling field is set. |