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


-- | Google Enterprise Apps Reseller SDK.
--   
--   Creates and manages your customers and their subscriptions.
--   
--   <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>v1</tt> of the API.
--   
--   Labels:
--   
--   <ul>
--   <li>Limited Availability</li>
--   </ul>
@package gogol-apps-reseller
@version 0.3.0


module Network.Google.AppsReseller.Types

-- | Default request referring to version <tt>v1</tt> of the Enterprise
--   Apps Reseller API. This contains the host and root path used as a
--   starting point for constructing service requests.
appsResellerService :: ServiceConfig

-- | Manage users on your domain
appsOrderReadOnlyScope :: Proxy '["https://www.googleapis.com/auth/apps.order.readonly"]

-- | Manage users on your domain
appsOrderScope :: Proxy '["https://www.googleapis.com/auth/apps.order"]

-- | Trial Settings of the subscription.
--   
--   <i>See:</i> <a>subscriptionTrialSettings</a> smart constructor.
data SubscriptionTrialSettings

-- | Creates a value of <a>SubscriptionTrialSettings</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>stsIsInTrial</a></li>
--   <li><a>stsTrialEndTime</a></li>
--   </ul>
subscriptionTrialSettings :: SubscriptionTrialSettings

-- | Whether the subscription is in trial.
stsIsInTrial :: Lens' SubscriptionTrialSettings (Maybe Bool)

-- | End time of the trial in milliseconds since Unix epoch.
stsTrialEndTime :: Lens' SubscriptionTrialSettings (Maybe Int64)

-- | JSON template for address of a customer.
--   
--   <i>See:</i> <a>address</a> smart constructor.
data Address

-- | Creates a value of <a>Address</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>aOrganizationName</a></li>
--   <li><a>aKind</a></li>
--   <li><a>aPostalCode</a></li>
--   <li><a>aAddressLine1</a></li>
--   <li><a>aLocality</a></li>
--   <li><a>aContactName</a></li>
--   <li><a>aAddressLine2</a></li>
--   <li><a>aCountryCode</a></li>
--   <li><a>aRegion</a></li>
--   <li><a>aAddressLine3</a></li>
--   </ul>
address :: Address

-- | Name of the organization.
aOrganizationName :: Lens' Address (Maybe Text)

-- | Identifies the resource as a customer address.
aKind :: Lens' Address Text

-- | The postal code. This is in accordance with -
--   http://portablecontacts.net/draft-spec.html#address_element.
aPostalCode :: Lens' Address (Maybe Text)

-- | Address line 1 of the address.
aAddressLine1 :: Lens' Address (Maybe Text)

-- | Name of the locality. This is in accordance with -
--   http://portablecontacts.net/draft-spec.html#address_element.
aLocality :: Lens' Address (Maybe Text)

-- | Name of the contact person.
aContactName :: Lens' Address (Maybe Text)

-- | Address line 2 of the address.
aAddressLine2 :: Lens' Address (Maybe Text)

-- | ISO 3166 country code.
aCountryCode :: Lens' Address (Maybe Text)

-- | Name of the region. This is in accordance with -
--   http://portablecontacts.net/draft-spec.html#address_element.
aRegion :: Lens' Address (Maybe Text)

-- | Address line 3 of the address.
aAddressLine3 :: Lens' Address (Maybe Text)

-- | JSON template for a customer.
--   
--   <i>See:</i> <a>customer</a> smart constructor.
data Customer

-- | Creates a value of <a>Customer</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>cCustomerDomainVerified</a></li>
--   <li><a>cResourceUiURL</a></li>
--   <li><a>cKind</a></li>
--   <li><a>cCustomerId</a></li>
--   <li><a>cAlternateEmail</a></li>
--   <li><a>cCustomerDomain</a></li>
--   <li><a>cPhoneNumber</a></li>
--   <li><a>cPostalAddress</a></li>
--   </ul>
customer :: Customer

-- | Whether the customer's primary domain has been verified.
cCustomerDomainVerified :: Lens' Customer (Maybe Bool)

-- | Ui url for customer resource.
cResourceUiURL :: Lens' Customer (Maybe Text)

-- | Identifies the resource as a customer.
cKind :: Lens' Customer Text

-- | The id of the customer.
cCustomerId :: Lens' Customer (Maybe Text)

-- | The alternate email of the customer.
cAlternateEmail :: Lens' Customer (Maybe Text)

-- | The domain name of the customer.
cCustomerDomain :: Lens' Customer (Maybe Text)

-- | The phone number of the customer.
cPhoneNumber :: Lens' Customer (Maybe Text)

-- | The postal address of the customer.
cPostalAddress :: Lens' Customer (Maybe Address)

-- | JSON template for the ChangePlan rpc request.
--   
--   <i>See:</i> <a>changePlanRequest</a> smart constructor.
data ChangePlanRequest

-- | Creates a value of <a>ChangePlanRequest</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>cprKind</a></li>
--   <li><a>cprDealCode</a></li>
--   <li><a>cprPlanName</a></li>
--   <li><a>cprPurchaseOrderId</a></li>
--   <li><a>cprSeats</a></li>
--   </ul>
changePlanRequest :: ChangePlanRequest

-- | Identifies the resource as a subscription change plan request.
cprKind :: Lens' ChangePlanRequest Text

-- | External name of the deal code applicable for the subscription. This
--   field is optional. If missing, the deal price plan won't be used.
cprDealCode :: Lens' ChangePlanRequest (Maybe Text)

-- | Name of the plan to change to.
cprPlanName :: Lens' ChangePlanRequest (Maybe Text)

-- | Purchase order id for your order tracking purposes.
cprPurchaseOrderId :: Lens' ChangePlanRequest (Maybe Text)

-- | Number/Limit of seats in the new plan.
cprSeats :: Lens' ChangePlanRequest (Maybe Seats)

-- | Interval of the commitment if it is a commitment plan.
--   
--   <i>See:</i> <a>subscriptionPlanCommitmentInterval</a> smart
--   constructor.
data SubscriptionPlanCommitmentInterval

-- | Creates a value of <a>SubscriptionPlanCommitmentInterval</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>spciStartTime</a></li>
--   <li><a>spciEndTime</a></li>
--   </ul>
subscriptionPlanCommitmentInterval :: SubscriptionPlanCommitmentInterval

-- | Start time of the commitment interval in milliseconds since Unix
--   epoch.
spciStartTime :: Lens' SubscriptionPlanCommitmentInterval (Maybe Int64)

-- | End time of the commitment interval in milliseconds since Unix epoch.
spciEndTime :: Lens' SubscriptionPlanCommitmentInterval (Maybe Int64)

-- | Whether the subscription is to be fully cancelled or downgraded
data SubscriptionsDeleteDeletionType

-- | <tt>cancel</tt> Cancels the subscription immediately
Cancel :: SubscriptionsDeleteDeletionType

-- | <tt>downgrade</tt> Downgrades a Google Apps for Business subscription
--   to Google Apps
Downgrade :: SubscriptionsDeleteDeletionType

-- | <tt>suspend</tt> Suspends the subscriptions for 4 days before
--   cancelling it
Suspend :: SubscriptionsDeleteDeletionType

-- | <tt>transfer_to_direct</tt> Transfers a subscription directly to
--   Google
TransferToDirect :: SubscriptionsDeleteDeletionType

-- | Plan details of the subscription
--   
--   <i>See:</i> <a>subscriptionPlan</a> smart constructor.
data SubscriptionPlan

