public final class FieldPolicy extends GeneratedMessageV3 implements FieldPolicyOrBuilder
Google 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
Inherited Members
com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT)
com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT,int)
com.google.protobuf.GeneratedMessageV3.<T>emptyList(java.lang.Class<T>)
com.google.protobuf.GeneratedMessageV3.internalGetMapFieldReflection(int)
Static Fields
RESOURCE_PERMISSION_FIELD_NUMBER
public static final int RESOURCE_PERMISSION_FIELD_NUMBER
Field Value |
---|
Type | Description |
int | |
RESOURCE_TYPE_FIELD_NUMBER
public static final int RESOURCE_TYPE_FIELD_NUMBER
Field Value |
---|
Type | Description |
int | |
SELECTOR_FIELD_NUMBER
public static final int SELECTOR_FIELD_NUMBER
Field Value |
---|
Type | Description |
int | |
Static Methods
getDefaultInstance()
public static FieldPolicy getDefaultInstance()
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
newBuilder()
public static FieldPolicy.Builder newBuilder()
newBuilder(FieldPolicy prototype)
public static FieldPolicy.Builder newBuilder(FieldPolicy prototype)
public static FieldPolicy parseDelimitedFrom(InputStream input)
public static FieldPolicy parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
parseFrom(byte[] data)
public static FieldPolicy parseFrom(byte[] data)
Parameter |
---|
Name | Description |
data | byte[]
|
parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
public static FieldPolicy parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
parseFrom(ByteString data)
public static FieldPolicy parseFrom(ByteString data)
parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static FieldPolicy parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static FieldPolicy parseFrom(CodedInputStream input)
public static FieldPolicy parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public static FieldPolicy parseFrom(InputStream input)
public static FieldPolicy parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
parseFrom(ByteBuffer data)
public static FieldPolicy parseFrom(ByteBuffer data)
parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
public static FieldPolicy parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
parser()
public static Parser<FieldPolicy> parser()
Methods
equals(Object obj)
public boolean equals(Object obj)
Parameter |
---|
Name | Description |
obj | Object
|
Overrides
getDefaultInstanceForType()
public FieldPolicy getDefaultInstanceForType()
getParserForType()
public Parser<FieldPolicy> getParserForType()
Overrides
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.
|
getSerializedSize()
public int getSerializedSize()
Returns |
---|
Type | Description |
int | |
Overrides
hashCode()
Returns |
---|
Type | Description |
int | |
Overrides
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Overrides
isInitialized()
public final boolean isInitialized()
Overrides
newBuilderForType()
public FieldPolicy.Builder newBuilderForType()
newBuilderForType(GeneratedMessageV3.BuilderParent parent)
protected FieldPolicy.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Overrides
newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Overrides
toBuilder()
public FieldPolicy.Builder toBuilder()
writeTo(CodedOutputStream output)
public void writeTo(CodedOutputStream output)
Overrides