Class GuestPolicies.CreateGuestPolicyRequest.Builder (2.22.0)

public static final class GuestPolicies.CreateGuestPolicyRequest.Builder extends GeneratedMessageV3.Builder<GuestPolicies.CreateGuestPolicyRequest.Builder> implements GuestPolicies.CreateGuestPolicyRequestOrBuilder

A request message for creating a guest policy.

Protobuf type google.cloud.osconfig.v1beta.CreateGuestPolicyRequest

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public GuestPolicies.CreateGuestPolicyRequest build()
Returns
TypeDescription
GuestPolicies.CreateGuestPolicyRequest

buildPartial()

public GuestPolicies.CreateGuestPolicyRequest buildPartial()
Returns
TypeDescription
GuestPolicies.CreateGuestPolicyRequest

clear()

public GuestPolicies.CreateGuestPolicyRequest.Builder clear()
Returns
TypeDescription
GuestPolicies.CreateGuestPolicyRequest.Builder
Overrides

clearField(Descriptors.FieldDescriptor field)

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

clearGuestPolicy()

public GuestPolicies.CreateGuestPolicyRequest.Builder clearGuestPolicy()

Required. The GuestPolicy to create.

.google.cloud.osconfig.v1beta.GuestPolicy guest_policy = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
GuestPolicies.CreateGuestPolicyRequest.Builder

clearGuestPolicyId()

public GuestPolicies.CreateGuestPolicyRequest.Builder clearGuestPolicyId()

Required. The logical name of the guest policy in the project with the following restrictions:

  • Must contain only lowercase letters, numbers, and hyphens.
  • Must start with a letter.
  • Must be between 1-63 characters.
  • Must end with a number or a letter.
  • Must be unique within the project.

string guest_policy_id = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
GuestPolicies.CreateGuestPolicyRequest.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearParent()

public GuestPolicies.CreateGuestPolicyRequest.Builder clearParent()

Required. The resource name of the parent using one of the following forms: projects/{project_number}.

string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Returns
TypeDescription
GuestPolicies.CreateGuestPolicyRequest.Builder

This builder for chaining.

clone()

public GuestPolicies.CreateGuestPolicyRequest.Builder clone()
Returns
TypeDescription
GuestPolicies.CreateGuestPolicyRequest.Builder
Overrides

getDefaultInstanceForType()

public GuestPolicies.CreateGuestPolicyRequest getDefaultInstanceForType()
Returns
TypeDescription
GuestPolicies.CreateGuestPolicyRequest

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getGuestPolicy()

public GuestPolicies.GuestPolicy getGuestPolicy()

Required. The GuestPolicy to create.

.google.cloud.osconfig.v1beta.GuestPolicy guest_policy = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
GuestPolicies.GuestPolicy

The guestPolicy.

getGuestPolicyBuilder()

public GuestPolicies.GuestPolicy.Builder getGuestPolicyBuilder()

Required. The GuestPolicy to create.

.google.cloud.osconfig.v1beta.GuestPolicy guest_policy = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
GuestPolicies.GuestPolicy.Builder

getGuestPolicyId()

public String getGuestPolicyId()

Required. The logical name of the guest policy in the project with the following restrictions:

  • Must contain only lowercase letters, numbers, and hyphens.
  • Must start with a letter.
  • Must be between 1-63 characters.
  • Must end with a number or a letter.
  • Must be unique within the project.

string guest_policy_id = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
String

The guestPolicyId.

getGuestPolicyIdBytes()

public ByteString getGuestPolicyIdBytes()

Required. The logical name of the guest policy in the project with the following restrictions:

  • Must contain only lowercase letters, numbers, and hyphens.
  • Must start with a letter.
  • Must be between 1-63 characters.
  • Must end with a number or a letter.
  • Must be unique within the project.

string guest_policy_id = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
ByteString

The bytes for guestPolicyId.

getGuestPolicyOrBuilder()

public GuestPolicies.GuestPolicyOrBuilder getGuestPolicyOrBuilder()

Required. The GuestPolicy to create.

.google.cloud.osconfig.v1beta.GuestPolicy guest_policy = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
GuestPolicies.GuestPolicyOrBuilder

getParent()

public String getParent()

Required. The resource name of the parent using one of the following forms: projects/{project_number}.

string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Returns
TypeDescription
String

The parent.

getParentBytes()

public ByteString getParentBytes()

Required. The resource name of the parent using one of the following forms: projects/{project_number}.

string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Returns
TypeDescription
ByteString

