-
Notifications
You must be signed in to change notification settings - Fork 591
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add docs to videointelligence v1beta1 client (#2538)
- Loading branch information
1 parent
0761e3f
commit d7f1960
Showing
4 changed files
with
749 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
121 changes: 121 additions & 0 deletions
121
packages/video-intelligence/src/v1beta1/doc/doc_google_protobuf_any.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,121 @@ | ||
/* | ||
* Copyright 2017, Google Inc. All rights reserved. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
/* | ||
* Note: this file is purely for documentation. Any contents are not expected | ||
* to be loaded as the JS file. | ||
*/ | ||
|
||
/** | ||
* `Any` contains an arbitrary serialized protocol buffer message along with a | ||
* URL that describes the type of the serialized message. | ||
* | ||
* Protobuf library provides support to pack/unpack Any values in the form | ||
* of utility functions or additional generated methods of the Any type. | ||
* | ||
* Example 1: Pack and unpack a message in C++. | ||
* | ||
* Foo foo = ...; | ||
* Any any; | ||
* any.PackFrom(foo); | ||
* ... | ||
* if (any.UnpackTo(&foo)) { | ||
* ... | ||
* } | ||
* | ||
* Example 2: Pack and unpack a message in Java. | ||
* | ||
* Foo foo = ...; | ||
* Any any = Any.pack(foo); | ||
* ... | ||
* if (any.is(Foo.class)) { | ||
* foo = any.unpack(Foo.class); | ||
* } | ||
* | ||
* Example 3: Pack and unpack a message in Python. | ||
* | ||
* foo = Foo(...) | ||
* any = Any() | ||
* any.Pack(foo) | ||
* ... | ||
* if any.Is(Foo.DESCRIPTOR): | ||
* any.Unpack(foo) | ||
* ... | ||
* | ||
* The pack methods provided by protobuf library will by default use | ||
* 'type.googleapis.com/full.type.name' as the type URL and the unpack | ||
* methods only use the fully qualified type name after the last '/' | ||
* in the type URL, for example "foo.bar.com/x/y.z" will yield type | ||
* name "y.z". | ||
* | ||
* | ||
* # JSON | ||
* | ||
* The JSON representation of an `Any` value uses the regular | ||
* representation of the deserialized, embedded message, with an | ||
* additional field `@type` which contains the type URL. Example: | ||
* | ||
* package google.profile; | ||
* message Person { | ||
* string first_name = 1; | ||
* string last_name = 2; | ||
* } | ||
* | ||
* { | ||
* "@type": "type.googleapis.com/google.profile.Person", | ||
* "firstName": <string>, | ||
* "lastName": <string> | ||
* } | ||
* | ||
* If the embedded message type is well-known and has a custom JSON | ||
* representation, that representation will be embedded adding a field | ||
* `value` which holds the custom JSON in addition to the `@type` | ||
* field. Example (for message {@link google.protobuf.Duration}): | ||
* | ||
* { | ||
* "@type": "type.googleapis.com/google.protobuf.Duration", | ||
* "value": "1.212s" | ||
* } | ||
* | ||
* @external "google.protobuf.Any" | ||
* @property {string} typeUrl | ||
* A URL/resource name whose content describes the type of the | ||
* serialized protocol buffer message. | ||
* | ||
* For URLs which use the scheme `http`, `https`, or no scheme, the | ||
* following restrictions and interpretations apply: | ||
* | ||
* * If no scheme is provided, `https` is assumed. | ||
* * The last segment of the URL's path must represent the fully | ||
* qualified name of the type (as in `path/google.protobuf.Duration`). | ||
* The name should be in a canonical form (e.g., leading "." is | ||
* not accepted). | ||
* * An HTTP GET on the URL must yield a {@link google.protobuf.Type} | ||
* value in binary format, or produce an error. | ||
* * Applications are allowed to cache lookup results based on the | ||
* URL, or have them precompiled into a binary to avoid any | ||
* lookup. Therefore, binary compatibility needs to be preserved | ||
* on changes to types. (Use versioned type names to manage | ||
* breaking changes.) | ||
* | ||
* Schemes other than `http`, `https` (or the empty scheme) might be | ||
* used with implementation specific semantics. | ||
* | ||
* @property {string} value | ||
* Must be a valid serialized protocol buffer of the above specified type. | ||
* | ||
* @see [google.protobuf.Any definition in proto format]{@link https://github.com/google/protobuf/blob/master/src/google/protobuf/any.proto} | ||
*/ |
92 changes: 92 additions & 0 deletions
92
packages/video-intelligence/src/v1beta1/doc/doc_google_rpc_status.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
/* | ||
* Copyright 2017, Google Inc. All rights reserved. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
/* | ||
* Note: this file is purely for documentation. Any contents are not expected | ||
* to be loaded as the JS file. | ||
*/ | ||
|
||
/** | ||
* The `Status` type defines a logical error model that is suitable for different | ||
* programming environments, including REST APIs and RPC APIs. It is used by | ||
* [gRPC](https://github.com/grpc). The error model is designed to be: | ||
* | ||
* - Simple to use and understand for most users | ||
* - Flexible enough to meet unexpected needs | ||
* | ||
* # Overview | ||
* | ||
* The `Status` message contains three pieces of data: error code, error message, | ||
* and error details. The error code should be an enum value of | ||
* {@link google.rpc.Code}, but it may accept additional error codes if needed. The | ||
* error message should be a developer-facing English message that helps | ||
* developers *understand* and *resolve* the error. If a localized user-facing | ||
* error message is needed, put the localized message in the error details or | ||
* localize it in the client. The optional error details may contain arbitrary | ||
* information about the error. There is a predefined set of error detail types | ||
* in the package `google.rpc` which can be used for common error conditions. | ||
* | ||
* # Language mapping | ||
* | ||
* The `Status` message is the logical representation of the error model, but it | ||
* is not necessarily the actual wire format. When the `Status` message is | ||
* exposed in different client libraries and different wire protocols, it can be | ||
* mapped differently. For example, it will likely be mapped to some exceptions | ||
* in Java, but more likely mapped to some error codes in C. | ||
* | ||
* # Other uses | ||
* | ||
* The error model and the `Status` message can be used in a variety of | ||
* environments, either with or without APIs, to provide a | ||
* consistent developer experience across different environments. | ||
* | ||
* Example uses of this error model include: | ||
* | ||
* - Partial errors. If a service needs to return partial errors to the client, | ||
* it may embed the `Status` in the normal response to indicate the partial | ||
* errors. | ||
* | ||
* - Workflow errors. A typical workflow has multiple steps. Each step may | ||
* have a `Status` message for error reporting purpose. | ||
* | ||
* - Batch operations. If a client uses batch request and batch response, the | ||
* `Status` message should be used directly inside batch response, one for | ||
* each error sub-response. | ||
* | ||
* - Asynchronous operations. If an API call embeds asynchronous operation | ||
* results in its response, the status of those operations should be | ||
* represented directly using the `Status` message. | ||
* | ||
* - Logging. If some API errors are stored in logs, the message `Status` could | ||
* be used directly after any stripping needed for security/privacy reasons. | ||
* | ||
* @external "google.rpc.Status" | ||
* @property {number} code | ||
* The status code, which should be an enum value of {@link google.rpc.Code}. | ||
* | ||
* @property {string} message | ||
* A developer-facing error message, which should be in English. Any | ||
* user-facing error message should be localized and sent in the | ||
* {@link google.rpc.Status.details} field, or localized by the client. | ||
* | ||
* @property {Object[]} details | ||
* A list of messages that carry the error details. There will be a | ||
* common set of message types for APIs to use. | ||
* | ||
* This object should have the same structure as [google.protobuf.Any]{@link external:"google.protobuf.Any"} | ||
* | ||
* @see [google.rpc.Status definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/rpc/status.proto} | ||
*/ |
Oops, something went wrong.