Class SetIamPolicyRequest.Builder (1.3.4)

public static final class SetIamPolicyRequest.Builder extends GeneratedMessageV3.Builder<SetIamPolicyRequest.Builder> implements SetIamPolicyRequestOrBuilder

Request message for SetIamPolicy method.

Protobuf type google.iam.v1.SetIamPolicyRequest

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public SetIamPolicyRequest build()
Returns
TypeDescription
SetIamPolicyRequest

buildPartial()

public SetIamPolicyRequest buildPartial()
Returns
TypeDescription
SetIamPolicyRequest

clear()

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

clearField(Descriptors.FieldDescriptor field)

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

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearPolicy()

public SetIamPolicyRequest.Builder clearPolicy()

REQUIRED: The complete policy to be applied to the resource. The size of the policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Cloud Platform services (such as Projects) might reject them.

.google.iam.v1.Policy policy = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
SetIamPolicyRequest.Builder

clearResource()

public SetIamPolicyRequest.Builder clearResource()

REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.

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

Returns
TypeDescription
SetIamPolicyRequest.Builder

This builder for chaining.

clearUpdateMask()

public SetIamPolicyRequest.Builder clearUpdateMask()

OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only the fields in the mask will be modified. If no mask is provided, the following default mask is used: paths: "bindings, etag"

.google.protobuf.FieldMask update_mask = 3;

Returns
TypeDescription
SetIamPolicyRequest.Builder

clone()

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

getDefaultInstanceForType()

public SetIamPolicyRequest getDefaultInstanceForType()
Returns
TypeDescription
SetIamPolicyRequest

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getPolicy()

public Policy getPolicy()

REQUIRED: The complete policy to be applied to the resource. The size of the policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Cloud Platform services (such as Projects) might reject them.

.google.iam.v1.Policy policy = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
Policy

The policy.

getPolicyBuilder()

public Policy.Builder getPolicyBuilder()

REQUIRED: The complete policy to be applied to the resource. The size of the policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Cloud Platform services (such as Projects) might reject them.

.google.iam.v1.Policy policy = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
Policy.Builder

getPolicyOrBuilder()

public PolicyOrBuilder getPolicyOrBuilder()

REQUIRED: The complete policy to be applied to the resource. The size of the policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Cloud Platform services (such as Projects) might reject them.

.google.iam.v1.Policy policy = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
PolicyOrBuilder

getResource()

public String getResource()

REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.

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

Returns
TypeDescription
String

The resource.

getResourceBytes()

public ByteString getResourceBytes()

REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.

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

Returns
TypeDescription
ByteString

The bytes for resource.

getUpdateMask()

public FieldMask getUpdateMask()

OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only the fields in the mask will be modified. If no mask is provided, the following default mask is used: paths: "bindings, etag"

.google.protobuf.FieldMask update_mask = 3;

Returns
TypeDescription
FieldMask

The updateMask.

getUpdateMaskBuilder()

public FieldMask.Builder getUpdateMaskBuilder()

OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only the fields in the mask will be modified. If no mask is provided, the following default mask is used: paths: "bindings, etag"

.google.protobuf.FieldMask update_mask = 3;

Returns
TypeDescription
Builder

getUpdateMaskOrBuilder()

public FieldMaskOrBuilder getUpdateMaskOrBuilder()

OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only the fields in the mask will be modified. If no mask is provided, the following default mask is used: paths: "bindings, etag"

.google.protobuf.FieldMask update_mask = 3;

Returns
TypeDescription
FieldMaskOrBuilder

hasPolicy()

public boolean hasPolicy()

REQUIRED: The complete policy to be applied to the resource. The size of the policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Cloud Platform services (such as Projects) might reject them.

.google.iam.v1.Policy policy = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
boolean

Whether the policy field is set.

hasUpdateMask()

public boolean hasUpdateMask()

OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only the fields in the mask will be modified. If no mask is provided, the following default mask is used: paths: "bindings, etag"

.google.protobuf.FieldMask update_mask = 3;

Returns
TypeDescription
boolean

Whether the updateMask field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(SetIamPolicyRequest other)

public SetIamPolicyRequest.Builder mergeFrom(SetIamPolicyRequest other)
Parameter
NameDescription
otherSetIamPolicyRequest
Returns
TypeDescription
SetIamPolicyRequest.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergePolicy(Policy value)

public SetIamPolicyRequest.Builder mergePolicy(Policy value)

REQUIRED: The complete policy to be applied to the resource. The size of the policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Cloud Platform services (such as Projects) might reject them.

.google.iam.v1.Policy policy = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
NameDescription
valuePolicy
Returns
TypeDescription
SetIamPolicyRequest.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

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

mergeUpdateMask(FieldMask value)

public SetIamPolicyRequest.Builder mergeUpdateMask(FieldMask value)

OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only the fields in the mask will be modified. If no mask is provided, the following default mask is used: paths: "bindings, etag"

.google.protobuf.FieldMask update_mask = 3;

Parameter
NameDescription
valueFieldMask
Returns
TypeDescription
SetIamPolicyRequest.Builder

setField(Descriptors.FieldDescriptor field, Object value)

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

setPolicy(Policy value)

public SetIamPolicyRequest.Builder setPolicy(Policy value)

REQUIRED: The complete policy to be applied to the resource. The size of the policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Cloud Platform services (such as Projects) might reject them.

.google.iam.v1.Policy policy = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
NameDescription
valuePolicy
Returns
TypeDescription
SetIamPolicyRequest.Builder

setPolicy(Policy.Builder builderForValue)

public SetIamPolicyRequest.Builder setPolicy(Policy.Builder builderForValue)

REQUIRED: The complete policy to be applied to the resource. The size of the policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Cloud Platform services (such as Projects) might reject them.

.google.iam.v1.Policy policy = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
NameDescription
builderForValuePolicy.Builder
Returns
TypeDescription
SetIamPolicyRequest.Builder

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

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

setResource(String value)

public SetIamPolicyRequest.Builder setResource(String value)

REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.

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

Parameter
NameDescription
valueString

The resource to set.

Returns
TypeDescription
SetIamPolicyRequest.Builder

This builder for chaining.

setResourceBytes(ByteString value)

public SetIamPolicyRequest.Builder setResourceBytes(ByteString value)

REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.

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

Parameter
NameDescription
valueByteString

The bytes for resource to set.

Returns
TypeDescription
SetIamPolicyRequest.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

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

setUpdateMask(FieldMask value)

public SetIamPolicyRequest.Builder setUpdateMask(FieldMask value)

OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only the fields in the mask will be modified. If no mask is provided, the following default mask is used: paths: "bindings, etag"

.google.protobuf.FieldMask update_mask = 3;

Parameter
NameDescription
valueFieldMask
Returns
TypeDescription
SetIamPolicyRequest.Builder

setUpdateMask(FieldMask.Builder builderForValue)

public SetIamPolicyRequest.Builder setUpdateMask(FieldMask.Builder builderForValue)

OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only the fields in the mask will be modified. If no mask is provided, the following default mask is used: paths: "bindings, etag"

.google.protobuf.FieldMask update_mask = 3;

Parameter
NameDescription
builderForValueBuilder
Returns
TypeDescription
SetIamPolicyRequest.Builder