-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | Google OAuth2 SDK.
--   
--   Obtains end-user authorization grants for use with other Google APIs.
--   
--   <i>Warning:</i> This is an experimental prototype/preview release
--   which is still under exploratory development and not intended for
--   public use, caveat emptor!
--   
--   This library is compatible with version <tt>v2</tt> of the API.
@package gogol-oauth2
@version 0.3.0


module Network.Google.OAuth2.Types

-- | Default request referring to version <tt>v2</tt> of the Google OAuth2
--   API. This contains the host and root path used as a starting point for
--   constructing service requests.
oAuth2Service :: ServiceConfig

-- | View your basic profile info
userInfoProFileScope :: Proxy '["https://www.googleapis.com/auth/userinfo.profile"]

-- | Know the list of people in your circles, your age range, and language
plusLoginScope :: Proxy '["https://www.googleapis.com/auth/plus.login"]

-- | View your email address
userInfoEmailScope :: Proxy '["https://www.googleapis.com/auth/userinfo.email"]

-- | Know who you are on Google
plusMeScope :: Proxy '["https://www.googleapis.com/auth/plus.me"]
data TokenInfo

-- | Creates a value of <a>TokenInfo</a> with the minimum fields required
--   to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>tiAudience</a></li>
--   <li><a>tiEmail</a></li>
--   <li><a>tiExpiresIn</a></li>
--   <li><a>tiAccessType</a></li>
--   <li><a>tiScope</a></li>
--   <li><a>tiVerifiedEmail</a></li>
--   <li><a>tiUserId</a></li>
--   <li><a>tiTokenHandle</a></li>
--   <li><a>tiIssuedTo</a></li>
--   </ul>
tokenInfo :: TokenInfo

-- | Who is the intended audience for this token. In general the same as
--   issued_to.
tiAudience :: Lens' TokenInfo (Maybe Text)

-- | The email address of the user. Present only if the email scope is
--   present in the request.
tiEmail :: Lens' TokenInfo (Maybe Text)

-- | The expiry time of the token, as number of seconds left until expiry.
tiExpiresIn :: Lens' TokenInfo (Maybe Int32)

-- | The access type granted with this token. It can be offline or online.
tiAccessType :: Lens' TokenInfo (Maybe Text)

-- | The space separated list of scopes granted to this token.
tiScope :: Lens' TokenInfo (Maybe Text)

-- | Boolean flag which is true if the email address is verified. Present
--   only if the email scope is present in the request.
tiVerifiedEmail :: Lens' TokenInfo (Maybe Bool)

-- | The obfuscated user id.
tiUserId :: Lens' TokenInfo (Maybe Text)

-- | The token handle associated with this token.
tiTokenHandle :: Lens' TokenInfo (Maybe Text)

-- | To whom was the token issued to. In general the same as audience.
tiIssuedTo :: Lens' TokenInfo (Maybe Text)
data JWK

-- | Creates a value of <a>JWK</a> with the minimum fields required to make
--   a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>jKeys</a></li>
--   </ul>
jwk :: JWK
jKeys :: Lens' JWK [JWKKeysItem]
data JWKKeysItem

-- | Creates a value of <a>JWKKeysItem</a> with the minimum fields required
--   to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>jkiAlg</a></li>
--   <li><a>jkiUse</a></li>
--   <li><a>jkiKid</a></li>
--   <li><a>jkiN</a></li>
--   <li><a>jkiE</a></li>
--   <li><a>jkiKty</a></li>
--   </ul>
jwkKeysItem :: JWKKeysItem
jkiAlg :: Lens' JWKKeysItem Text
jkiUse :: Lens' JWKKeysItem Text
jkiKid :: Lens' JWKKeysItem (Maybe Text)
jkiN :: Lens' JWKKeysItem (Maybe Text)
jkiE :: Lens' JWKKeysItem (Maybe Text)
jkiKty :: Lens' JWKKeysItem Text
data UserInfoplus

-- | Creates a value of <a>UserInfoplus</a> with the minimum fields
--   required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>uiHd</a></li>
--   <li><a>uiEmail</a></li>
--   <li><a>uiLink</a></li>
--   <li><a>uiLocale</a></li>
--   <li><a>uiGivenName</a></li>
--   <li><a>uiFamilyName</a></li>
--   <li><a>uiPicture</a></li>
--   <li><a>uiGender</a></li>
--   <li><a>uiName</a></li>
--   <li><a>uiVerifiedEmail</a></li>
--   <li><a>uiId</a></li>
--   </ul>
userInfoplus :: UserInfoplus

