Class CreateOSPolicyAssignmentRequest.Builder (2.56.0)

public static final class CreateOSPolicyAssignmentRequest.Builder extends GeneratedMessageV3.Builder<CreateOSPolicyAssignmentRequest.Builder> implements CreateOSPolicyAssignmentRequestOrBuilder

A request message to create an OS policy assignment

Protobuf type google.cloud.osconfig.v1.CreateOSPolicyAssignmentRequest

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public CreateOSPolicyAssignmentRequest.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
CreateOSPolicyAssignmentRequest.Builder
Overrides

build()

public CreateOSPolicyAssignmentRequest build()
Returns
Type Description
CreateOSPolicyAssignmentRequest

buildPartial()

public CreateOSPolicyAssignmentRequest buildPartial()
Returns
Type Description
CreateOSPolicyAssignmentRequest

clear()

public CreateOSPolicyAssignmentRequest.Builder clear()
Returns
Type Description
CreateOSPolicyAssignmentRequest.Builder
Overrides

clearField(Descriptors.FieldDescriptor field)

public CreateOSPolicyAssignmentRequest.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
CreateOSPolicyAssignmentRequest.Builder
Overrides

clearOneof(Descriptors.OneofDescriptor oneof)

public CreateOSPolicyAssignmentRequest.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
CreateOSPolicyAssignmentRequest.Builder
Overrides

clearOsPolicyAssignment()

public CreateOSPolicyAssignmentRequest.Builder clearOsPolicyAssignment()

Required. The OS policy assignment to be created.

.google.cloud.osconfig.v1.OSPolicyAssignment os_policy_assignment = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
CreateOSPolicyAssignmentRequest.Builder

clearOsPolicyAssignmentId()

public CreateOSPolicyAssignmentRequest.Builder clearOsPolicyAssignmentId()

Required. The logical name of the OS policy assignment 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 os_policy_assignment_id = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
CreateOSPolicyAssignmentRequest.Builder

This builder for chaining.

clearParent()

public CreateOSPolicyAssignmentRequest.Builder clearParent()

Required. The parent resource name in the form: projects/{project}/locations/{location}

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

Returns
Type Description
CreateOSPolicyAssignmentRequest.Builder

This builder for chaining.

clone()

public CreateOSPolicyAssignmentRequest.Builder clone()
Returns
Type Description
CreateOSPolicyAssignmentRequest.Builder
Overrides

getDefaultInstanceForType()

public CreateOSPolicyAssignmentRequest getDefaultInstanceForType()
Returns
Type Description
CreateOSPolicyAssignmentRequest

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getOsPolicyAssignment()

public OSPolicyAssignment getOsPolicyAssignment()

Required. The OS policy assignment to be created.

.google.cloud.osconfig.v1.OSPolicyAssignment os_policy_assignment = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
OSPolicyAssignment

The osPolicyAssignment.

getOsPolicyAssignmentBuilder()

public OSPolicyAssignment.Builder getOsPolicyAssignmentBuilder()

Required. The OS policy assignment to be created.

.google.cloud.osconfig.v1.OSPolicyAssignment os_policy_assignment = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
OSPolicyAssignment.Builder

getOsPolicyAssignmentId()

public String getOsPolicyAssignmentId()

Required. The logical name of the OS policy assignment 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 os_policy_assignment_id = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
String

The osPolicyAssignmentId.

getOsPolicyAssignmentIdBytes()

public ByteString getOsPolicyAssignmentIdBytes()

Required. The logical name of the OS policy assignment 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 os_policy_assignment_id = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ByteString

The bytes for osPolicyAssignmentId.

getOsPolicyAssignmentOrBuilder()

public OSPolicyAssignmentOrBuilder getOsPolicyAssignmentOrBuilder()

Required. The OS policy assignment to be created.

.google.cloud.osconfig.v1.OSPolicyAssignment os_policy_assignment = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
OSPolicyAssignmentOrBuilder

getParent()

public String getParent()

Required. The parent resource name in the form: projects/{project}/locations/{location}

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

Returns
Type Description
String

The parent.

getParentBytes()

public ByteString getParentBytes()

Required. The parent resource name in the form: projects/{project}/locations/{location}

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

