# Google Cloud Bare Metal Solution V2 Client - Class InstanceConfig (1.1.3)

1.1.3 (latest) 1.1.2 1.0.5 0.6.5 0.5.2 0.4.0 0.3.2 0.2.8 Reference documentation and code samples for the Google Cloud Bare Metal Solution V2 Client class InstanceConfig.

Configuration parameters for a new instance.

Generated from protobuf message `google.cloud.baremetalsolution.v2.InstanceConfig`

## Namespace

Google \\ Cloud \\ BareMetalSolution \\ V2

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ name` | `string` Output only. The name of the instance config. |
| `↳ id` | `string` A transient unique identifier to idenfity an instance within an ProvisioningConfig request. |
| `↳ instance_type` | `string` Instance type. [Available types](https://cloud.google.com/bare-metal/docs/bms-planning#server_configurations) |
| `↳ hyperthreading` | `bool` Whether the instance should be provisioned with Hyperthreading enabled. |
| `↳ os_image` | `string` OS image to initialize the instance. [Available images](https://cloud.google.com/bare-metal/docs/bms-planning#server_configurations) |
| `↳ client_network` | `https://docs.cloud.google.com/php/docs/reference/cloud-bare-metal-solution/latest/V2.InstanceConfig.NetworkAddress` Client network address. Filled if InstanceConfig.multivlan_config is false. |
| `↳ private_network` | `https://docs.cloud.google.com/php/docs/reference/cloud-bare-metal-solution/latest/V2.InstanceConfig.NetworkAddress` Private network address, if any. Filled if InstanceConfig.multivlan_config is false. |
| `↳ user_note` | `string` User note field, it can be used by customers to add additional information for the BMS Ops team . |
| `↳ account_networks_enabled` | `bool` If true networks can be from different projects of the same vendor account. |
| `↳ network_config` | `int` The type of network configuration on the instance. |
| `↳ network_template` | `string` Server network template name. Filled if InstanceConfig.multivlan_config is true. |
| `↳ logical_interfaces` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-bare-metal-solution/latest/V2.LogicalInterface>` List of logical interfaces for the instance. The number of logical interfaces will be the same as number of hardware bond/nic on the chosen network template. Filled if InstanceConfig.multivlan_config is true. |
| `↳ ssh_key_names` | `string[]` List of names of ssh keys used to provision the instance. |

### getName

Output only. The name of the instance config.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setName

Output only. The name of the instance config.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getId

A transient unique identifier to idenfity an instance within an
ProvisioningConfig request.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setId

A transient unique identifier to idenfity an instance within an
ProvisioningConfig request.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getInstanceType

Instance type.

[Available
types](https://cloud.google.com/bare-metal/docs/bms-planning#server_configurations)

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setInstanceType

Instance type.

[Available
types](https://cloud.google.com/bare-metal/docs/bms-planning#server_configurations)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getHyperthreading

Whether the instance should be provisioned with Hyperthreading enabled.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `bool` |   |

### setHyperthreading

Whether the instance should be provisioned with Hyperthreading enabled.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `bool` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getOsImage

OS image to initialize the instance.

[Available
images](https://cloud.google.com/bare-metal/docs/bms-planning#server_configurations)

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setOsImage

OS image to initialize the instance.

[Available
images](https://cloud.google.com/bare-metal/docs/bms-planning#server_configurations)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getClientNetwork

Client network address. Filled if InstanceConfig.multivlan_config is false.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-bare-metal-solution/latest/V2.InstanceConfig.NetworkAddress|null` |   |

### hasClientNetwork

### clearClientNetwork

### setClientNetwork

Client network address. Filled if InstanceConfig.multivlan_config is false.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-bare-metal-solution/latest/V2.InstanceConfig.NetworkAddress` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getPrivateNetwork

Private network address, if any. Filled if InstanceConfig.multivlan_config
is false.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-bare-metal-solution/latest/V2.InstanceConfig.NetworkAddress|null` |   |

### hasPrivateNetwork

### clearPrivateNetwork

### setPrivateNetwork

Private network address, if any. Filled if InstanceConfig.multivlan_config
is false.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-bare-metal-solution/latest/V2.InstanceConfig.NetworkAddress` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getUserNote

User note field, it can be used by customers to add additional information
for the BMS Ops team .

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setUserNote

User note field, it can be used by customers to add additional information
for the BMS Ops team .

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getAccountNetworksEnabled

If true networks can be from different projects of the same vendor account.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `bool` |   |

### setAccountNetworksEnabled

If true networks can be from different projects of the same vendor account.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `bool` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getNetworkConfig

The type of network configuration on the instance.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [NetworkConfig](https://docs.cloud.google.com/php/docs/reference/cloud-bare-metal-solution/latest/V2.InstanceConfig.NetworkConfig). |

### setNetworkConfig

The type of network configuration on the instance.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [NetworkConfig](https://docs.cloud.google.com/php/docs/reference/cloud-bare-metal-solution/latest/V2.InstanceConfig.NetworkConfig). |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getNetworkTemplate

Server network template name. Filled if InstanceConfig.multivlan_config is
true.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setNetworkTemplate

Server network template name. Filled if InstanceConfig.multivlan_config is
true.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getLogicalInterfaces

List of logical interfaces for the instance. The number of logical
interfaces will be the same as number of hardware bond/nic on the chosen
network template. Filled if InstanceConfig.multivlan_config is true.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<https://docs.cloud.google.com/php/docs/reference/cloud-bare-metal-solution/latest/V2.LogicalInterface>` |   |

### setLogicalInterfaces

List of logical interfaces for the instance. The number of logical
interfaces will be the same as number of hardware bond/nic on the chosen
network template. Filled if InstanceConfig.multivlan_config is true.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-bare-metal-solution/latest/V2.LogicalInterface>` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getSshKeyNames

List of names of ssh keys used to provision the instance.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<string>` |   |

### setSshKeyNames

List of names of ssh keys used to provision the instance.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string[]` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |