mirror of
https://github.com/OMGeeky/google-apis-rs.git
synced 2026-01-28 04:41:02 +01:00
213 lines
42 KiB
HTML
213 lines
42 KiB
HTML
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `google_logging2` crate."><meta name="keywords" content="rust, rustlang, rust-lang, google_logging2"><title>google_logging2 - Rust</title><link rel="stylesheet" type="text/css" href="../normalize.css"><link rel="stylesheet" type="text/css" href="../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../ayu.css" disabled ><script id="default-settings"></script><script src="../storage.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../favicon.svg">
|
||
<link rel="alternate icon" type="image/png" href="../favicon-16x16.png">
|
||
<link rel="alternate icon" type="image/png" href="../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../google_logging2/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><p class="location">Crate google_logging2</p><div class="block version"><p>Version 2.0.0+20210325</p></div><div class="sidebar-elems"><a id="all-types" href="all.html"><p>See all google_logging2's items</p></a><div class="block items"><ul><li><a href="#reexports">Re-exports</a></li><li><a href="#modules">Modules</a></li></ul></div><p class="location"></p><div id="sidebar-vars" data-name="google_logging2" data-ty="mod" data-relpath="../"></div></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||
<a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Crate <a class="mod" href="">google_logging2</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../src/google_logging2/lib.rs.html#5-265" title="goto source code">[src]</a></span></h1><div class="docblock"><p>This documentation was generated from <em>Logging</em> crate version <em>2.0.0+20210325</em>, where <em>20210325</em> is the exact revision of the <em>logging:v2</em> schema built by the <a href="http://www.makotemplates.org/">mako</a> code generator <em>v2.0.0</em>.</p>
|
||
<p>Everything else about the <em>Logging</em> <em>v2</em> API can be found at the
|
||
<a href="https://cloud.google.com/logging/docs/">official documentation site</a>.
|
||
The original source code is <a href="https://github.com/Byron/google-apis-rs/tree/master/gen/logging2">on github</a>.</p>
|
||
<h1 id="features" class="section-header"><a href="#features">Features</a></h1>
|
||
<p>Handle the following <em>Resources</em> with ease from the central <a href="../google_logging2/api/struct.Logging.html">hub</a> ... </p>
|
||
<ul>
|
||
<li>billing accounts</li>
|
||
<li><a href="../google_logging2/api/struct.BillingAccountBucketGetCall.html"><em>buckets get</em></a>, <a href="../google_logging2/api/struct.BillingAccountBucketViewGetCall.html"><em>buckets views get</em></a>, <a href="../google_logging2/api/struct.BillingAccountExclusionCreateCall.html"><em>exclusions create</em></a>, <a href="../google_logging2/api/struct.BillingAccountExclusionDeleteCall.html"><em>exclusions delete</em></a>, <a href="../google_logging2/api/struct.BillingAccountExclusionGetCall.html"><em>exclusions get</em></a>, <a href="../google_logging2/api/struct.BillingAccountExclusionListCall.html"><em>exclusions list</em></a>, <a href="../google_logging2/api/struct.BillingAccountExclusionPatchCall.html"><em>exclusions patch</em></a>, <a href="../google_logging2/api/struct.BillingAccountLocationBucketCreateCall.html"><em>locations buckets create</em></a>, <a href="../google_logging2/api/struct.BillingAccountLocationBucketDeleteCall.html"><em>locations buckets delete</em></a>, <a href="../google_logging2/api/struct.BillingAccountLocationBucketListCall.html"><em>locations buckets list</em></a>, <a href="../google_logging2/api/struct.BillingAccountLocationBucketPatchCall.html"><em>locations buckets patch</em></a>, <a href="../google_logging2/api/struct.BillingAccountLocationBucketUndeleteCall.html"><em>locations buckets undelete</em></a>, <a href="../google_logging2/api/struct.BillingAccountLocationBucketViewCreateCall.html"><em>locations buckets views create</em></a>, <a href="../google_logging2/api/struct.BillingAccountLocationBucketViewDeleteCall.html"><em>locations buckets views delete</em></a>, <a href="../google_logging2/api/struct.BillingAccountLocationBucketViewListCall.html"><em>locations buckets views list</em></a>, <a href="../google_logging2/api/struct.BillingAccountLocationBucketViewPatchCall.html"><em>locations buckets views patch</em></a>, <a href="../google_logging2/api/struct.BillingAccountLocationGetCall.html"><em>locations get</em></a>, <a href="../google_logging2/api/struct.BillingAccountLocationListCall.html"><em>locations list</em></a>, <a href="../google_logging2/api/struct.BillingAccountLogDeleteCall.html"><em>logs delete</em></a>, <a href="../google_logging2/api/struct.BillingAccountLogListCall.html"><em>logs list</em></a>, <a href="../google_logging2/api/struct.BillingAccountSinkCreateCall.html"><em>sinks create</em></a>, <a href="../google_logging2/api/struct.BillingAccountSinkDeleteCall.html"><em>sinks delete</em></a>, <a href="../google_logging2/api/struct.BillingAccountSinkGetCall.html"><em>sinks get</em></a>, <a href="../google_logging2/api/struct.BillingAccountSinkListCall.html"><em>sinks list</em></a>, <a href="../google_logging2/api/struct.BillingAccountSinkPatchCall.html"><em>sinks patch</em></a> and <a href="../google_logging2/api/struct.BillingAccountSinkUpdateCall.html"><em>sinks update</em></a></li>
|
||
<li>entries</li>
|
||
<li><a href="../google_logging2/api/struct.EntryListCall.html"><em>list</em></a>, <a href="../google_logging2/api/struct.EntryTailCall.html"><em>tail</em></a> and <a href="../google_logging2/api/struct.EntryWriteCall.html"><em>write</em></a></li>
|
||
<li>exclusions</li>
|
||
<li><a href="../google_logging2/api/struct.ExclusionCreateCall.html"><em>create</em></a>, <a href="../google_logging2/api/struct.ExclusionDeleteCall.html"><em>delete</em></a>, <a href="../google_logging2/api/struct.ExclusionGetCall.html"><em>get</em></a>, <a href="../google_logging2/api/struct.ExclusionListCall.html"><em>list</em></a> and <a href="../google_logging2/api/struct.ExclusionPatchCall.html"><em>patch</em></a></li>
|
||
<li>folders</li>
|
||
<li><a href="../google_logging2/api/struct.FolderExclusionCreateCall.html"><em>exclusions create</em></a>, <a href="../google_logging2/api/struct.FolderExclusionDeleteCall.html"><em>exclusions delete</em></a>, <a href="../google_logging2/api/struct.FolderExclusionGetCall.html"><em>exclusions get</em></a>, <a href="../google_logging2/api/struct.FolderExclusionListCall.html"><em>exclusions list</em></a>, <a href="../google_logging2/api/struct.FolderExclusionPatchCall.html"><em>exclusions patch</em></a>, <a href="../google_logging2/api/struct.FolderLocationBucketCreateCall.html"><em>locations buckets create</em></a>, <a href="../google_logging2/api/struct.FolderLocationBucketDeleteCall.html"><em>locations buckets delete</em></a>, <a href="../google_logging2/api/struct.FolderLocationBucketGetCall.html"><em>locations buckets get</em></a>, <a href="../google_logging2/api/struct.FolderLocationBucketListCall.html"><em>locations buckets list</em></a>, <a href="../google_logging2/api/struct.FolderLocationBucketPatchCall.html"><em>locations buckets patch</em></a>, <a href="../google_logging2/api/struct.FolderLocationBucketUndeleteCall.html"><em>locations buckets undelete</em></a>, <a href="../google_logging2/api/struct.FolderLocationBucketViewCreateCall.html"><em>locations buckets views create</em></a>, <a href="../google_logging2/api/struct.FolderLocationBucketViewDeleteCall.html"><em>locations buckets views delete</em></a>, <a href="../google_logging2/api/struct.FolderLocationBucketViewGetCall.html"><em>locations buckets views get</em></a>, <a href="../google_logging2/api/struct.FolderLocationBucketViewListCall.html"><em>locations buckets views list</em></a>, <a href="../google_logging2/api/struct.FolderLocationBucketViewPatchCall.html"><em>locations buckets views patch</em></a>, <a href="../google_logging2/api/struct.FolderLocationGetCall.html"><em>locations get</em></a>, <a href="../google_logging2/api/struct.FolderLocationListCall.html"><em>locations list</em></a>, <a href="../google_logging2/api/struct.FolderLogDeleteCall.html"><em>logs delete</em></a>, <a href="../google_logging2/api/struct.FolderLogListCall.html"><em>logs list</em></a>, <a href="../google_logging2/api/struct.FolderSinkCreateCall.html"><em>sinks create</em></a>, <a href="../google_logging2/api/struct.FolderSinkDeleteCall.html"><em>sinks delete</em></a>, <a href="../google_logging2/api/struct.FolderSinkGetCall.html"><em>sinks get</em></a>, <a href="../google_logging2/api/struct.FolderSinkListCall.html"><em>sinks list</em></a>, <a href="../google_logging2/api/struct.FolderSinkPatchCall.html"><em>sinks patch</em></a> and <a href="../google_logging2/api/struct.FolderSinkUpdateCall.html"><em>sinks update</em></a></li>
|
||
<li><a href="../google_logging2/api/struct.Location.html">locations</a></li>
|
||
<li><a href="../google_logging2/api/struct.LocationBucketCreateCall.html"><em>buckets create</em></a>, <a href="../google_logging2/api/struct.LocationBucketDeleteCall.html"><em>buckets delete</em></a>, <a href="../google_logging2/api/struct.LocationBucketGetCall.html"><em>buckets get</em></a>, <a href="../google_logging2/api/struct.LocationBucketListCall.html"><em>buckets list</em></a>, <a href="../google_logging2/api/struct.LocationBucketPatchCall.html"><em>buckets patch</em></a>, <a href="../google_logging2/api/struct.LocationBucketUndeleteCall.html"><em>buckets undelete</em></a>, <a href="../google_logging2/api/struct.LocationBucketViewCreateCall.html"><em>buckets views create</em></a>, <a href="../google_logging2/api/struct.LocationBucketViewDeleteCall.html"><em>buckets views delete</em></a>, <a href="../google_logging2/api/struct.LocationBucketViewGetCall.html"><em>buckets views get</em></a>, <a href="../google_logging2/api/struct.LocationBucketViewListCall.html"><em>buckets views list</em></a>, <a href="../google_logging2/api/struct.LocationBucketViewPatchCall.html"><em>buckets views patch</em></a>, <a href="../google_logging2/api/struct.LocationGetCall.html"><em>get</em></a> and <a href="../google_logging2/api/struct.LocationListCall.html"><em>list</em></a></li>
|
||
<li>logs</li>
|
||
<li><a href="../google_logging2/api/struct.LogDeleteCall.html"><em>delete</em></a> and <a href="../google_logging2/api/struct.LogListCall.html"><em>list</em></a></li>
|
||
<li><a href="../google_logging2/api/struct.MonitoredResourceDescriptor.html">monitored resource descriptors</a></li>
|
||
<li><a href="../google_logging2/api/struct.MonitoredResourceDescriptorListCall.html"><em>list</em></a></li>
|
||
<li>organizations</li>
|
||
<li><a href="../google_logging2/api/struct.OrganizationExclusionCreateCall.html"><em>exclusions create</em></a>, <a href="../google_logging2/api/struct.OrganizationExclusionDeleteCall.html"><em>exclusions delete</em></a>, <a href="../google_logging2/api/struct.OrganizationExclusionGetCall.html"><em>exclusions get</em></a>, <a href="../google_logging2/api/struct.OrganizationExclusionListCall.html"><em>exclusions list</em></a>, <a href="../google_logging2/api/struct.OrganizationExclusionPatchCall.html"><em>exclusions patch</em></a>, <a href="../google_logging2/api/struct.OrganizationGetCmekSettingCall.html"><em>get cmek settings</em></a>, <a href="../google_logging2/api/struct.OrganizationLocationBucketCreateCall.html"><em>locations buckets create</em></a>, <a href="../google_logging2/api/struct.OrganizationLocationBucketDeleteCall.html"><em>locations buckets delete</em></a>, <a href="../google_logging2/api/struct.OrganizationLocationBucketGetCall.html"><em>locations buckets get</em></a>, <a href="../google_logging2/api/struct.OrganizationLocationBucketListCall.html"><em>locations buckets list</em></a>, <a href="../google_logging2/api/struct.OrganizationLocationBucketPatchCall.html"><em>locations buckets patch</em></a>, <a href="../google_logging2/api/struct.OrganizationLocationBucketUndeleteCall.html"><em>locations buckets undelete</em></a>, <a href="../google_logging2/api/struct.OrganizationLocationBucketViewCreateCall.html"><em>locations buckets views create</em></a>, <a href="../google_logging2/api/struct.OrganizationLocationBucketViewDeleteCall.html"><em>locations buckets views delete</em></a>, <a href="../google_logging2/api/struct.OrganizationLocationBucketViewGetCall.html"><em>locations buckets views get</em></a>, <a href="../google_logging2/api/struct.OrganizationLocationBucketViewListCall.html"><em>locations buckets views list</em></a>, <a href="../google_logging2/api/struct.OrganizationLocationBucketViewPatchCall.html"><em>locations buckets views patch</em></a>, <a href="../google_logging2/api/struct.OrganizationLocationGetCall.html"><em>locations get</em></a>, <a href="../google_logging2/api/struct.OrganizationLocationListCall.html"><em>locations list</em></a>, <a href="../google_logging2/api/struct.OrganizationLogDeleteCall.html"><em>logs delete</em></a>, <a href="../google_logging2/api/struct.OrganizationLogListCall.html"><em>logs list</em></a>, <a href="../google_logging2/api/struct.OrganizationSinkCreateCall.html"><em>sinks create</em></a>, <a href="../google_logging2/api/struct.OrganizationSinkDeleteCall.html"><em>sinks delete</em></a>, <a href="../google_logging2/api/struct.OrganizationSinkGetCall.html"><em>sinks get</em></a>, <a href="../google_logging2/api/struct.OrganizationSinkListCall.html"><em>sinks list</em></a>, <a href="../google_logging2/api/struct.OrganizationSinkPatchCall.html"><em>sinks patch</em></a>, <a href="../google_logging2/api/struct.OrganizationSinkUpdateCall.html"><em>sinks update</em></a> and <a href="../google_logging2/api/struct.OrganizationUpdateCmekSettingCall.html"><em>update cmek settings</em></a></li>
|
||
<li>projects</li>
|
||
<li><a href="../google_logging2/api/struct.ProjectExclusionCreateCall.html"><em>exclusions create</em></a>, <a href="../google_logging2/api/struct.ProjectExclusionDeleteCall.html"><em>exclusions delete</em></a>, <a href="../google_logging2/api/struct.ProjectExclusionGetCall.html"><em>exclusions get</em></a>, <a href="../google_logging2/api/struct.ProjectExclusionListCall.html"><em>exclusions list</em></a>, <a href="../google_logging2/api/struct.ProjectExclusionPatchCall.html"><em>exclusions patch</em></a>, <a href="../google_logging2/api/struct.ProjectLocationBucketCreateCall.html"><em>locations buckets create</em></a>, <a href="../google_logging2/api/struct.ProjectLocationBucketDeleteCall.html"><em>locations buckets delete</em></a>, <a href="../google_logging2/api/struct.ProjectLocationBucketGetCall.html"><em>locations buckets get</em></a>, <a href="../google_logging2/api/struct.ProjectLocationBucketListCall.html"><em>locations buckets list</em></a>, <a href="../google_logging2/api/struct.ProjectLocationBucketPatchCall.html"><em>locations buckets patch</em></a>, <a href="../google_logging2/api/struct.ProjectLocationBucketUndeleteCall.html"><em>locations buckets undelete</em></a>, <a href="../google_logging2/api/struct.ProjectLocationBucketViewCreateCall.html"><em>locations buckets views create</em></a>, <a href="../google_logging2/api/struct.ProjectLocationBucketViewDeleteCall.html"><em>locations buckets views delete</em></a>, <a href="../google_logging2/api/struct.ProjectLocationBucketViewGetCall.html"><em>locations buckets views get</em></a>, <a href="../google_logging2/api/struct.ProjectLocationBucketViewListCall.html"><em>locations buckets views list</em></a>, <a href="../google_logging2/api/struct.ProjectLocationBucketViewPatchCall.html"><em>locations buckets views patch</em></a>, <a href="../google_logging2/api/struct.ProjectLocationGetCall.html"><em>locations get</em></a>, <a href="../google_logging2/api/struct.ProjectLocationListCall.html"><em>locations list</em></a>, <a href="../google_logging2/api/struct.ProjectLogDeleteCall.html"><em>logs delete</em></a>, <a href="../google_logging2/api/struct.ProjectLogListCall.html"><em>logs list</em></a>, <a href="../google_logging2/api/struct.ProjectMetricCreateCall.html"><em>metrics create</em></a>, <a href="../google_logging2/api/struct.ProjectMetricDeleteCall.html"><em>metrics delete</em></a>, <a href="../google_logging2/api/struct.ProjectMetricGetCall.html"><em>metrics get</em></a>, <a href="../google_logging2/api/struct.ProjectMetricListCall.html"><em>metrics list</em></a>, <a href="../google_logging2/api/struct.ProjectMetricUpdateCall.html"><em>metrics update</em></a>, <a href="../google_logging2/api/struct.ProjectSinkCreateCall.html"><em>sinks create</em></a>, <a href="../google_logging2/api/struct.ProjectSinkDeleteCall.html"><em>sinks delete</em></a>, <a href="../google_logging2/api/struct.ProjectSinkGetCall.html"><em>sinks get</em></a>, <a href="../google_logging2/api/struct.ProjectSinkListCall.html"><em>sinks list</em></a>, <a href="../google_logging2/api/struct.ProjectSinkPatchCall.html"><em>sinks patch</em></a> and <a href="../google_logging2/api/struct.ProjectSinkUpdateCall.html"><em>sinks update</em></a></li>
|
||
<li>sinks</li>
|
||
<li><a href="../google_logging2/api/struct.SinkCreateCall.html"><em>create</em></a>, <a href="../google_logging2/api/struct.SinkDeleteCall.html"><em>delete</em></a>, <a href="../google_logging2/api/struct.SinkGetCall.html"><em>get</em></a>, <a href="../google_logging2/api/struct.SinkListCall.html"><em>list</em></a> and <a href="../google_logging2/api/struct.SinkUpdateCall.html"><em>update</em></a></li>
|
||
</ul>
|
||
<p>Other activities are ...</p>
|
||
<ul>
|
||
<li><a href="../google_logging2/api/struct.MethodGetCmekSettingCall.html">get cmek settings</a></li>
|
||
<li><a href="../google_logging2/api/struct.MethodUpdateCmekSettingCall.html">update cmek settings</a></li>
|
||
</ul>
|
||
<p>Not what you are looking for ? Find all other Google APIs in their Rust <a href="http://byron.github.io/google-apis-rs">documentation index</a>.</p>
|
||
<h1 id="structure-of-this-library" class="section-header"><a href="#structure-of-this-library">Structure of this Library</a></h1>
|
||
<p>The API is structured into the following primary items:</p>
|
||
<ul>
|
||
<li><strong><a href="../google_logging2/api/struct.Logging.html">Hub</a></strong>
|
||
<ul>
|
||
<li>a central object to maintain state and allow accessing all <em>Activities</em></li>
|
||
<li>creates <a href="../google_logging2/client/trait.MethodsBuilder.html"><em>Method Builders</em></a> which in turn
|
||
allow access to individual <a href="../google_logging2/client/trait.CallBuilder.html"><em>Call Builders</em></a></li>
|
||
</ul>
|
||
</li>
|
||
<li><strong><a href="../google_logging2/client/trait.Resource.html">Resources</a></strong>
|
||
<ul>
|
||
<li>primary types that you can apply <em>Activities</em> to</li>
|
||
<li>a collection of properties and <em>Parts</em></li>
|
||
<li><strong><a href="../google_logging2/client/trait.Part.html">Parts</a></strong>
|
||
<ul>
|
||
<li>a collection of properties</li>
|
||
<li>never directly used in <em>Activities</em></li>
|
||
</ul>
|
||
</li>
|
||
</ul>
|
||
</li>
|
||
<li><strong><a href="../google_logging2/client/trait.CallBuilder.html">Activities</a></strong>
|
||
<ul>
|
||
<li>operations to apply to <em>Resources</em></li>
|
||
</ul>
|
||
</li>
|
||
</ul>
|
||
<p>All <em>structures</em> are marked with applicable traits to further categorize them and ease browsing.</p>
|
||
<p>Generally speaking, you can invoke <em>Activities</em> like this:</p>
|
||
<pre><code class="language-Rust,ignore">let r = hub.resource().activity(...).doit().await
|
||
</code></pre>
|
||
<p>Or specifically ...</p>
|
||
|
||
<div class='information'><div class='tooltip ignore'>ⓘ</div></div><div class="example-wrap"><pre class="rust rust-example-rendered ignore">
|
||
<span class="kw">let</span> <span class="ident">r</span> <span class="op">=</span> <span class="ident">hub</span>.<span class="ident">billing_accounts</span>().<span class="ident">exclusions_delete</span>(...).<span class="ident">doit</span>().<span class="kw">await</span>
|
||
<span class="kw">let</span> <span class="ident">r</span> <span class="op">=</span> <span class="ident">hub</span>.<span class="ident">billing_accounts</span>().<span class="ident">locations_buckets_views_delete</span>(...).<span class="ident">doit</span>().<span class="kw">await</span>
|
||
<span class="kw">let</span> <span class="ident">r</span> <span class="op">=</span> <span class="ident">hub</span>.<span class="ident">billing_accounts</span>().<span class="ident">locations_buckets_delete</span>(...).<span class="ident">doit</span>().<span class="kw">await</span>
|
||
<span class="kw">let</span> <span class="ident">r</span> <span class="op">=</span> <span class="ident">hub</span>.<span class="ident">billing_accounts</span>().<span class="ident">locations_buckets_undelete</span>(...).<span class="ident">doit</span>().<span class="kw">await</span>
|
||
<span class="kw">let</span> <span class="ident">r</span> <span class="op">=</span> <span class="ident">hub</span>.<span class="ident">billing_accounts</span>().<span class="ident">logs_delete</span>(...).<span class="ident">doit</span>().<span class="kw">await</span>
|
||
<span class="kw">let</span> <span class="ident">r</span> <span class="op">=</span> <span class="ident">hub</span>.<span class="ident">billing_accounts</span>().<span class="ident">sinks_delete</span>(...).<span class="ident">doit</span>().<span class="kw">await</span>
|
||
<span class="kw">let</span> <span class="ident">r</span> <span class="op">=</span> <span class="ident">hub</span>.<span class="ident">exclusions</span>().<span class="ident">delete</span>(...).<span class="ident">doit</span>().<span class="kw">await</span>
|
||
<span class="kw">let</span> <span class="ident">r</span> <span class="op">=</span> <span class="ident">hub</span>.<span class="ident">folders</span>().<span class="ident">exclusions_delete</span>(...).<span class="ident">doit</span>().<span class="kw">await</span>
|
||
<span class="kw">let</span> <span class="ident">r</span> <span class="op">=</span> <span class="ident">hub</span>.<span class="ident">folders</span>().<span class="ident">locations_buckets_views_delete</span>(...).<span class="ident">doit</span>().<span class="kw">await</span>
|
||
<span class="kw">let</span> <span class="ident">r</span> <span class="op">=</span> <span class="ident">hub</span>.<span class="ident">folders</span>().<span class="ident">locations_buckets_delete</span>(...).<span class="ident">doit</span>().<span class="kw">await</span>
|
||
<span class="kw">let</span> <span class="ident">r</span> <span class="op">=</span> <span class="ident">hub</span>.<span class="ident">folders</span>().<span class="ident">locations_buckets_undelete</span>(...).<span class="ident">doit</span>().<span class="kw">await</span>
|
||
<span class="kw">let</span> <span class="ident">r</span> <span class="op">=</span> <span class="ident">hub</span>.<span class="ident">folders</span>().<span class="ident">logs_delete</span>(...).<span class="ident">doit</span>().<span class="kw">await</span>
|
||
<span class="kw">let</span> <span class="ident">r</span> <span class="op">=</span> <span class="ident">hub</span>.<span class="ident">folders</span>().<span class="ident">sinks_delete</span>(...).<span class="ident">doit</span>().<span class="kw">await</span>
|
||
<span class="kw">let</span> <span class="ident">r</span> <span class="op">=</span> <span class="ident">hub</span>.<span class="ident">locations</span>().<span class="ident">buckets_views_delete</span>(...).<span class="ident">doit</span>().<span class="kw">await</span>
|
||
<span class="kw">let</span> <span class="ident">r</span> <span class="op">=</span> <span class="ident">hub</span>.<span class="ident">locations</span>().<span class="ident">buckets_delete</span>(...).<span class="ident">doit</span>().<span class="kw">await</span>
|
||
<span class="kw">let</span> <span class="ident">r</span> <span class="op">=</span> <span class="ident">hub</span>.<span class="ident">locations</span>().<span class="ident">buckets_undelete</span>(...).<span class="ident">doit</span>().<span class="kw">await</span>
|
||
<span class="kw">let</span> <span class="ident">r</span> <span class="op">=</span> <span class="ident">hub</span>.<span class="ident">logs</span>().<span class="ident">delete</span>(...).<span class="ident">doit</span>().<span class="kw">await</span>
|
||
<span class="kw">let</span> <span class="ident">r</span> <span class="op">=</span> <span class="ident">hub</span>.<span class="ident">organizations</span>().<span class="ident">exclusions_delete</span>(...).<span class="ident">doit</span>().<span class="kw">await</span>
|
||
<span class="kw">let</span> <span class="ident">r</span> <span class="op">=</span> <span class="ident">hub</span>.<span class="ident">organizations</span>().<span class="ident">locations_buckets_views_delete</span>(...).<span class="ident">doit</span>().<span class="kw">await</span>
|
||
<span class="kw">let</span> <span class="ident">r</span> <span class="op">=</span> <span class="ident">hub</span>.<span class="ident">organizations</span>().<span class="ident">locations_buckets_delete</span>(...).<span class="ident">doit</span>().<span class="kw">await</span>
|
||
<span class="kw">let</span> <span class="ident">r</span> <span class="op">=</span> <span class="ident">hub</span>.<span class="ident">organizations</span>().<span class="ident">locations_buckets_undelete</span>(...).<span class="ident">doit</span>().<span class="kw">await</span>
|
||
<span class="kw">let</span> <span class="ident">r</span> <span class="op">=</span> <span class="ident">hub</span>.<span class="ident">organizations</span>().<span class="ident">logs_delete</span>(...).<span class="ident">doit</span>().<span class="kw">await</span>
|
||
<span class="kw">let</span> <span class="ident">r</span> <span class="op">=</span> <span class="ident">hub</span>.<span class="ident">organizations</span>().<span class="ident">sinks_delete</span>(...).<span class="ident">doit</span>().<span class="kw">await</span>
|
||
<span class="kw">let</span> <span class="ident">r</span> <span class="op">=</span> <span class="ident">hub</span>.<span class="ident">projects</span>().<span class="ident">exclusions_delete</span>(...).<span class="ident">doit</span>().<span class="kw">await</span>
|
||
<span class="kw">let</span> <span class="ident">r</span> <span class="op">=</span> <span class="ident">hub</span>.<span class="ident">projects</span>().<span class="ident">locations_buckets_views_delete</span>(...).<span class="ident">doit</span>().<span class="kw">await</span>
|
||
<span class="kw">let</span> <span class="ident">r</span> <span class="op">=</span> <span class="ident">hub</span>.<span class="ident">projects</span>().<span class="ident">locations_buckets_delete</span>(...).<span class="ident">doit</span>().<span class="kw">await</span>
|
||
<span class="kw">let</span> <span class="ident">r</span> <span class="op">=</span> <span class="ident">hub</span>.<span class="ident">projects</span>().<span class="ident">locations_buckets_undelete</span>(...).<span class="ident">doit</span>().<span class="kw">await</span>
|
||
<span class="kw">let</span> <span class="ident">r</span> <span class="op">=</span> <span class="ident">hub</span>.<span class="ident">projects</span>().<span class="ident">logs_delete</span>(...).<span class="ident">doit</span>().<span class="kw">await</span>
|
||
<span class="kw">let</span> <span class="ident">r</span> <span class="op">=</span> <span class="ident">hub</span>.<span class="ident">projects</span>().<span class="ident">metrics_delete</span>(...).<span class="ident">doit</span>().<span class="kw">await</span>
|
||
<span class="kw">let</span> <span class="ident">r</span> <span class="op">=</span> <span class="ident">hub</span>.<span class="ident">projects</span>().<span class="ident">sinks_delete</span>(...).<span class="ident">doit</span>().<span class="kw">await</span>
|
||
<span class="kw">let</span> <span class="ident">r</span> <span class="op">=</span> <span class="ident">hub</span>.<span class="ident">sinks</span>().<span class="ident">delete</span>(...).<span class="ident">doit</span>().<span class="kw">await</span></pre></div>
|
||
<p>The <code>resource()</code> and <code>activity(...)</code> calls create <a href="http://en.wikipedia.org/wiki/Builder_pattern">builders</a>. The second one dealing with <code>Activities</code>
|
||
supports various methods to configure the impending operation (not shown here). It is made such that all required arguments have to be
|
||
specified right away (i.e. <code>(...)</code>), whereas all optional ones can be <a href="http://en.wikipedia.org/wiki/Builder_pattern">build up</a> as desired.
|
||
The <code>doit()</code> method performs the actual communication with the server and returns the respective result.</p>
|
||
<h1 id="usage" class="section-header"><a href="#usage">Usage</a></h1><h2 id="setting-up-your-project" class="section-header"><a href="#setting-up-your-project">Setting up your Project</a></h2>
|
||
<p>To use this library, you would put the following lines into your <code>Cargo.toml</code> file:</p>
|
||
<pre><code class="language-toml">[dependencies]
|
||
google-logging2 = "*"
|
||
# This project intentionally uses an old version of Hyper. See
|
||
# https://github.com/Byron/google-apis-rs/issues/173 for more
|
||
# information.
|
||
hyper = "^0.14"
|
||
hyper-rustls = "^0.22"
|
||
serde = "^1.0"
|
||
serde_json = "^1.0"
|
||
yup-oauth2 = "^5.0"
|
||
</code></pre>
|
||
<h2 id="a-complete-example" class="section-header"><a href="#a-complete-example">A complete example</a></h2>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered">
|
||
<span class="kw">extern</span> <span class="kw">crate</span> <span class="ident">hyper</span>;
|
||
<span class="kw">extern</span> <span class="kw">crate</span> <span class="ident">hyper_rustls</span>;
|
||
<span class="kw">extern</span> <span class="kw">crate</span> <span class="ident">yup_oauth2</span> <span class="kw">as</span> <span class="ident">oauth2</span>;
|
||
<span class="kw">extern</span> <span class="kw">crate</span> <span class="ident">google_logging2</span> <span class="kw">as</span> <span class="ident">logging2</span>;
|
||
<span class="kw">use</span> <span class="ident">logging2</span>::<span class="ident">api</span>::<span class="ident">UndeleteBucketRequest</span>;
|
||
<span class="kw">use</span> <span class="ident">logging2</span>::{<span class="prelude-ty">Result</span>, <span class="ident">Error</span>};
|
||
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">default</span>::<span class="ident">Default</span>;
|
||
<span class="kw">use</span> <span class="ident">oauth2</span>;
|
||
<span class="kw">use</span> <span class="ident">logging2</span>::<span class="ident">Logging</span>;
|
||
|
||
<span class="comment">// Get an ApplicationSecret instance by some means. It contains the `client_id` and </span>
|
||
<span class="comment">// `client_secret`, among other things.</span>
|
||
<span class="kw">let</span> <span class="ident">secret</span>: <span class="ident">oauth2</span>::<span class="ident">ApplicationSecret</span> <span class="op">=</span> <span class="ident">Default</span>::<span class="ident">default</span>();
|
||
<span class="comment">// Instantiate the authenticator. It will choose a suitable authentication flow for you, </span>
|
||
<span class="comment">// unless you replace `None` with the desired Flow.</span>
|
||
<span class="comment">// Provide your own `AuthenticatorDelegate` to adjust the way it operates and get feedback about </span>
|
||
<span class="comment">// what's going on. You probably want to bring in your own `TokenStorage` to persist tokens and</span>
|
||
<span class="comment">// retrieve them from storage.</span>
|
||
<span class="kw">let</span> <span class="ident">auth</span> <span class="op">=</span> <span class="ident">yup_oauth2</span>::<span class="ident">InstalledFlowAuthenticator</span>::<span class="ident">builder</span>(
|
||
<span class="ident">secret</span>,
|
||
<span class="ident">yup_oauth2</span>::<span class="ident">InstalledFlowReturnMethod</span>::<span class="ident">HTTPRedirect</span>,
|
||
).<span class="ident">build</span>().<span class="kw">await</span>.<span class="ident">unwrap</span>();
|
||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">hub</span> <span class="op">=</span> <span class="ident">Logging</span>::<span class="ident">new</span>(<span class="ident">hyper</span>::<span class="ident">Client</span>::<span class="ident">builder</span>().<span class="ident">build</span>(<span class="ident">hyper_rustls</span>::<span class="ident">HttpsConnector</span>::<span class="ident">with_native_roots</span>()), <span class="ident">auth</span>);
|
||
<span class="comment">// As the method needs a request, you would usually fill it with the desired information</span>
|
||
<span class="comment">// into the respective structure. Some of the parts shown here might not be applicable !</span>
|
||
<span class="comment">// Values shown here are possibly random and not representative !</span>
|
||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">req</span> <span class="op">=</span> <span class="ident">UndeleteBucketRequest</span>::<span class="ident">default</span>();
|
||
|
||
<span class="comment">// You can configure optional parameters by calling the respective setters at will, and</span>
|
||
<span class="comment">// execute the final call using `doit()`.</span>
|
||
<span class="comment">// Values shown here are possibly random and not representative !</span>
|
||
<span class="kw">let</span> <span class="ident">result</span> <span class="op">=</span> <span class="ident">hub</span>.<span class="ident">billing_accounts</span>().<span class="ident">locations_buckets_undelete</span>(<span class="ident">req</span>, <span class="string">"name"</span>)
|
||
.<span class="ident">doit</span>().<span class="kw">await</span>;
|
||
|
||
<span class="kw">match</span> <span class="ident">result</span> {
|
||
<span class="prelude-val">Err</span>(<span class="ident">e</span>) <span class="op">=</span><span class="op">></span> <span class="kw">match</span> <span class="ident">e</span> {
|
||
<span class="comment">// The Error enum provides details about what exactly happened.</span>
|
||
<span class="comment">// You can also just use its `Debug`, `Display` or `Error` traits</span>
|
||
<span class="ident">Error</span>::<span class="ident">HttpError</span>(<span class="kw">_</span>)
|
||
<span class="op">|</span><span class="ident">Error</span>::<span class="ident">Io</span>(<span class="kw">_</span>)
|
||
<span class="op">|</span><span class="ident">Error</span>::<span class="ident">MissingAPIKey</span>
|
||
<span class="op">|</span><span class="ident">Error</span>::<span class="ident">MissingToken</span>(<span class="kw">_</span>)
|
||
<span class="op">|</span><span class="ident">Error</span>::<span class="ident">Cancelled</span>
|
||
<span class="op">|</span><span class="ident">Error</span>::<span class="ident">UploadSizeLimitExceeded</span>(<span class="kw">_</span>, <span class="kw">_</span>)
|
||
<span class="op">|</span><span class="ident">Error</span>::<span class="ident">Failure</span>(<span class="kw">_</span>)
|
||
<span class="op">|</span><span class="ident">Error</span>::<span class="ident">BadRequest</span>(<span class="kw">_</span>)
|
||
<span class="op">|</span><span class="ident">Error</span>::<span class="ident">FieldClash</span>(<span class="kw">_</span>)
|
||
<span class="op">|</span><span class="ident">Error</span>::<span class="ident">JsonDecodeError</span>(<span class="kw">_</span>, <span class="kw">_</span>) <span class="op">=</span><span class="op">></span> <span class="macro">println</span><span class="macro">!</span>(<span class="string">"{}"</span>, <span class="ident">e</span>),
|
||
},
|
||
<span class="prelude-val">Ok</span>(<span class="ident">res</span>) <span class="op">=</span><span class="op">></span> <span class="macro">println</span><span class="macro">!</span>(<span class="string">"Success: {:?}"</span>, <span class="ident">res</span>),
|
||
}</pre></div>
|
||
<h2 id="handling-errors" class="section-header"><a href="#handling-errors">Handling Errors</a></h2>
|
||
<p>All errors produced by the system are provided either as <a href="../google_logging2/client/type.Result.html">Result</a> enumeration as return value of
|
||
the doit() methods, or handed as possibly intermediate results to either the
|
||
<a href="../google_logging2/client/trait.Delegate.html">Hub Delegate</a>, or the <a href="https://docs.rs/yup-oauth2/*/yup_oauth2/trait.AuthenticatorDelegate.html">Authenticator Delegate</a>.</p>
|
||
<p>When delegates handle errors or intermediate values, they may have a chance to instruct the system to retry. This
|
||
makes the system potentially resilient to all kinds of errors.</p>
|
||
<h2 id="uploads-and-downloads" class="section-header"><a href="#uploads-and-downloads">Uploads and Downloads</a></h2>
|
||
<p>If a method supports downloads, the response body, which is part of the <a href="../google_logging2/client/type.Result.html">Result</a>, should be
|
||
read by you to obtain the media.
|
||
If such a method also supports a <a href="../google_logging2/client/trait.ResponseResult.html">Response Result</a>, it will return that by default.
|
||
You can see it as meta-data for the actual media. To trigger a media download, you will have to set up the builder by making
|
||
this call: <code>.param("alt", "media")</code>.</p>
|
||
<p>Methods supporting uploads can do so using up to 2 different protocols:
|
||
<em>simple</em> and <em>resumable</em>. The distinctiveness of each is represented by customized
|
||
<code>doit(...)</code> methods, which are then named <code>upload(...)</code> and <code>upload_resumable(...)</code> respectively.</p>
|
||
<h2 id="customization-and-callbacks" class="section-header"><a href="#customization-and-callbacks">Customization and Callbacks</a></h2>
|
||
<p>You may alter the way an <code>doit()</code> method is called by providing a <a href="../google_logging2/client/trait.Delegate.html">delegate</a> to the
|
||
<a href="../google_logging2/client/trait.CallBuilder.html">Method Builder</a> before making the final <code>doit()</code> call.
|
||
Respective methods will be called to provide progress information, as well as determine whether the system should
|
||
retry on failure.</p>
|
||
<p>The <a href="../google_logging2/client/trait.Delegate.html">delegate trait</a> is default-implemented, allowing you to customize it with minimal effort.</p>
|
||
<h2 id="optional-parts-in-server-requests" class="section-header"><a href="#optional-parts-in-server-requests">Optional Parts in Server-Requests</a></h2>
|
||
<p>All structures provided by this library are made to be <a href="../google_logging2/client/trait.RequestValue.html">encodable</a> and
|
||
<a href="../google_logging2/client/trait.ResponseResult.html">decodable</a> via <em>json</em>. Optionals are used to indicate that partial requests are responses
|
||
are valid.
|
||
Most optionals are are considered <a href="../google_logging2/client/trait.Part.html">Parts</a> which are identifiable by name, which will be sent to
|
||
the server to indicate either the set parts of the request or the desired parts in the response.</p>
|
||
<h2 id="builder-arguments" class="section-header"><a href="#builder-arguments">Builder Arguments</a></h2>
|
||
<p>Using <a href="../google_logging2/client/trait.CallBuilder.html">method builders</a>, you are able to prepare an action call by repeatedly calling it's methods.
|
||
These will always take a single argument, for which the following statements are true.</p>
|
||
<ul>
|
||
<li><a href="http://en.wikipedia.org/wiki/Plain_old_data_structure">PODs</a> are handed by copy</li>
|
||
<li>strings are passed as <code>&str</code></li>
|
||
<li><a href="../google_logging2/client/trait.RequestValue.html">request values</a> are moved</li>
|
||
</ul>
|
||
<p>Arguments will always be copied or cloned into the builder, to make them independent of their original life times.</p>
|
||
</div><h2 id="reexports" class="section-header"><a href="#reexports">Re-exports</a></h2>
|
||
<table><tr><td><code>pub use api::<a class="struct" href="../google_logging2/api/struct.Logging.html" title="struct google_logging2::api::Logging">Logging</a>;</code></td></tr><tr><td><code>pub use client::<a class="type" href="../google_logging2/client/type.Result.html" title="type google_logging2::client::Result">Result</a>;</code></td></tr><tr><td><code>pub use client::<a class="enum" href="../google_logging2/client/enum.Error.html" title="enum google_logging2::client::Error">Error</a>;</code></td></tr><tr><td><code>pub use client::<a class="trait" href="../google_logging2/client/trait.Delegate.html" title="trait google_logging2::client::Delegate">Delegate</a>;</code></td></tr></table><h2 id="modules" class="section-header"><a href="#modules">Modules</a></h2>
|
||
<table><tr class="module-item"><td><a class="mod" href="api/index.html" title="google_logging2::api mod">api</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="mod" href="client/index.html" title="google_logging2::client mod">client</a></td><td class="docblock-short"></td></tr></table></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../" data-current-crate="google_logging2"></div>
|
||
<script src="../main.js"></script><script defer src="../search-index.js"></script></body></html> |