Returns
Type Description
ByteString

The bytes for parent.

hasOsPolicyAssignment()

public boolean hasOsPolicyAssignment()

Required. The OS policy assignment to be created.

.google.cloud.osconfig.v1.OSPolicyAssignment os_policy_assignment = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
boolean

Whether the osPolicyAssignment field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(CreateOSPolicyAssignmentRequest other)

public CreateOSPolicyAssignmentRequest.Builder mergeFrom(CreateOSPolicyAssignmentRequest other)
Parameter
Name Description
other CreateOSPolicyAssignmentRequest
Returns
Type Description
CreateOSPolicyAssignmentRequest.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public CreateOSPolicyAssignmentRequest.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
CreateOSPolicyAssignmentRequest.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public CreateOSPolicyAssignmentRequest.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
CreateOSPolicyAssignmentRequest.Builder
Overrides

mergeOsPolicyAssignment(OSPolicyAssignment value)

public CreateOSPolicyAssignmentRequest.Builder mergeOsPolicyAssignment(OSPolicyAssignment value)

Required. The OS policy assignment to be created.

.google.cloud.osconfig.v1.OSPolicyAssignment os_policy_assignment = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value OSPolicyAssignment
Returns
Type Description
CreateOSPolicyAssignmentRequest.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final CreateOSPolicyAssignmentRequest.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
CreateOSPolicyAssignmentRequest.Builder
Overrides

setField(Descriptors.FieldDescriptor field, Object value)

public CreateOSPolicyAssignmentRequest.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
CreateOSPolicyAssignmentRequest.Builder
Overrides

setOsPolicyAssignment(OSPolicyAssignment value)

public CreateOSPolicyAssignmentRequest.Builder setOsPolicyAssignment(OSPolicyAssignment value)

Required. The OS policy assignment to be created.

.google.cloud.osconfig.v1.OSPolicyAssignment os_policy_assignment = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value OSPolicyAssignment
Returns
Type Description
CreateOSPolicyAssignmentRequest.Builder

setOsPolicyAssignment(OSPolicyAssignment.Builder builderForValue)

public CreateOSPolicyAssignmentRequest.Builder setOsPolicyAssignment(OSPolicyAssignment.Builder builderForValue)

Required. The OS policy assignment to be created.

.google.cloud.osconfig.v1.OSPolicyAssignment os_policy_assignment = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
builderForValue OSPolicyAssignment.Builder
Returns
Type Description
CreateOSPolicyAssignmentRequest.Builder

setOsPolicyAssignmentId(String value)

public CreateOSPolicyAssignmentRequest.Builder setOsPolicyAssignmentId(String value)

Required. The logical name of the OS policy assignment 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 os_policy_assignment_id = 3 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value String

The osPolicyAssignmentId to set.

Returns
Type Description
CreateOSPolicyAssignmentRequest.Builder

This builder for chaining.

setOsPolicyAssignmentIdBytes(ByteString value)

public CreateOSPolicyAssignmentRequest.Builder setOsPolicyAssignmentIdBytes(ByteString value)

Required. The logical name of the OS policy assignment 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 os_policy_assignment_id = 3 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value ByteString

The bytes for osPolicyAssignmentId to set.

Returns
Type Description
CreateOSPolicyAssignmentRequest.Builder

This builder for chaining.

setParent(String value)

public CreateOSPolicyAssignmentRequest.Builder setParent(String value)

Required. The parent resource name in the form: projects/{project}/locations/{location}

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

Parameter
Name Description
value String

The parent to set.

Returns
Type Description
CreateOSPolicyAssignmentRequest.Builder

This builder for chaining.

setParentBytes(ByteString value)

public CreateOSPolicyAssignmentRequest.Builder setParentBytes(ByteString value)

Required. The parent resource name in the form: projects/{project}/locations/{location}

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

Parameter
Name Description
value ByteString

The bytes for parent to set.

Returns
Type Description
CreateOSPolicyAssignmentRequest.Builder

This builder for chaining.

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

public CreateOSPolicyAssignmentRequest.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
CreateOSPolicyAssignmentRequest.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final CreateOSPolicyAssignmentRequest.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
CreateOSPolicyAssignmentRequest.Builder
Overrides