public static final class OAuthRequirements.Builder extends GeneratedMessageV3.Builder<OAuthRequirements.Builder> implements OAuthRequirementsOrBuilder
OAuth scopes are a way to define data and permissions on data. For example, there are scopes defined for "Read-only access to Google Calendar" and "Access to Cloud Platform". Users can consent to a scope for an application, giving it permission to access that data on their behalf. OAuth scope specifications should be fairly coarse grained; a user will need to see and understand the text description of what your scope means. In most cases: use one or at most two OAuth scopes for an entire family of products. If your product has multiple APIs, you should probably be sharing the OAuth scope across all of those APIs. When you need finer grained OAuth consent screens: talk with your product management about how developers will use them in practice. Please note that even though each of the canonical scopes is enough for a request to be accepted and passed to the backend, a request can still fail due to the backend requiring additional scopes or permissions.
Protobuf type google.api.OAuthRequirements
Inheritance
Object > AbstractMessageLite.Builder<MessageType,BuilderType> > AbstractMessage.Builder<BuilderType> > GeneratedMessageV3.Builder > OAuthRequirements.BuilderImplements
OAuthRequirementsOrBuilderStatic Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Type | Description |
Descriptor |
Methods
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public OAuthRequirements.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Name | Description |
field | FieldDescriptor |
value | Object |
Type | Description |
OAuthRequirements.Builder |
build()
public OAuthRequirements build()
Type | Description |
OAuthRequirements |
buildPartial()
public OAuthRequirements buildPartial()
Type | Description |
OAuthRequirements |
clear()
public OAuthRequirements.Builder clear()
Type | Description |
OAuthRequirements.Builder |
clearCanonicalScopes()
public OAuthRequirements.Builder clearCanonicalScopes()
The list of publicly documented OAuth scopes that are allowed access. An OAuth token containing any of these scopes will be accepted. Example: canonical_scopes: https://www.googleapis.com/auth/calendar, https://www.googleapis.com/auth/calendar.read
string canonical_scopes = 1;
Type | Description |
OAuthRequirements.Builder | This builder for chaining. |
clearField(Descriptors.FieldDescriptor field)
public OAuthRequirements.Builder clearField(Descriptors.FieldDescriptor field)
Name | Description |
field | FieldDescriptor |
Type | Description |
OAuthRequirements.Builder |
clearOneof(Descriptors.OneofDescriptor oneof)
public OAuthRequirements.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Name | Description |
oneof | OneofDescriptor |
Type | Description |
OAuthRequirements.Builder |
clone()
public OAuthRequirements.Builder clone()
Type | Description |
OAuthRequirements.Builder |
getCanonicalScopes()
public String getCanonicalScopes()
The list of publicly documented OAuth scopes that are allowed access. An OAuth token containing any of these scopes will be accepted. Example: canonical_scopes: https://www.googleapis.com/auth/calendar, https://www.googleapis.com/auth/calendar.read
string canonical_scopes = 1;
Type | Description |
String | The canonicalScopes. |
getCanonicalScopesBytes()
public ByteString getCanonicalScopesBytes()
The list of publicly documented OAuth scopes that are allowed access. An OAuth token containing any of these scopes will be accepted. Example: canonical_scopes: https://www.googleapis.com/auth/calendar, https://www.googleapis.com/auth/calendar.read
string canonical_scopes = 1;
Type | Description |
ByteString | The bytes for canonicalScopes. |
getDefaultInstanceForType()
public OAuthRequirements getDefaultInstanceForType()
Type | Description |
OAuthRequirements |
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()
Type | Description |
Descriptor |
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Type | Description |
FieldAccessorTable |
isInitialized()
public final boolean isInitialized()
Type | Description |
boolean |
mergeFrom(OAuthRequirements other)
public OAuthRequirements.Builder mergeFrom(OAuthRequirements other)
Name | Description |
other | OAuthRequirements |
Type | Description |
OAuthRequirements.Builder |
mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public OAuthRequirements.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Name | Description |
input | CodedInputStream |
extensionRegistry | ExtensionRegistryLite |
Type | Description |
OAuthRequirements.Builder |
Type | Description |
IOException |
mergeFrom(Message other)
public OAuthRequirements.Builder mergeFrom(Message other)
Name | Description |
other | Message |
Type | Description |
OAuthRequirements.Builder |
mergeUnknownFields(UnknownFieldSet unknownFields)
public final OAuthRequirements.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Name | Description |
unknownFields | UnknownFieldSet |
Type | Description |
OAuthRequirements.Builder |
setCanonicalScopes(String value)
public OAuthRequirements.Builder setCanonicalScopes(String value)
The list of publicly documented OAuth scopes that are allowed access. An OAuth token containing any of these scopes will be accepted. Example: canonical_scopes: https://www.googleapis.com/auth/calendar, https://www.googleapis.com/auth/calendar.read
string canonical_scopes = 1;
Name | Description |
value | String The canonicalScopes to set. |
Type | Description |
OAuthRequirements.Builder | This builder for chaining. |
setCanonicalScopesBytes(ByteString value)
public OAuthRequirements.Builder setCanonicalScopesBytes(ByteString value)
The list of publicly documented OAuth scopes that are allowed access. An OAuth token containing any of these scopes will be accepted. Example: canonical_scopes: https://www.googleapis.com/auth/calendar, https://www.googleapis.com/auth/calendar.read
string canonical_scopes = 1;
Name | Description |
value | ByteString The bytes for canonicalScopes to set. |
Type | Description |
OAuthRequirements.Builder | This builder for chaining. |
setField(Descriptors.FieldDescriptor field, Object value)
public OAuthRequirements.Builder setField(Descriptors.FieldDescriptor field, Object value)
Name | Description |
field | FieldDescriptor |
value | Object |
Type | Description |
OAuthRequirements.Builder |
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
public OAuthRequirements.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Name | Description |
field | FieldDescriptor |
index | int |
value | Object |
Type | Description |
OAuthRequirements.Builder |
setUnknownFields(UnknownFieldSet unknownFields)
public final OAuthRequirements.Builder setUnknownFields(UnknownFieldSet unknownFields)
Name | Description |
unknownFields | UnknownFieldSet |
Type | Description |
OAuthRequirements.Builder |