-- | The hosted domain e.g. example.com if the user is Google apps user.
uiHd :: Lens' UserInfoplus (Maybe Text)

-- | The user's email address.
uiEmail :: Lens' UserInfoplus (Maybe Text)

-- | URL of the profile page.
uiLink :: Lens' UserInfoplus (Maybe Text)

-- | The user's preferred locale.
uiLocale :: Lens' UserInfoplus (Maybe Text)

-- | The user's first name.
uiGivenName :: Lens' UserInfoplus (Maybe Text)

-- | The user's last name.
uiFamilyName :: Lens' UserInfoplus (Maybe Text)

-- | URL of the user's picture image.
uiPicture :: Lens' UserInfoplus (Maybe Text)

-- | The user's gender.
uiGender :: Lens' UserInfoplus (Maybe Text)

-- | The user's full name.
uiName :: Lens' UserInfoplus (Maybe Text)

-- | Boolean flag which is true if the email address is verified. Always
--   verified because we only return the user's primary email address.
uiVerifiedEmail :: Lens' UserInfoplus Bool

-- | The obfuscated ID of the user.
uiId :: Lens' UserInfoplus (Maybe Text)


-- | <i>See:</i> <a>Google OAuth2 API Reference</a> for
--   <tt>oauth2.userinfo.get</tt>.
module Network.Google.Resource.OAuth2.UserInfo.Get

