Class CreateWorkloadRequest.Builder (2.0.0)
Note: Some or all of the information on this page might not apply
to Trusted Cloud. For a list of services that are available in
Trusted Cloud, see Services available for
Trusted Cloud .
Version 2.0.0keyboard_arrow_down
public static final class CreateWorkloadRequest . Builder extends GeneratedMessageV3 . Builder<CreateWorkloadRequest . Builder > implements CreateWorkloadRequestOrBuilder
Request for creating a workload.
Protobuf type google.cloud.assuredworkloads.v1.CreateWorkloadRequest
Static Methods
getDescriptor()
public static final Descriptors . Descriptor getDescriptor ()
Returns
Methods
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public CreateWorkloadRequest . Builder addRepeatedField ( Descriptors . FieldDescriptor field , Object value )
Parameters
Returns
Overrides
build()
public CreateWorkloadRequest build ()
Returns
buildPartial()
public CreateWorkloadRequest buildPartial ()
Returns
clear()
public CreateWorkloadRequest . Builder clear ()
Returns
Overrides
clearExternalId()
public CreateWorkloadRequest . Builder clearExternalId ()
Optional. A identifier associated with the workload and underlying projects
which allows for the break down of billing costs for a workload. The value
provided for the identifier will add a label to the workload and contained
projects with the identifier as the value.
string external_id = 3 [(.google.api.field_behavior) = OPTIONAL];
Returns
clearField(Descriptors.FieldDescriptor field)
public CreateWorkloadRequest . Builder clearField ( Descriptors . FieldDescriptor field )
Parameter
Returns
Overrides
clearOneof(Descriptors.OneofDescriptor oneof)
public CreateWorkloadRequest . Builder clearOneof ( Descriptors . OneofDescriptor oneof )
Parameter
Returns
Overrides
clearParent()
public CreateWorkloadRequest . Builder clearParent ()
Required. The resource name of the new Workload's parent.
Must be of the form organizations/{org_id}/locations/{location_id}
.
string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
Returns
clearWorkload()
public CreateWorkloadRequest . Builder clearWorkload ()
Required. Assured Workload to create
.google.cloud.assuredworkloads.v1.Workload workload = 2 [(.google.api.field_behavior) = REQUIRED];
Returns
clone()
public CreateWorkloadRequest . Builder clone ()
Returns
Overrides
getDefaultInstanceForType()
public CreateWorkloadRequest getDefaultInstanceForType ()
Returns
getDescriptorForType()
public Descriptors . Descriptor getDescriptorForType ()
Returns
Overrides
getExternalId()
public String getExternalId ()
Optional. A identifier associated with the workload and underlying projects
which allows for the break down of billing costs for a workload. The value
provided for the identifier will add a label to the workload and contained
projects with the identifier as the value.
string external_id = 3 [(.google.api.field_behavior) = OPTIONAL];
Returns
Type
Description
String
The externalId.
getExternalIdBytes()
public ByteString getExternalIdBytes ()
Optional. A identifier associated with the workload and underlying projects
which allows for the break down of billing costs for a workload. The value
provided for the identifier will add a label to the workload and contained
projects with the identifier as the value.
string external_id = 3 [(.google.api.field_behavior) = OPTIONAL];
Returns
Type
Description
ByteString
The bytes for externalId.
getParent()
public String getParent ()
Required. The resource name of the new Workload's parent.
Must be of the form organizations/{org_id}/locations/{location_id}
.
string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
Returns
Type
Description
String
The parent.
getParentBytes()
public ByteString getParentBytes ()
Required. The resource name of the new Workload's parent.
Must be of the form organizations/{org_id}/locations/{location_id}
.
string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
Returns
getWorkload()
public Workload getWorkload ()
Required. Assured Workload to create
.google.cloud.assuredworkloads.v1.Workload workload = 2 [(.google.api.field_behavior) = REQUIRED];
Returns
getWorkloadBuilder()
public Workload . Builder getWorkloadBuilder ()
Required. Assured Workload to create
.google.cloud.assuredworkloads.v1.Workload workload = 2 [(.google.api.field_behavior) = REQUIRED];
Returns
getWorkloadOrBuilder()
public WorkloadOrBuilder getWorkloadOrBuilder ()
Required. Assured Workload to create
.google.cloud.assuredworkloads.v1.Workload workload = 2 [(.google.api.field_behavior) = REQUIRED];
Returns
hasWorkload()
public boolean hasWorkload ()
Required. Assured Workload to create
.google.cloud.assuredworkloads.v1.Workload workload = 2 [(.google.api.field_behavior) = REQUIRED];
Returns
Type
Description
boolean
Whether the workload field is set.
internalGetFieldAccessorTable()
protected GeneratedMessageV3 . FieldAccessorTable internalGetFieldAccessorTable ()
Returns
Overrides
isInitialized()
public final boolean isInitialized ()
Returns
Overrides
mergeFrom(CreateWorkloadRequest other)
public CreateWorkloadRequest . Builder mergeFrom ( CreateWorkloadRequest other )
Parameter
Returns
public CreateWorkloadRequest . Builder mergeFrom ( CodedInputStream input , ExtensionRegistryLite extensionRegistry )
Parameters
Returns
Overrides
Exceptions
mergeFrom(Message other)
public CreateWorkloadRequest . Builder mergeFrom ( Message other )
Parameter
Returns
Overrides
mergeUnknownFields(UnknownFieldSet unknownFields)
public final CreateWorkloadRequest . Builder mergeUnknownFields ( UnknownFieldSet unknownFields )
Parameter
Returns
Overrides
mergeWorkload(Workload value)
public CreateWorkloadRequest . Builder mergeWorkload ( Workload value )
Required. Assured Workload to create
.google.cloud.assuredworkloads.v1.Workload workload = 2 [(.google.api.field_behavior) = REQUIRED];
Parameter
Returns
setExternalId(String value)
public CreateWorkloadRequest . Builder setExternalId ( String value )
Optional. A identifier associated with the workload and underlying projects
which allows for the break down of billing costs for a workload. The value
provided for the identifier will add a label to the workload and contained
projects with the identifier as the value.
string external_id = 3 [(.google.api.field_behavior) = OPTIONAL];
Parameter
Name
Description
value
String
The externalId to set.
Returns
setExternalIdBytes(ByteString value)
public CreateWorkloadRequest . Builder setExternalIdBytes ( ByteString value )
Optional. A identifier associated with the workload and underlying projects
which allows for the break down of billing costs for a workload. The value
provided for the identifier will add a label to the workload and contained
projects with the identifier as the value.
string external_id = 3 [(.google.api.field_behavior) = OPTIONAL];
Parameter
Name
Description
value
ByteString
The bytes for externalId to set.
Returns
setField(Descriptors.FieldDescriptor field, Object value)
public CreateWorkloadRequest . Builder setField ( Descriptors . FieldDescriptor field , Object value )
Parameters
Returns
Overrides
setParent(String value)
public CreateWorkloadRequest . Builder setParent ( String value )
Required. The resource name of the new Workload's parent.
Must be of the form organizations/{org_id}/locations/{location_id}
.
string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
Parameter
Name
Description
value
String
The parent to set.
Returns
setParentBytes(ByteString value)
public CreateWorkloadRequest . Builder setParentBytes ( ByteString value )
Required. The resource name of the new Workload's parent.
Must be of the form organizations/{org_id}/locations/{location_id}
.
string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
Parameter
Name
Description
value
ByteString
The bytes for parent to set.
Returns
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
public CreateWorkloadRequest . Builder setRepeatedField ( Descriptors . FieldDescriptor field , int index , Object value )
Parameters
Returns
Overrides
setUnknownFields(UnknownFieldSet unknownFields)
public final CreateWorkloadRequest . Builder setUnknownFields ( UnknownFieldSet unknownFields )
Parameter
Returns
Overrides
setWorkload(Workload value)
public CreateWorkloadRequest . Builder setWorkload ( Workload value )
Required. Assured Workload to create
.google.cloud.assuredworkloads.v1.Workload workload = 2 [(.google.api.field_behavior) = REQUIRED];
Parameter
Returns
setWorkload(Workload.Builder builderForValue)
public CreateWorkloadRequest . Builder setWorkload ( Workload . Builder builderForValue )
Required. Assured Workload to create
.google.cloud.assuredworkloads.v1.Workload workload = 2 [(.google.api.field_behavior) = REQUIRED];
Parameter
Returns
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-08-07 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[],[]]