/// <summary> /// Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service. /// Documentation https://developers.google.com/appengine/v1beta5/reference/operations/get /// 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 appengine service.</param> /// <param name="appsId">Part of `name`. The name of the operation resource.</param> /// <param name="operationsId">Part of `name`. See documentation of `appsId`.</param> /// <returns>OperationResponse</returns> public static Operation Get(appengineService service, string appsId, string operationsId) { try { // Initial validation. if (service == null) { throw new ArgumentNullException("service"); } if (appsId == null) { throw new ArgumentNullException(appsId); } if (operationsId == null) { throw new ArgumentNullException(operationsId); } // Make the request. return(service.Operations.Get(appsId, operationsId).Execute()); } catch (Exception ex) { throw new Exception("Request Operations.Get failed.", ex); } }
/// <summary> /// Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns UNIMPLEMENTED.NOTE: the name binding below allows API services to override the binding to use different resource name schemes, such as users/*/operations. /// Documentation https://developers.google.com/appengine/v1beta5/reference/operations/list /// 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 appengine service.</param> /// <param name="appsId">Part of `name`. The name of the operation collection.</param> /// <param name="optional">Optional paramaters.</param> /// <returns>ListOperationsResponseResponse</returns> public static ListOperationsResponse List(appengineService service, string appsId, OperationsListOptionalParms optional = null) { try { // Initial validation. if (service == null) { throw new ArgumentNullException("service"); } if (appsId == null) { throw new ArgumentNullException(appsId); } // Building the initial request. var request = service.Operations.List(appsId); // Applying optional parameters to the request. request = (OperationsResource.ListRequest)SampleHelpers.ApplyOptionalParms(request, optional); // Requesting data. return(request.Execute()); } catch (Exception ex) { throw new Exception("Request Operations.List failed.", ex); } }
/// <summary> /// Stops a running instance. /// Documentation https://developers.google.com/appengine/v1beta5/reference/instances/delete /// 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 appengine service.</param> /// <param name="appsId">Part of `name`. Name of the resource requested. For example: "apps/myapp/services/default/versions/v1/instances/instance-1".</param> /// <param name="servicesId">Part of `name`. See documentation of `appsId`.</param> /// <param name="versionsId">Part of `name`. See documentation of `appsId`.</param> /// <param name="instancesId">Part of `name`. See documentation of `appsId`.</param> /// <returns>OperationResponse</returns> public static Operation Delete(appengineService service, string appsId, string servicesId, string versionsId, string instancesId) { try { // Initial validation. if (service == null) { throw new ArgumentNullException("service"); } if (appsId == null) { throw new ArgumentNullException(appsId); } if (servicesId == null) { throw new ArgumentNullException(servicesId); } if (versionsId == null) { throw new ArgumentNullException(versionsId); } if (instancesId == null) { throw new ArgumentNullException(instancesId); } // Make the request. return(service.Instances.Delete(appsId, servicesId, versionsId, instancesId).Execute()); } catch (Exception ex) { throw new Exception("Request Instances.Delete failed.", ex); } }