OfficeIMO.GoogleWorkspace 3.2.0

Prefix Reserved
dotnet add package OfficeIMO.GoogleWorkspace --version 3.2.0
                    
NuGet\Install-Package OfficeIMO.GoogleWorkspace -Version 3.2.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="OfficeIMO.GoogleWorkspace" Version="3.2.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="OfficeIMO.GoogleWorkspace" Version="3.2.0" />
                    
Directory.Packages.props
<PackageReference Include="OfficeIMO.GoogleWorkspace" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add OfficeIMO.GoogleWorkspace --version 3.2.0
                    
#r "nuget: OfficeIMO.GoogleWorkspace, 3.2.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package OfficeIMO.GoogleWorkspace@3.2.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=OfficeIMO.GoogleWorkspace&version=3.2.0
                    
Install as a Cake Addin
#tool nuget:?package=OfficeIMO.GoogleWorkspace&version=3.2.0
                    
Install as a Cake Tool

OfficeIMO.GoogleWorkspace - shared Google Workspace primitives

nuget version nuget downloads

OfficeIMO.GoogleWorkspace contains the dependency-light credential, session, transport, retry, scope, diagnostics, Drive-location, and translation-report contracts shared by the OfficeIMO Google Docs, Sheets, Slides, Drive, and synchronization packages.

Explicit mutation policy

Non-safe Google requests are blocked unless the session names the expected account, supplies an operation-policy provider, and records every outcome through a receipt sink. The policy captures scopes, target, expected revision decision, retry count and total elapsed-time deadline, rate-limit behavior, and the caller's data-loss decision. Provider-verified grant supersets may satisfy a narrower adapter request, while the policy and receipt continue to record only the exact scopes required by that operation. Targets retain allowlisted operation-defining query values such as Drive parent changes while redacting or excluding sensitive and non-semantic values. Transport-known destructive operations such as DELETE are refused unless the policy explicitly accepts the named loss. When any guarded mutation loses the connection or times out before final response headers arrive, the transport records IsOutcomeAmbiguous and throws GoogleWorkspaceAmbiguousMutationException; reconcile its receipt target and request identifier before retrying. This applies in the dependency-light HTTP owner, so Docs, Sheets, Slides, Drive, and optional SDK adapters cannot bypass it accidentally.

Translation preflight defaults to FailOnErrors. Select FailOnWarnings when every lossy projection must be accepted by diagnostic code before mutation; a named accepted diagnostic remains explicit and reviewable.

Drive offers stream/file durable transfer APIs. UploadResumableStreamAsync and UploadResumableFileAsync persist the sensitive upload-session checkpoint after initiation and every confirmed chunk, query Google before resuming, reconcile ambiguous outcomes, and verify that the local source did not change. DownloadToFileAsync uses ranged reads and binds its checkpoint to file id, Drive version, size, destination identity, and the hash of committed bytes; after a crash it verifies the checkpointed prefix and discards only an uncheckpointed tail. Protect upload checkpoint values like credentials; their ToString() representation is redacted and policy/receipt targets use a stable SHA-256 session identifier.

Install

dotnet add package OfficeIMO.GoogleWorkspace

Quick start

using OfficeIMO.GoogleWorkspace;

var receipts = new List<GoogleWorkspaceOperationReceipt>();
var options = new GoogleWorkspaceSessionOptions {
    ApplicationName = "OfficeIMO Samples",
    ExpectedAccount = "service-account@project.iam.gserviceaccount.com",
    DefaultDriveId = "shared-drive-id",
    DefaultFolderId = "reports-folder-id",
    MaxRetryCount = 5,
    RetryBaseDelay = TimeSpan.FromMilliseconds(250),
    RetryMaxDelay = TimeSpan.FromSeconds(10),
    MaxRetryElapsedTime = TimeSpan.FromMinutes(2),
    RequestTimeout = TimeSpan.FromSeconds(120),
    OperationReceiptSink = receipts.Add,
};
options.OperationPolicyProvider = context => {
    string expectedRevision = context.RevisionPreconditionKind switch {
        GoogleWorkspaceRevisionPreconditionKind.ResourceAbsentCreate => GoogleWorkspaceOperationPolicy.ResourceAbsentForCreateRevision,
        GoogleWorkspaceRevisionPreconditionKind.PayloadRevision => context.AdapterExpectedRevision!,
        GoogleWorkspaceRevisionPreconditionKind.ResumableSessionState => context.AdapterExpectedRevision!,
        GoogleWorkspaceRevisionPreconditionKind.Unavailable => GoogleWorkspaceOperationPolicy.ExplicitlyUnversionedRevision("API exposes no conditional revision"),
        _ => "\"observed-google-etag\"", // sent as If-Match
    };
    // Secure baseline: destructive or deliberately unversioned mutations stay blocked.
    // Applications should accept only specifically approved operations and targets here.
    bool acceptsLoss = false;
    return new GoogleWorkspaceOperationPolicy(
        options.ExpectedAccount!,
        context.RequiredScopes,
        context.Target,
        expectedRevision,
        context.MaxRetryCount,
        context.MaxRetryElapsedTime,
        context.RateLimitPolicy,
        acceptsLoss ? GoogleWorkspaceDataLossDecision.AcceptSpecifiedLoss : GoogleWorkspaceDataLossDecision.RejectPotentialLoss,
        acceptsLoss ? "application-approved operation and target" : null);
};

