target.apidocs.com.google.api.services.compute.model.Metadata.html Maven / Gradle / Ivy
Metadata (Compute Engine API v1-rev20240919-2.0.0)
com.google.api.services.compute.model
Class Metadata
- java.lang.Object
-
- java.util.AbstractMap<String,Object>
-
- com.google.api.client.util.GenericData
-
- com.google.api.client.json.GenericJson
-
- com.google.api.services.compute.model.Metadata
-
public final class Metadata
extends com.google.api.client.json.GenericJson
A metadata key/value entry.
This is the Java data model class that specifies how to parse/serialize into the JSON that is
transmitted over HTTP when working with the Compute Engine API. For a detailed explanation see:
https://developers.google.com/api-client-library/java/google-http-java-client/json
- Author:
- Google, Inc.
-
-
Nested Class Summary
Nested Classes
Modifier and Type
Class and Description
static class
Metadata.Items
Metadata
-
Nested classes/interfaces inherited from class com.google.api.client.util.GenericData
com.google.api.client.util.GenericData.Flags
-
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
-
Constructor Summary
Constructors
Constructor and Description
Metadata()
-
Method Summary
All Methods Instance Methods Concrete Methods
Modifier and Type
Method and Description
Metadata
clone()
byte[]
decodeFingerprint()
Specifies a fingerprint for this request, which is essentially a hash of the metadata's
contents and used for optimistic locking.
Metadata
encodeFingerprint(byte[] fingerprint)
Specifies a fingerprint for this request, which is essentially a hash of the metadata's
contents and used for optimistic locking.
String
getFingerprint()
Specifies a fingerprint for this request, which is essentially a hash of the metadata's
contents and used for optimistic locking.
List<Metadata.Items>
getItems()
Array of key/value pairs.
String
getKind()
[Output Only] Type of the resource.
Metadata
set(String fieldName,
Object value)
Metadata
setFingerprint(String fingerprint)
Specifies a fingerprint for this request, which is essentially a hash of the metadata's
contents and used for optimistic locking.
Metadata
setItems(List<Metadata.Items> items)
Array of key/value pairs.
Metadata
setKind(String kind)
[Output Only] Type of the resource.
-
Methods inherited from class com.google.api.client.json.GenericJson
getFactory, setFactory, toPrettyString, toString
-
Methods inherited from class com.google.api.client.util.GenericData
entrySet, equals, get, getClassInfo, getUnknownKeys, hashCode, put, putAll, remove, setUnknownKeys
-
Methods inherited from class java.util.AbstractMap
clear, containsKey, containsValue, isEmpty, keySet, size, values
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
-
-
Method Detail
-
getFingerprint
public String getFingerprint()
Specifies a fingerprint for this request, which is essentially a hash of the metadata's
contents and used for optimistic locking. The fingerprint is initially generated by Compute
Engine and changes after every request to modify or update metadata. You must always provide an
up-to-date fingerprint hash in order to update or change metadata, otherwise the request will
fail with error 412 conditionNotMet. To see the latest fingerprint, make a get() request to
retrieve the resource.
- Returns:
- value or
null
for none
- See Also:
decodeFingerprint()
-
decodeFingerprint
public byte[] decodeFingerprint()
Specifies a fingerprint for this request, which is essentially a hash of the metadata's
contents and used for optimistic locking. The fingerprint is initially generated by Compute
Engine and changes after every request to modify or update metadata. You must always provide an
up-to-date fingerprint hash in order to update or change metadata, otherwise the request will
fail with error 412 conditionNotMet. To see the latest fingerprint, make a get() request to
retrieve the resource.
- Returns:
- Base64 decoded value or
null
for none
- Since:
- 1.14
- See Also:
getFingerprint()
-
setFingerprint
public Metadata setFingerprint(String fingerprint)
Specifies a fingerprint for this request, which is essentially a hash of the metadata's
contents and used for optimistic locking. The fingerprint is initially generated by Compute
Engine and changes after every request to modify or update metadata. You must always provide an
up-to-date fingerprint hash in order to update or change metadata, otherwise the request will
fail with error 412 conditionNotMet. To see the latest fingerprint, make a get() request to
retrieve the resource.
- Parameters:
fingerprint
- fingerprint or null
for none
- See Also:
#encodeFingerprint()
-
encodeFingerprint
public Metadata encodeFingerprint(byte[] fingerprint)
Specifies a fingerprint for this request, which is essentially a hash of the metadata's
contents and used for optimistic locking. The fingerprint is initially generated by Compute
Engine and changes after every request to modify or update metadata. You must always provide an
up-to-date fingerprint hash in order to update or change metadata, otherwise the request will
fail with error 412 conditionNotMet. To see the latest fingerprint, make a get() request to
retrieve the resource.
- Since:
- 1.14
- See Also:
The value is encoded Base64 or {@code null} for none.
-
getItems
public List<Metadata.Items> getItems()
Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
- Returns:
- value or
null
for none
-
setItems
public Metadata setItems(List<Metadata.Items> items)
Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
- Parameters:
items
- items or null
for none
-
getKind
public String getKind()
[Output Only] Type of the resource. Always compute#metadata for metadata.
- Returns:
- value or
null
for none
-
setKind
public Metadata setKind(String kind)
[Output Only] Type of the resource. Always compute#metadata for metadata.
- Parameters:
kind
- kind or null
for none
-
set
public Metadata set(String fieldName,
Object value)
- Overrides:
set
in class com.google.api.client.json.GenericJson
-
clone
public Metadata clone()
- Overrides:
clone
in class com.google.api.client.json.GenericJson
Copyright © 2011–2024 Google. All rights reserved.