Class CreateOSPolicyAssignmentRequest.Builder (2.22.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
TypeDescription
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public CreateOSPolicyAssignmentRequest build()
Returns
TypeDescription
CreateOSPolicyAssignmentRequest

buildPartial()

public CreateOSPolicyAssignmentRequest buildPartial()
Returns
TypeDescription
CreateOSPolicyAssignmentRequest

clear()

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

clearField(Descriptors.FieldDescriptor field)

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

clearOneof(Descriptors.OneofDescriptor oneof)

public CreateOSPolicyAssignmentRequest.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
CreateOSPolicyAssignmentRequest.Builder

This builder for chaining.

clone()

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

getDefaultInstanceForType()

public CreateOSPolicyAssignmentRequest getDefaultInstanceForType()
Returns
TypeDescription
CreateOSPolicyAssignmentRequest

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
boolean

Whether the osPolicyAssignment field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(CreateOSPolicyAssignmentRequest other)

public CreateOSPolicyAssignmentRequest.Builder mergeFrom(CreateOSPolicyAssignmentRequest other)
Parameter
NameDescription
otherCreateOSPolicyAssignmentRequest
Returns
TypeDescription
CreateOSPolicyAssignmentRequest.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

public CreateOSPolicyAssignmentRequest.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
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
NameDescription
valueOSPolicyAssignment
Returns
TypeDescription
CreateOSPolicyAssignmentRequest.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

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

setField(Descriptors.FieldDescriptor field, Object value)

public CreateOSPolicyAssignmentRequest.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
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
NameDescription
valueOSPolicyAssignment
Returns
TypeDescription
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
NameDescription
builderForValueOSPolicyAssignment.Builder
Returns
TypeDescription
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
NameDescription
valueString

The osPolicyAssignmentId to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for osPolicyAssignmentId to set.

Returns
TypeDescription
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
NameDescription
valueString

The parent to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for parent to set.

Returns
TypeDescription
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
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
CreateOSPolicyAssignmentRequest.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

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