Class OAuthRequirements.Builder

  • All Implemented Interfaces:
    OAuthRequirementsOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
    Enclosing class:
    OAuthRequirements

    public static final class OAuthRequirements.Builder
    extends com.google.protobuf.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
    • Method Detail

      • getDescriptor

        public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
      • internalGetFieldAccessorTable

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.Builder<OAuthRequirements.Builder>
      • clear

        public OAuthRequirements.Builder clear()
        Specified by:
        clear in interface com.google.protobuf.Message.Builder
        Specified by:
        clear in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        clear in class com.google.protobuf.GeneratedMessageV3.Builder<OAuthRequirements.Builder>
      • getDescriptorForType

        public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
        Specified by:
        getDescriptorForType in interface com.google.protobuf.Message.Builder
        Specified by:
        getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
        Overrides:
        getDescriptorForType in class com.google.protobuf.GeneratedMessageV3.Builder<OAuthRequirements.Builder>
      • getDefaultInstanceForType

        public OAuthRequirements getDefaultInstanceForType()
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
      • build

        public OAuthRequirements build()
        Specified by:
        build in interface com.google.protobuf.Message.Builder
        Specified by:
        build in interface com.google.protobuf.MessageLite.Builder
      • buildPartial

        public OAuthRequirements buildPartial()
        Specified by:
        buildPartial in interface com.google.protobuf.Message.Builder
        Specified by:
        buildPartial in interface com.google.protobuf.MessageLite.Builder
      • clone

        public OAuthRequirements.Builder clone()
        Specified by:
        clone in interface com.google.protobuf.Message.Builder
        Specified by:
        clone in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        clone in class com.google.protobuf.GeneratedMessageV3.Builder<OAuthRequirements.Builder>
      • setField

        public OAuthRequirements.Builder setField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                  Object value)
        Specified by:
        setField in interface com.google.protobuf.Message.Builder
        Overrides:
        setField in class com.google.protobuf.GeneratedMessageV3.Builder<OAuthRequirements.Builder>
      • clearField

        public OAuthRequirements.Builder clearField​(com.google.protobuf.Descriptors.FieldDescriptor field)
        Specified by:
        clearField in interface com.google.protobuf.Message.Builder
        Overrides:
        clearField in class com.google.protobuf.GeneratedMessageV3.Builder<OAuthRequirements.Builder>
      • clearOneof

        public OAuthRequirements.Builder clearOneof​(com.google.protobuf.Descriptors.OneofDescriptor oneof)
        Specified by:
        clearOneof in interface com.google.protobuf.Message.Builder
        Overrides:
        clearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<OAuthRequirements.Builder>
      • setRepeatedField

        public OAuthRequirements.Builder setRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                          int index,
                                                          Object value)
        Specified by:
        setRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        setRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<OAuthRequirements.Builder>
      • addRepeatedField

        public OAuthRequirements.Builder addRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                          Object value)
        Specified by:
        addRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        addRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<OAuthRequirements.Builder>
      • mergeFrom

        public OAuthRequirements.Builder mergeFrom​(com.google.protobuf.Message other)
        Specified by:
        mergeFrom in interface com.google.protobuf.Message.Builder
        Overrides:
        mergeFrom in class com.google.protobuf.AbstractMessage.Builder<OAuthRequirements.Builder>
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3.Builder<OAuthRequirements.Builder>
      • mergeFrom

        public OAuthRequirements.Builder mergeFrom​(com.google.protobuf.CodedInputStream input,
                                                   com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                            throws IOException
        Specified by:
        mergeFrom in interface com.google.protobuf.Message.Builder
        Specified by:
        mergeFrom in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        mergeFrom in class com.google.protobuf.AbstractMessage.Builder<OAuthRequirements.Builder>
        Throws:
        IOException
      • 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;
        Specified by:
        getCanonicalScopes in interface OAuthRequirementsOrBuilder
        Returns:
        The canonicalScopes.
      • getCanonicalScopesBytes

        public com.google.protobuf.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;
        Specified by:
        getCanonicalScopesBytes in interface OAuthRequirementsOrBuilder
        Returns:
        The bytes for canonicalScopes.
      • setCanonicalScopes

        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;
        Parameters:
        value - The canonicalScopes to set.
        Returns:
        This builder for chaining.
      • 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;
        Returns:
        This builder for chaining.
      • setCanonicalScopesBytes

        public OAuthRequirements.Builder setCanonicalScopesBytes​(com.google.protobuf.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;
        Parameters:
        value - The bytes for canonicalScopes to set.
        Returns:
        This builder for chaining.
      • setUnknownFields

        public final OAuthRequirements.Builder setUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        setUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        setUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<OAuthRequirements.Builder>
      • mergeUnknownFields

        public final OAuthRequirements.Builder mergeUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        mergeUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        mergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<OAuthRequirements.Builder>