/// <summary>
        /// Take action on Mobile Device
        /// Documentation https://developers.google.com/directory/directory_v1/reference/mobiledevices/action
        /// Generation Note: This does not always build corectly.  Google needs to standardise things I need to figuer out which ones are wrong.
        /// </summary>
        /// <param name="service">Authenticated directory service.</param>
        /// <param name="customerId">Immutable id of the Google Apps account</param>
        /// <param name="resourceId">Immutable id of Mobile Device</param>
        /// <param name="body">A valid directory directory_v1 body.</param>
        public static void Action(directoryService service, string customerId, string resourceId, MobileDeviceAction body)
        {
            try
            {
                // Initial validation.
                if (service == null)
                {
                    throw new ArgumentNullException("service");
                }
                if (body == null)
                {
                    throw new ArgumentNullException("body");
                }
                if (customerId == null)
                {
                    throw new ArgumentNullException(customerId);
                }
                if (resourceId == null)
                {
                    throw new ArgumentNullException(resourceId);
                }

                // Make the request.
                return(service.Mobiledevices.Action(body, customerId, resourceId).Execute());
            }
            catch (Exception ex)
            {
                throw new Exception("Request Mobiledevices.Action failed.", ex);
            }
        }
Esempio n. 2
0
 public override String ToString()
 {
     return("Mobile Device Action: " + MobileDeviceAction.ToString());
 }