-- | Creates a value of <a>SubscriptionPlan</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>spCommitmentInterval</a></li>
--   <li><a>spIsCommitmentPlan</a></li>
--   <li><a>spPlanName</a></li>
--   </ul>
subscriptionPlan :: SubscriptionPlan

-- | Interval of the commitment if it is a commitment plan.
spCommitmentInterval :: Lens' SubscriptionPlan (Maybe SubscriptionPlanCommitmentInterval)

-- | Whether the plan is a commitment plan or not.
spIsCommitmentPlan :: Lens' SubscriptionPlan (Maybe Bool)

-- | The plan name of this subscription's plan.
spPlanName :: Lens' SubscriptionPlan (Maybe Text)

-- | JSON template for a subscription list.
--   
--   <i>See:</i> <a>subscriptions</a> smart constructor.
data Subscriptions

-- | Creates a value of <a>Subscriptions</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>sNextPageToken</a></li>
--   <li><a>sKind</a></li>
--   <li><a>sSubscriptions</a></li>
--   </ul>
subscriptions :: Subscriptions

-- | The continuation token, used to page through large result sets.
--   Provide this value in a subsequent request to return the next page of
--   results.
sNextPageToken :: Lens' Subscriptions (Maybe Text)

-- | Identifies the resource as a collection of subscriptions.
sKind :: Lens' Subscriptions Text

-- | The subscriptions in this page of results.
sSubscriptions :: Lens' Subscriptions [Subscription]

-- | JSON template for subscription seats.
--   
--   <i>See:</i> <a>seats</a> smart constructor.
data Seats

-- | Creates a value of <a>Seats</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>seaNumberOfSeats</a></li>
--   <li><a>seaMaximumNumberOfSeats</a></li>
--   <li><a>seaLicensedNumberOfSeats</a></li>
--   <li><a>seaKind</a></li>
--   </ul>
seats :: Seats

-- | Number of seats to purchase. This is applicable only for a commitment
--   plan.
seaNumberOfSeats :: Lens' Seats (Maybe Int32)

-- | Maximum number of seats that can be purchased. This needs to be
--   provided only for a non-commitment plan. For a commitment plan it is
--   decided by the contract.
seaMaximumNumberOfSeats :: Lens' Seats (Maybe Int32)

-- | Read-only field containing the current number of licensed seats for
--   FLEXIBLE Google-Apps subscriptions and secondary subscriptions such as
--   Google-Vault and Drive-storage.
seaLicensedNumberOfSeats :: Lens' Seats (Maybe Int32)

-- | Identifies the resource as a subscription change plan request.
seaKind :: Lens' Seats Text

-- | JSON template for a subscription renewal settings.
--   
--   <i>See:</i> <a>renewalSettings</a> smart constructor.
data RenewalSettings

-- | Creates a value of <a>RenewalSettings</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>rsKind</a></li>
--   <li><a>rsRenewalType</a></li>
--   </ul>
renewalSettings :: RenewalSettings

-- | Identifies the resource as a subscription renewal setting.
rsKind :: Lens' RenewalSettings Text

-- | Subscription renewal type.
rsRenewalType :: Lens' RenewalSettings (Maybe Text)

-- | JSON template for a subscription.
--   
--   <i>See:</i> <a>subscription</a> smart constructor.
data Subscription

-- | Creates a value of <a>Subscription</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>subCreationTime</a></li>
--   <li><a>subBillingMethod</a></li>
--   <li><a>subStatus</a></li>
--   <li><a>subTrialSettings</a></li>
--   <li><a>subResourceUiURL</a></li>
--   <li><a>subKind</a></li>
--   <li><a>subSKUId</a></li>
--   <li><a>subPlan</a></li>
--   <li><a>subDealCode</a></li>
--   <li><a>subCustomerId</a></li>
--   <li><a>subCustomerDomain</a></li>
--   <li><a>subSuspensionReasons</a></li>
--   <li><a>subTransferInfo</a></li>
--   <li><a>subPurchaseOrderId</a></li>
--   <li><a>subSeats</a></li>
--   <li><a>subRenewalSettings</a></li>
--   <li><a>subSubscriptionId</a></li>
--   </ul>
subscription :: Subscription

-- | Creation time of this subscription in milliseconds since Unix epoch.
subCreationTime :: Lens' Subscription (Maybe Int64)

-- | Billing method of this subscription.
subBillingMethod :: Lens' Subscription (Maybe Text)

-- | Status of the subscription.
subStatus :: Lens' Subscription (Maybe Text)

-- | Trial Settings of the subscription.
subTrialSettings :: Lens' Subscription (Maybe SubscriptionTrialSettings)

-- | Ui url for subscription resource.
subResourceUiURL :: Lens' Subscription (Maybe Text)

-- | Identifies the resource as a Subscription.
subKind :: Lens' Subscription Text

-- | Name of the sku for which this subscription is purchased.
subSKUId :: Lens' Subscription (Maybe Text)

-- | Plan details of the subscription
subPlan :: Lens' Subscription (Maybe SubscriptionPlan)

-- | External name of the deal, if this subscription was provisioned under
--   one. Otherwise this field will be empty.
subDealCode :: Lens' Subscription (Maybe Text)

-- | The id of the customer to whom the subscription belongs.
subCustomerId :: Lens' Subscription (Maybe Text)

-- | Primary domain name of the customer
subCustomerDomain :: Lens' Subscription (Maybe Text)

-- | Read-only field containing an enumerable of all the current suspension
--   reasons for a subscription. It is possible for a subscription to have
--   many concurrent, overlapping suspension reasons. A subscription's
--   STATUS is SUSPENDED until all pending suspensions are removed.
--   Possible options include: - PENDING_TOS_ACCEPTANCE - The customer has
--   not logged in and accepted the Google Apps Resold Terms of Services. -
--   RENEWAL_WITH_TYPE_CANCEL - The customer's commitment ended and their
--   service was cancelled at the end of their term. - RESELLER_INITIATED -
--   A manual suspension invoked by a Reseller. - TRIAL_ENDED - The
--   customer's trial expired without a plan selected. - OTHER - The
--   customer is suspended for an internal Google reason (e.g. abuse or
--   otherwise).
subSuspensionReasons :: Lens' Subscription [Text]

-- | Transfer related information for the subscription.
subTransferInfo :: Lens' Subscription (Maybe SubscriptionTransferInfo)

-- | Purchase order id for your order tracking purposes.
subPurchaseOrderId :: Lens' Subscription (Maybe Text)

-- | Number/Limit of seats in the new plan.
subSeats :: Lens' Subscription (Maybe Seats)

-- | Renewal settings of the subscription.
subRenewalSettings :: Lens' Subscription (Maybe RenewalSettings)

-- | The id of the subscription.
subSubscriptionId :: Lens' Subscription (Maybe Text)

-- | Transfer related information for the subscription.
--   
--   <i>See:</i> <a>subscriptionTransferInfo</a> smart constructor.
data SubscriptionTransferInfo

-- | Creates a value of <a>SubscriptionTransferInfo</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>stiTransferabilityExpirationTime</a></li>
--   <li><a>stiMinimumTransferableSeats</a></li>
--   </ul>
subscriptionTransferInfo :: SubscriptionTransferInfo

-- | Time when transfer token or intent to transfer will expire.
stiTransferabilityExpirationTime :: Lens' SubscriptionTransferInfo (Maybe Int64)
stiMinimumTransferableSeats :: Lens' SubscriptionTransferInfo (Maybe Int32)


