Class MethodPolicy (2.24.0)

public final class MethodPolicy extends GeneratedMessageV3 implements MethodPolicyOrBuilder

Defines policies applying to an RPC method.

Protobuf type google.api.MethodPolicy

Static Fields

REQUEST_POLICIES_FIELD_NUMBER

public static final int REQUEST_POLICIES_FIELD_NUMBER
Field Value
TypeDescription
int

SELECTOR_FIELD_NUMBER

public static final int SELECTOR_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static MethodPolicy getDefaultInstance()
Returns
TypeDescription
MethodPolicy

getDescriptor()

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

newBuilder()

public static MethodPolicy.Builder newBuilder()
Returns
TypeDescription
MethodPolicy.Builder

newBuilder(MethodPolicy prototype)

public static MethodPolicy.Builder newBuilder(MethodPolicy prototype)
Parameter
NameDescription
prototypeMethodPolicy
Returns
TypeDescription
MethodPolicy.Builder

parseDelimitedFrom(InputStream input)

public static MethodPolicy parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
MethodPolicy
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static MethodPolicy parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
MethodPolicy
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static MethodPolicy parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
MethodPolicy
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static MethodPolicy parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
MethodPolicy
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static MethodPolicy parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
MethodPolicy
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static MethodPolicy parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
MethodPolicy
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static MethodPolicy parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
MethodPolicy
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static MethodPolicy parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
MethodPolicy
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static MethodPolicy parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
MethodPolicy
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static MethodPolicy parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
MethodPolicy
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static MethodPolicy parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
MethodPolicy
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static MethodPolicy parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
MethodPolicy
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

public static Parser<MethodPolicy> parser()
Returns
TypeDescription
Parser<MethodPolicy>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
Overrides

getDefaultInstanceForType()

public MethodPolicy getDefaultInstanceForType()
Returns
TypeDescription
MethodPolicy

getParserForType()

public Parser<MethodPolicy> getParserForType()
Returns
TypeDescription
Parser<MethodPolicy>
Overrides

getRequestPolicies(int index)

public FieldPolicy getRequestPolicies(int index)

Policies that are applicable to the request message.

repeated .google.api.FieldPolicy request_policies = 2;

Parameter
NameDescription
indexint
Returns
TypeDescription
FieldPolicy

getRequestPoliciesCount()

public int getRequestPoliciesCount()

Policies that are applicable to the request message.

repeated .google.api.FieldPolicy request_policies = 2;

Returns
TypeDescription
int

getRequestPoliciesList()

public List<FieldPolicy> getRequestPoliciesList()

Policies that are applicable to the request message.

repeated .google.api.FieldPolicy request_policies = 2;

Returns
TypeDescription
List<FieldPolicy>

getRequestPoliciesOrBuilder(int index)

public FieldPolicyOrBuilder getRequestPoliciesOrBuilder(int index)

Policies that are applicable to the request message.

repeated .google.api.FieldPolicy request_policies = 2;

Parameter
NameDescription
indexint
Returns
TypeDescription
FieldPolicyOrBuilder

getRequestPoliciesOrBuilderList()

public List<? extends FieldPolicyOrBuilder> getRequestPoliciesOrBuilderList()

Policies that are applicable to the request message.

repeated .google.api.FieldPolicy request_policies = 2;

Returns
TypeDescription
List<? extends com.google.api.FieldPolicyOrBuilder>

getSelector()

public String getSelector()

Selects a method to which these policies should be enforced, for example, "google.pubsub.v1.Subscriber.CreateSubscription".

Refer to selector for syntax details.

NOTE: This field must not be set in the proto annotation. It will be automatically filled by the service config compiler .

string selector = 9;

Returns
TypeDescription
String

The selector.

getSelectorBytes()

public ByteString getSelectorBytes()

Selects a method to which these policies should be enforced, for example, "google.pubsub.v1.Subscriber.CreateSubscription".

Refer to selector for syntax details.

NOTE: This field must not be set in the proto annotation. It will be automatically filled by the service config compiler .

string selector = 9;

Returns
TypeDescription
ByteString

The bytes for selector.

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

public MethodPolicy.Builder newBuilderForType()
Returns
TypeDescription
MethodPolicy.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected MethodPolicy.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
MethodPolicy.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

public MethodPolicy.Builder toBuilder()
Returns
TypeDescription
MethodPolicy.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides
Exceptions
TypeDescription
IOException