Class Inventory.Builder (2.31.0)

public static final class Inventory.Builder extends GeneratedMessageV3.Builder<Inventory.Builder> implements InventoryOrBuilder

This API resource represents the available inventory data for a Compute Engine virtual machine (VM) instance at a given point in time.

You can use this API resource to determine the inventory data of your VM.

For more information, see Information provided by OS inventory management.

Protobuf type google.cloud.osconfig.v1.Inventory

Implements

InventoryOrBuilder

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public Inventory.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
Inventory.Builder
Overrides

build()

public Inventory build()
Returns
TypeDescription
Inventory

buildPartial()

public Inventory buildPartial()
Returns
TypeDescription
Inventory

clear()

public Inventory.Builder clear()
Returns
TypeDescription
Inventory.Builder
Overrides

clearField(Descriptors.FieldDescriptor field)

public Inventory.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
Inventory.Builder
Overrides

clearItems()

public Inventory.Builder clearItems()
Returns
TypeDescription
Inventory.Builder

clearName()

public Inventory.Builder clearName()

Output only. The Inventory API resource name.

Format: projects/{project_number}/locations/{location}/instances/{instance_id}/inventory

string name = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
Inventory.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public Inventory.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
Inventory.Builder
Overrides

clearOsInfo()

public Inventory.Builder clearOsInfo()

Base level operating system information for the VM.

.google.cloud.osconfig.v1.Inventory.OsInfo os_info = 1;

Returns
TypeDescription
Inventory.Builder

clearUpdateTime()

public Inventory.Builder clearUpdateTime()

Output only. Timestamp of the last reported inventory for the VM.

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

Returns
TypeDescription
Inventory.Builder

clone()

public Inventory.Builder clone()
Returns
TypeDescription
Inventory.Builder
Overrides

containsItems(String key)

public boolean containsItems(String key)

Inventory items related to the VM keyed by an opaque unique identifier for each inventory item. The identifier is unique to each distinct and addressable inventory item and will change, when there is a new package version.

map<string, .google.cloud.osconfig.v1.Inventory.Item> items = 2;

Parameter
NameDescription
keyString
Returns
TypeDescription
boolean

getDefaultInstanceForType()

public Inventory getDefaultInstanceForType()
Returns
TypeDescription
Inventory

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getItems()

public Map<String,Inventory.Item> getItems()

Use #getItemsMap() instead.

Returns
TypeDescription
Map<String,Item>

getItemsCount()

public int getItemsCount()

Inventory items related to the VM keyed by an opaque unique identifier for each inventory item. The identifier is unique to each distinct and addressable inventory item and will change, when there is a new package version.

map<string, .google.cloud.osconfig.v1.Inventory.Item> items = 2;

Returns
TypeDescription
int

getItemsMap()

public Map<String,Inventory.Item> getItemsMap()

Inventory items related to the VM keyed by an opaque unique identifier for each inventory item. The identifier is unique to each distinct and addressable inventory item and will change, when there is a new package version.

map<string, .google.cloud.osconfig.v1.Inventory.Item> items = 2;

Returns
TypeDescription
Map<String,Item>

getItemsOrDefault(String key, Inventory.Item defaultValue)

public Inventory.Item getItemsOrDefault(String key, Inventory.Item defaultValue)

Inventory items related to the VM keyed by an opaque unique identifier for each inventory item. The identifier is unique to each distinct and addressable inventory item and will change, when there is a new package version.

map<string, .google.cloud.osconfig.v1.Inventory.Item> items = 2;

Parameters
NameDescription
keyString
defaultValueInventory.Item
Returns
TypeDescription
Inventory.Item

getItemsOrThrow(String key)

public Inventory.Item getItemsOrThrow(String key)

Inventory items related to the VM keyed by an opaque unique identifier for each inventory item. The identifier is unique to each distinct and addressable inventory item and will change, when there is a new package version.

map<string, .google.cloud.osconfig.v1.Inventory.Item> items = 2;

Parameter
NameDescription
keyString
Returns
TypeDescription
Inventory.Item

getMutableItems()

public Map<String,Inventory.Item> getMutableItems()

Use alternate mutation accessors instead.

Returns
TypeDescription
Map<String,Item>

getName()

public String getName()

Output only. The Inventory API resource name.

Format: projects/{project_number}/locations/{location}/instances/{instance_id}/inventory

string name = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
String

The name.

getNameBytes()

public ByteString getNameBytes()

Output only. The Inventory API resource name.

Format: projects/{project_number}/locations/{location}/instances/{instance_id}/inventory

string name = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
ByteString

The bytes for name.

getOsInfo()

public Inventory.OsInfo getOsInfo()

Base level operating system information for the VM.

.google.cloud.osconfig.v1.Inventory.OsInfo os_info = 1;

Returns
TypeDescription
Inventory.OsInfo

The osInfo.

getOsInfoBuilder()

public Inventory.OsInfo.Builder getOsInfoBuilder()

Base level operating system information for the VM.

.google.cloud.osconfig.v1.Inventory.OsInfo os_info = 1;

Returns
TypeDescription
Inventory.OsInfo.Builder

getOsInfoOrBuilder()

public Inventory.OsInfoOrBuilder getOsInfoOrBuilder()

Base level operating system information for the VM.

.google.cloud.osconfig.v1.Inventory.OsInfo os_info = 1;

Returns
TypeDescription
Inventory.OsInfoOrBuilder

getUpdateTime()

public Timestamp getUpdateTime()

Output only. Timestamp of the last reported inventory for the VM.

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

Returns
TypeDescription
Timestamp