-- | Gets a customer resource if one exists and is owned by the reseller.
--   
--   <i>See:</i> <a>Enterprise Apps Reseller API Reference</a> for
--   <tt>reseller.customers.get</tt>.
module Network.Google.Resource.Reseller.Customers.Get

-- | A resource alias for <tt>reseller.customers.get</tt> method which the
--   <a>CustomersGet</a> request conforms to.
type CustomersGetResource = "apps" :> ("reseller" :> ("v1" :> ("customers" :> (Capture "customerId" Text :> (QueryParam "alt" AltJSON :> Get '[JSON] Customer)))))

-- | Creates a value of <a>CustomersGet</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>cgCustomerId</a></li>
--   </ul>
customersGet :: Text -> CustomersGet

-- | Gets a customer resource if one exists and is owned by the reseller.
--   
--   <i>See:</i> <a>customersGet</a> smart constructor.
data CustomersGet

-- | Id of the Customer
cgCustomerId :: Lens' CustomersGet Text
instance GHC.Generics.Generic Network.Google.Resource.Reseller.Customers.Get.CustomersGet
instance Data.Data.Data Network.Google.Resource.Reseller.Customers.Get.CustomersGet
instance GHC.Show.Show Network.Google.Resource.Reseller.Customers.Get.CustomersGet
instance GHC.Classes.Eq Network.Google.Resource.Reseller.Customers.Get.CustomersGet
instance Network.Google.Types.GoogleRequest Network.Google.Resource.Reseller.Customers.Get.CustomersGet


-- | Creates a customer resource if one does not already exist.
--   
--   <i>See:</i> <a>Enterprise Apps Reseller API Reference</a> for
--   <tt>reseller.customers.insert</tt>.
module Network.Google.Resource.Reseller.Customers.Insert

-- | A resource alias for <tt>reseller.customers.insert</tt> method which
--   the <a>CustomersInsert</a> request conforms to.
type CustomersInsertResource = "apps" :> ("reseller" :> ("v1" :> ("customers" :> (QueryParam "customerAuthToken" Text :> (QueryParam "alt" AltJSON :> (ReqBody '[JSON] Customer :> Post '[JSON] Customer))))))

-- | Creates a value of <a>CustomersInsert</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>ciPayload</a></li>
--   <li><a>ciCustomerAuthToken</a></li>
--   </ul>
customersInsert :: Customer -> CustomersInsert

-- | Creates a customer resource if one does not already exist.
--   
--   <i>See:</i> <a>customersInsert</a> smart constructor.
data CustomersInsert

-- | Multipart request metadata.
ciPayload :: Lens' CustomersInsert Customer

-- | An auth token needed for inserting a customer for which domain already
--   exists. Can be generated at https://admin.google.com/TransferToken.
--   Optional.
ciCustomerAuthToken :: Lens' CustomersInsert (Maybe Text)
instance GHC.Generics.Generic Network.Google.Resource.Reseller.Customers.Insert.CustomersInsert
instance Data.Data.Data Network.Google.Resource.Reseller.Customers.Insert.CustomersInsert
instance GHC.Show.Show Network.Google.Resource.Reseller.Customers.Insert.CustomersInsert
instance GHC.Classes.Eq Network.Google.Resource.Reseller.Customers.Insert.CustomersInsert
instance Network.Google.Types.GoogleRequest Network.Google.Resource.Reseller.Customers.Insert.CustomersInsert


-- | Update a customer resource if one it exists and is owned by the
--   reseller. This method supports patch semantics.
--   
--   <i>See:</i> <a>Enterprise Apps Reseller API Reference</a> for
--   <tt>reseller.customers.patch</tt>.
module Network.Google.Resource.Reseller.Customers.Patch

-- | A resource alias for <tt>reseller.customers.patch</tt> method which
--   the <a>CustomersPatch</a> request conforms to.
type CustomersPatchResource = "apps" :> ("reseller" :> ("v1" :> ("customers" :> (Capture "customerId" Text :> (QueryParam "alt" AltJSON :> (ReqBody '[JSON] Customer :> Patch '[JSON] Customer))))))

-- | Creates a value of <a>CustomersPatch</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>cpPayload</a></li>
--   <li><a>cpCustomerId</a></li>
--   </ul>
customersPatch :: Customer -> Text -> CustomersPatch

-- | Update a customer resource if one it exists and is owned by the
--   reseller. This method supports patch semantics.
--   
--   <i>See:</i> <a>customersPatch</a> smart constructor.
data CustomersPatch

-- | Multipart request metadata.
cpPayload :: Lens' CustomersPatch Customer

-- | Id of the Customer
cpCustomerId :: Lens' CustomersPatch Text
instance GHC.Generics.Generic Network.Google.Resource.Reseller.Customers.Patch.CustomersPatch
instance Data.Data.Data Network.Google.Resource.Reseller.Customers.Patch.CustomersPatch
instance GHC.Show.Show Network.Google.Resource.Reseller.Customers.Patch.CustomersPatch
instance GHC.Classes.Eq Network.Google.Resource.Reseller.Customers.Patch.CustomersPatch
instance Network.Google.Types.GoogleRequest Network.Google.Resource.Reseller.Customers.Patch.CustomersPatch


-- | Update a customer resource if one it exists and is owned by the
--   reseller.
--   
--   <i>See:</i> <a>Enterprise Apps Reseller API Reference</a> for
--   <tt>reseller.customers.update</tt>.
module Network.Google.Resource.Reseller.Customers.Update

-- | A resource alias for <tt>reseller.customers.update</tt> method which
--   the <a>CustomersUpdate</a> request conforms to.
type CustomersUpdateResource = "apps" :> ("reseller" :> ("v1" :> ("customers" :> (Capture "customerId" Text :> (QueryParam "alt" AltJSON :> (ReqBody '[JSON] Customer :> Put '[JSON] Customer))))))

-- | Creates a value of <a>CustomersUpdate</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>cuPayload</a></li>
--   <li><a>cuCustomerId</a></li>
--   </ul>
customersUpdate :: Customer -> Text -> CustomersUpdate

-- | Update a customer resource if one it exists and is owned by the
--   reseller.
--   
--   <i>See:</i> <a>customersUpdate</a> smart constructor.
data CustomersUpdate

-- | Multipart request metadata.
cuPayload :: Lens' CustomersUpdate Customer

-- | Id of the Customer
cuCustomerId :: Lens' CustomersUpdate Text
instance GHC.Generics.Generic Network.Google.Resource.Reseller.Customers.Update.CustomersUpdate
instance Data.Data.Data Network.Google.Resource.Reseller.Customers.Update.CustomersUpdate
instance GHC.Show.Show Network.Google.Resource.Reseller.Customers.Update.CustomersUpdate
instance GHC.Classes.Eq Network.Google.Resource.Reseller.Customers.Update.CustomersUpdate
instance Network.Google.Types.GoogleRequest Network.Google.Resource.Reseller.Customers.Update.CustomersUpdate


-- | Activates a subscription previously suspended by the reseller
--   
--   <i>See:</i> <a>Enterprise Apps Reseller API Reference</a> for
--   <tt>reseller.subscriptions.activate</tt>.
module Network.Google.Resource.Reseller.Subscriptions.Activate

-- | A resource alias for <tt>reseller.subscriptions.activate</tt> method
--   which the <a>SubscriptionsActivate</a> request conforms to.
type SubscriptionsActivateResource = "apps" :> ("reseller" :> ("v1" :> ("customers" :> (Capture "customerId" Text :> ("subscriptions" :> (Capture "subscriptionId" Text :> ("activate" :> (QueryParam "alt" AltJSON :> Post '[JSON] Subscription))))))))

-- | Creates a value of <a>SubscriptionsActivate</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>saCustomerId</a></li>
--   <li><a>saSubscriptionId</a></li>
--   </ul>
subscriptionsActivate :: Text -> Text -> SubscriptionsActivate

-- | Activates a subscription previously suspended by the reseller
--   
--   <i>See:</i> <a>subscriptionsActivate</a> smart constructor.
data SubscriptionsActivate

-- | Id of the Customer
saCustomerId :: Lens' SubscriptionsActivate Text

-- | Id of the subscription, which is unique for a customer
saSubscriptionId :: Lens' SubscriptionsActivate Text
instance GHC.Generics.Generic Network.Google.Resource.Reseller.Subscriptions.Activate.SubscriptionsActivate
instance Data.Data.Data Network.Google.Resource.Reseller.Subscriptions.Activate.SubscriptionsActivate
instance GHC.Show.Show Network.Google.Resource.Reseller.Subscriptions.Activate.SubscriptionsActivate
instance GHC.Classes.Eq Network.Google.Resource.Reseller.Subscriptions.Activate.SubscriptionsActivate
instance Network.Google.Types.GoogleRequest Network.Google.Resource.Reseller.Subscriptions.Activate.SubscriptionsActivate


-- | Changes the plan of a subscription
--   
--   <i>See:</i> <a>Enterprise Apps Reseller API Reference</a> for
--   <tt>reseller.subscriptions.changePlan</tt>.
module Network.Google.Resource.Reseller.Subscriptions.ChangePlan

-- | A resource alias for <tt>reseller.subscriptions.changePlan</tt> method
--   which the <a>SubscriptionsChangePlan</a> request conforms to.
type SubscriptionsChangePlanResource = "apps" :> ("reseller" :> ("v1" :> ("customers" :> (Capture "customerId" Text :> ("subscriptions" :> (Capture "subscriptionId" Text :> ("changePlan" :> (QueryParam "alt" AltJSON :> (ReqBody '[JSON] ChangePlanRequest :> Post '[JSON] Subscription)))))))))

-- | Creates a value of <a>SubscriptionsChangePlan</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>scpPayload</a></li>
--   <li><a>scpCustomerId</a></li>
--   <li><a>scpSubscriptionId</a></li>
--   </ul>
subscriptionsChangePlan :: ChangePlanRequest -> Text -> Text -> SubscriptionsChangePlan

-- | Changes the plan of a subscription
--   
--   <i>See:</i> <a>subscriptionsChangePlan</a> smart constructor.
data SubscriptionsChangePlan

-- | Multipart request metadata.
scpPayload :: Lens' SubscriptionsChangePlan ChangePlanRequest

-- | Id of the Customer
scpCustomerId :: Lens' SubscriptionsChangePlan Text

-- | Id of the subscription, which is unique for a customer
scpSubscriptionId :: Lens' SubscriptionsChangePlan Text
instance GHC.Generics.Generic Network.Google.Resource.Reseller.Subscriptions.ChangePlan.SubscriptionsChangePlan
instance Data.Data.Data Network.Google.Resource.Reseller.Subscriptions.ChangePlan.SubscriptionsChangePlan
instance GHC.Show.Show Network.Google.Resource.Reseller.Subscriptions.ChangePlan.SubscriptionsChangePlan
instance GHC.Classes.Eq Network.Google.Resource.Reseller.Subscriptions.ChangePlan.SubscriptionsChangePlan
instance Network.Google.Types.GoogleRequest Network.Google.Resource.Reseller.Subscriptions.ChangePlan.SubscriptionsChangePlan


-- | Changes the renewal settings of a subscription
--   
--   <i>See:</i> <a>Enterprise Apps Reseller API Reference</a> for
--   <tt>reseller.subscriptions.changeRenewalSettings</tt>.
module Network.Google.Resource.Reseller.Subscriptions.ChangeRenewalSettings

-- | A resource alias for
--   <tt>reseller.subscriptions.changeRenewalSettings</tt> method which the
--   <a>SubscriptionsChangeRenewalSettings</a> request conforms to.
type SubscriptionsChangeRenewalSettingsResource = "apps" :> ("reseller" :> ("v1" :> ("customers" :> (Capture "customerId" Text :> ("subscriptions" :> (Capture "subscriptionId" Text :> ("changeRenewalSettings" :> (QueryParam "alt" AltJSON :> (ReqBody '[JSON] RenewalSettings :> Post '[JSON] Subscription)))))))))

-- | Creates a value of <a>SubscriptionsChangeRenewalSettings</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>scrsPayload</a></li>
--   <li><a>scrsCustomerId</a></li>
--   <li><a>scrsSubscriptionId</a></li>
--   </ul>
subscriptionsChangeRenewalSettings :: RenewalSettings -> Text -> Text -> SubscriptionsChangeRenewalSettings

-- | Changes the renewal settings of a subscription
--   
--   <i>See:</i> <a>subscriptionsChangeRenewalSettings</a> smart
--   constructor.
data SubscriptionsChangeRenewalSettings

-- | Multipart request metadata.
scrsPayload :: Lens' SubscriptionsChangeRenewalSettings RenewalSettings

-- | Id of the Customer
scrsCustomerId :: Lens' SubscriptionsChangeRenewalSettings Text

-- | Id of the subscription, which is unique for a customer
scrsSubscriptionId :: Lens' SubscriptionsChangeRenewalSettings Text
instance GHC.Generics.Generic Network.Google.Resource.Reseller.Subscriptions.ChangeRenewalSettings.SubscriptionsChangeRenewalSettings
instance Data.Data.Data Network.Google.Resource.Reseller.Subscriptions.ChangeRenewalSettings.SubscriptionsChangeRenewalSettings
instance GHC.Show.Show Network.Google.Resource.Reseller.Subscriptions.ChangeRenewalSettings.SubscriptionsChangeRenewalSettings
instance GHC.Classes.Eq Network.Google.Resource.Reseller.Subscriptions.ChangeRenewalSettings.SubscriptionsChangeRenewalSettings
instance Network.Google.Types.GoogleRequest Network.Google.Resource.Reseller.Subscriptions.ChangeRenewalSettings.SubscriptionsChangeRenewalSettings


-- | Changes the seats configuration of a subscription
--   
--   <i>See:</i> <a>Enterprise Apps Reseller API Reference</a> for
--   <tt>reseller.subscriptions.changeSeats</tt>.
module Network.Google.Resource.Reseller.Subscriptions.ChangeSeats

-- | A resource alias for <tt>reseller.subscriptions.changeSeats</tt>
--   method which the <a>SubscriptionsChangeSeats</a> request conforms to.
type SubscriptionsChangeSeatsResource = "apps" :> ("reseller" :> ("v1" :> ("customers" :> (Capture "customerId" Text :> ("subscriptions" :> (Capture "subscriptionId" Text :> ("changeSeats" :> (QueryParam "alt" AltJSON :> (ReqBody '[JSON] Seats :> Post '[JSON] Subscription)))))))))

-- | Creates a value of <a>SubscriptionsChangeSeats</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>scsPayload</a></li>
--   <li><a>scsCustomerId</a></li>
--   <li><a>scsSubscriptionId</a></li>
--   </ul>
subscriptionsChangeSeats :: Seats -> Text -> Text -> SubscriptionsChangeSeats

-- | Changes the seats configuration of a subscription
--   
--   <i>See:</i> <a>subscriptionsChangeSeats</a> smart constructor.
data SubscriptionsChangeSeats

-- | Multipart request metadata.
scsPayload :: Lens' SubscriptionsChangeSeats Seats

-- | Id of the Customer
scsCustomerId :: Lens' SubscriptionsChangeSeats Text

-- | Id of the subscription, which is unique for a customer
scsSubscriptionId :: Lens' SubscriptionsChangeSeats Text
instance GHC.Generics.Generic Network.Google.Resource.Reseller.Subscriptions.ChangeSeats.SubscriptionsChangeSeats
instance Data.Data.Data Network.Google.Resource.Reseller.Subscriptions.ChangeSeats.SubscriptionsChangeSeats
instance GHC.Show.Show Network.Google.Resource.Reseller.Subscriptions.ChangeSeats.SubscriptionsChangeSeats
instance GHC.Classes.Eq Network.Google.Resource.Reseller.Subscriptions.ChangeSeats.SubscriptionsChangeSeats
instance Network.Google.Types.GoogleRequest Network.Google.Resource.Reseller.Subscriptions.ChangeSeats.SubscriptionsChangeSeats


-- | Cancels/Downgrades a subscription.
--   
--   <i>See:</i> <a>Enterprise Apps Reseller API Reference</a> for
--   <tt>reseller.subscriptions.delete</tt>.
module Network.Google.Resource.Reseller.Subscriptions.Delete

-- | A resource alias for <tt>reseller.subscriptions.delete</tt> method
--   which the <a>SubscriptionsDelete</a> request conforms to.
type SubscriptionsDeleteResource = "apps" :> ("reseller" :> ("v1" :> ("customers" :> (Capture "customerId" Text :> ("subscriptions" :> (Capture "subscriptionId" Text :> (QueryParam "deletionType" SubscriptionsDeleteDeletionType :> (QueryParam "alt" AltJSON :> Delete '[JSON] ()))))))))

-- | Creates a value of <a>SubscriptionsDelete</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>sdCustomerId</a></li>
--   <li><a>sdDeletionType</a></li>
--   <li><a>sdSubscriptionId</a></li>
--   </ul>
subscriptionsDelete :: Text -> SubscriptionsDeleteDeletionType -> Text -> SubscriptionsDelete

-- | Cancels/Downgrades a subscription.
--   
--   <i>See:</i> <a>subscriptionsDelete</a> smart constructor.
data SubscriptionsDelete

-- | Id of the Customer
sdCustomerId :: Lens' SubscriptionsDelete Text

-- | Whether the subscription is to be fully cancelled or downgraded
sdDeletionType :: Lens' SubscriptionsDelete SubscriptionsDeleteDeletionType

-- | Id of the subscription, which is unique for a customer
sdSubscriptionId :: Lens' SubscriptionsDelete Text
instance GHC.Generics.Generic Network.Google.Resource.Reseller.Subscriptions.Delete.SubscriptionsDelete
instance Data.Data.Data Network.Google.Resource.Reseller.Subscriptions.Delete.SubscriptionsDelete
instance GHC.Show.Show Network.Google.Resource.Reseller.Subscriptions.Delete.SubscriptionsDelete
instance GHC.Classes.Eq Network.Google.Resource.Reseller.Subscriptions.Delete.SubscriptionsDelete
instance Network.Google.Types.GoogleRequest Network.Google.Resource.Reseller.Subscriptions.Delete.SubscriptionsDelete


-- | Gets a subscription of the customer.
--   
--   <i>See:</i> <a>Enterprise Apps Reseller API Reference</a> for
--   <tt>reseller.subscriptions.get</tt>.
module Network.Google.Resource.Reseller.Subscriptions.Get

-- | A resource alias for <tt>reseller.subscriptions.get</tt> method which
--   the <a>SubscriptionsGet</a> request conforms to.
type SubscriptionsGetResource = "apps" :> ("reseller" :> ("v1" :> ("customers" :> (Capture "customerId" Text :> ("subscriptions" :> (Capture "subscriptionId" Text :> (QueryParam "alt" AltJSON :> Get '[JSON] Subscription)))))))

-- | Creates a value of <a>SubscriptionsGet</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>sgCustomerId</a></li>
--   <li><a>sgSubscriptionId</a></li>
--   </ul>
subscriptionsGet :: Text -> Text -> SubscriptionsGet

-- | Gets a subscription of the customer.
--   
--   <i>See:</i> <a>subscriptionsGet</a> smart constructor.
data SubscriptionsGet

-- | Id of the Customer
sgCustomerId :: Lens' SubscriptionsGet Text

-- | Id of the subscription, which is unique for a customer
sgSubscriptionId :: Lens' SubscriptionsGet Text
instance GHC.Generics.Generic Network.Google.Resource.Reseller.Subscriptions.Get.SubscriptionsGet
instance Data.Data.Data Network.Google.Resource.Reseller.Subscriptions.Get.SubscriptionsGet
instance GHC.Show.Show Network.Google.Resource.Reseller.Subscriptions.Get.SubscriptionsGet
instance GHC.Classes.Eq Network.Google.Resource.Reseller.Subscriptions.Get.SubscriptionsGet
instance Network.Google.Types.GoogleRequest Network.Google.Resource.Reseller.Subscriptions.Get.SubscriptionsGet


-- | Creates/Transfers a subscription for the customer.
--   
--   <i>See:</i> <a>Enterprise Apps Reseller API Reference</a> for
--   <tt>reseller.subscriptions.insert</tt>.
module Network.Google.Resource.Reseller.Subscriptions.Insert

-- | A resource alias for <tt>reseller.subscriptions.insert</tt> method
--   which the <a>SubscriptionsInsert</a> request conforms to.
type SubscriptionsInsertResource = "apps" :> ("reseller" :> ("v1" :> ("customers" :> (Capture "customerId" Text :> ("subscriptions" :> (QueryParam "customerAuthToken" Text :> (QueryParam "alt" AltJSON :> (ReqBody '[JSON] Subscription :> Post '[JSON] Subscription))))))))

-- | Creates a value of <a>SubscriptionsInsert</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>siPayload</a></li>
--   <li><a>siCustomerId</a></li>
--   <li><a>siCustomerAuthToken</a></li>
--   </ul>
subscriptionsInsert :: Subscription -> Text -> SubscriptionsInsert

-- | Creates/Transfers a subscription for the customer.
--   
--   <i>See:</i> <a>subscriptionsInsert</a> smart constructor.
data SubscriptionsInsert

-- | Multipart request metadata.
siPayload :: Lens' SubscriptionsInsert Subscription

-- | Id of the Customer
siCustomerId :: Lens' SubscriptionsInsert Text

-- | An auth token needed for transferring a subscription. Can be generated
--   at https://www.google.com/a/cpanel/customer-domain/TransferToken.
--   Optional.
siCustomerAuthToken :: Lens' SubscriptionsInsert (Maybe Text)
instance GHC.Generics.Generic Network.Google.Resource.Reseller.Subscriptions.Insert.SubscriptionsInsert
instance Data.Data.Data Network.Google.Resource.Reseller.Subscriptions.Insert.SubscriptionsInsert
instance GHC.Show.Show Network.Google.Resource.Reseller.Subscriptions.Insert.SubscriptionsInsert
instance GHC.Classes.Eq Network.Google.Resource.Reseller.Subscriptions.Insert.SubscriptionsInsert
instance Network.Google.Types.GoogleRequest Network.Google.Resource.Reseller.Subscriptions.Insert.SubscriptionsInsert


-- | Lists subscriptions of a reseller, optionally filtered by a customer
--   name prefix.
--   
--   <i>See:</i> <a>Enterprise Apps Reseller API Reference</a> for
--   <tt>reseller.subscriptions.list</tt>.
module Network.Google.Resource.Reseller.Subscriptions.List

-- | A resource alias for <tt>reseller.subscriptions.list</tt> method which
--   the <a>SubscriptionsList</a> request conforms to.
type SubscriptionsListResource = "apps" :> ("reseller" :> ("v1" :> ("subscriptions" :> (QueryParam "customerNamePrefix" Text :> (QueryParam "customerId" Text :> (QueryParam "customerAuthToken" Text :> (QueryParam "pageToken" Text :> (QueryParam "maxResults" (Textual Word32) :> (QueryParam "alt" AltJSON :> Get '[JSON] Subscriptions)))))))))

-- | Creates a value of <a>SubscriptionsList</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>slCustomerNamePrefix</a></li>
--   <li><a>slCustomerId</a></li>
--   <li><a>slCustomerAuthToken</a></li>
--   <li><a>slPageToken</a></li>
--   <li><a>slMaxResults</a></li>
--   </ul>
subscriptionsList :: SubscriptionsList

-- | Lists subscriptions of a reseller, optionally filtered by a customer
--   name prefix.
--   
--   <i>See:</i> <a>subscriptionsList</a> smart constructor.
data SubscriptionsList

-- | Prefix of the customer's domain name by which the subscriptions should
--   be filtered. Optional
slCustomerNamePrefix :: Lens' SubscriptionsList (Maybe Text)

-- | Id of the Customer
slCustomerId :: Lens' SubscriptionsList (Maybe Text)

-- | An auth token needed if the customer is not a resold customer of this
--   reseller. Can be generated at
--   https://www.google.com/a/cpanel/customer-domain/TransferToken.Optional.
slCustomerAuthToken :: Lens' SubscriptionsList (Maybe Text)

-- | Token to specify next page in the list
slPageToken :: Lens' SubscriptionsList (Maybe Text)

-- | Maximum number of results to return
slMaxResults :: Lens' SubscriptionsList (Maybe Word32)
instance GHC.Generics.Generic Network.Google.Resource.Reseller.Subscriptions.List.SubscriptionsList
instance Data.Data.Data Network.Google.Resource.Reseller.Subscriptions.List.SubscriptionsList
instance GHC.Show.Show Network.Google.Resource.Reseller.Subscriptions.List.SubscriptionsList
instance GHC.Classes.Eq Network.Google.Resource.Reseller.Subscriptions.List.SubscriptionsList
instance Network.Google.Types.GoogleRequest Network.Google.Resource.Reseller.Subscriptions.List.SubscriptionsList


-- | Starts paid service of a trial subscription
--   
--   <i>See:</i> <a>Enterprise Apps Reseller API Reference</a> for
--   <tt>reseller.subscriptions.startPaidService</tt>.
module Network.Google.Resource.Reseller.Subscriptions.StartPaidService

-- | A resource alias for <tt>reseller.subscriptions.startPaidService</tt>
--   method which the <a>SubscriptionsStartPaidService</a> request conforms
--   to.
type SubscriptionsStartPaidServiceResource = "apps" :> ("reseller" :> ("v1" :> ("customers" :> (Capture "customerId" Text :> ("subscriptions" :> (Capture "subscriptionId" Text :> ("startPaidService" :> (QueryParam "alt" AltJSON :> Post '[JSON] Subscription))))))))

-- | Creates a value of <a>SubscriptionsStartPaidService</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>sspsCustomerId</a></li>
--   <li><a>sspsSubscriptionId</a></li>
--   </ul>
subscriptionsStartPaidService :: Text -> Text -> SubscriptionsStartPaidService

-- | Starts paid service of a trial subscription
--   
--   <i>See:</i> <a>subscriptionsStartPaidService</a> smart constructor.
data SubscriptionsStartPaidService

-- | Id of the Customer
sspsCustomerId :: Lens' SubscriptionsStartPaidService Text

-- | Id of the subscription, which is unique for a customer
sspsSubscriptionId :: Lens' SubscriptionsStartPaidService Text
instance GHC.Generics.Generic Network.Google.Resource.Reseller.Subscriptions.StartPaidService.SubscriptionsStartPaidService
instance Data.Data.Data Network.Google.Resource.Reseller.Subscriptions.StartPaidService.SubscriptionsStartPaidService
instance GHC.Show.Show Network.Google.Resource.Reseller.Subscriptions.StartPaidService.SubscriptionsStartPaidService
instance GHC.Classes.Eq Network.Google.Resource.Reseller.Subscriptions.StartPaidService.SubscriptionsStartPaidService
instance Network.Google.Types.GoogleRequest Network.Google.Resource.Reseller.Subscriptions.StartPaidService.SubscriptionsStartPaidService


-- | Suspends an active subscription
--   
--   <i>See:</i> <a>Enterprise Apps Reseller API Reference</a> for
--   <tt>reseller.subscriptions.suspend</tt>.
module Network.Google.Resource.Reseller.Subscriptions.Suspend

-- | A resource alias for <tt>reseller.subscriptions.suspend</tt> method
--   which the <a>SubscriptionsSuspend</a> request conforms to.
type SubscriptionsSuspendResource = "apps" :> ("reseller" :> ("v1" :> ("customers" :> (Capture "customerId" Text :> ("subscriptions" :> (Capture "subscriptionId" Text :> ("suspend" :> (QueryParam "alt" AltJSON :> Post '[JSON] Subscription))))))))

-- | Creates a value of <a>SubscriptionsSuspend</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>ssCustomerId</a></li>
--   <li><a>ssSubscriptionId</a></li>
--   </ul>
subscriptionsSuspend :: Text -> Text -> SubscriptionsSuspend

-- | Suspends an active subscription
--   
--   <i>See:</i> <a>subscriptionsSuspend</a> smart constructor.
data SubscriptionsSuspend

-- | Id of the Customer
ssCustomerId :: Lens' SubscriptionsSuspend Text

-- | Id of the subscription, which is unique for a customer
ssSubscriptionId :: Lens' SubscriptionsSuspend Text
instance GHC.Generics.Generic Network.Google.Resource.Reseller.Subscriptions.Suspend.SubscriptionsSuspend
instance Data.Data.Data Network.Google.Resource.Reseller.Subscriptions.Suspend.SubscriptionsSuspend
instance GHC.Show.Show Network.Google.Resource.Reseller.Subscriptions.Suspend.SubscriptionsSuspend
instance GHC.Classes.Eq Network.Google.Resource.Reseller.Subscriptions.Suspend.SubscriptionsSuspend
instance Network.Google.Types.GoogleRequest Network.Google.Resource.Reseller.Subscriptions.Suspend.SubscriptionsSuspend


-- | Creates and manages your customers and their subscriptions.
--   
--   <i>See:</i> <a>Enterprise Apps Reseller API Reference</a>
module Network.Google.AppsReseller

-- | Default request referring to version <tt>v1</tt> of the Enterprise
--   Apps Reseller API. This contains the host and root path used as a
--   starting point for constructing service requests.
appsResellerService :: ServiceConfig

-- | Manage users on your domain
appsOrderReadOnlyScope :: Proxy '["https://www.googleapis.com/auth/apps.order.readonly"]

-- | Manage users on your domain
appsOrderScope :: Proxy '["https://www.googleapis.com/auth/apps.order"]

-- | Represents the entirety of the methods and resources available for the
--   Enterprise Apps Reseller API service.
type AppsResellerAPI = CustomersInsertResource :<|> (CustomersPatchResource :<|> (CustomersGetResource :<|> (CustomersUpdateResource :<|> (SubscriptionsInsertResource :<|> (SubscriptionsListResource :<|> (SubscriptionsChangeRenewalSettingsResource :<|> (SubscriptionsGetResource :<|> (SubscriptionsActivateResource :<|> (SubscriptionsSuspendResource :<|> (SubscriptionsChangePlanResource :<|> (SubscriptionsChangeSeatsResource :<|> (SubscriptionsDeleteResource :<|> SubscriptionsStartPaidServiceResource))))))))))))

-- | Trial Settings of the subscription.
--   
--   <i>See:</i> <a>subscriptionTrialSettings</a> smart constructor.
data SubscriptionTrialSettings

-- | Creates a value of <a>SubscriptionTrialSettings</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>stsIsInTrial</a></li>
--   <li><a>stsTrialEndTime</a></li>
--   </ul>
subscriptionTrialSettings :: SubscriptionTrialSettings

-- | Whether the subscription is in trial.
stsIsInTrial :: Lens' SubscriptionTrialSettings (Maybe Bool)

-- | End time of the trial in milliseconds since Unix epoch.
stsTrialEndTime :: Lens' SubscriptionTrialSettings (Maybe Int64)

-- | JSON template for address of a customer.
--   
--   <i>See:</i> <a>address</a> smart constructor.
data Address

-- | Creates a value of <a>Address</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>aOrganizationName</a></li>
--   <li><a>aKind</a></li>
--   <li><a>aPostalCode</a></li>
--   <li><a>aAddressLine1</a></li>
--   <li><a>aLocality</a></li>
--   <li><a>aContactName</a></li>
--   <li><a>aAddressLine2</a></li>
--   <li><a>aCountryCode</a></li>
--   <li><a>aRegion</a></li>
--   <li><a>aAddressLine3</a></li>
--   </ul>
address :: Address

-- | Name of the organization.
aOrganizationName :: Lens' Address (Maybe Text)

-- | Identifies the resource as a customer address.
aKind :: Lens' Address Text

-- | The postal code. This is in accordance with -
--   http://portablecontacts.net/draft-spec.html#address_element.
aPostalCode :: Lens' Address (Maybe Text)

-- | Address line 1 of the address.
aAddressLine1 :: Lens' Address (Maybe Text)

-- | Name of the locality. This is in accordance with -
--   http://portablecontacts.net/draft-spec.html#address_element.
aLocality :: Lens' Address (Maybe Text)

-- | Name of the contact person.
aContactName :: Lens' Address (Maybe Text)

-- | Address line 2 of the address.
aAddressLine2 :: Lens' Address (Maybe Text)

-- | ISO 3166 country code.
aCountryCode :: Lens' Address (Maybe Text)

-- | Name of the region. This is in accordance with -
--   http://portablecontacts.net/draft-spec.html#address_element.
aRegion :: Lens' Address (Maybe Text)

-- | Address line 3 of the address.
aAddressLine3 :: Lens' Address (Maybe Text)

-- | JSON template for a customer.
--   
--   <i>See:</i> <a>customer</a> smart constructor.
data Customer

-- | Creates a value of <a>Customer</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>cCustomerDomainVerified</a></li>
--   <li><a>cResourceUiURL</a></li>
--   <li><a>cKind</a></li>
--   <li><a>cCustomerId</a></li>
--   <li><a>cAlternateEmail</a></li>
--   <li><a>cCustomerDomain</a></li>
--   <li><a>cPhoneNumber</a></li>
--   <li><a>cPostalAddress</a></li>
--   </ul>
customer :: Customer

-- | Whether the customer's primary domain has been verified.
cCustomerDomainVerified :: Lens' Customer (Maybe Bool)

-- | Ui url for customer resource.
cResourceUiURL :: Lens' Customer (Maybe Text)

-- | Identifies the resource as a customer.
cKind :: Lens' Customer Text

-- | The id of the customer.
cCustomerId :: Lens' Customer (Maybe Text)

-- | The alternate email of the customer.
cAlternateEmail :: Lens' Customer (Maybe Text)

-- | The domain name of the customer.
cCustomerDomain :: Lens' Customer (Maybe Text)

-- | The phone number of the customer.
cPhoneNumber :: Lens' Customer (Maybe Text)

-- | The postal address of the customer.
cPostalAddress :: Lens' Customer (Maybe Address)

-- | JSON template for the ChangePlan rpc request.
--   
--   <i>See:</i> <a>changePlanRequest</a> smart constructor.
data ChangePlanRequest

-- | Creates a value of <a>ChangePlanRequest</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>cprKind</a></li>
--   <li><a>cprDealCode</a></li>
--   <li><a>cprPlanName</a></li>
--   <li><a>cprPurchaseOrderId</a></li>
--   <li><a>cprSeats</a></li>
--   </ul>
changePlanRequest :: ChangePlanRequest

-- | Identifies the resource as a subscription change plan request.
cprKind :: Lens' ChangePlanRequest Text

-- | External name of the deal code applicable for the subscription. This
--   field is optional. If missing, the deal price plan won't be used.
cprDealCode :: Lens' ChangePlanRequest (Maybe Text)

-- | Name of the plan to change to.
cprPlanName :: Lens' ChangePlanRequest (Maybe Text)

-- | Purchase order id for your order tracking purposes.
cprPurchaseOrderId :: Lens' ChangePlanRequest (Maybe Text)

-- | Number/Limit of seats in the new plan.
cprSeats :: Lens' ChangePlanRequest (Maybe Seats)

-- | Interval of the commitment if it is a commitment plan.
--   
--   <i>See:</i> <a>subscriptionPlanCommitmentInterval</a> smart
--   constructor.
data SubscriptionPlanCommitmentInterval

-- | Creates a value of <a>SubscriptionPlanCommitmentInterval</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>spciStartTime</a></li>
--   <li><a>spciEndTime</a></li>
--   </ul>
subscriptionPlanCommitmentInterval :: SubscriptionPlanCommitmentInterval

-- | Start time of the commitment interval in milliseconds since Unix
--   epoch.
spciStartTime :: Lens' SubscriptionPlanCommitmentInterval (Maybe Int64)

-- | End time of the commitment interval in milliseconds since Unix epoch.
spciEndTime :: Lens' SubscriptionPlanCommitmentInterval (Maybe Int64)

-- | Whether the subscription is to be fully cancelled or downgraded
data SubscriptionsDeleteDeletionType

-- | <tt>cancel</tt> Cancels the subscription immediately
Cancel :: SubscriptionsDeleteDeletionType

-- | <tt>downgrade</tt> Downgrades a Google Apps for Business subscription
--   to Google Apps
Downgrade :: SubscriptionsDeleteDeletionType

-- | <tt>suspend</tt> Suspends the subscriptions for 4 days before
--   cancelling it
Suspend :: SubscriptionsDeleteDeletionType

-- | <tt>transfer_to_direct</tt> Transfers a subscription directly to
--   Google
TransferToDirect :: SubscriptionsDeleteDeletionType

-- | Plan details of the subscription
--   
--   <i>See:</i> <a>subscriptionPlan</a> smart constructor.
data SubscriptionPlan

-- | Creates a value of <a>SubscriptionPlan</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>spCommitmentInterval</a></li>
--   <li><a>spIsCommitmentPlan</a></li>
--   <li><a>spPlanName</a></li>
--   </ul>
subscriptionPlan :: SubscriptionPlan

-- | Interval of the commitment if it is a commitment plan.
spCommitmentInterval :: Lens' SubscriptionPlan (Maybe SubscriptionPlanCommitmentInterval)

-- | Whether the plan is a commitment plan or not.
spIsCommitmentPlan :: Lens' SubscriptionPlan (Maybe Bool)

-- | The plan name of this subscription's plan.
spPlanName :: Lens' SubscriptionPlan (Maybe Text)

-- | JSON template for a subscription list.
--   
--   <i>See:</i> <a>subscriptions</a> smart constructor.
data Subscriptions

-- | Creates a value of <a>Subscriptions</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>sNextPageToken</a></li>
--   <li><a>sKind</a></li>
--   <li><a>sSubscriptions</a></li>
--   </ul>
subscriptions :: Subscriptions

-- | The continuation token, used to page through large result sets.
--   Provide this value in a subsequent request to return the next page of
--   results.
sNextPageToken :: Lens' Subscriptions (Maybe Text)

-- | Identifies the resource as a collection of subscriptions.
sKind :: Lens' Subscriptions Text

-- | The subscriptions in this page of results.
sSubscriptions :: Lens' Subscriptions [Subscription]

-- | JSON template for subscription seats.
--   
--   <i>See:</i> <a>seats</a> smart constructor.
data Seats

-- | Creates a value of <a>Seats</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>seaNumberOfSeats</a></li>
--   <li><a>seaMaximumNumberOfSeats</a></li>
--   <li><a>seaLicensedNumberOfSeats</a></li>
--   <li><a>seaKind</a></li>
--   </ul>
seats :: Seats

-- | Number of seats to purchase. This is applicable only for a commitment
--   plan.
seaNumberOfSeats :: Lens' Seats (Maybe Int32)

-- | Maximum number of seats that can be purchased. This needs to be
--   provided only for a non-commitment plan. For a commitment plan it is
--   decided by the contract.
seaMaximumNumberOfSeats :: Lens' Seats (Maybe Int32)

-- | Read-only field containing the current number of licensed seats for
--   FLEXIBLE Google-Apps subscriptions and secondary subscriptions such as
--   Google-Vault and Drive-storage.
seaLicensedNumberOfSeats :: Lens' Seats (Maybe Int32)

-- | Identifies the resource as a subscription change plan request.
seaKind :: Lens' Seats Text

-- | JSON template for a subscription renewal settings.
--   
--   <i>See:</i> <a>renewalSettings</a> smart constructor.
data RenewalSettings

-- | Creates a value of <a>RenewalSettings</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>rsKind</a></li>
--   <li><a>rsRenewalType</a></li>
--   </ul>
renewalSettings :: RenewalSettings

-- | Identifies the resource as a subscription renewal setting.
rsKind :: Lens' RenewalSettings Text

-- | Subscription renewal type.
rsRenewalType :: Lens' RenewalSettings (Maybe Text)

-- | JSON template for a subscription.
--   
--   <i>See:</i> <a>subscription</a> smart constructor.
data Subscription

-- | Creates a value of <a>Subscription</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>subCreationTime</a></li>
--   <li><a>subBillingMethod</a></li>
--   <li><a>subStatus</a></li>
--   <li><a>subTrialSettings</a></li>
--   <li><a>subResourceUiURL</a></li>
--   <li><a>subKind</a></li>
--   <li><a>subSKUId</a></li>
--   <li><a>subPlan</a></li>
--   <li><a>subDealCode</a></li>
--   <li><a>subCustomerId</a></li>
--   <li><a>subCustomerDomain</a></li>
--   <li><a>subSuspensionReasons</a></li>
--   <li><a>subTransferInfo</a></li>
--   <li><a>subPurchaseOrderId</a></li>
--   <li><a>subSeats</a></li>
--   <li><a>subRenewalSettings</a></li>
--   <li><a>subSubscriptionId</a></li>
--   </ul>
subscription :: Subscription

-- | Creation time of this subscription in milliseconds since Unix epoch.
subCreationTime :: Lens' Subscription (Maybe Int64)

-- | Billing method of this subscription.
subBillingMethod :: Lens' Subscription (Maybe Text)

-- | Status of the subscription.
subStatus :: Lens' Subscription (Maybe Text)

-- | Trial Settings of the subscription.
subTrialSettings :: Lens' Subscription (Maybe SubscriptionTrialSettings)

-- | Ui url for subscription resource.
subResourceUiURL :: Lens' Subscription (Maybe Text)

-- | Identifies the resource as a Subscription.
subKind :: Lens' Subscription Text

-- | Name of the sku for which this subscription is purchased.
subSKUId :: Lens' Subscription (Maybe Text)

-- | Plan details of the subscription
subPlan :: Lens' Subscription (Maybe SubscriptionPlan)

-- | External name of the deal, if this subscription was provisioned under
--   one. Otherwise this field will be empty.
subDealCode :: Lens' Subscription (Maybe Text)

-- | The id of the customer to whom the subscription belongs.
subCustomerId :: Lens' Subscription (Maybe Text)

-- | Primary domain name of the customer
subCustomerDomain :: Lens' Subscription (Maybe Text)

-- | Read-only field containing an enumerable of all the current suspension
--   reasons for a subscription. It is possible for a subscription to have
--   many concurrent, overlapping suspension reasons. A subscription's
--   STATUS is SUSPENDED until all pending suspensions are removed.
--   Possible options include: - PENDING_TOS_ACCEPTANCE - The customer has
--   not logged in and accepted the Google Apps Resold Terms of Services. -
--   RENEWAL_WITH_TYPE_CANCEL - The customer's commitment ended and their
--   service was cancelled at the end of their term. - RESELLER_INITIATED -
--   A manual suspension invoked by a Reseller. - TRIAL_ENDED - The
--   customer's trial expired without a plan selected. - OTHER - The
--   customer is suspended for an internal Google reason (e.g. abuse or
--   otherwise).
subSuspensionReasons :: Lens' Subscription [Text]

-- | Transfer related information for the subscription.
subTransferInfo :: Lens' Subscription (Maybe SubscriptionTransferInfo)

-- | Purchase order id for your order tracking purposes.
subPurchaseOrderId :: Lens' Subscription (Maybe Text)

-- | Number/Limit of seats in the new plan.
subSeats :: Lens' Subscription (Maybe Seats)

-- | Renewal settings of the subscription.
subRenewalSettings :: Lens' Subscription (Maybe RenewalSettings)

-- | The id of the subscription.
subSubscriptionId :: Lens' Subscription (Maybe Text)

-- | Transfer related information for the subscription.
--   
--   <i>See:</i> <a>subscriptionTransferInfo</a> smart constructor.
data SubscriptionTransferInfo

-- | Creates a value of <a>SubscriptionTransferInfo</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>stiTransferabilityExpirationTime</a></li>
--   <li><a>stiMinimumTransferableSeats</a></li>
--   </ul>
subscriptionTransferInfo :: SubscriptionTransferInfo

-- | Time when transfer token or intent to transfer will expire.
stiTransferabilityExpirationTime :: Lens' SubscriptionTransferInfo (Maybe Int64)
stiMinimumTransferableSeats :: Lens' SubscriptionTransferInfo (Maybe Int32)
