Google.Api.Gax
The transports that can be used to make calls to an API.
No transports specified.
Native gRPC support via binary protobuf serialization.
"REST"-like support via JSON.
Batching settings used to specify the conditions under which a batch of data
will be further processed.
Creates a new instance with the specified settings.
The element count above which further processing of a batch will occur.
The byte count above which further processing of a batch will occur.
The batch lifetime above which further processing of a batch will occur.
The element count above which further processing of a batch will occur.
The byte count above which further processing of a batch will occur.
The batch lifetime above which further processing of a batch will occur.
Google Cloud Run details.
Builds a from the given metadata
and Cloud Run environment variables.
The metadata is normally retrieved from the GCE metadata server.
JSON metadata, normally retrieved from the GCE metadata server.
Must not be null.
A populated if the metadata represents and GCE instance;
null otherwise.
Constructs details of a Google Cloud Run service revision.
JSON metadata, normally retrieved from the GCE metadata server.
Must not be null.
The project ID. Must not be null.
The zone in which the service code is running. Must not be null.
The name of the service. Must not be null.
The name of the revision. Must not be null.
The name of the configuration. Must not be null.
The full JSON string retrieved from the metadata server. This is never null.
The Project ID under which this service is running. This is never null.
The zone of the service, e.g. "us-central1-1". This is never null.
The region part of the zone. For example, a zone of "us-central1-1" has a region
of "us-central1".
The name of the Cloud Run service being run. This is never null.
The name of the Cloud Run revision being run. This is never null.
The name of the Cloud Run configuration being run. This is never null.
Provides cached instances of empty dictionaries.
The type of the keys in the dictionary.
The type of the values in the dictionary.
Gets a cached empty . The returned dictionary is read-only.
Specifies whether or not an emulator configuration should be present and
whether or not it should be used. Emulator configuration is usually specified
through environment variables.
Ignores the presence or absence of emulator configuration.
Always connect to the production servers, but throw an exception if
an emulator configuration is detected that would suggest connecting to
an emulator is expected.
Always connect to the emulator, throwing an exception if no emulator
configuration is detected.
Connect to the emulator if an emulator configuration is detected,
or production otherwise. This is a convenient option, but risks damage to
production databases or running up unexpected bills if tests are accidentally
run in production due to the emulator configuration being absent unexpectedly.
(Using separate projects for production and testing is a best practice for
preventing the first issue, but may be unrealistic for small or hobby projects.)
The type of ; none, timeout or deadline.
No expiration; an infinite timeout.
Expiration is a relative timeout, represented by a .
Expiration is an absolute deadline, represented by a .
Expiration specified by relative timeout or absolute deadline.
Create an with a relative timeout.
The relative timeout.
An with the specified relative timeout.
Zero or negative timeouts are valid, and will cause immediate failure of the operation being performed.
Create an with an absolute deadline.
The absolute deadline. Should be a UTC datetime.
An with the specified absolute deadline.
Deadlines in the past are valid, and will cause immediate failure of the operation being performed.
An with no timeout or deadline.
Indicates that no expiration is required.
If not null, the relative timeout of this expiration.
If not null, the absolute deadline of this expiration.
What is contained in this .
Extension methods for .
Calculate a deadline from an and a .
, may be null.
to use for deadline calculation.
The calculated absolute deadline, or null if no deadline should be used.
Convenience methods for handling field formats documented in https://google.aip.dev/202.
Generates a UUID v4 value and formats it as xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx,
using lower-case letters for hex digits.
Settings used to control data flow.
The precise meaning of the settings in this class
is context-sensitive. For example, when used by a library which creates multiple
streams of data, the flow control settings may restrict flow on a per-stream basis,
or on an aggregate basis. Please consult the documentation of the library that consumes
these settings for more details on how they're used in that context.
Creates a new instance with the specified settings.
The maximum number of elements that can be outstanding before data flow is restricted, or
null if there is no specified limit.
The maximum number of bytes that can be outstanding before data flow is restricted, or
null if there is no specified limit.
The maximum number of elements that can be outstanding before data flow is restricted, or
null if there is no specified limit.
The maximum number of bytes that can be outstanding before data flow is restricted, or
null if there is no specified limit.
Google App Engine details.
Construct details of Google App Engine
The Project ID associated with your application,
which is visible in the Google Cloud Console. Must not be null.
The name of the current instance. Must not be null.
The service name specified in your application's app.yaml file,
or if no service name is specified, it is set to default. Must not be null.
The version label of the current application. Must not be null.
The Project ID associated with your application, which is visible in the Google Cloud Console.
The name of the current instance.
The service name specified in your application's app.yaml file, or if no service name is specified, it is set to default.
The version label of the current application.
Convenience methods to simplify implementing equality comparisons and hash codes.
Checks if two lists are equal, in an ordering-sensitive manner, using the default equality comparer for the type.
The left list to compare. May be null.
The right list to compare. May be null.
Whether or not the lists are equal
Computes an ordering-sensitive hash code for a list, using the default equality comparer for the type.
The list to compute a hash code for. May be null.
The computed hash code.
Combines two hash codes.
The first hash code.
The second hash code.
The combined hash code.
Combines three hash codes.
The first hash code.
The second hash code.
The third hash code.
The combined hash code.
Combines four hash codes.
The first hash code.
The second hash code.
The third hash code.
The fourth hash code.
The combined hash code.
Combines five hash codes.
The first hash code.
The second hash code.
The third hash code.
The fourth hash code.
The fifth hash code.
The combined hash code.
Combines six hash codes.
The first hash code.
The second hash code.
The third hash code.
The fourth hash code.
The fifth hash code.
The sixth hash code.
The combined hash code.
Combines seven hash codes.
The first hash code.
The second hash code.
The third hash code.
The fourth hash code.
The fifth hash code.
The sixth hash code.
The seventh hash code.
The combined hash code.
Combines eight hash codes.
The first hash code.
The second hash code.
The third hash code.
The fourth hash code.
The fifth hash code.
The sixth hash code.
The seventh hash code.
The eight hash code.
The combined hash code.
Preconditions for checking method arguments, state etc.
Checks that the given argument (to the calling method) is non-null.
The type of the parameter.
The argument provided for the parameter.
The name of the parameter in the calling method.
is null
if it is not null
Checks that a string argument is neither null, nor an empty string.
The argument provided for the parameter.
The name of the parameter in the calling method.
is null
is empty
if it is not null or empty
Checks that the given argument value is valid.
Note that the upper bound () is inclusive,
not exclusive. This is deliberate, to allow the specification of ranges which include
.
The value of the argument passed to the calling method.
The name of the parameter in the calling method.
The smallest valid value.
The largest valid value.
if it was in range
The argument was outside the specified range.
Checks that the given argument value is valid.
Note that the upper bound () is inclusive,
not exclusive. This is deliberate, to allow the specification of ranges which include
.
The value of the argument passed to the calling method.
The name of the parameter in the calling method.
The smallest valid value.
The largest valid value.
if it was in range
The argument was outside the specified range.
Checks that the given argument value, if not null, is valid.
Note that the upper bound () is inclusive,
not exclusive. This is deliberate, to allow the specification of ranges which include
.
The value of the argument passed to the calling method.
The name of the parameter in the calling method.
The smallest valid value.
The largest valid value.
if it was in range, or null.
The argument was outside the specified range.
Checks that the given argument value is not negative.
The value of the argument passed to the calling method.
The name of the parameter in the calling method.
if it was non-negative.
The argument was negative.
Checks that the given argument value, if not null, is not negative.
The value of the argument passed to the calling method.
The name of the parameter in the calling method.
if it was non-negative, or null.
The argument was negative.
Checks that the given argument value is not negative.
The value of the argument passed to the calling method.
The name of the parameter in the calling method.
if it was non-negative.
The argument was negative.
Checks that the given argument value, if not null, is not negative.
The value of the argument passed to the calling method.
The name of the parameter in the calling method.
if it was non-negative, or null.
The argument was negative.
Checks that the given argument value is not negative.
The value of the argument passed to the calling method.
The name of the parameter in the calling method.
if it was non-negative.
The argument was negative.
Checks that the given argument value, if not null, is not negative.
The value of the argument passed to the calling method.
The name of the parameter in the calling method.
if it was non-negative, or null.
The argument was negative.
Checks that given condition is met, throwing an otherwise.
The (already evaluated) condition to check.
The message to include in the exception, if generated. This should not
use interpolation, as the interpolation would be performed regardless of whether or
not an exception is thrown.
Checks that given condition is met, throwing an otherwise.
The (already evaluated) condition to check.
The format string to use to create the exception message if the
condition is not met.
The argument to the format string.
Checks that given condition is met, throwing an otherwise.
The (already evaluated) condition to check.
The format string to use to create the exception message if the
condition is not met.
The first argument to the format string.
The second argument to the format string.
Checks that given condition is met, throwing an otherwise.
The (already evaluated) condition to check.
The format string to use to create the exception message if the
condition is not met.
The first argument to the format string.
The second argument to the format string.
The third argument to the format string.
Checks that given argument-based condition is met, throwing an otherwise.
The (already evaluated) condition to check.
The name of the parameter whose value is being tested.
The message to include in the exception, if generated. This should not
use interpolation, as the interpolation would be performed regardless of whether or not an exception
is thrown.
Checks that given argument-based condition is met, throwing an otherwise.
The (already evaluated) condition to check.
The name of the parameter whose value is being tested.
The format string to use to create the exception message if the
condition is not met.
The argument to the format string.
Checks that given argument-based condition is met, throwing an otherwise.
The (already evaluated) condition to check.
The name of the parameter whose value is being tested.
The format string to use to create the exception message if the
condition is not met.
The first argument to the format string.
The second argument to the format string.
Checks that the given value is in fact defined in the enum used as the type argument of the method.
The enum type to check the value within.
The value to check.
The name of the parameter whose value is being tested.
if it was a defined value
Checks that the given used as a delay is non-negative. This is a very specific
call; most users won't need it.
The value to check.
The name of the parameter whose value is being tested.
Google Compute Engine details.
Builds a from the given metadata.
This metadata is normally retrieved from the GCE metadata server.
JSON metadata, normally retrieved from the GCE metadata server.
Must not be null.
A populated if the metadata represents and GCE instance;
null otherwise.
Construct details of Google Compute Engine
The full JSON string retrieved from the metadata server. Must not be null.
The project ID. Must not be null.
The instance ID. Must not be null.
The zone name. Must not be null.
If this value is in the format projects/<project-number>/zones/<zone-name>
then will return the <zone-name>
part of this value.
If not, will throw .
If this value has been retrived from Google Compute Engine, the it's format will be the one
described above.
The full JSON string retrieved from the metadata server. This is never null.
The Project ID under which this GCE instance is running. This is never null.
The Instance ID of the GCE instance on which this is running. This is never null.
The zone where this GCE instance is running. This is never null.
This will be in the format projects/<project-number>/zones/<zone-name>
id the value has been retrieved from Google Compute Engine.
The zone name where this GCE instance is running.
If is in the format projects/<project-number>/zones/<zone-name>
this value will be the <zone-name>
part in .
If is in a different format then this getting the value of this property will
throw .
Google Container (Kubernetes) Engine details.
Data from the Kubernetes API
The Kubernetes pod name
The Kubernetes namespace name
JSON from https://kubernetes/api/v1/namespaces/{namespace}
JSON from https://kubernetes/api/v1/namespaces/{namespace}/pods/{pod-name}
Lines from /proc/self/mountinfo
Builds a from the given metadata and kubernetes data.
The metadata is normally retrieved from the GCE metadata server.
The kubernetes data is normally retrieved using the kubernetes API.
This method attempts to return as much information as it is present on
and but will return for
properties whose corresponding information is corrupt or missing in
or .
JSON metadata, normally retrieved from the GCE metadata server.
Must not be null.
Kubernetes data, normally retrieved using the kubernetes API.
Must not be null.
A populated if the metadata represents and GKE instance;
null otherwise.
Construct details of Google Container (Kubernetes) Engine
The full JSON string retrieved from the metadata server. Must not be null.
The project ID. Must not be null.
The cluster name. Must not be null.
The location. Must not be null.
The instance host name. Must not be null.
The GCE instance ID. Must not be null.
The zone. Must not be null.
The kubernetes namespace ID. Must not be null.
The kubernetes pod ID. Must not be null.
The container name. Must not be null.
The location of the cluster. Must not be null.
The full JSON string retrieved from the metadata server.
The Project ID associated with your application, which is visible in the Google Cloud Console.
The cluster name, which is visible in the Google Cloud Console.
The cluster location, which is visible in the Google Cloud Console.
This is equivalent to the value of the <zone-name>
part in
The hostname of this instance.
The GCE instance this container is running in.
The GCE zone in which the instance is running.
This is in the format projects/<project-number>/zones/<zone-name>
.
The cluster namespace the container is running in.
The pos the container is running in.
The name of the container.
The location of the cluster.
May be different from node / pod location.
An abstraction of the ability to determine the current date and time.
This interface primarily exists for testing purposes, allowing test code to
isolate itself from the system clock. In production, the
implementation is by far the most likely one to be used, and the only one provided
within this library. Code that uses a clock should generally be designed to allow it
to be optionally specified, defaulting to .
Returns the current date and time in UTC, with a kind of .
A representing the current date and time in UTC.
A resource name.
Whether this instance contains a resource name with a known pattern.
The string representation of the resource name.
The string representation of the resource name.
Abstraction of scheduler-like operations, used for testability.
Note that this is different to , which is really involved
with assigning tasks to threads rather than any sort of delay.
Returns a task which will complete after the given delay. Whether the returned
awaitable is configured to capture the current context or not is implementation-specific.
(A test implementation may capture the current context to enable reliable testing.)
Time to delay for. Must not be negative.
The cancellation token that will be checked prior to completing the returned task.
A task which will complete after the given delay.
Extension methods for .
Simulates a synchronous delay by calling on
, and unwrapping any exceptions generated (typically cancellation).
The scheduler to use for the sleep operation.
Time to sleep for. Must not be negative.
The cancellation token that will be watched during the sleep operation.
The cancellation token was cancelled during the sleep.
Thrown when an attempt is made to parse invalid JSON, e.g. using
a non-string property key, or including a redundant comma.
Utility class for generating JSON. This class doesn't perform much in the way of validity
checks - that's left as the responsibility of the caller. However, it allows values and properties
to be written in a simple, chainable way, without the caller needing to worry about adding commas.
The JSON representation of the first 160 characters of Unicode.
Empty strings are replaced by the static constructor.
Constructs a new instance using the specified .
The to append to. Must not be null.
Constructs a new instance with a new .
Writes the start of an object to the builder.
A reference to the same the method was called on, for chaining.
Writes the start of an array to the builder.
A reference to the same the method was called on, for chaining.
Writes the end of an array to the builder.
A reference to the same the method was called on, for chaining.
Writes the end of an object to the builder.
A reference to the same the method was called on, for chaining.
Writes a string value to the builder, escaping it if necessary.
The value to write. May be null.
A reference to the same the method was called on, for chaining.
Writes a Boolean value to the builder.
The value to write.
A reference to the same the method was called on, for chaining.
Writes a numeric value to the builder.
The value to write.
A reference to the same the method was called on, for chaining.
Writes a name/value property pair to the builder for a string value.
The name of the property. Must not be null.
The value of the property. May be null.
A reference to the same the method was called on, for chaining.
Writes a name/value property pair to the builder for a Boolean value.
The name of the property. Must not be null.
The value of the property.
A reference to the same the method was called on, for chaining.
Writes a name/value property pair to the builder for a numeric value.
The name of the property. Must not be null.
The value of the property.
A reference to the same the method was called on, for chaining.
Writes a property name to the builder, so that an array or object value may then be written.
The name of the property. Must not be null.
A reference to the same the method was called on, for chaining.
Returns the string representation of the underlying .
If this builder was created with an existing StringBuilder instance, any data written earlier
will be included in the result.
The string representation of the builder.
Crude JSON parser. This is only capable of parsing documents that are fully compliant with RFC 7159.
Each JSON value is represented as:
- JSON string: System.String
- JSON number: System.Double
- JSON array: System.Collections.Generic.List`1{System.Object}
- JSON object: System.Collections.Generic.Dictionary`1{System.String, System.Object}
- JSON Boolean: System.Boolean
- JSON null: null reference
Simple but strict JSON tokenizer, rigidly following RFC 7159.
This tokenizer is stateful, and only returns "useful" tokens - names, values etc.
It does not create tokens for the separator between names and values, or for the comma
between values. It validates the token stream as it goes - so callers can assume that the
tokens it produces are appropriate. For example, it would never produce "start object, end array."
Not thread-safe.
Creates a tokenizer that reads from the given text reader.
Pushes a new container type onto the stack and validates that we don't violate the maximum depth.
Peeks at the next token in the stream, without changing the visible state.
The next token in the stream.
Skips the value we're about to read. This must only be called immediately after reading a property name.
If the value is an object or an array, the complete object/array is skipped.
Returns the next JSON token in the stream.
This method is called after an EndDocument token has been returned
The input text does not comply with RFC 7159
The next token in the stream.
Reads a string token. It is assumed that the opening " has already been read.
Reads an escaped character. It is assumed that the leading backslash has already been read.
Reads an escaped Unicode 4-nybble hex sequence. It is assumed that the leading \u has already been read.
Consumes a text-only literal, throwing an exception if the read text doesn't match it.
It is assumed that the first letter of the literal has already been read.
Validates that we're in a valid state to read a value (using the given error prefix if necessary)
and changes the state to the appropriate one, e.g. ObjectAfterColon to ObjectAfterProperty.
Pops the top-most container, and sets the state to the appropriate one for the end of a value
in the parent container.
Possible states of the tokenizer.
This is a flags enum purely so we can simply and efficiently represent a set of valid states
for checking.
Each is documented with an example,
where ^ represents the current position within the text stream. The examples all use string values,
but could be any value, including nested objects/arrays.
The complete state of the tokenizer also includes a stack to indicate the contexts (arrays/objects).
Any additional notional state of "AfterValue" indicates that a value has been completed, at which
point there's an immediate transition to ExpectedEndOfDocument, ObjectAfterProperty or ArrayAfterValue.
These states were derived manually by reading RFC 7159 carefully.
^ { "foo": "bar" }
Before the value in a document. Next states: ObjectStart, ArrayStart, "AfterValue"
{ "foo": "bar" } ^
After the value in a document. Next states: ReaderExhausted
{ "foo": "bar" } ^ (and already read to the end of the reader)
Terminal state.
{ ^ "foo": "bar" }
Before the *first* property in an object.
Next states:
"AfterValue" (empty object)
ObjectBeforeColon (read a name)
{ "foo" ^ : "bar", "x": "y" }
Next state: ObjectAfterColon
{ "foo" : ^ "bar", "x": "y" }
Before any property other than the first in an object.
(Equivalently: after any property in an object)
Next states:
"AfterValue" (value is simple)
ObjectStart (value is object)
ArrayStart (value is array)
{ "foo" : "bar" ^ , "x" : "y" }
At the end of a property, so expecting either a comma or end-of-object
Next states: ObjectAfterComma or "AfterValue"
{ "foo":"bar", ^ "x":"y" }
Read the comma after the previous property, so expecting another property.
This is like ObjectStart, but closing brace isn't valid here
Next state: ObjectBeforeColon.
[ ^ "foo", "bar" ]
Before the *first* value in an array.
Next states:
"AfterValue" (read a value)
"AfterValue" (end of array; will pop stack)
[ "foo" ^ , "bar" ]
After any value in an array, so expecting either a comma or end-of-array
Next states: ArrayAfterComma or "AfterValue"
[ "foo", ^ "bar" ]
After a comma in an array, so there *must* be another value (simple or complex).
Next states: "AfterValue" (simple value), StartObject, StartArray
Wrapper around a text reader allowing small amounts of buffering and location handling.
The buffered next character, if we have one.
Returns the next character in the stream, or null if we have reached the end.
Creates a new exception appropriate for the current state of the reader.
A page of resources which will only have fewer results than requested if
there is no more data to fetch.
The type of resource within the page.
The page token to use to fetch the next set of resources.
gRPC-based APIs use an empty string as a "no page token", whereas REST-based APIs
use a null reference instead. The value here will be consistent with the value returned
by the API itself.
Constructs a fixed-size page from the given resource sequence and page token.
The resources in the page.
The next page token.
An asynchronous sequence of resources obtained via API responses. Application code
can treat this as a simple sequence (with API calls automatically being made
lazily as more results are required), or call to retrieve
one API response at a time, potentially with additional information.
The API response type. Each response contains a page of resources.
The resource type contained within the response.
Returns the sequence of raw API responses, each of which contributes a page of
resources to this sequence.
An asynchronous sequence of raw API responses, each containing a page of resources.
Eagerly (but asynchronously) reads a single page of results with a fixed maximum size. The returned page is guaranteed
to have that many results, unless there is no more data available.
"Natural" pages returned by the API may contain a smaller number of resources than requested.
For example, a request for a page with 100 resources may return a page with 80 resources but
a next page token for more to be retrieved. This is suitable for batch-processing, but not
for user-visible paging such as in a web application, where fixed-size pages are expected.
This method may make more than one API call in order to fill the page, but after the page has been
returned, all the data will have been loaded. (In particular, iterating over the items in the page
multiple times will not make any further requests.)
The page size. Must be greater than 0.
A token to cancel the operation.
An asynchronous operation, the result of which is a page of resources.
A sequence of resources obtained via API responses, each of which contributes a page of resources.
Application code can treat this as a simple sequence (with API calls automatically being made
lazily as more results are required), or call to retrieve
a page at a time, potentially with additional information.
The API response type. Each response contains a page of resources.
The resource type contained within the response.
Returns the sequence of raw API responses, each of which contributes a page of
resources to this sequence.
A sequence of raw API responses, each containing a page of resources.
Eagerly reads a single page of results with a fixed maximum size. The returned page is guaranteed
to have that many results, unless there is no more data available.
"Natural" pages returned by the API may contain a smaller number of resources than requested.
For example, a request for a page with 100 resources may return a page with 80 resources but
a next page token for more to be retrieved. This is suitable for batch-processing, but not
for user-visible paging such as in a web application, where fixed-size pages are expected.
This method may make more than one API call in order to fill the page, but after the page has been
returned, all the data will have been loaded. (In particular, iterating over the items in the page
multiple times will not make any further requests.)
The page size. Must be greater than 0.
An asynchronous operation, the result of which is a page of resources.
Represents a path template used for resource names which may be composed of multiple IDs.
Templates use a subset of the syntax of the API platform. See
https://github.com/googleapis/googleapis/blob/master/google/api/http.proto
for details of the API platform.
This class performs no URL escaping or unescaping. It is designed for use within GRPC, where no
URL encoding is required.
Just an array containing a single slash, to avoid constructing a new array every time we need
to split.
List of segments in this template. Never modified after construction.
List of the segments in this template which are wildcards. Never modified after construction.
The names of the parameters within the template. This collection has one element per parameter,
but unnamed parameters have a name of null.
Constructs a template from its textual representation, such as shelves/*/books/**.
The textual representation of the template. Must not be null.
The number of parameter segments (regular wildcards or path wildcards, named or unnamed) in the template.
Validates a service name, ensuring it is not empty and doesn't contain any slashes.
(In the future, we may want to make this stricter, e.g. that it's a valid DNS-like name.)
The name to validate
The name of the parameter
Validate a single value from a sequence. This is used in both parsing and instantiating.
Validates a whole array of resource IDs, including that the count matches.
Validates that the given resource IDs are valid for this template, and returns a string representation
This is equivalent to calling new ResourceName(template, resourceIds).ToString(), but simpler in
calling code and more efficient in terms of memory allocation.
This method assumes no service name is required. Call to specify a service name.
The resource IDs to use to populate the parameters in this template. Must not be null.
The string representation of the resource name.
Validates that the given resource IDs are valid for this template, and returns a string representation
The resource IDs to use to populate the parameters in this template. Must not be null.
The service name, which may be null.
The string representation of the resource name.
Returns a string representation of the template with parameters replaced by resource IDs.
The name of the service, for full resource names. May be null, to produce a relative resource name.
Resource IDs to interpolate the template with. Expected to have been validated already.
Attempts to parse the given resource name against this template, returning null on failure.
Although this method returns null if a name is passed in which doesn't match the template,
it still throws if is null, as this would
usually indicate a programming error rather than a data error.
The resource name to parse against this template. Must not be null.
When this method returns, the parsed resource name or null if parsing fails.
true if the name was parsed successfully; false otherwise.
Attempts to parse the given resource name against this template, throwing on failure.
The resource name to parse against this template. Must not be null.
The parsed name as a .
Implementation of parsing, returning the error message for a FormatException if parsing fails.
Returns the textual representation of this template.
The same textual representation that this template was initially constructed with.
A literal path segment.
A simple wildcard ('*').
A path wildcard ('**').
A segment of a path.
The literal value or the name of a wildcard.
null for unnamed wildcards.
Information about the current execution platform.
Supported execution platforms are Google App Engine (GAE), Google Container Engine (GKE), and Google Compute Engine (GCE).
Asyncrhonously get execution platform information.
A task containing the execution platform information.
Get execution platform information. This may block briefly while network operations are in progress.
Execution platform information.
Determine the metadata host to use. In order of priority, this will use:
- GCE_METADATA_HOST environment variable, if set and non-empty
- METADATA_EMULATOR_HOST environment variable, if set and non-empty.
This is the undocumented but the de-facto mechanism for using an emulator.
- The hard-coded IP address of "169.254.169.254". We use the IP address rather
than the IP name to avoid a DNS lookup, which can cause intermittent failures.
Construct with no details.
This leads to a platform of .
Construct with details of Google Compute Engine.
Details of Google Compute Engine.
Construct with details of Google App Engine.
Details of Google App Engine.
Construct with details of Google Container (Kubernetes) Engine.
Details of Google Container (Kubernetes) Engine.
Construct with details of Google Cloud Run.
Details of Google Cloud Run.
Google App Engine (GAE) platform details.
null if not executing on GAE.
Google Compute Engine (GCE) platform details.
null if not executing on GCE.
Google Container (Kubernetes) Engine (GKE) platform details.
null if not executing on GKE.
Google Cloud Run platform details.
null if not executing on Google Cloud Run.
The current execution platform.
The current Project ID.
null if the Project ID cannot be determined on the current execution platform.
Execution platform type.
Unknown execution platform.
Execution platform is Google Compute Engine.
Execution platform is Google App Engine.
Execution platform is Google Container Engine (Kubernetes).
Execution platform is Google Cloud Run.
Helper methods for polling scenarios.
Repeatedly calls the specified polling action, delaying between calls,
until a given condition is met in the response.
The response type.
The poll action, typically performing an RPC. The value passed to the
action is the overall deadline, so that the RPC settings can be adjusted accordingly. A null value
indicates no deadline.
The test for whether to return the response (true) or continue
polling (false). Must not be null.
The clock to use for determining deadlines. Must not be null.
The scheduler to use for delaying between calls. Must not be null.
The poll settings, controlling timeouts, call settings and delays.
The cancellation token used to cancel delays, if any.
The completed response.
The timeout specified in the poll settings expired.
Asynchronously repeatedly calls the specified polling action, delaying between calls,
until a given condition is met in the response.
The response type.
The poll action, typically performing an RPC. The value passed to the
action is the overall deadline, so that the RPC settings can be adjusted accordingly. A null
value indicates no deadline.
The test for whether to return the response (true) or continue
polling (false). Must not be null.
The clock to use for determining deadlines. Must not be null.
The scheduler to use for delaying between calls. Must not be null.
The poll settings, controlling timeouts, call settings and delays.
The cancellation token used to cancel delays, if any.
A task representing the asynchronous operation. The result of the task will be the completed response.
Settings controlling repeated polling, for example when waiting for a long-running operation
to complete.
How long to wait before giving up. This is never null.
The delay between RPC calls when fetching the operation status. This is never negative.
There is no exponential backoff between calls; the same delay is used for each call.
This is the delay between the a successful RPC response being received
and the next RPC request being sent.
The multiplier to apply to the delay on each iteration; must be greater or equal to 1.0.
The maximum delay to use. If the increasing delay due to the delay multiplier exceeds this,
this maximum is used instead.
Creates poll settings from the given expiration and constant delay.
The expiration to use in order to know when to stop polling. Must not be null.
The constant delay between RPC calls. Must be non-negative.
Creates poll settings from the given expiration, delay, delay multiplier and maximum delay.
The expiration to use in order to know when to stop polling. Must not be null.
The delay between RPC calls. Must be non-negative.
The multiplier to apply to the delay on each iteration; must be greater or equal to 1.0.
The maximum delay to use.
Works out the next delay from the current one, based on the multiplier and maximum.
The current delay.
The next delay.
Exception used to indicate that an attempt was made to get or create a resource,
and the retrieved resource did not match the expected constraints.
Constructs a new instance of the exception.
The error message for the exception.
A list of resource names of a specific type, that delegates all operations to an
underlying list of string-based resource names.
The type of the resource name contained in this list.
Constructs a from an underlying string-based list
and a resource name parser.
Adds all items to this list.
The items to add to this list.
Resource name for the 'billing account' resource which is widespread across Google Cloud.
While most resource names are generated on a per-API basis, many APIs use a billing account resource, and it's
useful to be able to pass values from one API to another.
The possible contents of .
An unparsed resource name.
A resource name with pattern billingAccounts/{billing_account}.
Creates a containing an unparsed resource name.
The unparsed resource name. Must not be null.
A new instance of containing the provided
.
Creates a with the pattern billingAccounts/{billing_account}.
The BillingAccount ID. Must not be null or empty.
A new instance of constructed from the provided ids.
Formats the IDs into the string representation of this with pattern
billingAccounts/{billing_account}.
The BillingAccount ID. Must not be null or empty.
The string representation of this with pattern
billingAccounts/{billing_account}.
Formats the IDs into the string representation of this with pattern
billingAccounts/{billing_account}.
The BillingAccount ID. Must not be null or empty.
The string representation of this with pattern
billingAccounts/{billing_account}.
Parses the given resource name string into a new instance.
To parse successfully, the resource name must be formatted as one of the following:
- billingAccounts/{billing_account}
The resource name in string form. Must not be null.
The parsed if successful.
Parses the given resource name string into a new instance; optionally
allowing an unparseable resource name.
To parse successfully, the resource name must be formatted as one of the following:
- billingAccounts/{billing_account}
Or may be in any format if is true.
The resource name in string form. Must not be null.
If true will successfully store an unparseable resource name into the
property; otherwise will throw an if an unparseable resource name is
specified.
The parsed if successful.
Tries to parse the given resource name string into a new instance.
To parse successfully, the resource name must be formatted as one of the following:
- billingAccounts/{billing_account}
The resource name in string form. Must not be null.
When this method returns, the parsed , or null if parsing failed.
true if the name was parsed successfully; false otherwise.
Tries to parse the given resource name string into a new instance;
optionally allowing an unparseable resource name.
To parse successfully, the resource name must be formatted as one of the following:
- billingAccounts/{billing_account}
Or may be in any format if is true.
The resource name in string form. Must not be null.
If true will successfully store an unparseable resource name into the
property; otherwise will throw an if an unparseable resource name is
specified.
When this method returns, the parsed , or null if parsing failed.
true if the name was parsed successfully; false otherwise.
Constructs a new instance of a class from the component parts of pattern
billingAccounts/{billing_account}
The BillingAccount ID. Must not be null or empty.
The of the contained resource name.
The contained . Only non-nullif this instance contains an
unparsed resource name.
The BillingAccount ID. Will not be null, unless this instance contains an unparsed resource
name.
Resource name for the 'folder' resource which is widespread across Google Cloud.
While most resource names are generated on a per-API basis, many APIs use a folder resource, and it's
useful to be able to pass values from one API to another.
The possible contents of .
An unparsed resource name.
A resource name with pattern folders/{folder}.
Creates a containing an unparsed resource name.
The unparsed resource name. Must not be null.
A new instance of containing the provided .
Creates a with the pattern folders/{folder}.
The Folder ID. Must not be null or empty.
A new instance of constructed from the provided ids.
Formats the IDs into the string representation of this with pattern
folders/{folder}.
The Folder ID. Must not be null or empty.
The string representation of this with pattern folders/{folder}.
Formats the IDs into the string representation of this with pattern
folders/{folder}.
The Folder ID. Must not be null or empty.
The string representation of this with pattern folders/{folder}.
Parses the given resource name string into a new instance.
To parse successfully, the resource name must be formatted as one of the following:
- folders/{folder}
The resource name in string form. Must not be null.
The parsed if successful.
Parses the given resource name string into a new instance; optionally allowing an
unparseable resource name.
To parse successfully, the resource name must be formatted as one of the following:
- folders/{folder}
Or may be in any format if is true.
The resource name in string form. Must not be null.
If true will successfully store an unparseable resource name into the
property; otherwise will throw an if an unparseable resource name is
specified.
The parsed if successful.
Tries to parse the given resource name string into a new instance.
To parse successfully, the resource name must be formatted as one of the following:
- folders/{folder}
The resource name in string form. Must not be null.
When this method returns, the parsed , or null if parsing failed.
true if the name was parsed successfully; false otherwise.
Tries to parse the given resource name string into a new instance; optionally
allowing an unparseable resource name.
To parse successfully, the resource name must be formatted as one of the following:
- folders/{folder}
Or may be in any format if is true.
The resource name in string form. Must not be null.
If true will successfully store an unparseable resource name into the
property; otherwise will throw an if an unparseable resource name is
specified.
When this method returns, the parsed , or null if parsing failed.
true if the name was parsed successfully; false otherwise.
Constructs a new instance of a class from the component parts of pattern
folders/{folder}
The Folder ID. Must not be null or empty.
The of the contained resource name.
The contained . Only non-nullif this instance contains an
unparsed resource name.
The Folder ID. Will not be null, unless this instance contains an unparsed resource name.
Resource name for the 'location' resource which is widespread across Google Cloud.
While most resource names are generated on a per-API basis, many APIs use a location resource, and it's
useful to be able to pass values from one API to another.
The possible contents of .
An unparsed resource name.
A resource name with pattern projects/{project}/locations/{location}.
Creates a containing an unparsed resource name.
The unparsed resource name. Must not be null.
A new instance of containing the provided
.
Creates a with the pattern projects/{project}/locations/{location}.
The Project ID. Must not be null or empty.
The Location ID. Must not be null or empty.
A new instance of constructed from the provided ids.
Formats the IDs into the string representation of this with pattern
projects/{project}/locations/{location}.
The Project ID. Must not be null or empty.
The Location ID. Must not be null or empty.
The string representation of this with pattern
projects/{project}/locations/{location}.
Formats the IDs into the string representation of this with pattern
projects/{project}/locations/{location}.
The Project ID. Must not be null or empty.
The Location ID. Must not be null or empty.
The string representation of this with pattern
projects/{project}/locations/{location}.
Parses the given resource name string into a new instance.
To parse successfully, the resource name must be formatted as one of the following:
- projects/{project}/locations/{location}
The resource name in string form. Must not be null.
The parsed if successful.
Parses the given resource name string into a new instance; optionally allowing an
unparseable resource name.
To parse successfully, the resource name must be formatted as one of the following:
- projects/{project}/locations/{location}
Or may be in any format if is true.
The resource name in string form. Must not be null.
If true will successfully store an unparseable resource name into the
property; otherwise will throw an if an unparseable resource name is
specified.
The parsed if successful.
Tries to parse the given resource name string into a new instance.
To parse successfully, the resource name must be formatted as one of the following:
- projects/{project}/locations/{location}
The resource name in string form. Must not be null.
When this method returns, the parsed , or null if parsing failed.
true if the name was parsed successfully; false otherwise.
Tries to parse the given resource name string into a new instance; optionally
allowing an unparseable resource name.
To parse successfully, the resource name must be formatted as one of the following:
- projects/{project}/locations/{location}
Or may be in any format if is true.
The resource name in string form. Must not be null.
If true will successfully store an unparseable resource name into the
property; otherwise will throw an if an unparseable resource name is
specified.
When this method returns, the parsed , or null if parsing failed.
true if the name was parsed successfully; false otherwise.
Constructs a new instance of a class from the component parts of pattern
projects/{project}/locations/{location}
The Project ID. Must not be null or empty.
The Location ID. Must not be null or empty.
The of the contained resource name.
The contained . Only non-nullif this instance contains an
unparsed resource name.
The Location ID. Will not be null, unless this instance contains an unparsed resource name.
The Project ID. Will not be null, unless this instance contains an unparsed resource name.
Resource name for the 'organization' resource which is widespread across Google Cloud.
While most resource names are generated on a per-API basis, many APIs use an organization resource, and it's
useful to be able to pass values from one API to another.
The possible contents of .
An unparsed resource name.
A resource name with pattern organizations/{organization}.
Creates a containing an unparsed resource name.
The unparsed resource name. Must not be null.
A new instance of containing the provided
.
Creates a with the pattern organizations/{organization}.
The Organization ID. Must not be null or empty.
A new instance of constructed from the provided ids.
Formats the IDs into the string representation of this with pattern
organizations/{organization}.
The Organization ID. Must not be null or empty.
The string representation of this with pattern
organizations/{organization}.
Formats the IDs into the string representation of this with pattern
organizations/{organization}.
The Organization ID. Must not be null or empty.
The string representation of this with pattern
organizations/{organization}.
Parses the given resource name string into a new instance.
To parse successfully, the resource name must be formatted as one of the following:
- organizations/{organization}
The resource name in string form. Must not be null.
The parsed if successful.
Parses the given resource name string into a new instance; optionally
allowing an unparseable resource name.
To parse successfully, the resource name must be formatted as one of the following:
- organizations/{organization}
Or may be in any format if is true.
The resource name in string form. Must not be null.
If true will successfully store an unparseable resource name into the
property; otherwise will throw an if an unparseable resource name is
specified.
The parsed if successful.
Tries to parse the given resource name string into a new instance.
To parse successfully, the resource name must be formatted as one of the following:
- organizations/{organization}
The resource name in string form. Must not be null.
When this method returns, the parsed , or null if parsing failed.
true if the name was parsed successfully; false otherwise.
Tries to parse the given resource name string into a new instance; optionally
allowing an unparseable resource name.
To parse successfully, the resource name must be formatted as one of the following:
- organizations/{organization}
Or may be in any format if is true.
The resource name in string form. Must not be null.
If true will successfully store an unparseable resource name into the
property; otherwise will throw an if an unparseable resource name is
specified.
When this method returns, the parsed , or null if parsing failed.
true if the name was parsed successfully; false otherwise.
Constructs a new instance of a class from the component parts of pattern
organizations/{organization}
The Organization ID. Must not be null or empty.
The of the contained resource name.
The contained . Only non-nullif this instance contains an
unparsed resource name.
The Organization ID. Will not be null, unless this instance contains an unparsed resource
name.
Resource name for the 'project' resource which is widespread across Google Cloud.
While most resource names are generated on a per-API basis, many APIs use a project resource, and it's
useful to be able to pass values from one API to another.
The possible contents of .
An unparsed resource name.
A resource name with pattern projects/{project}.
Creates a containing an unparsed resource name.
The unparsed resource name. Must not be null.
A new instance of containing the provided .
Creates a with the pattern projects/{project}.
The Project ID. Must not be null or empty.
A new instance of constructed from the provided ids.
Formats the IDs into the string representation of this with pattern
projects/{project}.
The Project ID. Must not be null or empty.
The string representation of this with pattern projects/{project}.
Formats the IDs into the string representation of this with pattern
projects/{project}.
The Project ID. Must not be null or empty.
The string representation of this with pattern projects/{project}.
Parses the given resource name string into a new instance.
To parse successfully, the resource name must be formatted as one of the following:
- projects/{project}
The resource name in string form. Must not be null.
The parsed if successful.
Parses the given resource name string into a new instance; optionally allowing an
unparseable resource name.
To parse successfully, the resource name must be formatted as one of the following:
- projects/{project}
Or may be in any format if is true.
The resource name in string form. Must not be null.
If true will successfully store an unparseable resource name into the
property; otherwise will throw an if an unparseable resource name is
specified.
The parsed if successful.
Tries to parse the given resource name string into a new instance.
To parse successfully, the resource name must be formatted as one of the following:
- projects/{project}
The resource name in string form. Must not be null.
When this method returns, the parsed , or null if parsing failed.
true if the name was parsed successfully; false otherwise.
Tries to parse the given resource name string into a new instance; optionally
allowing an unparseable resource name.
To parse successfully, the resource name must be formatted as one of the following:
- projects/{project}
Or may be in any format if is true.
The resource name in string form. Must not be null.
If true will successfully store an unparseable resource name into the
property; otherwise will throw an if an unparseable resource name is
specified.
When this method returns, the parsed , or null if parsing failed.
true if the name was parsed successfully; false otherwise.
Constructs a new instance of a class from the component parts of pattern
projects/{project}
The Project ID. Must not be null or empty.
The of the contained resource name.
The contained . Only non-nullif this instance contains an
unparsed resource name.
The Project ID. Will not be null, unless this instance contains an unparsed resource name.
A singleton implementation of which delegates to the BCL
property.
Retrieves the singleton instance of this type.
Returns the current date and time in UTC, using .
The current date and time in UTC.
Singleton implementation of which uses .
Retrieves the singleton instance.
Extension methods for .
Returns a task from a task completion source, but observing a given cancellation token.
The result type of the task completion source
The task completion source. Must not be null.
The cancellation token to observe.
A task that will complete when completes, but
will observe for cancellation.
Extension methods for tasks.
Synchronously waits for the given task to complete, and returns the result.
Any thrown is unwrapped to the first inner exception.
The result type of the task
The task to wait for.
The result of the completed task.
Synchronously waits for the given task to complete.
Any thrown is unwrapped to the first inner exception.
The task to wait for.
Synchronously waits for the given task to complete.
Any thrown is unwrapped to the first inner exception.
The task to wait for.
A TimeSpan that represents the number of milliseconds to wait, or
-1 milliseconds to wait indefinitely.
Synchronously waits for the given task to complete.
Any thrown is unwrapped to the first inner exception.
The task to wait for.
The number of milliseconds to wait, or
-1 to wait indefinitely.
Synchronously waits for the given task to complete.
Any thrown is unwrapped to the first inner exception.
The task to wait for.
The number of milliseconds to wait, or
-1 to wait indefinitely.
A cancellation token to observe while waiting for the task to complete
Synchronously waits for the given task to complete.
Any thrown is unwrapped to the first inner exception.
The task to wait for.
A cancellation token to observe while waiting for the task to complete
Class for representing and working with resource names.
A resource name is represented by a , an assignment of resource IDs to parameters in
the template, and an optional service name. This class allows the service name and resource IDs to be
modified, but only within the same template.
The template this resource name is associated with. Never null.
The service name part of this resource name, or null if no service name is specified.
Gets or sets the identifier for the specified parameter index.
The index of the parameter value to retrieve.
The identifier within the resource name at the given parameter index.
Gets or sets the identifier for the specified parameter name.
The name of the parameter value to retrieve.
The identifier within the resource name with the given parameter name.
Creates a resource name with the given template and resource IDs.
The resource IDs are cloned, so later changes to
are ignored. This constructor does not populate the property,
but that can be set after construction.
The template for the new resource name. Must not be null.
The resource IDs to populate template parameters with. Must not be null.
Creates a clone of this resource name, which is then independent of the original.
A clone of this resource name.
Private constructor used by internal code to avoid repeated cloning and validation.
Returns a string representation of this resource name, expanding the template
parameters with the resource IDs and prepending the service name (if present).
A string representation of this resource name.
A resource name in which nothing is known about the name structure.
Parse a resource name into an .
Only minimal verification is carried out that is a valid resource name string.
A resource name.
is null.
is an invalid resource name.
An representing the given string.
Tries to parse the given resource name into an .
Only minimal verification is carried out that is a value resource name string.
A resource name.
The result if parsing is successful, otherwise null.
true if was successfully parsed, otherwise false.
Creates an unkown resource name from the given resource name string.
Only minimal verification is carried out that is a value resource name string.
Helps build version strings for the x-goog-api-client header.
The value is a space-separated list of name/value pairs, where the value
should be a semantic version string. Names must be unique.
The name of the header to set.
Appends the given name/version string to the list.
The name. Must not be null or empty, or contain a space or a slash.
The version. Must not be null, or contain a space or a slash.
Appends a name/version string, taking the version from the version of the assembly
containing the given type.
Appends the .NET environment information to the list.
Whether the name or value that are supposed to be included in a header are valid
Formats an AssemblyInformationalVersionAttribute value to avoid losing useful information,
but also avoid including unnecessary hex that is appended automatically.
Clones this VersionHeaderBuilder, creating an independent copy with the same names/values.
A clone of this builder.