Skip to content

Commit

Permalink
Add dummy js files for gapic-based logging, pubsub and spanner (#2423)
Browse files Browse the repository at this point in the history
  • Loading branch information
swcloud authored and stephenplusplus committed Jun 30, 2017
1 parent 21ce94f commit 0204f13
Show file tree
Hide file tree
Showing 32 changed files with 6,047 additions and 0 deletions.
38 changes: 38 additions & 0 deletions packages/logging/src/v2/doc/doc_google_api_label.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
/*
* 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.
*/

/**
* A description of a label.
*
* @external "google.api.LabelDescriptor"
* @property {string} key
* The label key.
*
* @property {number} valueType
* The type of data that can be assigned to the label.
*
* The number should be among the values of [google.api.LabelDescriptor.ValueType]{@link external:"google.api.LabelDescriptor.ValueType"}
*
* @property {string} description
* A human-readable description for the label.
*
* @see [google.api.LabelDescriptor definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/api/label.proto}
*/
94 changes: 94 additions & 0 deletions packages/logging/src/v2/doc/doc_google_api_monitored_resource.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
/*
* 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.
*/

/**
* An object that describes the schema of a {@link MonitoredResource} object using a
* type name and a set of labels. For example, the monitored resource
* descriptor for Google Compute Engine VM instances has a type of
* `"gce_instance"` and specifies the use of the labels `"instance_id"` and
* `"zone"` to identify particular VM instances.
*
* Different APIs can support different monitored resource types. APIs generally
* provide a `list` method that returns the monitored resource descriptors used
* by the API.
*
* @external "google.api.MonitoredResourceDescriptor"
* @property {string} name
* Optional. The resource name of the monitored resource descriptor:
* `"projects/{project_id}/monitoredResourceDescriptors/{type}"` where
* {type} is the value of the `type` field in this object and
* {project_id} is a project ID that provides API-specific context for
* accessing the type. APIs that do not use project information can use the
* resource name format `"monitoredResourceDescriptors/{type}"`.
*
* @property {string} type
* Required. The monitored resource type. For example, the type
* `"cloudsql_database"` represents databases in Google Cloud SQL.
* The maximum length of this value is 256 characters.
*
* @property {string} displayName
* Optional. A concise name for the monitored resource type that might be
* displayed in user interfaces. It should be a Title Cased Noun Phrase,
* without any article or other determiners. For example,
* `"Google Cloud SQL Database"`.
*
* @property {string} description
* Optional. A detailed description of the monitored resource type that might
* be used in documentation.
*
* @property {Object[]} labels
* Required. A set of labels used to describe instances of this monitored
* resource type. For example, an individual Google Cloud SQL database is
* identified by values for the labels `"database_id"` and `"zone"`.
*
* This object should have the same structure as [google.api.LabelDescriptor]{@link external:"google.api.LabelDescriptor"}
*
* @see [google.api.MonitoredResourceDescriptor definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/api/monitored_resource.proto}
*/

/**
* An object representing a resource that can be used for monitoring, logging,
* billing, or other purposes. Examples include virtual machine instances,
* databases, and storage devices such as disks. The `type` field identifies a
* {@link MonitoredResourceDescriptor} object that describes the resource's
* schema. Information in the `labels` field identifies the actual resource and
* its attributes according to the schema. For example, a particular Compute
* Engine VM instance could be represented by the following object, because the
* {@link MonitoredResourceDescriptor} for `"gce_instance"` has labels
* `"instance_id"` and `"zone"`:
*
* { "type": "gce_instance",
* "labels": { "instance_id": "12345678901234",
* "zone": "us-central1-a" }}
*
* @external "google.api.MonitoredResource"
* @property {string} type
* Required. The monitored resource type. This field must match
* the `type` field of a {@link MonitoredResourceDescriptor} object. For
* example, the type of a Cloud SQL database is `"cloudsql_database"`.
*
* @property {Object.<string, string>} labels
* Required. Values for all of the labels listed in the associated monitored
* resource descriptor. For example, Cloud SQL databases use the labels
* `"database_id"` and `"zone"`.
*
* @see [google.api.MonitoredResource definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/api/monitored_resource.proto}
*/
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
/*
* 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.
*/

/**
* A common proto for logging HTTP requests. Only contains semantics
* defined by the HTTP specification. Product-specific logging
* information MUST be defined in a separate message.
*
* @external "google.logging.type.HttpRequest"
* @property {string} requestMethod
* The request method. Examples: `"GET"`, `"HEAD"`, `"PUT"`, `"POST"`.
*
* @property {string} requestUrl
* The scheme (http, https), the host name, the path and the query
* portion of the URL that was requested.
* Example: `"http://example.com/some/info?color=red"`.
*
* @property {number} requestSize
* The size of the HTTP request message in bytes, including the request
* headers and the request body.
*
* @property {number} status
* The response code indicating the status of response.
* Examples: 200, 404.
*
* @property {number} responseSize
* The size of the HTTP response message sent back to the client, in bytes,
* including the response headers and the response body.
*
* @property {string} userAgent
* The user agent sent by the client. Example:
* `"Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Q312461; .NET CLR 1.0.3705)"`.
*
* @property {string} remoteIp
* The IP address (IPv4 or IPv6) of the client that issued the HTTP
* request. Examples: `"192.168.1.1"`, `"FE80::0202:B3FF:FE1E:8329"`.
*
* @property {string} serverIp
* The IP address (IPv4 or IPv6) of the origin server that the request was
* sent to.
*
* @property {string} referer
* The referer URL of the request, as defined in
* [HTTP/1.1 Header Field Definitions](http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html).
*
* @property {Object} latency
* The request processing latency on the server, from the time the request was
* received until the response was sent.
*
* This object should have the same structure as [google.protobuf.Duration]{@link external:"google.protobuf.Duration"}
*
* @property {boolean} cacheLookup
* Whether or not a cache lookup was attempted.
*
* @property {boolean} cacheHit
* Whether or not an entity was served from cache
* (with or without validation).
*
* @property {boolean} cacheValidatedWithOriginServer
* Whether or not the response was validated with the origin server before
* being served from cache. This field is only meaningful if `cache_hit` is
* True.
*
* @property {number} cacheFillBytes
* The number of HTTP response bytes inserted into cache. Set only when a
* cache fill was attempted.
*
* @see [google.logging.type.HttpRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/type/http_request.proto}
*/
121 changes: 121 additions & 0 deletions packages/logging/src/v2/doc/doc_google_protobuf_any.js
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}
*/
Loading

0 comments on commit 0204f13

Please sign in to comment.