/// <summary>Lists the transfers for a customer by source user, destination user, or status.</summary>
            /// <param name="properties">The optional properties for this method.</param>
            /// <param name="gShellServiceAccount">The optional email address the service account should impersonate.</param>
            public List <Google.Apis.admin.DataTransfer.datatransfer_v1.Data.DataTransfersListResponse> List(
                TransfersListProperties properties = null, gShell.dotNet.Utilities.OAuth2.StandardQueryParameters StandardQueryParams = null)
            {
                var results = new List <Google.Apis.admin.DataTransfer.datatransfer_v1.Data.DataTransfersListResponse>();

                datatransfer_v1.TransfersResource.ListRequest request = GetService().Transfers.List();

                if (StandardQueryParams != null)
                {
                    request.Fields    = StandardQueryParams.fields;
                    request.QuotaUser = StandardQueryParams.quotaUser;
                    request.UserIp    = StandardQueryParams.userIp;
                }

                if (properties != null)
                {
                    request.CustomerId     = properties.CustomerId;
                    request.MaxResults     = properties.MaxResults;
                    request.NewOwnerUserId = properties.NewOwnerUserId;
                    request.OldOwnerUserId = properties.OldOwnerUserId;
                    request.Status         = properties.Status;
                }

                if (null != properties.StartProgressBar)
                {
                    properties.StartProgressBar("Gathering Transfers",
                                                string.Format("-Collecting Transfers page 1"));
                }

                Google.Apis.admin.DataTransfer.datatransfer_v1.Data.DataTransfersListResponse pagedResult = request.Execute();

                if (pagedResult != null)
                {
                    results.Add(pagedResult);

                    while (!string.IsNullOrWhiteSpace(pagedResult.NextPageToken) &&
                           pagedResult.NextPageToken != request.PageToken &&
                           (properties.TotalResults == 0 || results.Count < properties.TotalResults))
                    {
                        request.PageToken = pagedResult.NextPageToken;

                        if (null != properties.UpdateProgressBar)
                        {
                            properties.UpdateProgressBar(5, 10, "Gathering Transfers",
                                                         string.Format("-Collecting Transfers page {0}",
                                                                       (results.Count + 1).ToString()));
                        }
                        pagedResult = request.Execute();
                        results.Add(pagedResult);
                    }

                    if (null != properties.UpdateProgressBar)
                    {
                        properties.UpdateProgressBar(1, 2, "Gathering Transfers",
                                                     string.Format("-Returning {0} pages.", results.Count.ToString()));
                    }
                }

                return(results);
            }
            /// <summary>Retrieves a report which is a collection of properties / statistics for a specific
            /// customer.</summary>
            /// <param name="Date">Represents the date in yyyy-mm-dd format for which the data is to be fetched.</param>
            /// <param name="properties">The optional properties for this method.</param>
            /// <param name="gShellServiceAccount">The optional email address the service account should impersonate.</param>
            public List <Google.Apis.admin.Reports.reports_v1.Data.UsageReports> Get(
                string Date, CustomerUsageReportsGetProperties properties = null, gShell.dotNet.Utilities.OAuth2.StandardQueryParameters StandardQueryParams = null)
            {
                var results = new List <Google.Apis.admin.Reports.reports_v1.Data.UsageReports>();

                reports_v1.CustomerUsageReportsResource.GetRequest request = GetService().CustomerUsageReports.Get(Date);

                if (StandardQueryParams != null)
                {
                    request.Fields    = StandardQueryParams.fields;
                    request.QuotaUser = StandardQueryParams.quotaUser;
                    request.UserIp    = StandardQueryParams.userIp;
                }

                if (properties != null)
                {
                    request.CustomerId = properties.CustomerId;
                    request.Parameters = properties.Parameters;
                }

                if (null != properties.StartProgressBar)
                {
                    properties.StartProgressBar("Gathering CustomerUsageReports",
                                                string.Format("-Collecting CustomerUsageReports page 1"));
                }

                Google.Apis.admin.Reports.reports_v1.Data.UsageReports pagedResult = request.Execute();

                if (pagedResult != null)
                {
                    results.Add(pagedResult);

                    while (!string.IsNullOrWhiteSpace(pagedResult.NextPageToken) &&
                           pagedResult.NextPageToken != request.PageToken &&
                           (properties.TotalResults == 0 || results.Count < properties.TotalResults))
                    {
                        request.PageToken = pagedResult.NextPageToken;

                        if (null != properties.UpdateProgressBar)
                        {
                            properties.UpdateProgressBar(5, 10, "Gathering CustomerUsageReports",
                                                         string.Format("-Collecting CustomerUsageReports page {0}",
                                                                       (results.Count + 1).ToString()));
                        }
                        pagedResult = request.Execute();
                        results.Add(pagedResult);
                    }

                    if (null != properties.UpdateProgressBar)
                    {
                        properties.UpdateProgressBar(1, 2, "Gathering CustomerUsageReports",
                                                     string.Format("-Returning {0} pages.", results.Count.ToString()));
                    }
                }

                return(results);
            }
Exemple #3
0
            public Data.RestDescription RestData(string api, string version, gShell.dotNet.Utilities.OAuth2.StandardQueryParameters StandardQueryParams = null)
            {
                var request = service.Apis.GetRest(api, version);

                if (StandardQueryParams != null)
                {
                    request.Fields    = StandardQueryParams.fields;
                    request.QuotaUser = StandardQueryParams.quotaUser;
                    request.UserIp    = StandardQueryParams.userIp;
                }

                return(request.Execute());
            }
Exemple #4
0
            /// <summary>Revoke License.</summary>
            /// <param name="ProductId">Name for product</param>
            /// <param name="SkuId">Name for sku</param>
            /// <param
            /// name="UserId">email id or unique Id of the user</param>
            /// <param name="gShellServiceAccount">The optional email address the service account should impersonate.</param>
            public void Delete(string ProductId, string SkuId, string UserId, gShell.dotNet.Utilities.OAuth2.StandardQueryParameters StandardQueryParams = null)
            {
                var request = GetService().LicenseAssignments.Delete(ProductId, SkuId, UserId);

                if (StandardQueryParams != null)
                {
                    request.Fields    = StandardQueryParams.fields;
                    request.QuotaUser = StandardQueryParams.quotaUser;
                    request.UserIp    = StandardQueryParams.userIp;
                }



                request.Execute();
            }
Exemple #5
0
            /// <summary>Gets a customer resource if one exists and is owned by the reseller.</summary>
            /// <param name="CustomerId">Id of the Customer</param>
            /// <param name="gShellServiceAccount">The optional email address the service account should impersonate.</param>
            public Google.Apis.Reseller.v1.Data.Customer Get(string CustomerId, gShell.dotNet.Utilities.OAuth2.StandardQueryParameters StandardQueryParams = null)
            {
                var request = GetService().Customers.Get(CustomerId);

                if (StandardQueryParams != null)
                {
                    request.Fields    = StandardQueryParams.fields;
                    request.QuotaUser = StandardQueryParams.quotaUser;
                    request.UserIp    = StandardQueryParams.userIp;
                }



                return(request.Execute());
            }
 /// <summary>Stop watching resources through this channel</summary>
 /// <param name="ChannelBody">The body of the request.</param>
 public void Stop(Google.Apis.admin.Reports.reports_v1.Data.Channel ChannelBody, gShell.dotNet.Utilities.OAuth2.StandardQueryParameters StandardQueryParams = null)
 {
     mainBase.channels.Stop(ChannelBody, StandardQueryParams);
 }
Exemple #7
0
            public Data.DirectoryList List(DiscoveryListProperties properties = null, gShell.dotNet.Utilities.OAuth2.StandardQueryParameters StandardQueryParams = null)
            {
                discovery_v1.ApisResource.ListRequest request = service.Apis.List();

                if (StandardQueryParams != null)
                {
                    request.Fields    = StandardQueryParams.fields;
                    request.QuotaUser = StandardQueryParams.quotaUser;
                    request.UserIp    = StandardQueryParams.userIp;
                }

                if (properties != null)
                {
                    request.Name      = properties.name;
                    request.Preferred = properties.preferred;
                }

                return(request.Execute());
            }
Exemple #8
0
            /// <summary>Assign License.</summary>
            /// <param name="LicenseAssignmentBody">The body of the request.</param>
            /// <param name="ProductId">Name for product</param>
            /// <param name="SkuId">Name for sku for which license would be
            /// revoked</param>
            /// <param name="UserId">email id or unique Id of the user</param>
            /// <param name="gShellServiceAccount">The optional email address the service account should impersonate.</param>
            public Google.Apis.Licensing.v1.Data.LicenseAssignment Update(Google.Apis.Licensing.v1.Data.LicenseAssignment LicenseAssignmentBody, string ProductId, string SkuId, string UserId, gShell.dotNet.Utilities.OAuth2.StandardQueryParameters StandardQueryParams = null)
            {
                var request = GetService().LicenseAssignments.Update(LicenseAssignmentBody, ProductId, SkuId, UserId);

                if (StandardQueryParams != null)
                {
                    request.Fields    = StandardQueryParams.fields;
                    request.QuotaUser = StandardQueryParams.quotaUser;
                    request.UserIp    = StandardQueryParams.userIp;
                }



                return(request.Execute());
            }
Exemple #9
0
            /// <summary>List license assignments for given product and sku of the customer.</summary>
            /// <param name="ProductId">Name for product</param>
            /// <param name="SkuId">Name for sku</param>
            /// <param
            /// name="CustomerId">CustomerId represents the customer for whom licenseassignments are queried</param>
            /// <param name="properties">The optional properties for this method.</param>

            public List <Google.Apis.Licensing.v1.Data.LicenseAssignmentList> ListForProductAndSku(string ProductId, string SkuId, string CustomerId, gLicensing.LicenseAssignments.LicenseAssignmentsListForProductAndSkuProperties properties = null, gShell.dotNet.Utilities.OAuth2.StandardQueryParameters StandardQueryParams = null)
            {
                properties = properties ?? new gLicensing.LicenseAssignments.LicenseAssignmentsListForProductAndSkuProperties();
                properties.StartProgressBar  = StartProgressBar;
                properties.UpdateProgressBar = UpdateProgressBar;

                return(mainBase.licenseAssignments.ListForProductAndSku(ProductId, SkuId, CustomerId, properties));
            }
            /// <summary>Retrieves a list of activities for a specific customer and application.</summary>
            /// <param name="UserKey">Represents the profile id or the user email for which the data should be filtered. When 'all'
            /// is specified as the userKey, it returns usageReports for all users.</param>
            /// <param
            /// name="ApplicationName">Application name for which the events are to be retrieved.</param>
            /// <param name="properties">The optional properties for this method.</param>

            public List <Google.Apis.admin.Reports.reports_v1.Data.Activities> List(string UserKey, string ApplicationName, gReports.Activities.ActivitiesListProperties properties = null, gShell.dotNet.Utilities.OAuth2.StandardQueryParameters StandardQueryParams = null)
            {
                properties = properties ?? new gReports.Activities.ActivitiesListProperties();
                properties.StartProgressBar  = StartProgressBar;
                properties.UpdateProgressBar = UpdateProgressBar;

                return(mainBase.activities.List(UserKey, ApplicationName, properties));
            }
Exemple #11
0
            /// <summary>Creates/Transfers a subscription for the customer.</summary>
            /// <param name="SubscriptionBody">The body of the request.</param>
            /// <param name="CustomerId">Id of the Customer</param>
            /// <param name="properties">The optional properties for this method.</param>
            /// <param name="gShellServiceAccount">The optional email address the service account should impersonate.</param>
            public Google.Apis.Reseller.v1.Data.Subscription Insert(Google.Apis.Reseller.v1.Data.Subscription SubscriptionBody, string CustomerId, SubscriptionsInsertProperties properties = null, gShell.dotNet.Utilities.OAuth2.StandardQueryParameters StandardQueryParams = null)
            {
                var request = GetService().Subscriptions.Insert(SubscriptionBody, CustomerId);

                if (StandardQueryParams != null)
                {
                    request.Fields    = StandardQueryParams.fields;
                    request.QuotaUser = StandardQueryParams.quotaUser;
                    request.UserIp    = StandardQueryParams.userIp;
                }

                if (properties != null)
                {
                    request.CustomerAuthToken = properties.CustomerAuthToken;
                }

                return(request.Execute());
            }
            /// <summary>Push changes to activities</summary>
            /// <param name="ChannelBody">The body of the request.</param>
            /// <param name="UserKey">Represents the profile id or the user email for which the data should be filtered. When 'all'
            /// is specified as the userKey, it returns usageReports for all users.</param>
            /// <param
            /// name="ApplicationName">Application name for which the events are to be retrieved.</param>
            /// <param name="properties">The optional properties for this method.</param>
            /// <param name="gShellServiceAccount">The optional email address the service account should impersonate.</param>
            public Google.Apis.admin.Reports.reports_v1.Data.Channel Watch(Google.Apis.admin.Reports.reports_v1.Data.Channel ChannelBody, string UserKey, string ApplicationName, ActivitiesWatchProperties properties = null, gShell.dotNet.Utilities.OAuth2.StandardQueryParameters StandardQueryParams = null)
            {
                var request = GetService().Activities.Watch(ChannelBody, UserKey, ApplicationName);

                if (StandardQueryParams != null)
                {
                    request.Fields    = StandardQueryParams.fields;
                    request.QuotaUser = StandardQueryParams.quotaUser;
                    request.UserIp    = StandardQueryParams.userIp;
                }

                if (properties != null)
                {
                    request.ActorIpAddress = properties.ActorIpAddress;
                    request.CustomerId     = properties.CustomerId;
                    request.EndTime        = properties.EndTime;
                    request.EventName      = properties.EventName;
                    request.Filters        = properties.Filters;
                    request.MaxResults     = properties.MaxResults;
                    request.StartTime      = properties.StartTime;
                }

                return(request.Execute());
            }
            /// <summary>Stop watching resources through this channel</summary>
            /// <param name="ChannelBody">The body of the request.</param>
            /// <param name="gShellServiceAccount">The optional email address the service account should impersonate.</param>
            public void Stop(Google.Apis.admin.Reports.reports_v1.Data.Channel ChannelBody, gShell.dotNet.Utilities.OAuth2.StandardQueryParameters StandardQueryParams = null)
            {
                var request = GetService().Channels.Stop(ChannelBody);

                if (StandardQueryParams != null)
                {
                    request.Fields    = StandardQueryParams.fields;
                    request.QuotaUser = StandardQueryParams.quotaUser;
                    request.UserIp    = StandardQueryParams.userIp;
                }



                request.Execute();
            }
            /// <summary>Retrieves a list of activities for a specific customer and application.</summary>
            /// <param name="UserKey">Represents the profile id or the user email for which the data should be filtered. When 'all'
            /// is specified as the userKey, it returns usageReports for all users.</param>
            /// <param
            /// name="ApplicationName">Application name for which the events are to be retrieved.</param>
            /// <param name="properties">The optional properties for this method.</param>
            /// <param name="gShellServiceAccount">The optional email address the service account should impersonate.</param>
            public List <Google.Apis.admin.Reports.reports_v1.Data.Activities> List(
                string UserKey, string ApplicationName, ActivitiesListProperties properties = null, gShell.dotNet.Utilities.OAuth2.StandardQueryParameters StandardQueryParams = null)
            {
                var results = new List <Google.Apis.admin.Reports.reports_v1.Data.Activities>();

                reports_v1.ActivitiesResource.ListRequest request = GetService().Activities.List(UserKey, ApplicationName);

                if (StandardQueryParams != null)
                {
                    request.Fields    = StandardQueryParams.fields;
                    request.QuotaUser = StandardQueryParams.quotaUser;
                    request.UserIp    = StandardQueryParams.userIp;
                }

                if (properties != null)
                {
                    request.ActorIpAddress = properties.ActorIpAddress;
                    request.CustomerId     = properties.CustomerId;
                    request.EndTime        = properties.EndTime;
                    request.EventName      = properties.EventName;
                    request.Filters        = properties.Filters;
                    request.MaxResults     = properties.MaxResults;
                    request.StartTime      = properties.StartTime;
                }

                if (null != properties.StartProgressBar)
                {
                    properties.StartProgressBar("Gathering Activities",
                                                string.Format("-Collecting Activities page 1"));
                }

                Google.Apis.admin.Reports.reports_v1.Data.Activities pagedResult = request.Execute();

                if (pagedResult != null)
                {
                    results.Add(pagedResult);

                    while (!string.IsNullOrWhiteSpace(pagedResult.NextPageToken) &&
                           pagedResult.NextPageToken != request.PageToken &&
                           (properties.TotalResults == 0 || results.Count < properties.TotalResults))
                    {
                        request.PageToken = pagedResult.NextPageToken;

                        if (null != properties.UpdateProgressBar)
                        {
                            properties.UpdateProgressBar(5, 10, "Gathering Activities",
                                                         string.Format("-Collecting Activities page {0}",
                                                                       (results.Count + 1).ToString()));
                        }
                        pagedResult = request.Execute();
                        results.Add(pagedResult);
                    }

                    if (null != properties.UpdateProgressBar)
                    {
                        properties.UpdateProgressBar(1, 2, "Gathering Activities",
                                                     string.Format("-Returning {0} pages.", results.Count.ToString()));
                    }
                }

                return(results);
            }
            /// <summary>Retrieves a report which is a collection of properties / statistics for a set of
            /// users.</summary>
            /// <param name="UserKey">Represents the profile id or the user email for which the data should be
            /// filtered.</param>
            /// <param name="Date">Represents the date in yyyy-mm-dd format for which the data is to be
            /// fetched.</param>
            /// <param name="properties">The optional properties for this method.</param>

            public List <Google.Apis.admin.Reports.reports_v1.Data.UsageReports> Get(string UserKey, string Date, gReports.UserUsageReport.UserUsageReportGetProperties properties = null, gShell.dotNet.Utilities.OAuth2.StandardQueryParameters StandardQueryParams = null)
            {
                properties = properties ?? new gReports.UserUsageReport.UserUsageReportGetProperties();
                properties.StartProgressBar  = StartProgressBar;
                properties.UpdateProgressBar = UpdateProgressBar;

                return(mainBase.userUsageReport.Get(UserKey, Date, properties));
            }
            /// <summary>Retrieves a report which is a collection of properties / statistics for a specific
            /// customer.</summary>
            /// <param name="Date">Represents the date in yyyy-mm-dd format for which the data is to be fetched.</param>
            /// <param name="properties">The optional properties for this method.</param>

            public List <Google.Apis.admin.Reports.reports_v1.Data.UsageReports> Get(string Date, gReports.CustomerUsageReports.CustomerUsageReportsGetProperties properties = null, gShell.dotNet.Utilities.OAuth2.StandardQueryParameters StandardQueryParams = null)
            {
                properties = properties ?? new gReports.CustomerUsageReports.CustomerUsageReportsGetProperties();


                return(mainBase.customerUsageReports.Get(Date, properties));
            }
Exemple #17
0
            /// <summary>Changes the seats configuration of a subscription</summary>
            /// <param name="SeatsBody">The body of the request.</param>
            /// <param name="CustomerId">Id of the Customer</param>
            /// <param name="SubscriptionId">Id of the subscription,
            /// which is unique for a customer</param>
            /// <param name="gShellServiceAccount">The optional email address the service account should impersonate.</param>
            public Google.Apis.Reseller.v1.Data.Subscription ChangeSeats(Google.Apis.Reseller.v1.Data.Seats SeatsBody, string CustomerId, string SubscriptionId, gShell.dotNet.Utilities.OAuth2.StandardQueryParameters StandardQueryParams = null)
            {
                var request = GetService().Subscriptions.ChangeSeats(SeatsBody, CustomerId, SubscriptionId);

                if (StandardQueryParams != null)
                {
                    request.Fields    = StandardQueryParams.fields;
                    request.QuotaUser = StandardQueryParams.quotaUser;
                    request.UserIp    = StandardQueryParams.userIp;
                }



                return(request.Execute());
            }
Exemple #18
0
            /// <summary>Creates a customer resource if one does not already exist.</summary>
            /// <param name="CustomerBody">The body of the request.</param>
            /// <param name="properties">The optional properties for this method.</param>
            public Google.Apis.Reseller.v1.Data.Customer Insert(Google.Apis.Reseller.v1.Data.Customer CustomerBody, gReseller.Customers.CustomersInsertProperties properties = null, gShell.dotNet.Utilities.OAuth2.StandardQueryParameters StandardQueryParams = null)
            {
                properties = properties ?? new gReseller.Customers.CustomersInsertProperties();

                return(mainBase.customers.Insert(CustomerBody, properties, StandardQueryParams));
            }
Exemple #19
0
            /// <summary>Cancels/Downgrades a subscription.</summary>
            /// <param name="CustomerId">Id of the Customer</param>
            /// <param name="SubscriptionId">Id of the subscription,
            /// which is unique for a customer</param>
            /// <param name="DeletionType">Whether the subscription is to be fully
            /// cancelled or downgraded</param>
            /// <param name="gShellServiceAccount">The optional email address the service account should impersonate.</param>
            public void Delete(string CustomerId, string SubscriptionId, v1.SubscriptionsResource.DeleteRequest.DeletionTypeEnum DeletionType, gShell.dotNet.Utilities.OAuth2.StandardQueryParameters StandardQueryParams = null)
            {
                var request = GetService().Subscriptions.Delete(CustomerId, SubscriptionId, DeletionType);

                if (StandardQueryParams != null)
                {
                    request.Fields    = StandardQueryParams.fields;
                    request.QuotaUser = StandardQueryParams.quotaUser;
                    request.UserIp    = StandardQueryParams.userIp;
                }



                request.Execute();
            }
Exemple #20
0
 /// <summary>Changes the seats configuration of a subscription</summary>
 /// <param name="SeatsBody">The body of the request.</param>
 /// <param name="CustomerId">Id of the Customer</param>
 /// <param name="SubscriptionId">Id of the subscription,
 /// which is unique for a customer</param>
 public Google.Apis.Reseller.v1.Data.Subscription ChangeSeats(Google.Apis.Reseller.v1.Data.Seats SeatsBody, string CustomerId, string SubscriptionId, gShell.dotNet.Utilities.OAuth2.StandardQueryParameters StandardQueryParams = null)
 {
     return(mainBase.subscriptions.ChangeSeats(SeatsBody, CustomerId, SubscriptionId, StandardQueryParams));
 }
Exemple #21
0
 /// <summary>Gets a customer resource if one exists and is owned by the reseller.</summary>
 /// <param name="CustomerId">Id of the Customer</param>
 public Google.Apis.Reseller.v1.Data.Customer Get(string CustomerId, gShell.dotNet.Utilities.OAuth2.StandardQueryParameters StandardQueryParams = null)
 {
     return(mainBase.customers.Get(CustomerId, StandardQueryParams));
 }
Exemple #22
0
 /// <summary>Cancels/Downgrades a subscription.</summary>
 /// <param name="CustomerId">Id of the Customer</param>
 /// <param name="SubscriptionId">Id of the subscription,
 /// which is unique for a customer</param>
 /// <param name="DeletionType">Whether the subscription is to be fully
 /// cancelled or downgraded</param>
 public void Delete(string CustomerId, string SubscriptionId, v1.SubscriptionsResource.DeleteRequest.DeletionTypeEnum DeletionType, gShell.dotNet.Utilities.OAuth2.StandardQueryParameters StandardQueryParams = null)
 {
     mainBase.subscriptions.Delete(CustomerId, SubscriptionId, DeletionType, StandardQueryParams);
 }
Exemple #23
0
 /// <summary>Assign License.</summary>
 /// <param name="LicenseAssignmentBody">The body of the request.</param>
 /// <param name="ProductId">Name for product</param>
 /// <param name="SkuId">Name for sku for which license would be
 /// revoked</param>
 /// <param name="UserId">email id or unique Id of the user</param>
 public Google.Apis.Licensing.v1.Data.LicenseAssignment Update(Google.Apis.Licensing.v1.Data.LicenseAssignment LicenseAssignmentBody, string ProductId, string SkuId, string UserId, gShell.dotNet.Utilities.OAuth2.StandardQueryParameters StandardQueryParams = null)
 {
     return(mainBase.licenseAssignments.Update(LicenseAssignmentBody, ProductId, SkuId, UserId, StandardQueryParams));
 }
Exemple #24
0
            /// <summary>Creates/Transfers a subscription for the customer.</summary>
            /// <param name="SubscriptionBody">The body of the request.</param>
            /// <param name="CustomerId">Id of the Customer</param>
            /// <param name="properties">The optional properties for this method.</param>
            public Google.Apis.Reseller.v1.Data.Subscription Insert(Google.Apis.Reseller.v1.Data.Subscription SubscriptionBody, string CustomerId, gReseller.Subscriptions.SubscriptionsInsertProperties properties = null, gShell.dotNet.Utilities.OAuth2.StandardQueryParameters StandardQueryParams = null)
            {
                properties = properties ?? new gReseller.Subscriptions.SubscriptionsInsertProperties();

                return(mainBase.subscriptions.Insert(SubscriptionBody, CustomerId, properties, StandardQueryParams));
            }
Exemple #25
0
            /// <summary>List license assignments for given product and sku of the customer.</summary>
            /// <param name="ProductId">Name for product</param>
            /// <param name="SkuId">Name for sku</param>
            /// <param
            /// name="CustomerId">CustomerId represents the customer for whom licenseassignments are queried</param>
            /// <param name="properties">The optional properties for this method.</param>
            /// <param name="gShellServiceAccount">The optional email address the service account should impersonate.</param>
            public List <Google.Apis.Licensing.v1.Data.LicenseAssignmentList> ListForProductAndSku(
                string ProductId, string SkuId, string CustomerId, LicenseAssignmentsListForProductAndSkuProperties properties = null, gShell.dotNet.Utilities.OAuth2.StandardQueryParameters StandardQueryParams = null)
            {
                var results = new List <Google.Apis.Licensing.v1.Data.LicenseAssignmentList>();

                v1.LicenseAssignmentsResource.ListForProductAndSkuRequest request = GetService().LicenseAssignments.ListForProductAndSku(ProductId, SkuId, CustomerId);

                if (StandardQueryParams != null)
                {
                    request.Fields    = StandardQueryParams.fields;
                    request.QuotaUser = StandardQueryParams.quotaUser;
                    request.UserIp    = StandardQueryParams.userIp;
                }

                if (properties != null)
                {
                    request.MaxResults = properties.MaxResults;
                }

                if (null != properties.StartProgressBar)
                {
                    properties.StartProgressBar("Gathering LicenseAssignments",
                                                string.Format("-Collecting LicenseAssignments page 1"));
                }

                Google.Apis.Licensing.v1.Data.LicenseAssignmentList pagedResult = request.Execute();

                if (pagedResult != null)
                {
                    results.Add(pagedResult);

                    while (!string.IsNullOrWhiteSpace(pagedResult.NextPageToken) &&
                           pagedResult.NextPageToken != request.PageToken &&
                           (properties.TotalResults == 0 || results.Count < properties.TotalResults))
                    {
                        request.PageToken = pagedResult.NextPageToken;

                        if (null != properties.UpdateProgressBar)
                        {
                            properties.UpdateProgressBar(5, 10, "Gathering LicenseAssignments",
                                                         string.Format("-Collecting LicenseAssignments page {0}",
                                                                       (results.Count + 1).ToString()));
                        }
                        pagedResult = request.Execute();
                        results.Add(pagedResult);
                    }

                    if (null != properties.UpdateProgressBar)
                    {
                        properties.UpdateProgressBar(1, 2, "Gathering LicenseAssignments",
                                                     string.Format("-Returning {0} pages.", results.Count.ToString()));
                    }
                }

                return(results);
            }
 /// <summary>Retrieves information about an application for the given application ID.</summary>
 /// <param name="ApplicationId">ID of the application resource to be retrieved.</param>
 public Google.Apis.admin.DataTransfer.datatransfer_v1.Data.Application Get(long ApplicationId, gShell.dotNet.Utilities.OAuth2.StandardQueryParameters StandardQueryParams = null)
 {
     return(mainBase.applications.Get(ApplicationId, StandardQueryParams));
 }
Exemple #27
0
 /// <summary>Revoke License.</summary>
 /// <param name="ProductId">Name for product</param>
 /// <param name="SkuId">Name for sku</param>
 /// <param
 /// name="UserId">email id or unique Id of the user</param>
 public void Delete(string ProductId, string SkuId, string UserId, gShell.dotNet.Utilities.OAuth2.StandardQueryParameters StandardQueryParams = null)
 {
     mainBase.licenseAssignments.Delete(ProductId, SkuId, UserId, StandardQueryParams);
 }
Exemple #28
0
 /// <summary>Suspends an active subscription</summary>
 /// <param name="CustomerId">Id of the Customer</param>
 /// <param name="SubscriptionId">Id of the subscription,
 /// which is unique for a customer</param>
 public Google.Apis.Reseller.v1.Data.Subscription Suspend(string CustomerId, string SubscriptionId, gShell.dotNet.Utilities.OAuth2.StandardQueryParameters StandardQueryParams = null)
 {
     return(mainBase.subscriptions.Suspend(CustomerId, SubscriptionId, StandardQueryParams));
 }
Exemple #29
0
            /// <summary>Lists subscriptions of a reseller, optionally filtered by a customer name prefix.</summary>
            /// <param name="properties">The optional properties for this method.</param>

            public List <Google.Apis.Reseller.v1.Data.Subscriptions> List(gReseller.Subscriptions.SubscriptionsListProperties properties = null, gShell.dotNet.Utilities.OAuth2.StandardQueryParameters StandardQueryParams = null)
            {
                properties = properties ?? new gReseller.Subscriptions.SubscriptionsListProperties();
                properties.StartProgressBar  = StartProgressBar;
                properties.UpdateProgressBar = UpdateProgressBar;

                return(mainBase.subscriptions.List(properties));
            }
            /// <summary>Push changes to activities</summary>
            /// <param name="ChannelBody">The body of the request.</param>
            /// <param name="UserKey">Represents the profile id or the user email for which the data should be filtered. When 'all'
            /// is specified as the userKey, it returns usageReports for all users.</param>
            /// <param
            /// name="ApplicationName">Application name for which the events are to be retrieved.</param>
            /// <param name="properties">The optional properties for this method.</param>
            public Google.Apis.admin.Reports.reports_v1.Data.Channel Watch(Google.Apis.admin.Reports.reports_v1.Data.Channel ChannelBody, string UserKey, string ApplicationName, gReports.Activities.ActivitiesWatchProperties properties = null, gShell.dotNet.Utilities.OAuth2.StandardQueryParameters StandardQueryParams = null)
            {
                properties = properties ?? new gReports.Activities.ActivitiesWatchProperties();

                return(mainBase.activities.Watch(ChannelBody, UserKey, ApplicationName, properties, StandardQueryParams));
            }