/// <summary> /// Gets the latest state of a long-running operation. Clients can use thismethod to poll the operation result at intervals as recommended by the APIservice. /// Documentation https://developers.google.com/cloudfunctions/v1beta2/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 Cloudfunctions service.</param> /// <param name="name">The name of the operation resource.</param> /// <returns>OperationResponse</returns> public static Operation Get(CloudfunctionsService service, string name) { try { // Initial validation. if (service == null) { throw new ArgumentNullException("service"); } if (name == null) { throw new ArgumentNullException(name); } // Make the request. return(service.Operations.Get(name).Execute()); } catch (Exception ex) { throw new Exception("Request Operations.Get failed.", ex); } }
/// <summary> /// Lists operations that match the specified filter in the request. If theserver doesn't support this method, it returns `UNIMPLEMENTED`.NOTE: the `name` binding allows API services to override the bindingto use different resource name schemes, such as `users/*/operations`. Tooverride the binding, API services can add a binding such as`"/v1/{name=users/*}/operations"` to their service configuration.For backwards compatibility, the default name includes the operationscollection id, however overriding users must ensure the name bindingis the parent resource, without the operations collection id. /// Documentation https://developers.google.com/cloudfunctions/v1beta2/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 Cloudfunctions service.</param> /// <param name="optional">Optional paramaters.</param> /// <returns>ListOperationsResponseResponse</returns> public static ListOperationsResponse List(CloudfunctionsService service, OperationsListOptionalParms optional = null) { try { // Initial validation. if (service == null) { throw new ArgumentNullException("service"); } // Building the initial request. var request = service.Operations.List(); // 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); } }