The bytes for parent.

hasGuestPolicy()

public boolean hasGuestPolicy()

Required. The GuestPolicy to create.

.google.cloud.osconfig.v1beta.GuestPolicy guest_policy = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
boolean

Whether the guestPolicy field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(GuestPolicies.CreateGuestPolicyRequest other)

public GuestPolicies.CreateGuestPolicyRequest.Builder mergeFrom(GuestPolicies.CreateGuestPolicyRequest other)
Parameter
NameDescription
otherGuestPolicies.CreateGuestPolicyRequest
Returns
TypeDescription
GuestPolicies.CreateGuestPolicyRequest.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeGuestPolicy(GuestPolicies.GuestPolicy value)

public GuestPolicies.CreateGuestPolicyRequest.Builder mergeGuestPolicy(GuestPolicies.GuestPolicy value)

Required. The GuestPolicy to create.

.google.cloud.osconfig.v1beta.GuestPolicy guest_policy = 3 [(.google.api.field_behavior) = REQUIRED];

Parameter
NameDescription
valueGuestPolicies.GuestPolicy
Returns
TypeDescription
GuestPolicies.CreateGuestPolicyRequest.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

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

setField(Descriptors.FieldDescriptor field, Object value)

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

setGuestPolicy(GuestPolicies.GuestPolicy value)

public GuestPolicies.CreateGuestPolicyRequest.Builder setGuestPolicy(GuestPolicies.GuestPolicy value)

Required. The GuestPolicy to create.

.google.cloud.osconfig.v1beta.GuestPolicy guest_policy = 3 [(.google.api.field_behavior) = REQUIRED];

Parameter
NameDescription
valueGuestPolicies.GuestPolicy
Returns
TypeDescription
GuestPolicies.CreateGuestPolicyRequest.Builder

setGuestPolicy(GuestPolicies.GuestPolicy.Builder builderForValue)

public GuestPolicies.CreateGuestPolicyRequest.Builder setGuestPolicy(GuestPolicies.GuestPolicy.Builder builderForValue)

Required. The GuestPolicy to create.

.google.cloud.osconfig.v1beta.GuestPolicy guest_policy = 3 [(.google.api.field_behavior) = REQUIRED];

Parameter
NameDescription
builderForValueGuestPolicies.GuestPolicy.Builder
Returns
TypeDescription
GuestPolicies.CreateGuestPolicyRequest.Builder

setGuestPolicyId(String value)

public GuestPolicies.CreateGuestPolicyRequest.Builder setGuestPolicyId(String value)

Required. The logical name of the guest policy in the project with the following restrictions:

  • Must contain only lowercase letters, numbers, and hyphens.
  • Must start with a letter.
  • Must be between 1-63 characters.
  • Must end with a number or a letter.
  • Must be unique within the project.

string guest_policy_id = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
NameDescription
valueString

The guestPolicyId to set.

Returns
TypeDescription
GuestPolicies.CreateGuestPolicyRequest.Builder

This builder for chaining.

setGuestPolicyIdBytes(ByteString value)

public GuestPolicies.CreateGuestPolicyRequest.Builder setGuestPolicyIdBytes(ByteString value)

Required. The logical name of the guest policy in the project with the following restrictions:

  • Must contain only lowercase letters, numbers, and hyphens.
  • Must start with a letter.
  • Must be between 1-63 characters.
  • Must end with a number or a letter.
  • Must be unique within the project.

string guest_policy_id = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
NameDescription
valueByteString

The bytes for guestPolicyId to set.

Returns
TypeDescription
GuestPolicies.CreateGuestPolicyRequest.Builder

This builder for chaining.

setParent(String value)

public GuestPolicies.CreateGuestPolicyRequest.Builder setParent(String value)

Required. The resource name of the parent using one of the following forms: projects/{project_number}.

string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Parameter
NameDescription
valueString

The parent to set.

Returns
TypeDescription
GuestPolicies.CreateGuestPolicyRequest.Builder

This builder for chaining.

setParentBytes(ByteString value)

public GuestPolicies.CreateGuestPolicyRequest.Builder setParentBytes(ByteString value)

Required. The resource name of the parent using one of the following forms: projects/{project_number}.

string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Parameter
NameDescription
valueByteString

The bytes for parent to set.

Returns
TypeDescription
GuestPolicies.CreateGuestPolicyRequest.Builder

This builder for chaining.

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

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

setUnknownFields(UnknownFieldSet unknownFields)

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