public static final class UsageRule.Builder extends GeneratedMessageV3.Builder<UsageRule.Builder> implements UsageRuleOrBuilder
Usage configuration rules for the service. NOTE: Under development. Use this rule to configure unregistered calls for the service. Unregistered calls are calls that do not contain consumer project identity. (Example: calls that do not contain an API key). By default, API methods do not allow unregistered calls, and each method call must be identified by a consumer project identity. Use this rule to allow/disallow unregistered calls. Example of an API that wants to allow unregistered calls for entire service. usage: rules: - selector: "*" allow_unregistered_calls: true Example of a method that wants to allow unregistered calls. usage: rules: - selector: "google.example.library.v1.LibraryService.CreateBook" allow_unregistered_calls: trueProtobuf type
google.api.UsageRule
Modifier and Type | Method and Description |
---|---|
UsageRule.Builder |
addRepeatedField(Descriptors.FieldDescriptor field,
java.lang.Object value) |
UsageRule |
build() |
UsageRule |
buildPartial() |
UsageRule.Builder |
clear() |
UsageRule.Builder |
clearAllowUnregisteredCalls()
If true, the selected method allows unregistered calls, e.g.
|
UsageRule.Builder |
clearField(Descriptors.FieldDescriptor field) |
UsageRule.Builder |
clearOneof(Descriptors.OneofDescriptor oneof) |
UsageRule.Builder |
clearSelector()
Selects the methods to which this rule applies.
|
UsageRule.Builder |
clearSkipServiceControl()
If true, the selected method should skip service control and the control
plane features, such as quota and billing, will not be available.
|
UsageRule.Builder |
clone() |
boolean |
getAllowUnregisteredCalls()
If true, the selected method allows unregistered calls, e.g.
|
UsageRule |
getDefaultInstanceForType() |
static Descriptors.Descriptor |
getDescriptor() |
Descriptors.Descriptor |
getDescriptorForType() |
java.lang.String |
getSelector()
Selects the methods to which this rule applies.
|
ByteString |
getSelectorBytes()
Selects the methods to which this rule applies.
|
boolean |
getSkipServiceControl()
If true, the selected method should skip service control and the control
plane features, such as quota and billing, will not be available.
|
protected GeneratedMessageV3.FieldAccessorTable |
internalGetFieldAccessorTable() |
boolean |
isInitialized() |
UsageRule.Builder |
mergeFrom(CodedInputStream input,
ExtensionRegistryLite extensionRegistry) |
UsageRule.Builder |
mergeFrom(Message other) |
UsageRule.Builder |
mergeFrom(UsageRule other) |
UsageRule.Builder |
mergeUnknownFields(UnknownFieldSet unknownFields) |
UsageRule.Builder |
setAllowUnregisteredCalls(boolean value)
If true, the selected method allows unregistered calls, e.g.
|
UsageRule.Builder |
setField(Descriptors.FieldDescriptor field,
java.lang.Object value) |
UsageRule.Builder |
setRepeatedField(Descriptors.FieldDescriptor field,
int index,
java.lang.Object value) |
UsageRule.Builder |
setSelector(java.lang.String value)
Selects the methods to which this rule applies.
|
UsageRule.Builder |
setSelectorBytes(ByteString value)
Selects the methods to which this rule applies.
|
UsageRule.Builder |
setSkipServiceControl(boolean value)
If true, the selected method should skip service control and the control
plane features, such as quota and billing, will not be available.
|
UsageRule.Builder |
setUnknownFields(UnknownFieldSet unknownFields) |
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, internalGetMutableMapField, isClean, markClean, newBuilderForField, onBuilt, onChanged, setUnknownFieldsProto3
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString
addAll, addAll, mergeFrom, newUninitializedMessageException
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
mergeFrom
public static final Descriptors.Descriptor getDescriptor()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable
in class GeneratedMessageV3.Builder<UsageRule.Builder>
public UsageRule.Builder clear()
clear
in interface Message.Builder
clear
in interface MessageLite.Builder
clear
in class GeneratedMessageV3.Builder<UsageRule.Builder>
public Descriptors.Descriptor getDescriptorForType()
getDescriptorForType
in interface Message.Builder
getDescriptorForType
in interface MessageOrBuilder
getDescriptorForType
in class GeneratedMessageV3.Builder<UsageRule.Builder>
public UsageRule getDefaultInstanceForType()
getDefaultInstanceForType
in interface MessageLiteOrBuilder
getDefaultInstanceForType
in interface MessageOrBuilder
public UsageRule build()
build
in interface Message.Builder
build
in interface MessageLite.Builder
public UsageRule buildPartial()
buildPartial
in interface Message.Builder
buildPartial
in interface MessageLite.Builder
public UsageRule.Builder clone()
clone
in interface Message.Builder
clone
in interface MessageLite.Builder
clone
in class GeneratedMessageV3.Builder<UsageRule.Builder>
public UsageRule.Builder setField(Descriptors.FieldDescriptor field, java.lang.Object value)
setField
in interface Message.Builder
setField
in class GeneratedMessageV3.Builder<UsageRule.Builder>
public UsageRule.Builder clearField(Descriptors.FieldDescriptor field)
clearField
in interface Message.Builder
clearField
in class GeneratedMessageV3.Builder<UsageRule.Builder>
public UsageRule.Builder clearOneof(Descriptors.OneofDescriptor oneof)
clearOneof
in interface Message.Builder
clearOneof
in class GeneratedMessageV3.Builder<UsageRule.Builder>
public UsageRule.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, java.lang.Object value)
setRepeatedField
in interface Message.Builder
setRepeatedField
in class GeneratedMessageV3.Builder<UsageRule.Builder>
public UsageRule.Builder addRepeatedField(Descriptors.FieldDescriptor field, java.lang.Object value)
addRepeatedField
in interface Message.Builder
addRepeatedField
in class GeneratedMessageV3.Builder<UsageRule.Builder>
public UsageRule.Builder mergeFrom(Message other)
mergeFrom
in interface Message.Builder
mergeFrom
in class AbstractMessage.Builder<UsageRule.Builder>
public UsageRule.Builder mergeFrom(UsageRule other)
public final boolean isInitialized()
isInitialized
in interface MessageLiteOrBuilder
isInitialized
in class GeneratedMessageV3.Builder<UsageRule.Builder>
public UsageRule.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws java.io.IOException
mergeFrom
in interface Message.Builder
mergeFrom
in interface MessageLite.Builder
mergeFrom
in class AbstractMessage.Builder<UsageRule.Builder>
java.io.IOException
public java.lang.String getSelector()
Selects the methods to which this rule applies. Use '*' to indicate all methods in all APIs. Refer to [selector][google.api.DocumentationRule.selector] for syntax details.
string selector = 1;
getSelector
in interface UsageRuleOrBuilder
public ByteString getSelectorBytes()
Selects the methods to which this rule applies. Use '*' to indicate all methods in all APIs. Refer to [selector][google.api.DocumentationRule.selector] for syntax details.
string selector = 1;
getSelectorBytes
in interface UsageRuleOrBuilder
public UsageRule.Builder setSelector(java.lang.String value)
Selects the methods to which this rule applies. Use '*' to indicate all methods in all APIs. Refer to [selector][google.api.DocumentationRule.selector] for syntax details.
string selector = 1;
public UsageRule.Builder clearSelector()
Selects the methods to which this rule applies. Use '*' to indicate all methods in all APIs. Refer to [selector][google.api.DocumentationRule.selector] for syntax details.
string selector = 1;
public UsageRule.Builder setSelectorBytes(ByteString value)
Selects the methods to which this rule applies. Use '*' to indicate all methods in all APIs. Refer to [selector][google.api.DocumentationRule.selector] for syntax details.
string selector = 1;
public boolean getAllowUnregisteredCalls()
If true, the selected method allows unregistered calls, e.g. calls that don't identify any user or application.
bool allow_unregistered_calls = 2;
getAllowUnregisteredCalls
in interface UsageRuleOrBuilder
public UsageRule.Builder setAllowUnregisteredCalls(boolean value)
If true, the selected method allows unregistered calls, e.g. calls that don't identify any user or application.
bool allow_unregistered_calls = 2;
public UsageRule.Builder clearAllowUnregisteredCalls()
If true, the selected method allows unregistered calls, e.g. calls that don't identify any user or application.
bool allow_unregistered_calls = 2;
public boolean getSkipServiceControl()
If true, the selected method should skip service control and the control plane features, such as quota and billing, will not be available. This flag is used by Google Cloud Endpoints to bypass checks for internal methods, such as service health check methods.
bool skip_service_control = 3;
getSkipServiceControl
in interface UsageRuleOrBuilder
public UsageRule.Builder setSkipServiceControl(boolean value)
If true, the selected method should skip service control and the control plane features, such as quota and billing, will not be available. This flag is used by Google Cloud Endpoints to bypass checks for internal methods, such as service health check methods.
bool skip_service_control = 3;
public UsageRule.Builder clearSkipServiceControl()
If true, the selected method should skip service control and the control plane features, such as quota and billing, will not be available. This flag is used by Google Cloud Endpoints to bypass checks for internal methods, such as service health check methods.
bool skip_service_control = 3;
public final UsageRule.Builder setUnknownFields(UnknownFieldSet unknownFields)
setUnknownFields
in interface Message.Builder
setUnknownFields
in class GeneratedMessageV3.Builder<UsageRule.Builder>
public final UsageRule.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
mergeUnknownFields
in interface Message.Builder
mergeUnknownFields
in class GeneratedMessageV3.Builder<UsageRule.Builder>