- 2.65.0 (latest)
- 2.64.1
- 2.63.2
- 2.62.0
- 2.61.3
- 2.60.0
- 2.59.2
- 2.58.0
- 2.57.0
- 2.56.0
- 2.54.1
- 2.53.0
- 2.52.0
- 2.51.0
- 2.50.1
- 2.49.0
- 2.48.0
- 2.46.0
- 2.45.1
- 2.44.0
- 2.43.0
- 2.42.0
- 2.41.0
- 2.40.0
- 2.39.1
- 2.38.0
- 2.37.1
- 2.36.0
- 2.34.0
- 2.33.0
- 2.32.0
- 2.30.0
- 2.29.0
- 2.28.0
- 2.27.0
- 2.26.0
- 2.25.1
- 2.24.0
- 2.23.1
- 2.22.1
- 2.21.1
- 2.15.0
- 2.14.3
- 2.13.0
- 2.12.0
- 2.11.0
- 2.10.0
- 2.9.6
- 2.8.4
- 2.7.4
public static final class FieldPolicy.Builder extends GeneratedMessage.Builder<FieldPolicy.Builder> implements FieldPolicyOrBuilderGoogle API Policy Annotation
This message defines a simple API policy annotation that can be used to annotate API request and response message fields with applicable policies. One field may have multiple applicable policies that must all be satisfied before a request can be processed. This policy annotation is used to generate the overall policy that will be used for automatic runtime policy enforcement and documentation generation.
Protobuf type google.api.FieldPolicy
Inheritance
java.lang.Object > AbstractMessageLite.Builder<MessageType,BuilderType> > AbstractMessage.Builder<BuilderType> > GeneratedMessage.Builder > FieldPolicy.BuilderImplements
FieldPolicyOrBuilderStatic Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()| Returns | |
|---|---|
| Type | Description |
Descriptor |
|
Methods
build()
public FieldPolicy build()| Returns | |
|---|---|
| Type | Description |
FieldPolicy |
|
buildPartial()
public FieldPolicy buildPartial()| Returns | |
|---|---|
| Type | Description |
FieldPolicy |
|
clear()
public FieldPolicy.Builder clear()| Returns | |
|---|---|
| Type | Description |
FieldPolicy.Builder |
|
clearResourcePermission()
public FieldPolicy.Builder clearResourcePermission()Specifies the required permission(s) for the resource referred to by the field. It requires the field contains a valid resource reference, and the request must pass the permission checks to proceed. For example, "resourcemanager.projects.get".
string resource_permission = 2;
| Returns | |
|---|---|
| Type | Description |
FieldPolicy.Builder |
This builder for chaining. |
clearResourceType()
public FieldPolicy.Builder clearResourceType()Specifies the resource type for the resource referred to by the field.
string resource_type = 3;
| Returns | |
|---|---|
| Type | Description |
FieldPolicy.Builder |
This builder for chaining. |
clearSelector()
public FieldPolicy.Builder clearSelector() Selects one or more request or response message fields to apply this
FieldPolicy.
When a FieldPolicy is used in proto annotation, the selector must
be left as empty. The service config generator will automatically fill
the correct value.
When a FieldPolicy is used in service config, the selector must be a
comma-separated string with valid request or response field paths,
such as "foo.bar" or "foo.bar,foo.baz".
string selector = 1;
| Returns | |
|---|---|
| Type | Description |
FieldPolicy.Builder |
This builder for chaining. |
getDefaultInstanceForType()
public FieldPolicy getDefaultInstanceForType()| Returns | |
|---|---|
| Type | Description |
FieldPolicy |
|
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()| Returns | |
|---|---|
| Type | Description |
Descriptor |
|
getResourcePermission()
public String getResourcePermission()Specifies the required permission(s) for the resource referred to by the field. It requires the field contains a valid resource reference, and the request must pass the permission checks to proceed. For example, "resourcemanager.projects.get".
string resource_permission = 2;
| Returns | |
|---|---|
| Type | Description |
String |
The resourcePermission. |
getResourcePermissionBytes()
public ByteString getResourcePermissionBytes()Specifies the required permission(s) for the resource referred to by the field. It requires the field contains a valid resource reference, and the request must pass the permission checks to proceed. For example, "resourcemanager.projects.get".
string resource_permission = 2;
| Returns | |
|---|---|
| Type | Description |
ByteString |
The bytes for resourcePermission. |
getResourceType()
public String getResourceType()Specifies the resource type for the resource referred to by the field.
string resource_type = 3;
| Returns | |
|---|---|
| Type | Description |
String |
The resourceType. |
getResourceTypeBytes()
public ByteString getResourceTypeBytes()Specifies the resource type for the resource referred to by the field.
string resource_type = 3;
| Returns | |
|---|---|
| Type | Description |
ByteString |
The bytes for resourceType. |
getSelector()
public String getSelector() Selects one or more request or response message fields to apply this
FieldPolicy.
When a FieldPolicy is used in proto annotation, the selector must
be left as empty. The service config generator will automatically fill
the correct value.
When a FieldPolicy is used in service config, the selector must be a
comma-separated string with valid request or response field paths,
such as "foo.bar" or "foo.bar,foo.baz".
string selector = 1;
| Returns | |
|---|---|
| Type | Description |
String |
The selector. |
getSelectorBytes()
public ByteString getSelectorBytes() Selects one or more request or response message fields to apply this
FieldPolicy.
When a FieldPolicy is used in proto annotation, the selector must
be left as empty. The service config generator will automatically fill
the correct value.
When a FieldPolicy is used in service config, the selector must be a
comma-separated string with valid request or response field paths,
such as "foo.bar" or "foo.bar,foo.baz".
string selector = 1;
| Returns | |
|---|---|
| Type | Description |
ByteString |
The bytes for selector. |
internalGetFieldAccessorTable()
protected GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()| Returns | |
|---|---|
| Type | Description |
FieldAccessorTable |
|
isInitialized()
public final boolean isInitialized()| Returns | |
|---|---|
| Type | Description |
boolean |
|
mergeFrom(FieldPolicy other)
public FieldPolicy.Builder mergeFrom(FieldPolicy other)| Parameter | |
|---|---|
| Name | Description |
other |
FieldPolicy |
| Returns | |
|---|---|
| Type | Description |
FieldPolicy.Builder |
|
mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public FieldPolicy.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)| Parameters | |
|---|---|
| Name | Description |
input |
CodedInputStream |
extensionRegistry |
ExtensionRegistryLite |
| Returns | |
|---|---|
| Type | Description |
FieldPolicy.Builder |
|
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|
mergeFrom(Message other)
public FieldPolicy.Builder mergeFrom(Message other)| Parameter | |
|---|---|
| Name | Description |
other |
Message |
| Returns | |
|---|---|
| Type | Description |
FieldPolicy.Builder |
|
setResourcePermission(String value)
public FieldPolicy.Builder setResourcePermission(String value)Specifies the required permission(s) for the resource referred to by the field. It requires the field contains a valid resource reference, and the request must pass the permission checks to proceed. For example, "resourcemanager.projects.get".
string resource_permission = 2;
| Parameter | |
|---|---|
| Name | Description |
value |
StringThe resourcePermission to set. |
| Returns | |
|---|---|
| Type | Description |
FieldPolicy.Builder |
This builder for chaining. |
setResourcePermissionBytes(ByteString value)
public FieldPolicy.Builder setResourcePermissionBytes(ByteString value)Specifies the required permission(s) for the resource referred to by the field. It requires the field contains a valid resource reference, and the request must pass the permission checks to proceed. For example, "resourcemanager.projects.get".
string resource_permission = 2;
| Parameter | |
|---|---|
| Name | Description |
value |
ByteStringThe bytes for resourcePermission to set. |
| Returns | |
|---|---|
| Type | Description |
FieldPolicy.Builder |
This builder for chaining. |
setResourceType(String value)
public FieldPolicy.Builder setResourceType(String value)Specifies the resource type for the resource referred to by the field.
string resource_type = 3;
| Parameter | |
|---|---|
| Name | Description |
value |
StringThe resourceType to set. |
| Returns | |
|---|---|
| Type | Description |
FieldPolicy.Builder |
This builder for chaining. |
setResourceTypeBytes(ByteString value)
public FieldPolicy.Builder setResourceTypeBytes(ByteString value)Specifies the resource type for the resource referred to by the field.
string resource_type = 3;
| Parameter | |
|---|---|
| Name | Description |
value |
ByteStringThe bytes for resourceType to set. |
| Returns | |
|---|---|
| Type | Description |
FieldPolicy.Builder |
This builder for chaining. |
setSelector(String value)
public FieldPolicy.Builder setSelector(String value) Selects one or more request or response message fields to apply this
FieldPolicy.
When a FieldPolicy is used in proto annotation, the selector must
be left as empty. The service config generator will automatically fill
the correct value.
When a FieldPolicy is used in service config, the selector must be a
comma-separated string with valid request or response field paths,
such as "foo.bar" or "foo.bar,foo.baz".
string selector = 1;
| Parameter | |
|---|---|
| Name | Description |
value |
StringThe selector to set. |
| Returns | |
|---|---|
| Type | Description |
FieldPolicy.Builder |
This builder for chaining. |
setSelectorBytes(ByteString value)
public FieldPolicy.Builder setSelectorBytes(ByteString value) Selects one or more request or response message fields to apply this
FieldPolicy.
When a FieldPolicy is used in proto annotation, the selector must
be left as empty. The service config generator will automatically fill
the correct value.
When a FieldPolicy is used in service config, the selector must be a
comma-separated string with valid request or response field paths,
such as "foo.bar" or "foo.bar,foo.baz".
string selector = 1;
| Parameter | |
|---|---|
| Name | Description |
value |
ByteStringThe bytes for selector to set. |
| Returns | |
|---|---|
| Type | Description |
FieldPolicy.Builder |
This builder for chaining. |