# Interface InstanceOrBuilder (0.26.0)

0.26.0 (latest) 0.24.0 0.21.0 0.20.0 0.18.0 0.16.0 0.15.0 0.14.0 0.13.0 0.11.0 0.9.0 0.8.0 0.7.0 0.6.0 0.5.0 0.3.0 0.1.0

    public interface InstanceOrBuilder 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)

Optional. Labels as key value pairs

`map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL];`

| **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` |   |

### containsProductActivation(String key)

    public abstract boolean containsProductActivation(String key)

Output only. Map with Product_Name and Activation State of the VM.

`
map<string, .google.cloud.licensemanager.v1.ActivationState> product_activation = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
`

| **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` |   |

### getComputeInstance()

    public abstract String getComputeInstance()

Required. Compute Instance resource name, i.e.
projects/{project}/zones/{zone}/instances/{instance}

`
string compute_instance = 9 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
`

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

### getComputeInstanceBytes()

    public abstract ByteString getComputeInstanceBytes()

Required. Compute Instance resource name, i.e.
projects/{project}/zones/{zone}/instances/{instance}

`
string compute_instance = 9 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
`

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

### getCreateTime()

    public abstract Timestamp getCreateTime()

Output only. \[Output only\] Create time stamp

`.google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Timestamp.html` | The createTime. |

### getCreateTimeOrBuilder()

    public abstract TimestampOrBuilder getCreateTimeOrBuilder()

Output only. \[Output only\] Create time stamp

`.google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.TimestampOrBuilder.html` |   |

### getLabels() (deprecated)

    public abstract Map<String,String> getLabels()

Use [#getLabelsMap()](https://docs.cloud.google.com/java/docs/reference/google-cloud-licensemanager/latest/com.google.cloud.licensemanager.v1.InstanceOrBuilder#com_google_cloud_licensemanager_v1_InstanceOrBuilder_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()

Optional. Labels as key value pairs

`map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL];`

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

### getLabelsMap()

    public abstract Map<String,String> getLabelsMap()

Optional. Labels as key value pairs

`map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL];`

| **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)

Optional. Labels as key value pairs

`map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL];`

| **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)

Optional. Labels as key value pairs

`map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL];`

| **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` |   |

### getLicenseVersionId()

    public abstract String getLicenseVersionId()

Output only. license version id.

`string license_version_id = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];`

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

### getLicenseVersionIdBytes()

    public abstract ByteString getLicenseVersionIdBytes()

Output only. license version id.

`string license_version_id = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];`

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

### getName()

    public abstract String getName()

Identifier. name of resource

`string name = 1 [(.google.api.field_behavior) = IDENTIFIER];`

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

### getNameBytes()

    public abstract ByteString getNameBytes()

Identifier. name of resource

`string name = 1 [(.google.api.field_behavior) = IDENTIFIER];`

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

### getProductActivation() (deprecated)

    public abstract Map<String,ActivationState> getProductActivation()

Use [#getProductActivationMap()](https://docs.cloud.google.com/java/docs/reference/google-cloud-licensemanager/latest/com.google.cloud.licensemanager.v1.InstanceOrBuilder#com_google_cloud_licensemanager_v1_InstanceOrBuilder_getProductActivationMap__) 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.cloud.google.com/java/docs/reference/google-cloud-licensemanager/latest/com.google.cloud.licensemanager.v1.ActivationState>` |   |

### getProductActivationCount()

    public abstract int getProductActivationCount()

Output only. Map with Product_Name and Activation State of the VM.

`
map<string, .google.cloud.licensemanager.v1.ActivationState> product_activation = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
`

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

### getProductActivationMap()

    public abstract Map<String,ActivationState> getProductActivationMap()

Output only. Map with Product_Name and Activation State of the VM.

`
map<string, .google.cloud.licensemanager.v1.ActivationState> product_activation = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
`

| **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.cloud.google.com/java/docs/reference/google-cloud-licensemanager/latest/com.google.cloud.licensemanager.v1.ActivationState>` |   |

### getProductActivationOrDefault(String key, ActivationState defaultValue)

    public abstract ActivationState getProductActivationOrDefault(String key, ActivationState defaultValue)

Output only. Map with Product_Name and Activation State of the VM.

`
map<string, .google.cloud.licensemanager.v1.ActivationState> product_activation = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
`

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `key` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` |
| `defaultValue` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-licensemanager/latest/com.google.cloud.licensemanager.v1.ActivationState` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-licensemanager/latest/com.google.cloud.licensemanager.v1.ActivationState` |   |

### getProductActivationOrThrow(String key)

    public abstract ActivationState getProductActivationOrThrow(String key)

Output only. Map with Product_Name and Activation State of the VM.

`
map<string, .google.cloud.licensemanager.v1.ActivationState> product_activation = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
`

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

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-licensemanager/latest/com.google.cloud.licensemanager.v1.ActivationState` |   |

### getProductActivationValue() (deprecated)

    public abstract Map<String,Integer> getProductActivationValue()

Use [#getProductActivationValueMap()](https://docs.cloud.google.com/java/docs/reference/google-cloud-licensemanager/latest/com.google.cloud.licensemanager.v1.InstanceOrBuilder#com_google_cloud_licensemanager_v1_InstanceOrBuilder_getProductActivationValueMap__) 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,java.lang.Integer>` |   |

### getProductActivationValueMap()

    public abstract Map<String,Integer> getProductActivationValueMap()

Output only. Map with Product_Name and Activation State of the VM.

`
map<string, .google.cloud.licensemanager.v1.ActivationState> product_activation = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
`

| **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,java.lang.Integer>` |   |

### getProductActivationValueOrDefault(String key, int defaultValue)

    public abstract int getProductActivationValueOrDefault(String key, int defaultValue)

Output only. Map with Product_Name and Activation State of the VM.

`
map<string, .google.cloud.licensemanager.v1.ActivationState> product_activation = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
`

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

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

### getProductActivationValueOrThrow(String key)

    public abstract int getProductActivationValueOrThrow(String key)

Output only. Map with Product_Name and Activation State of the VM.

`
map<string, .google.cloud.licensemanager.v1.ActivationState> product_activation = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
`

| **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` |   |

### getRegion()

    public abstract String getRegion()

Output only. The location of the VM.

`string region = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];`

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

### getRegionBytes()

    public abstract ByteString getRegionBytes()

Output only. The location of the VM.

`string region = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];`

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

### getState()

    public abstract Instance.State getState()

Output only. The state of the VM.

`
.google.cloud.licensemanager.v1.Instance.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-licensemanager/latest/com.google.cloud.licensemanager.v1.Instance.State` | The state. |

### getStateValue()

    public abstract int getStateValue()

Output only. The state of the VM.

`
.google.cloud.licensemanager.v1.Instance.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
`

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

### getUpdateTime()

    public abstract Timestamp getUpdateTime()

Output only. \[Output only\] Update time stamp

`.google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Timestamp.html` | The updateTime. |

### getUpdateTimeOrBuilder()

    public abstract TimestampOrBuilder getUpdateTimeOrBuilder()

Output only. \[Output only\] Update time stamp

`.google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.TimestampOrBuilder.html` |   |

### hasCreateTime()

    public abstract boolean hasCreateTime()

Output only. \[Output only\] Create time stamp

`.google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
`

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

### hasUpdateTime()

    public abstract boolean hasUpdateTime()

Output only. \[Output only\] Update time stamp

`.google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
`

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