/// <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();
            }
Esempio n. 2
0
        protected override void ProcessRecord()
        {
            if (ShouldProcess("User Usage Report", "Get-GAUser"))
            {
                if (ParameterSetName == "Params")
                {
                    var body = new Data.Channel()
                    {
                        Id      = Id,
                        Token   = Token,
                        Type    = Type,
                        Address = Address
                    };

                    if (Expiration.HasValue)
                    {
                        body.Expiration = Expiration.Value;
                    }

                    if (Payload.HasValue)
                    {
                        body.Payload = Payload.Value;
                    }

                    if (!string.IsNullOrWhiteSpace(Ttl))
                    {
                        body.Params__        = new Dictionary <string, string>();
                        body.Params__["ttl"] = Ttl;
                    }
                    WriteObject(activities.Watch(body, GetFullEmailAddress(UserKey, authUserInfo), ApplicationName.ToString(), StandardQueryParams: StandardQueryParams));
                }
                else
                {
                    WriteObject(activities.Watch(ChannelBody, GetFullEmailAddress(UserKey, authUserInfo), ApplicationName.ToString(), StandardQueryParams: StandardQueryParams));
                }
            }
        }
            /// <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>
 public void Stop(Google.Apis.admin.Reports.reports_v1.Data.Channel ChannelBody, gShell.dotNet.Utilities.OAuth2.StandardQueryParameters StandardQueryParams = null)
 {
     mainBase.channels.Stop(ChannelBody, StandardQueryParams);
 }
            /// <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));
            }