-- | A resource alias for <tt>oauth2.userinfo.get</tt> method which the
--   <a>UserInfoGet</a> request conforms to.
type UserInfoGetResource = "oauth2" :> ("v2" :> ("userinfo" :> (QueryParam "alt" AltJSON :> Get '[JSON] UserInfoplus)))

-- | Creates a value of <a>UserInfoGet</a> with the minimum fields required
--   to make a request.
userInfoGet :: UserInfoGet
data UserInfoGet
instance GHC.Generics.Generic Network.Google.Resource.OAuth2.UserInfo.Get.UserInfoGet
instance Data.Data.Data Network.Google.Resource.OAuth2.UserInfo.Get.UserInfoGet
instance GHC.Show.Show Network.Google.Resource.OAuth2.UserInfo.Get.UserInfoGet
instance GHC.Classes.Eq Network.Google.Resource.OAuth2.UserInfo.Get.UserInfoGet
instance Network.Google.Types.GoogleRequest Network.Google.Resource.OAuth2.UserInfo.Get.UserInfoGet


-- | <i>See:</i> <a>Google OAuth2 API Reference</a> for
--   <tt>oauth2.userinfo.v2.me.get</tt>.
module Network.Google.Resource.OAuth2.UserInfo.V2.Me.Get

-- | A resource alias for <tt>oauth2.userinfo.v2.me.get</tt> method which
--   the <a>UserInfoV2MeGet</a> request conforms to.
type UserInfoV2MeGetResource = "userinfo" :> ("v2" :> ("me" :> (QueryParam "alt" AltJSON :> Get '[JSON] UserInfoplus)))

-- | Creates a value of <a>UserInfoV2MeGet</a> with the minimum fields
--   required to make a request.
userInfoV2MeGet :: UserInfoV2MeGet
data UserInfoV2MeGet
instance GHC.Generics.Generic Network.Google.Resource.OAuth2.UserInfo.V2.Me.Get.UserInfoV2MeGet
instance Data.Data.Data Network.Google.Resource.OAuth2.UserInfo.V2.Me.Get.UserInfoV2MeGet
instance GHC.Show.Show Network.Google.Resource.OAuth2.UserInfo.V2.Me.Get.UserInfoV2MeGet
instance GHC.Classes.Eq Network.Google.Resource.OAuth2.UserInfo.V2.Me.Get.UserInfoV2MeGet
instance Network.Google.Types.GoogleRequest Network.Google.Resource.OAuth2.UserInfo.V2.Me.Get.UserInfoV2MeGet


-- | <i>See:</i> <a>Google OAuth2 API Reference</a> for
--   <tt>oauth2.tokeninfo</tt>.
module Network.Google.Method.OAuth2.TokenInfo

-- | A resource alias for <tt>oauth2.tokeninfo</tt> method which the
--   <a>TokenInfo'</a> request conforms to.
type TokenInfoMethod = "oauth2" :> ("v2" :> ("tokeninfo" :> (QueryParam "access_token" Text :> (QueryParam "token_handle" Text :> (QueryParam "id_token" Text :> (QueryParam "alt" AltJSON :> Post '[JSON] TokenInfo))))))

-- | Creates a value of <a>TokenInfo'</a> with the minimum fields required
--   to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>tAccessToken</a></li>
--   <li><a>tTokenHandle</a></li>
--   <li><a>tIdToken</a></li>
--   </ul>
tokenInfo' :: TokenInfo'
data TokenInfo'
tAccessToken :: Lens' TokenInfo' (Maybe Text)
tTokenHandle :: Lens' TokenInfo' (Maybe Text)
tIdToken :: Lens' TokenInfo' (Maybe Text)
instance GHC.Generics.Generic Network.Google.Method.OAuth2.TokenInfo.TokenInfo'
instance Data.Data.Data Network.Google.Method.OAuth2.TokenInfo.TokenInfo'
instance GHC.Show.Show Network.Google.Method.OAuth2.TokenInfo.TokenInfo'
instance GHC.Classes.Eq Network.Google.Method.OAuth2.TokenInfo.TokenInfo'
instance Network.Google.Types.GoogleRequest Network.Google.Method.OAuth2.TokenInfo.TokenInfo'


-- | <i>See:</i> <a>Google OAuth2 API Reference</a> for
--   <tt>oauth2.getCertForOpenIdConnect</tt>.
module Network.Google.Method.OAuth2.GetCertForOpenIdConnect

-- | A resource alias for <tt>oauth2.getCertForOpenIdConnect</tt> method
--   which the <a>GetCertForOpenIdConnect</a> request conforms to.
type GetCertForOpenIdConnectMethod = "oauth2" :> ("v2" :> ("certs" :> (QueryParam "alt" AltJSON :> Get '[JSON] JWK)))

-- | Creates a value of <a>GetCertForOpenIdConnect</a> with the minimum
--   fields required to make a request.
getCertForOpenIdConnect :: GetCertForOpenIdConnect
data GetCertForOpenIdConnect
instance GHC.Generics.Generic Network.Google.Method.OAuth2.GetCertForOpenIdConnect.GetCertForOpenIdConnect
instance Data.Data.Data Network.Google.Method.OAuth2.GetCertForOpenIdConnect.GetCertForOpenIdConnect
instance GHC.Show.Show Network.Google.Method.OAuth2.GetCertForOpenIdConnect.GetCertForOpenIdConnect
instance GHC.Classes.Eq Network.Google.Method.OAuth2.GetCertForOpenIdConnect.GetCertForOpenIdConnect
instance Network.Google.Types.GoogleRequest Network.Google.Method.OAuth2.GetCertForOpenIdConnect.GetCertForOpenIdConnect


-- | Obtains end-user authorization grants for use with other Google APIs.
--   
--   <i>See:</i> <a>Google OAuth2 API Reference</a>
module Network.Google.OAuth2

-- | Default request referring to version <tt>v2</tt> of the Google OAuth2
--   API. This contains the host and root path used as a starting point for
--   constructing service requests.
oAuth2Service :: ServiceConfig

-- | View your basic profile info
userInfoProFileScope :: Proxy '["https://www.googleapis.com/auth/userinfo.profile"]

-- | Know the list of people in your circles, your age range, and language
plusLoginScope :: Proxy '["https://www.googleapis.com/auth/plus.login"]

-- | View your email address
userInfoEmailScope :: Proxy '["https://www.googleapis.com/auth/userinfo.email"]

-- | Know who you are on Google
plusMeScope :: Proxy '["https://www.googleapis.com/auth/plus.me"]

-- | Represents the entirety of the methods and resources available for the
--   Google OAuth2 API service.
type OAuth2API = UserInfoV2MeGetResource :<|> (UserInfoGetResource :<|> (GetCertForOpenIdConnectMethod :<|> TokenInfoMethod))
data TokenInfo

-- | Creates a value of <a>TokenInfo</a> with the minimum fields required
--   to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>tiAudience</a></li>
--   <li><a>tiEmail</a></li>
--   <li><a>tiExpiresIn</a></li>
--   <li><a>tiAccessType</a></li>
--   <li><a>tiScope</a></li>
--   <li><a>tiVerifiedEmail</a></li>
--   <li><a>tiUserId</a></li>
--   <li><a>tiTokenHandle</a></li>
--   <li><a>tiIssuedTo</a></li>
--   </ul>
tokenInfo :: TokenInfo

-- | Who is the intended audience for this token. In general the same as
--   issued_to.
tiAudience :: Lens' TokenInfo (Maybe Text)

-- | The email address of the user. Present only if the email scope is
--   present in the request.
tiEmail :: Lens' TokenInfo (Maybe Text)

-- | The expiry time of the token, as number of seconds left until expiry.
tiExpiresIn :: Lens' TokenInfo (Maybe Int32)

-- | The access type granted with this token. It can be offline or online.
tiAccessType :: Lens' TokenInfo (Maybe Text)

-- | The space separated list of scopes granted to this token.
tiScope :: Lens' TokenInfo (Maybe Text)

-- | Boolean flag which is true if the email address is verified. Present
--   only if the email scope is present in the request.
tiVerifiedEmail :: Lens' TokenInfo (Maybe Bool)

-- | The obfuscated user id.
tiUserId :: Lens' TokenInfo (Maybe Text)

-- | The token handle associated with this token.
tiTokenHandle :: Lens' TokenInfo (Maybe Text)

-- | To whom was the token issued to. In general the same as audience.
tiIssuedTo :: Lens' TokenInfo (Maybe Text)
data JWK

-- | Creates a value of <a>JWK</a> with the minimum fields required to make
--   a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>jKeys</a></li>
--   </ul>
jwk :: JWK
jKeys :: Lens' JWK [JWKKeysItem]
data JWKKeysItem

-- | Creates a value of <a>JWKKeysItem</a> with the minimum fields required
--   to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>jkiAlg</a></li>
--   <li><a>jkiUse</a></li>
--   <li><a>jkiKid</a></li>
--   <li><a>jkiN</a></li>
--   <li><a>jkiE</a></li>
--   <li><a>jkiKty</a></li>
--   </ul>
jwkKeysItem :: JWKKeysItem
jkiAlg :: Lens' JWKKeysItem Text
jkiUse :: Lens' JWKKeysItem Text
jkiKid :: Lens' JWKKeysItem (Maybe Text)
jkiN :: Lens' JWKKeysItem (Maybe Text)
jkiE :: Lens' JWKKeysItem (Maybe Text)
jkiKty :: Lens' JWKKeysItem Text
data UserInfoplus

-- | Creates a value of <a>UserInfoplus</a> with the minimum fields
--   required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>uiHd</a></li>
--   <li><a>uiEmail</a></li>
--   <li><a>uiLink</a></li>
--   <li><a>uiLocale</a></li>
--   <li><a>uiGivenName</a></li>
--   <li><a>uiFamilyName</a></li>
--   <li><a>uiPicture</a></li>
--   <li><a>uiGender</a></li>
--   <li><a>uiName</a></li>
--   <li><a>uiVerifiedEmail</a></li>
--   <li><a>uiId</a></li>
--   </ul>
userInfoplus :: UserInfoplus

-- | The hosted domain e.g. example.com if the user is Google apps user.
uiHd :: Lens' UserInfoplus (Maybe Text)

-- | The user's email address.
uiEmail :: Lens' UserInfoplus (Maybe Text)

-- | URL of the profile page.
uiLink :: Lens' UserInfoplus (Maybe Text)

-- | The user's preferred locale.
uiLocale :: Lens' UserInfoplus (Maybe Text)

-- | The user's first name.
uiGivenName :: Lens' UserInfoplus (Maybe Text)

-- | The user's last name.
uiFamilyName :: Lens' UserInfoplus (Maybe Text)

-- | URL of the user's picture image.
uiPicture :: Lens' UserInfoplus (Maybe Text)

-- | The user's gender.
uiGender :: Lens' UserInfoplus (Maybe Text)

-- | The user's full name.
uiName :: Lens' UserInfoplus (Maybe Text)

-- | Boolean flag which is true if the email address is verified. Always
--   verified because we only return the user's primary email address.
uiVerifiedEmail :: Lens' UserInfoplus Bool

-- | The obfuscated ID of the user.
uiId :: Lens' UserInfoplus (Maybe Text)