The updateTime.

getUpdateTimeBuilder()

public Timestamp.Builder getUpdateTimeBuilder()

Output only. Timestamp of the last reported inventory for the VM.

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

Returns
TypeDescription
Builder

getUpdateTimeOrBuilder()

public TimestampOrBuilder getUpdateTimeOrBuilder()

Output only. Timestamp of the last reported inventory for the VM.

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

Returns
TypeDescription
TimestampOrBuilder

hasOsInfo()

public boolean hasOsInfo()

Base level operating system information for the VM.

.google.cloud.osconfig.v1.Inventory.OsInfo os_info = 1;

Returns
TypeDescription
boolean

Whether the osInfo field is set.

hasUpdateTime()

public boolean hasUpdateTime()

Output only. Timestamp of the last reported inventory for the VM.

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

Returns
TypeDescription
boolean

Whether the updateTime field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

internalGetMapField(int number)

protected MapField internalGetMapField(int number)
Parameter
NameDescription
numberint
Returns
TypeDescription
MapField
Overrides

internalGetMutableMapField(int number)

protected MapField internalGetMutableMapField(int number)
Parameter
NameDescription
numberint
Returns
TypeDescription
MapField
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(Inventory other)

public Inventory.Builder mergeFrom(Inventory other)
Parameter
NameDescription
otherInventory
Returns
TypeDescription
Inventory.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public Inventory.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Inventory.Builder
Overrides
Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public Inventory.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
Inventory.Builder
Overrides

mergeOsInfo(Inventory.OsInfo value)

public Inventory.Builder mergeOsInfo(Inventory.OsInfo value)

Base level operating system information for the VM.

.google.cloud.osconfig.v1.Inventory.OsInfo os_info = 1;

Parameter
NameDescription
valueInventory.OsInfo
Returns
TypeDescription
Inventory.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final Inventory.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
Inventory.Builder
Overrides

mergeUpdateTime(Timestamp value)

public Inventory.Builder mergeUpdateTime(Timestamp value)

Output only. Timestamp of the last reported inventory for the VM.

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

Parameter
NameDescription
valueTimestamp
Returns
TypeDescription
Inventory.Builder

putAllItems(Map<String,Inventory.Item> values)

public Inventory.Builder putAllItems(Map<String,Inventory.Item> values)

Inventory items related to the VM keyed by an opaque unique identifier for each inventory item. The identifier is unique to each distinct and addressable inventory item and will change, when there is a new package version.

map<string, .google.cloud.osconfig.v1.Inventory.Item> items = 2;

Parameter
NameDescription
valuesMap<String,Item>
Returns
TypeDescription
Inventory.Builder

putItems(String key, Inventory.Item value)

public Inventory.Builder putItems(String key, Inventory.Item value)

Inventory items related to the VM keyed by an opaque unique identifier for each inventory item. The identifier is unique to each distinct and addressable inventory item and will change, when there is a new package version.

map<string, .google.cloud.osconfig.v1.Inventory.Item> items = 2;

Parameters
NameDescription
keyString
valueInventory.Item
Returns
TypeDescription
Inventory.Builder

removeItems(String key)

public Inventory.Builder removeItems(String key)

Inventory items related to the VM keyed by an opaque unique identifier for each inventory item. The identifier is unique to each distinct and addressable inventory item and will change, when there is a new package version.

map<string, .google.cloud.osconfig.v1.Inventory.Item> items = 2;

Parameter
NameDescription
keyString
Returns
TypeDescription
Inventory.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public Inventory.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
Inventory.Builder
Overrides

setName(String value)

public Inventory.Builder setName(String value)

Output only. The Inventory API resource name.

Format: projects/{project_number}/locations/{location}/instances/{instance_id}/inventory

string name = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
valueString

The name to set.

Returns
TypeDescription
Inventory.Builder

This builder for chaining.

setNameBytes(ByteString value)

public Inventory.Builder setNameBytes(ByteString value)

Output only. The Inventory API resource name.

Format: projects/{project_number}/locations/{location}/instances/{instance_id}/inventory

string name = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
valueByteString

The bytes for name to set.

Returns
TypeDescription
Inventory.Builder

This builder for chaining.

setOsInfo(Inventory.OsInfo value)

public Inventory.Builder setOsInfo(Inventory.OsInfo value)

Base level operating system information for the VM.

.google.cloud.osconfig.v1.Inventory.OsInfo os_info = 1;

Parameter
NameDescription
valueInventory.OsInfo
Returns
TypeDescription
Inventory.Builder

setOsInfo(Inventory.OsInfo.Builder builderForValue)

public Inventory.Builder setOsInfo(Inventory.OsInfo.Builder builderForValue)

Base level operating system information for the VM.

.google.cloud.osconfig.v1.Inventory.OsInfo os_info = 1;

Parameter
NameDescription
builderForValueInventory.OsInfo.Builder
Returns
TypeDescription
Inventory.Builder

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public Inventory.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
Inventory.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final Inventory.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
Inventory.Builder
Overrides

setUpdateTime(Timestamp value)

public Inventory.Builder setUpdateTime(Timestamp value)

Output only. Timestamp of the last reported inventory for the VM.

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

Parameter
NameDescription
valueTimestamp
Returns
TypeDescription
Inventory.Builder

setUpdateTime(Timestamp.Builder builderForValue)

public Inventory.Builder setUpdateTime(Timestamp.Builder builderForValue)

Output only. Timestamp of the last reported inventory for the VM.

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

Parameter
NameDescription
builderForValueBuilder
Returns
TypeDescription
Inventory.Builder