var credentialSource = GoogleServiceAccountCredentialSource.FromFile(
    "service-account.json", options);
var session = new GoogleWorkspaceSession(credentialSource, options);

Raw static tokens remain useful for reads. For mutations, use the service-account source or a delegate that returns GoogleWorkspaceAccessToken.FromVerifiedCredential only after checking provider-issued account and scope evidence; a caller-entered account label or requested scope is not credential proof.

What it provides

  • IGoogleWorkspaceCredentialSource for application-owned OAuth or service-account token acquisition.
  • StaticAccessTokenCredentialSource, DelegateGoogleWorkspaceCredentialSource, and GoogleServiceAccountCredentialSource.
  • GoogleWorkspaceSession and GoogleWorkspaceSessionOptions.
  • GoogleDriveFileLocation for folder, shared-drive, and existing-file targeting.
  • TranslationReport, TranslationNotice, preflight, conflict/export exceptions, cancellation exceptions, and log-ready diagnostic entries.
  • Safety-aware retries, normalized Google API failures, request timeouts, and diagnostic correlation through GoogleWorkspaceSessionOptions.DiagnosticSink.
  • Minimum-scope catalogs for Docs, Sheets, Slides, and Drive operations.

Service account shortcut

var sessionOptions = new GoogleWorkspaceSessionOptions {
    SubjectUser = "analyst@example.com",
    UseDomainWideDelegation = true,
    DefaultFolderId = "reports-folder-id",
};

var credentialSource = GoogleServiceAccountCredentialSource.FromFile(
    "service-account.json",
    sessionOptions);

var session = new GoogleWorkspaceSession(credentialSource, sessionOptions);

For a Google endpoint that exposes no usable conditional revision precondition, call GoogleWorkspaceOperationPolicy.ExplicitlyUnversionedRevision(reason) and pair it with AcceptSpecifiedLoss plus a named accepted-loss description. The receipt then records that the mutation was deliberately unguarded instead of presenting an observed version as an enforced precondition. For Docs and Slides write-control payloads, AdapterExpectedRevision is the exact revision already embedded by the adapter; return that same value so the transport can reject a mismatched policy before sending the request.

This shortcut is sufficient for read-only calls. Add the explicit mutation policy and receipt sink shown above before creating, updating, or deleting cloud resources.

Boundaries

  • This package owns shared Google Workspace plumbing.
  • Word/Google Docs translation belongs in OfficeIMO.Word.GoogleDocs.
  • Excel/Google Sheets translation belongs in OfficeIMO.Excel.GoogleSheets.
  • PowerPoint/Google Slides translation belongs in OfficeIMO.PowerPoint.GoogleSlides.
  • Drive resources belong in OfficeIMO.GoogleWorkspace.Drive; change-feed consumption and plan/apply belong in OfficeIMO.GoogleWorkspace.Sync.
  • Applications own consent and credential policy. OfficeIMO.GoogleWorkspace.Auth.GoogleApis is an optional adapter when an application already uses the Google client SDK.

Targets and license

  • Targets: netstandard2.0, net8.0, net10.0, plus net472 on Windows.
  • License: MIT.
  • Repository: EvotecIT/OfficeIMO

Dependency footprint

  • External: System.Text.Json plus platform HTTP and cryptography; no Google client SDK.
  • OfficeIMO: Credential abstractions, sessions, retry, Drive placement, failures, and translation reports are first-party.

See the complete OfficeIMO package map for related formats and conversion paths.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 is compatible.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETFramework 4.7.2

  • .NETStandard 2.0

  • net10.0

    • No dependencies.
  • net8.0

    • No dependencies.

NuGet packages (6)

Showing the top 5 NuGet packages that depend on OfficeIMO.GoogleWorkspace:

Package Downloads
OfficeIMO.Excel.GoogleSheets

Create, safely replace, import, diff, and translate Google Sheets documents with OfficeIMO.Excel.

OfficeIMO.Word.GoogleDocs

Create, safely replace, import, diff, and translate Google Docs documents with OfficeIMO.Word.

OfficeIMO.GoogleWorkspace.Drive

Typed Google Drive API client, shared-drive support, conversion, media transfer, collaboration, and change tracking for OfficeIMO.

OfficeIMO.PowerPoint.GoogleSlides

Bidirectional OfficeIMO PowerPoint and Google Slides translation with safe replacement, template, and Drive fallback workflows.

OfficeIMO.GoogleWorkspace.Sync

Google Drive change tracking and explicit plan/apply synchronization workflows for OfficeIMO Google Workspace libraries.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
3.2.0 71 8/7/2026
3.1.1 74 8/7/2026
3.1.0 71 8/6/2026
3.0.3 336 7/27/2026
3.0.2 344 7/26/2026
3.0.1 602 7/26/2026
3.0.0 667 7/20/2026
2.0.1 306 7/14/2026
2.0.0 168 7/14/2026
0.1.15 208 7/9/2026
0.1.14 201 7/8/2026
0.1.13 215 7/5/2026
0.1.12 192 7/4/2026
0.1.11 215 6/27/2026
0.1.10 195 6/27/2026
0.1.9 202 6/24/2026
0.1.8 206 6/23/2026
0.1.7 189 6/21/2026
0.1.6 219 6/16/2026
0.1.5 303 6/16/2026
Loading failed