public final class OAuthRequirements extends GeneratedMessageV3 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
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
CANONICAL_SCOPES_FIELD_NUMBER
public static final int CANONICAL_SCOPES_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
Static Methods
getDefaultInstance()
public static OAuthRequirements getDefaultInstance()
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
newBuilder()
public static OAuthRequirements.Builder newBuilder()
newBuilder(OAuthRequirements prototype)
public static OAuthRequirements.Builder newBuilder(OAuthRequirements prototype)
public static OAuthRequirements parseDelimitedFrom(InputStream input)
public static OAuthRequirements parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
parseFrom(byte[] data)
public static OAuthRequirements parseFrom(byte[] data)
Parameter |
Name |
Description |
data |
byte[]
|
parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
public static OAuthRequirements parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
parseFrom(ByteString data)
public static OAuthRequirements parseFrom(ByteString data)
parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static OAuthRequirements parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static OAuthRequirements parseFrom(CodedInputStream input)
public static OAuthRequirements parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public static OAuthRequirements parseFrom(InputStream input)
public static OAuthRequirements parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
parseFrom(ByteBuffer data)
public static OAuthRequirements parseFrom(ByteBuffer data)
parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
public static OAuthRequirements parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
parser()
public static Parser<OAuthRequirements> parser()
Methods
equals(Object obj)
public boolean equals(Object obj)
Parameter |
Name |
Description |
obj |
Object
|
Overrides
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;
Returns |
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;
Returns |
Type |
Description |
ByteString |
The bytes for canonicalScopes.
|
getDefaultInstanceForType()
public OAuthRequirements getDefaultInstanceForType()
getParserForType()
public Parser<OAuthRequirements> getParserForType()
Overrides
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 OAuthRequirements.Builder newBuilderForType()
newBuilderForType(GeneratedMessageV3.BuilderParent parent)
protected OAuthRequirements.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Overrides
newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Returns |
Type |
Description |
Object |
|
Overrides
toBuilder()
public OAuthRequirements.Builder toBuilder()
writeTo(CodedOutputStream output)
public void writeTo(CodedOutputStream output)
Overrides