/// <summary> /// Deletes a log and all its log entries. /// The log will reappear if it receives new entries. /// </summary> /// <param name="log_name"> /// Required. The resource name of the log to delete. Example: /// `"projects/my-project/logs/syslog"`. /// </param> /// <param name="cancellationToken">If not null, a <see cref="CancellationToken"/> to use for this RPC.</param> /// <param name="callSettings">If not null, applies overrides to this RPC call.</param> /// <returns>A Task containing the RPC response.</returns> public override Task DeleteLogAsync( string logName, CancellationToken?cancellationToken = null, CallSettings callSettings = null) { DeleteLogRequest request = new DeleteLogRequest { LogName = logName, }; return(GrpcClient.DeleteLogAsync( request, _clientHelper.BuildCallOptions(cancellationToken, callSettings) ).ResponseAsync); }
/// <summary> /// Creates the given topic with the given name. /// </summary> /// <param name="name"> /// The name of the topic. It must have the format /// `"projects/{project}/topics/{topic}"`. `{topic}` must start with a letter, /// and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`), /// underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent /// signs (`%`). It must be between 3 and 255 characters in length, and it /// must not start with `"goog"`. /// </param> /// <param name="cancellationToken">If not null, a <see cref="CancellationToken"/> to use for this RPC.</param> /// <param name="callSettings">If not null, applies overrides to this RPC call.</param> /// <returns>A Task containing the RPC response.</returns> public override Task <Topic> CreateTopicAsync( string name, CancellationToken?cancellationToken = null, CallSettings callSettings = null) { Topic request = new Topic { Name = name, }; return(GrpcClient.CreateTopicAsync( request, _clientHelper.BuildCallOptions(cancellationToken, callSettings) ).ResponseAsync); }
/// <summary> /// Look up entities by key. /// </summary> /// <param name="project_id">Project ID against which to make the request.</param> /// <param name="read_options">Options for this lookup request.</param> /// <param name="keys">Keys of entities to look up.</param> /// <param name="cancellationToken">If not null, a <see cref="CancellationToken"/> to use for this RPC.</param> /// <param name="callSettings">If not null, applies overrides to this RPC call.</param> /// <returns>A Task containing the RPC response.</returns> public override Task <LookupResponse> LookupAsync( string projectId, ReadOptions readOptions, IEnumerable <Key> keys, CancellationToken?cancellationToken = null, CallSettings callSettings = null) { LookupRequest request = new LookupRequest { ProjectId = projectId, ReadOptions = readOptions, Keys = { keys }, }; return(GrpcClient.LookupAsync( request, _clientHelper.BuildCallOptions(cancellationToken, callSettings) ).ResponseAsync); }