├── .gitignore
├── file.go
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── scripts
├── get-protoc-extras
├── get-protoc
└── gen-proto-stubs
├── tools.go
├── javascript
├── chipperpb
│ ├── robotmode.js
│ ├── audioencoding.js
│ ├── intentgraphmode.js
│ ├── intentservice.js
│ ├── languagecode.js
│ ├── speechresult.js
│ ├── connectioncheckresponse.js
│ └── weatherlocation.js
├── jdocspb
│ ├── deletedocresp.js
│ ├── purgeaccountdocsresp.js
│ ├── echoreq.js
│ ├── echoresp.js
│ ├── viewaccountdocsreq.js
│ ├── viewdocsresp.js
│ ├── writedocresp.js
│ ├── deletedocreq.js
│ ├── purgeaccountdocsreq.js
│ ├── jdoc.js
│ └── viewdoc.js
└── tokenpb
│ ├── disassociateprimaryuserrequest.js
│ ├── disassociateprimaryuserresponse.js
│ ├── revokefactorycertificateresponse.js
│ ├── revoketokensresponse.js
│ ├── listrevokedtokensrequest.js
│ ├── revokefactorycertificaterequest.js
│ ├── refreshtokenresponse.js
│ ├── revoketokensrequest.js
│ ├── listrevokedtokensresponse.js
│ ├── associateprimaryuserresponse.js
│ ├── reassociateprimaryuserresponse.js
│ ├── associatesecondaryclientresponse.js
│ ├── refreshtokenrequest.js
│ └── associatesecondaryclientrequest.js
├── go.mod
├── README.md
├── documents
└── contributing
│ ├── style-guide.md
│ ├── how-to-file-an-issue.md
│ ├── CONTRIBUTING.md
│ ├── code_of_conduct.md
│ └── pull-requests.md
├── LICENSE
├── Makefile
└── proto
├── token
└── token.proto
└── jdocs
└── jdocs.proto
/.gitignore:
--------------------------------------------------------------------------------
1 | /bin
2 |
--------------------------------------------------------------------------------
/file.go:
--------------------------------------------------------------------------------
1 | package tools
2 |
--------------------------------------------------------------------------------
/CODE_OF_CONDUCT.md:
--------------------------------------------------------------------------------
1 | # Project Victor Contributor Covenant Code of Conduct
2 |
3 | Please check out the [Code of Conduct](/documents/contributing/code_of_conduct.md) page.
4 |
--------------------------------------------------------------------------------
/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | ## How to Contribute
2 |
3 | For information related to contributing, please check out the
4 | [How to Contribute](/documents/contributing/CONTRIBUTING.md) file in the
5 | 'documents/contributing' folder.
6 |
--------------------------------------------------------------------------------
/scripts/get-protoc-extras:
--------------------------------------------------------------------------------
1 | mkdir -p bin
2 |
3 | PROTO_EXTRAS=https://github.com/protocolbuffers/protobuf/archive/master.zip
4 | ZIP="master.zip"
5 |
6 | wget --no-check-certificate ${PROTO_EXTRAS}
7 | unzip -q master.zip -d bin
8 | mv bin/protobuf-master $1
9 | rm ${ZIP}
--------------------------------------------------------------------------------
/tools.go:
--------------------------------------------------------------------------------
1 | // +build tools
2 |
3 | package tools
4 |
5 | import (
6 | _ "github.com/golang/protobuf/protoc-gen-go"
7 | _ "github.com/grpc-ecosystem/grpc-gateway/protoc-gen-grpc-gateway"
8 | _ "github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger"
9 | )
10 |
--------------------------------------------------------------------------------
/javascript/chipperpb/robotmode.js:
--------------------------------------------------------------------------------
1 | // source: chipperpb.proto
2 | /**
3 | * @fileoverview
4 | * @enhanceable
5 | * @suppress {messageConventions} JS Compiler reports an error if a variable or
6 | * field starts with 'MSG_' and isn't a translatable message.
7 | * @public
8 | */
9 | // GENERATED CODE -- DO NOT EDIT!
10 | /* eslint-disable */
11 | // @ts-nocheck
12 |
13 | goog.provide('proto.chippergrpc2.RobotMode');
14 |
15 | /**
16 | * @enum {number}
17 | */
18 | proto.chippergrpc2.RobotMode = {
19 | VOICE_COMMAND: 0,
20 | GAME: 1
21 | };
22 |
23 |
--------------------------------------------------------------------------------
/javascript/chipperpb/audioencoding.js:
--------------------------------------------------------------------------------
1 | // source: chipperpb.proto
2 | /**
3 | * @fileoverview
4 | * @enhanceable
5 | * @suppress {messageConventions} JS Compiler reports an error if a variable or
6 | * field starts with 'MSG_' and isn't a translatable message.
7 | * @public
8 | */
9 | // GENERATED CODE -- DO NOT EDIT!
10 | /* eslint-disable */
11 | // @ts-nocheck
12 |
13 | goog.provide('proto.chippergrpc2.AudioEncoding');
14 |
15 | /**
16 | * @enum {number}
17 | */
18 | proto.chippergrpc2.AudioEncoding = {
19 | LINEAR_PCM: 0,
20 | OGG_OPUS: 1
21 | };
22 |
23 |
--------------------------------------------------------------------------------
/go.mod:
--------------------------------------------------------------------------------
1 | module github.com/digital-dream-labs/api
2 |
3 | go 1.14
4 |
5 | require (
6 | github.com/golang/protobuf v1.4.2
7 | github.com/grpc-ecosystem/grpc-gateway v1.16.0
8 | github.com/grpc-ecosystem/grpc-gateway/v2 v2.0.0-beta.5
9 | github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e // indirect
10 | google.golang.org/genproto v0.0.0-20200923140941-5646d36feee1
11 | google.golang.org/grpc v1.33.1
12 | google.golang.org/protobuf v1.25.0
13 | gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f // indirect
14 | gopkg.in/yaml.v2 v2.3.0 // indirect
15 | )
16 |
--------------------------------------------------------------------------------
/javascript/chipperpb/intentgraphmode.js:
--------------------------------------------------------------------------------
1 | // source: chipperpb.proto
2 | /**
3 | * @fileoverview
4 | * @enhanceable
5 | * @suppress {messageConventions} JS Compiler reports an error if a variable or
6 | * field starts with 'MSG_' and isn't a translatable message.
7 | * @public
8 | */
9 | // GENERATED CODE -- DO NOT EDIT!
10 | /* eslint-disable */
11 | // @ts-nocheck
12 |
13 | goog.provide('proto.chippergrpc2.IntentGraphMode');
14 |
15 | /**
16 | * @enum {number}
17 | */
18 | proto.chippergrpc2.IntentGraphMode = {
19 | UNKNOWN: 0,
20 | INTENT: 1,
21 | KNOWLEDGE_GRAPH: 2
22 | };
23 |
24 |
--------------------------------------------------------------------------------
/javascript/chipperpb/intentservice.js:
--------------------------------------------------------------------------------
1 | // source: chipperpb.proto
2 | /**
3 | * @fileoverview
4 | * @enhanceable
5 | * @suppress {messageConventions} JS Compiler reports an error if a variable or
6 | * field starts with 'MSG_' and isn't a translatable message.
7 | * @public
8 | */
9 | // GENERATED CODE -- DO NOT EDIT!
10 | /* eslint-disable */
11 | // @ts-nocheck
12 |
13 | goog.provide('proto.chippergrpc2.IntentService');
14 |
15 | /**
16 | * @enum {number}
17 | */
18 | proto.chippergrpc2.IntentService = {
19 | DEFAULT: 0,
20 | DIALOGFLOW: 1,
21 | BING_LUIS: 2,
22 | LEX: 3,
23 | HOUNDIFY: 4
24 | };
25 |
26 |
--------------------------------------------------------------------------------
/javascript/chipperpb/languagecode.js:
--------------------------------------------------------------------------------
1 | // source: chipperpb.proto
2 | /**
3 | * @fileoverview
4 | * @enhanceable
5 | * @suppress {messageConventions} JS Compiler reports an error if a variable or
6 | * field starts with 'MSG_' and isn't a translatable message.
7 | * @public
8 | */
9 | // GENERATED CODE -- DO NOT EDIT!
10 | /* eslint-disable */
11 | // @ts-nocheck
12 |
13 | goog.provide('proto.chippergrpc2.LanguageCode');
14 |
15 | /**
16 | * @enum {number}
17 | */
18 | proto.chippergrpc2.LanguageCode = {
19 | ENGLISH_US: 0,
20 | ENGLISH_UK: 1,
21 | ENGLISH_AU: 2,
22 | GERMAN: 3,
23 | FRENCH: 4
24 | };
25 |
26 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
2 | # API
3 |
4 | [Protocol buffers](https://developers.google.com/protocol-buffers/docs/proto3) for all of the magical back-end services that make vector work!
5 |
6 |
7 | ## Protocol buffers
8 | |Directory| Description |
9 | |--|--|
10 | | proto/chipper | Wire protocol for the voice service |
11 | | proto/jdocs | Wire protocol for the document store service |
12 | | proto/token | Wire protocol for the token service |
13 |
14 | ## Building
15 |
16 | To regenerate protocol buffers:
17 |
18 | ```sh
19 | # make protos
20 | ```
21 |
22 |
23 | ```
24 | // To build an individual proto
25 | make proto dir=proto/chipper file=chipperpb
26 | ```
27 |
--------------------------------------------------------------------------------
/documents/contributing/style-guide.md:
--------------------------------------------------------------------------------
1 | # Style Guide
2 |
3 | The `.proto` files should follow [Google's protobuf style][0] guidelines.
4 |
5 | ## Documentation style
6 |
7 | ### Markdown files
8 |
9 | - The title of the document should use a `#` (in Markdown). Only a single title
10 | (`#`) should be used.
11 | - The heading levels should start with `##` (in Markdown) and grow in order
12 |
13 | Links ought to be relative instead of absolute when linking to documents. That
14 | is to say, the should not include the full domain.
15 | For example `/documents/some-reference/` instead of
16 | `https://randym32.github.io/Anki.Vector.Documentation/some-reference/`
17 |
18 |
19 |
20 |
21 |
22 | [0]: https://developers.google.com/protocol-buffers/docs/style
23 |
--------------------------------------------------------------------------------
/scripts/get-protoc:
--------------------------------------------------------------------------------
1 | #!/bin/bash -e
2 |
3 | # This is a script to download protoc. Rather than depending on the version on
4 | # a developer's machine, always download a specific version.
5 |
6 | VERSION="3.14.0"
7 |
8 | if [ $# -ne 1 ]; then
9 | echo "Usage: ./get-protoc [dest]"
10 | exit 2
11 | fi
12 |
13 | # Use the go tool to determine OS.
14 | OS=$( go env GOOS )
15 |
16 | if [ "$OS" = "darwin" ]; then
17 | OS="osx"
18 | fi
19 |
20 | mkdir -p bin
21 |
22 | ZIP="protoc-${VERSION}-${OS}-x86_64.zip"
23 | URL="https://github.com/google/protobuf/releases/download/v${VERSION}/${ZIP}"
24 |
25 | wget --no-check-certificate ${URL}
26 | # Unpack the protoc binary. Later we might want to grab additional data.
27 | unzip -p ${ZIP} bin/protoc > $1
28 | chmod +x $1
29 | rm ${ZIP}
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2021 Digital Dream Labs
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/scripts/gen-proto-stubs:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | DST_DIR="go"
4 |
5 | gen_proto_stubs() {
6 |
7 | SVC_NAME=$(echo $1 | rev | cut -d'/' -f 1 | rev)
8 |
9 | SVC_DIR=$1
10 | SVC_FILE=$2
11 | API_CONFIG_YAML=$3
12 |
13 | mkdir -p "$DST_DIR/$SVC_NAME"pb
14 | mkdir -p javascript/"$SVC_NAME"pb
15 | mkdir -p csharp/"$SVC_NAME"pb
16 |
17 | echo "Creating Stubs for: $SVC_DIR"
18 | echo "Sending to" "$DST_DIR/$SVC_NAME"pb
19 | if [[ $# -eq 2 ]]; then
20 | ./bin/protoc -I=$(pwd)/$SVC_DIR \
21 | -I="./bin/protobuf/src/" \
22 | --go_out="$DST_DIR/$SVC_NAME"pb \
23 | --go-grpc_out=paths=source_relative:"$DST_DIR/$SVC_NAME"pb \
24 | --csharp_out=./csharp/"$SVC_NAME"pb \
25 | --js_out=./javascript/"$SVC_NAME"pb \
26 | --go_opt=paths=source_relative \
27 | $(pwd)/$SVC_DIR/$SVC_FILE.proto
28 | else
29 | ./bin/protoc -I=$(pwd)/$SVC_DIR \
30 | -I="./bin/protobuf/src/" \
31 | --go_out="$DST_DIR/$SVC_NAME"pb \
32 | --go-grpc_out=paths=source_relative:"$DST_DIR/$SVC_NAME"pb \
33 | --grpc-gateway_out=logtostderr=true,grpc_api_configuration=$SVC_DIR/$SVC_FILE.yaml,allow_delete_body=true,paths=source_relative:"$DST_DIR/$SVC_NAME"pb \
34 | --openapiv2_out=logtostderr=true,grpc_api_configuration=$SVC_DIR/$SVC_FILE.yaml,allow_delete_body=true:./swagger \
35 | --csharp_out=./csharp/"$SVC_NAME"pb \
36 | --js_out=./javascript/"$SVC_NAME"pb \
37 | --go_opt=paths=source_relative \
38 | $(pwd)/$SVC_DIR/$SVC_FILE.proto
39 | fi
40 | }
41 |
42 | REGEX=".*\.proto$"
43 |
44 | walk_files() {
45 | for dir in $(ls $1); do \
46 | for file in $(ls "$1/${dir}"); do \
47 | if [[ ${file} =~ $REGEX ]]; then \
48 | gen_proto_stubs "$1/$dir" $(echo "${file}" | cut -d'.' -f 1)
49 | fi \
50 | done \
51 | done
52 | }
53 |
54 |
55 | "$@"
56 |
--------------------------------------------------------------------------------
/Makefile:
--------------------------------------------------------------------------------
1 | PROTO_DIR = ./proto/*
2 |
3 | .PHONY: protos proto
4 |
5 | legacy-protos: $(PROTO_DIR)
6 | for dir in $^ ; do mkdir -p go/$$(echo $${dir}pb | sed 's/proto\///') ; protoc \
7 | -I ${GOPATH}/src/github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis \
8 | -I ${GOPATH}/src/github.com/golang/protobuf/ptypes/struct \
9 | -I $${dir} \
10 | --proto_path=. \
11 | --go_out=plugins=grpc,paths=source_relative:./go/$$(echo $${dir}pb | sed 's/proto\///') \
12 | --csharp_out=./csharp/$$(echo $${dir}pb | sed 's/proto\///') \
13 | --python_out=./python/$$(echo $${dir}pb | sed 's/proto\///') \
14 | --cpp_out=./cpp/$$(echo $${dir}pb | sed 's/proto\///') \
15 | --js_out=./javascript/$$(echo $${dir}pb | sed 's/proto\///') \
16 | $${dir}/*.proto \
17 | --grpc-gateway_out=paths=source_relative:./go/$$(echo $${dir}pb | sed 's/proto\///') ; done
18 |
19 | # protos: bin/protoc bin/protoc-gen-go bin/protobuf
20 | # @./scripts/gen-proto-stubs walk_files "proto"
21 |
22 | # Generates all protobuf helper files then generates code from proto file passed in
23 | proto: go.mod bin/protoc bin/protoc-gen-go bin/protobuf
24 | @./scripts/gen-proto-stubs gen_proto_stubs $(dir) $(file)
25 |
26 | # make a stubbed go.mod
27 | bin/go.mod:
28 | @echo "// Hey, go mod, keep out!" > bin/go.mod
29 |
30 | # download protoc
31 | bin/protoc: bin/go.mod scripts/get-protoc
32 | @./scripts/get-protoc bin/protoc
33 |
34 | # install protoc
35 | bin/protoc-gen-go:
36 | go install google.golang.org/protobuf/cmd/protoc-gen-go@latest
37 | go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest
38 |
39 | # Unzip protobuf helper files to bin
40 | bin/protobuf: bin/go.mod scripts/get-protoc-extras
41 | @./scripts/get-protoc-extras bin/protobuf
42 |
43 |
44 | # for dir in $^ ;do mkdir -p go/$$(echo $${dir}pb | sed 's/proto\///') ; protoc \
45 | # -I ${GOPATH}/src/github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis \
46 | # -I ${GOPATH}/src/github.com/golang/protobuf/ptypes/struct \
47 | # -I $${dir} \
48 | # --proto_path=. \
49 | # --go-grpc_out=grpc,paths=source_relative:./go/$$(echo $${dir}pb | sed 's/proto\///') \
50 | # --csharp_out=./csharp/$$(echo $${dir}pb | sed 's/proto\///') \
51 | # --python_out=./python/$$(echo $${dir}pb | sed 's/proto\///') \
52 | # --cpp_out=./cpp/$$(echo $${dir}pb | sed 's/proto\///') \
53 | # --js_out=./javascript/$$(echo $${dir}pb | sed 's/proto\///') \
54 | # $${dir}/*.proto \
55 | # --grpc-gateway_out=paths=source_relative:./go/$$(echo $${dir}pb | sed 's/proto\///') ; done
56 |
57 |
--------------------------------------------------------------------------------
/documents/contributing/how-to-file-an-issue.md:
--------------------------------------------------------------------------------
1 | # Issues and Bug Tracking
2 |
3 | ## How to File an Issue
4 |
5 | The GitHub [issue tracker][0] is the preferred channel for bug reports,
6 | documentation, feature requests and [submitting pull requests](pull-requests.md).
7 |
8 | To resolve your issue, please select the appropriate category:
9 |
10 | - Bug Reports
11 | - Documentation
12 | - Feature Requests
13 |
14 | For bug reports, include in your issue:
15 |
16 | - The OS version you are running the software on
17 | - The language (C#, javascript, go, etc) that you are targeting
18 | - A [reproduction](/documents/contributing/how-to-make-a-reproducible-test-case/) for debugging and taking action
19 |
20 | Please do not use the issue tracker for personal support requests.
21 | The [discourse and forums](CONTRIBUTING.md#contact) are the
22 | better places to request help.
23 |
24 |
25 | ## Labelling the issues
26 |
27 | Issue labels are a tool in GitHub that are used to group issues into one or
28 | more categories. Labeling issues helps by identifying:
29 |
30 | - good issues for new contributors to work on
31 | - reported and confirmed bugs
32 | - feature requests
33 | - duplicate issues
34 | - issues that are stalled or blocked
35 | - the status of an open issue
36 | - the topic or subject matter of the issue
37 |
38 | When an issue is created -- and later examined -- this is a good time to check
39 | that its label is sensible, and to add an other labels that are helpful -- and
40 | to remove labels that do not apply.
41 |
42 | You can see a list of this project's [labels (and their descriptions)][1].
43 |
44 |
45 | ## Tracking and Helping with Issues
46 |
47 | If an issue is affecting you, start at the top of this list and complete as many
48 | tasks on the list as you can:
49 |
50 | 1. If there is an issue and you can add more detail, write a comment describing
51 | how the problem is affecting you, OR if you can, write up a work-around or
52 | improvement for the issue
53 | 2. If there _is not_ an issue, write the most complete description of what's
54 | happening
55 | 3. Offer to help fix the issue (and it is totally expected that you ask for
56 | help; open-source maintainers want to help contributors)
57 | 4. [Deliver a well-crafted, tested PR](pull-requests.md)
58 |
59 |
60 |
61 | [0]: https://github.com/digital-dream-labs/api-clients/issues
62 | [1]: https://github.com/digital-dream-labs/api-clients/issues/labels
63 |
64 | _Credits: this was adapted from the
65 | [Gatsbj.js project](https://github.com/gatsbyjs/gatsby/blob/master/docs/contributing/)_
--------------------------------------------------------------------------------
/documents/contributing/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | # Contributing
2 |
3 | Thanks for being interested in contributing! We're so glad you want to help!
4 |
5 | We want contributing to Project Victor to be fun, enjoyable, and educational
6 | for all. We love receiving contributions from our community, all contributions
7 | are welcome.
8 |
9 | There are many ways to contribute. You can also help us by:
10 |
11 | * Answering questions people have have in the forums
12 | * Helping us build and design our website
13 | * Cleaning up our existing documentation, polishing it, fixing our spelling or
14 | grammar mistakes, and so on
15 | * Create new documentation
16 | * Create an example of some changes / fixes/ hacks
17 | * Creating blog posts, and tutorials about one of Vector's many features
18 | * Reviewing submissions
19 | * Contributing bits that can be incorporated into this or related projects.
20 |
21 | Below you will find tips on how to get the most out of your contributing
22 | experience, including GitHub management tips, setup instructions for docs and
23 | code contributions, and more.
24 |
25 |
26 | ## Not sure how to start contributing?
27 |
28 | If you are worried or don't know where to start,
29 | you can reach out with questions to anyone from the
30 | Project Victor team on
31 |
32 | * [**Official Anki developer forums**](https://forums.anki.com/)
33 | * [**Anki robots Discord chat**](https://discord.gg/FT8EYwu)
34 | * [**GitHub Discussions**][9]
35 | is directly integrated with the repository. You can use this to ask for help
36 | or share ideas related to improving the documentation or deploying it.
37 |
38 |
39 | ## How to start contributing and our code of conduct
40 | Below you'll find guides on our community, code of conduct, and how to get
41 | started contributing:
42 |
43 | - [Code of Conduct][0]: Read about what we expect
44 | from everyone participating to make it the most friendly and welcoming
45 | community.
46 | - [Style Guide][1]: The art of contributing, a.k.a.
47 | the detailed requirements that will make it more likely your contribution is
48 | accepted with minimal changes.
49 |
50 |
51 | > By participating in this project, you agree to abide by our [Code of Conduct][0].
52 | > We expect all contributors to follow the [Code of Conduct][0] and to treat
53 | > fellow humans with respect.
54 |
55 |
56 | ## Important Resources
57 |
58 | The important documents and links are on the [front page of the wiki.](../index.md)
59 |
60 | ## Improving Documentation
61 |
62 | If you have a suggestion for the documentation, we ask that you take
63 | a stab at making the changes to the documentation. Simple changes can often be
64 | made without a sophisticated pull release.
65 |
66 | For large fixes, please build and test the documentation before submitting the
67 | pull-request to be sure you haven't accidentally introduced any layout or
68 | formatting issues.
69 |
70 |
71 | ### Whitespace Cleanup
72 |
73 | Don't mix code or documentation changes with whitespace cleanup! If you are
74 | fixing whitespace, include those changes separately from your code changes. If
75 | your request is unreadable due to whitespace changes, it will be rejected.
76 |
77 | > Please submit whitespace cleanups in a separate pull request.
78 |
79 | ## Reorganizing Filesystem / directory tree
80 |
81 | Don't mix rearranging the location and names of files with code or documentation
82 | changes! If you are rearranging the file system, please include those changes
83 | separately from your code changes.
84 |
85 | > Please submit file system changes in a separate pull request.
86 |
87 |
88 | ## Pull Request Process
89 |
90 | Please see the [pull requests page](pull-requests.md) for the process of
91 | submitting your changes to the prooject and incorporating feedback.
92 | are happy with your changes first!
93 |
94 | [0]: code_of_conduct.md
95 | [1]: style-guide.md
96 | [2]: https://egghead.io/series/how-to-contribute-to-an-open-source-project-on-github
97 | [3]: http://makeapullrequest.com/
98 | [4]: http://www.firsttimersonly.com
99 | [5]: https://gist.github.com/Chaser324/ce0505fbed06b947d962
100 | [7]: http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html
101 | [9]: https://github.com/digital-dream-labs/api/discussions)
102 |
103 | _Credits: This page was adapted from an [EmbeddedArtistry template](https://github.com/embeddedartistry/embedded-resources/blob/master/docs/CODE_OF_CONDUCT_template.md)_
104 |
--------------------------------------------------------------------------------
/javascript/jdocspb/deletedocresp.js:
--------------------------------------------------------------------------------
1 | // source: jdocs.proto
2 | /**
3 | * @fileoverview
4 | * @enhanceable
5 | * @suppress {messageConventions} JS Compiler reports an error if a variable or
6 | * field starts with 'MSG_' and isn't a translatable message.
7 | * @public
8 | */
9 | // GENERATED CODE -- DO NOT EDIT!
10 |
11 | goog.provide('proto.jdocspb.DeleteDocResp');
12 |
13 | goog.require('jspb.BinaryReader');
14 | goog.require('jspb.BinaryWriter');
15 | goog.require('jspb.Message');
16 |
17 | /**
18 | * Generated by JsPbCodeGenerator.
19 | * @param {Array=} opt_data Optional initial data array, typically from a
20 | * server response, or constructed directly in Javascript. The array is used
21 | * in place and becomes part of the constructed object. It is not cloned.
22 | * If no data is provided, the constructed object will be empty, but still
23 | * valid.
24 | * @extends {jspb.Message}
25 | * @constructor
26 | */
27 | proto.jdocspb.DeleteDocResp = function(opt_data) {
28 | jspb.Message.initialize(this, opt_data, 0, -1, null, null);
29 | };
30 | goog.inherits(proto.jdocspb.DeleteDocResp, jspb.Message);
31 | if (goog.DEBUG && !COMPILED) {
32 | /**
33 | * @public
34 | * @override
35 | */
36 | proto.jdocspb.DeleteDocResp.displayName = 'proto.jdocspb.DeleteDocResp';
37 | }
38 |
39 |
40 |
41 | if (jspb.Message.GENERATE_TO_OBJECT) {
42 | /**
43 | * Creates an object representation of this proto.
44 | * Field names that are reserved in JavaScript and will be renamed to pb_name.
45 | * Optional fields that are not set will be set to undefined.
46 | * To access a reserved field use, foo.pb_, eg, foo.pb_default.
47 | * For the list of reserved names please see:
48 | * net/proto2/compiler/js/internal/generator.cc#kKeyword.
49 | * @param {boolean=} opt_includeInstance Deprecated. whether to include the
50 | * JSPB instance for transitional soy proto support:
51 | * http://goto/soy-param-migration
52 | * @return {!Object}
53 | */
54 | proto.jdocspb.DeleteDocResp.prototype.toObject = function(opt_includeInstance) {
55 | return proto.jdocspb.DeleteDocResp.toObject(opt_includeInstance, this);
56 | };
57 |
58 |
59 | /**
60 | * Static version of the {@see toObject} method.
61 | * @param {boolean|undefined} includeInstance Deprecated. Whether to include
62 | * the JSPB instance for transitional soy proto support:
63 | * http://goto/soy-param-migration
64 | * @param {!proto.jdocspb.DeleteDocResp} msg The msg instance to transform.
65 | * @return {!Object}
66 | * @suppress {unusedLocalVariables} f is only used for nested messages
67 | */
68 | proto.jdocspb.DeleteDocResp.toObject = function(includeInstance, msg) {
69 | var f, obj = {
70 |
71 | };
72 |
73 | if (includeInstance) {
74 | obj.$jspbMessageInstance = msg;
75 | }
76 | return obj;
77 | };
78 | }
79 |
80 |
81 | /**
82 | * Deserializes binary data (in protobuf wire format).
83 | * @param {jspb.ByteSource} bytes The bytes to deserialize.
84 | * @return {!proto.jdocspb.DeleteDocResp}
85 | */
86 | proto.jdocspb.DeleteDocResp.deserializeBinary = function(bytes) {
87 | var reader = new jspb.BinaryReader(bytes);
88 | var msg = new proto.jdocspb.DeleteDocResp;
89 | return proto.jdocspb.DeleteDocResp.deserializeBinaryFromReader(msg, reader);
90 | };
91 |
92 |
93 | /**
94 | * Deserializes binary data (in protobuf wire format) from the
95 | * given reader into the given message object.
96 | * @param {!proto.jdocspb.DeleteDocResp} msg The message object to deserialize into.
97 | * @param {!jspb.BinaryReader} reader The BinaryReader to use.
98 | * @return {!proto.jdocspb.DeleteDocResp}
99 | */
100 | proto.jdocspb.DeleteDocResp.deserializeBinaryFromReader = function(msg, reader) {
101 | while (reader.nextField()) {
102 | if (reader.isEndGroup()) {
103 | break;
104 | }
105 | var field = reader.getFieldNumber();
106 | switch (field) {
107 | default:
108 | reader.skipField();
109 | break;
110 | }
111 | }
112 | return msg;
113 | };
114 |
115 |
116 | /**
117 | * Serializes the message to binary data (in protobuf wire format).
118 | * @return {!Uint8Array}
119 | */
120 | proto.jdocspb.DeleteDocResp.prototype.serializeBinary = function() {
121 | var writer = new jspb.BinaryWriter();
122 | proto.jdocspb.DeleteDocResp.serializeBinaryToWriter(this, writer);
123 | return writer.getResultBuffer();
124 | };
125 |
126 |
127 | /**
128 | * Serializes the given message to binary data (in protobuf wire
129 | * format), writing to the given BinaryWriter.
130 | * @param {!proto.jdocspb.DeleteDocResp} message
131 | * @param {!jspb.BinaryWriter} writer
132 | * @suppress {unusedLocalVariables} f is only used for nested messages
133 | */
134 | proto.jdocspb.DeleteDocResp.serializeBinaryToWriter = function(message, writer) {
135 | var f = undefined;
136 | };
137 |
138 |
139 |
--------------------------------------------------------------------------------
/javascript/jdocspb/purgeaccountdocsresp.js:
--------------------------------------------------------------------------------
1 | // source: jdocs.proto
2 | /**
3 | * @fileoverview
4 | * @enhanceable
5 | * @suppress {messageConventions} JS Compiler reports an error if a variable or
6 | * field starts with 'MSG_' and isn't a translatable message.
7 | * @public
8 | */
9 | // GENERATED CODE -- DO NOT EDIT!
10 |
11 | goog.provide('proto.jdocspb.PurgeAccountDocsResp');
12 |
13 | goog.require('jspb.BinaryReader');
14 | goog.require('jspb.BinaryWriter');
15 | goog.require('jspb.Message');
16 |
17 | /**
18 | * Generated by JsPbCodeGenerator.
19 | * @param {Array=} opt_data Optional initial data array, typically from a
20 | * server response, or constructed directly in Javascript. The array is used
21 | * in place and becomes part of the constructed object. It is not cloned.
22 | * If no data is provided, the constructed object will be empty, but still
23 | * valid.
24 | * @extends {jspb.Message}
25 | * @constructor
26 | */
27 | proto.jdocspb.PurgeAccountDocsResp = function(opt_data) {
28 | jspb.Message.initialize(this, opt_data, 0, -1, null, null);
29 | };
30 | goog.inherits(proto.jdocspb.PurgeAccountDocsResp, jspb.Message);
31 | if (goog.DEBUG && !COMPILED) {
32 | /**
33 | * @public
34 | * @override
35 | */
36 | proto.jdocspb.PurgeAccountDocsResp.displayName = 'proto.jdocspb.PurgeAccountDocsResp';
37 | }
38 |
39 |
40 |
41 | if (jspb.Message.GENERATE_TO_OBJECT) {
42 | /**
43 | * Creates an object representation of this proto.
44 | * Field names that are reserved in JavaScript and will be renamed to pb_name.
45 | * Optional fields that are not set will be set to undefined.
46 | * To access a reserved field use, foo.pb_, eg, foo.pb_default.
47 | * For the list of reserved names please see:
48 | * net/proto2/compiler/js/internal/generator.cc#kKeyword.
49 | * @param {boolean=} opt_includeInstance Deprecated. whether to include the
50 | * JSPB instance for transitional soy proto support:
51 | * http://goto/soy-param-migration
52 | * @return {!Object}
53 | */
54 | proto.jdocspb.PurgeAccountDocsResp.prototype.toObject = function(opt_includeInstance) {
55 | return proto.jdocspb.PurgeAccountDocsResp.toObject(opt_includeInstance, this);
56 | };
57 |
58 |
59 | /**
60 | * Static version of the {@see toObject} method.
61 | * @param {boolean|undefined} includeInstance Deprecated. Whether to include
62 | * the JSPB instance for transitional soy proto support:
63 | * http://goto/soy-param-migration
64 | * @param {!proto.jdocspb.PurgeAccountDocsResp} msg The msg instance to transform.
65 | * @return {!Object}
66 | * @suppress {unusedLocalVariables} f is only used for nested messages
67 | */
68 | proto.jdocspb.PurgeAccountDocsResp.toObject = function(includeInstance, msg) {
69 | var f, obj = {
70 |
71 | };
72 |
73 | if (includeInstance) {
74 | obj.$jspbMessageInstance = msg;
75 | }
76 | return obj;
77 | };
78 | }
79 |
80 |
81 | /**
82 | * Deserializes binary data (in protobuf wire format).
83 | * @param {jspb.ByteSource} bytes The bytes to deserialize.
84 | * @return {!proto.jdocspb.PurgeAccountDocsResp}
85 | */
86 | proto.jdocspb.PurgeAccountDocsResp.deserializeBinary = function(bytes) {
87 | var reader = new jspb.BinaryReader(bytes);
88 | var msg = new proto.jdocspb.PurgeAccountDocsResp;
89 | return proto.jdocspb.PurgeAccountDocsResp.deserializeBinaryFromReader(msg, reader);
90 | };
91 |
92 |
93 | /**
94 | * Deserializes binary data (in protobuf wire format) from the
95 | * given reader into the given message object.
96 | * @param {!proto.jdocspb.PurgeAccountDocsResp} msg The message object to deserialize into.
97 | * @param {!jspb.BinaryReader} reader The BinaryReader to use.
98 | * @return {!proto.jdocspb.PurgeAccountDocsResp}
99 | */
100 | proto.jdocspb.PurgeAccountDocsResp.deserializeBinaryFromReader = function(msg, reader) {
101 | while (reader.nextField()) {
102 | if (reader.isEndGroup()) {
103 | break;
104 | }
105 | var field = reader.getFieldNumber();
106 | switch (field) {
107 | default:
108 | reader.skipField();
109 | break;
110 | }
111 | }
112 | return msg;
113 | };
114 |
115 |
116 | /**
117 | * Serializes the message to binary data (in protobuf wire format).
118 | * @return {!Uint8Array}
119 | */
120 | proto.jdocspb.PurgeAccountDocsResp.prototype.serializeBinary = function() {
121 | var writer = new jspb.BinaryWriter();
122 | proto.jdocspb.PurgeAccountDocsResp.serializeBinaryToWriter(this, writer);
123 | return writer.getResultBuffer();
124 | };
125 |
126 |
127 | /**
128 | * Serializes the given message to binary data (in protobuf wire
129 | * format), writing to the given BinaryWriter.
130 | * @param {!proto.jdocspb.PurgeAccountDocsResp} message
131 | * @param {!jspb.BinaryWriter} writer
132 | * @suppress {unusedLocalVariables} f is only used for nested messages
133 | */
134 | proto.jdocspb.PurgeAccountDocsResp.serializeBinaryToWriter = function(message, writer) {
135 | var f = undefined;
136 | };
137 |
138 |
139 |
--------------------------------------------------------------------------------
/javascript/tokenpb/disassociateprimaryuserrequest.js:
--------------------------------------------------------------------------------
1 | // source: token.proto
2 | /**
3 | * @fileoverview
4 | * @enhanceable
5 | * @suppress {messageConventions} JS Compiler reports an error if a variable or
6 | * field starts with 'MSG_' and isn't a translatable message.
7 | * @public
8 | */
9 | // GENERATED CODE -- DO NOT EDIT!
10 |
11 | goog.provide('proto.tokenpb.DisassociatePrimaryUserRequest');
12 |
13 | goog.require('jspb.BinaryReader');
14 | goog.require('jspb.BinaryWriter');
15 | goog.require('jspb.Message');
16 |
17 | /**
18 | * Generated by JsPbCodeGenerator.
19 | * @param {Array=} opt_data Optional initial data array, typically from a
20 | * server response, or constructed directly in Javascript. The array is used
21 | * in place and becomes part of the constructed object. It is not cloned.
22 | * If no data is provided, the constructed object will be empty, but still
23 | * valid.
24 | * @extends {jspb.Message}
25 | * @constructor
26 | */
27 | proto.tokenpb.DisassociatePrimaryUserRequest = function(opt_data) {
28 | jspb.Message.initialize(this, opt_data, 0, -1, null, null);
29 | };
30 | goog.inherits(proto.tokenpb.DisassociatePrimaryUserRequest, jspb.Message);
31 | if (goog.DEBUG && !COMPILED) {
32 | /**
33 | * @public
34 | * @override
35 | */
36 | proto.tokenpb.DisassociatePrimaryUserRequest.displayName = 'proto.tokenpb.DisassociatePrimaryUserRequest';
37 | }
38 |
39 |
40 |
41 | if (jspb.Message.GENERATE_TO_OBJECT) {
42 | /**
43 | * Creates an object representation of this proto.
44 | * Field names that are reserved in JavaScript and will be renamed to pb_name.
45 | * Optional fields that are not set will be set to undefined.
46 | * To access a reserved field use, foo.pb_, eg, foo.pb_default.
47 | * For the list of reserved names please see:
48 | * net/proto2/compiler/js/internal/generator.cc#kKeyword.
49 | * @param {boolean=} opt_includeInstance Deprecated. whether to include the
50 | * JSPB instance for transitional soy proto support:
51 | * http://goto/soy-param-migration
52 | * @return {!Object}
53 | */
54 | proto.tokenpb.DisassociatePrimaryUserRequest.prototype.toObject = function(opt_includeInstance) {
55 | return proto.tokenpb.DisassociatePrimaryUserRequest.toObject(opt_includeInstance, this);
56 | };
57 |
58 |
59 | /**
60 | * Static version of the {@see toObject} method.
61 | * @param {boolean|undefined} includeInstance Deprecated. Whether to include
62 | * the JSPB instance for transitional soy proto support:
63 | * http://goto/soy-param-migration
64 | * @param {!proto.tokenpb.DisassociatePrimaryUserRequest} msg The msg instance to transform.
65 | * @return {!Object}
66 | * @suppress {unusedLocalVariables} f is only used for nested messages
67 | */
68 | proto.tokenpb.DisassociatePrimaryUserRequest.toObject = function(includeInstance, msg) {
69 | var f, obj = {
70 |
71 | };
72 |
73 | if (includeInstance) {
74 | obj.$jspbMessageInstance = msg;
75 | }
76 | return obj;
77 | };
78 | }
79 |
80 |
81 | /**
82 | * Deserializes binary data (in protobuf wire format).
83 | * @param {jspb.ByteSource} bytes The bytes to deserialize.
84 | * @return {!proto.tokenpb.DisassociatePrimaryUserRequest}
85 | */
86 | proto.tokenpb.DisassociatePrimaryUserRequest.deserializeBinary = function(bytes) {
87 | var reader = new jspb.BinaryReader(bytes);
88 | var msg = new proto.tokenpb.DisassociatePrimaryUserRequest;
89 | return proto.tokenpb.DisassociatePrimaryUserRequest.deserializeBinaryFromReader(msg, reader);
90 | };
91 |
92 |
93 | /**
94 | * Deserializes binary data (in protobuf wire format) from the
95 | * given reader into the given message object.
96 | * @param {!proto.tokenpb.DisassociatePrimaryUserRequest} msg The message object to deserialize into.
97 | * @param {!jspb.BinaryReader} reader The BinaryReader to use.
98 | * @return {!proto.tokenpb.DisassociatePrimaryUserRequest}
99 | */
100 | proto.tokenpb.DisassociatePrimaryUserRequest.deserializeBinaryFromReader = function(msg, reader) {
101 | while (reader.nextField()) {
102 | if (reader.isEndGroup()) {
103 | break;
104 | }
105 | var field = reader.getFieldNumber();
106 | switch (field) {
107 | default:
108 | reader.skipField();
109 | break;
110 | }
111 | }
112 | return msg;
113 | };
114 |
115 |
116 | /**
117 | * Serializes the message to binary data (in protobuf wire format).
118 | * @return {!Uint8Array}
119 | */
120 | proto.tokenpb.DisassociatePrimaryUserRequest.prototype.serializeBinary = function() {
121 | var writer = new jspb.BinaryWriter();
122 | proto.tokenpb.DisassociatePrimaryUserRequest.serializeBinaryToWriter(this, writer);
123 | return writer.getResultBuffer();
124 | };
125 |
126 |
127 | /**
128 | * Serializes the given message to binary data (in protobuf wire
129 | * format), writing to the given BinaryWriter.
130 | * @param {!proto.tokenpb.DisassociatePrimaryUserRequest} message
131 | * @param {!jspb.BinaryWriter} writer
132 | * @suppress {unusedLocalVariables} f is only used for nested messages
133 | */
134 | proto.tokenpb.DisassociatePrimaryUserRequest.serializeBinaryToWriter = function(message, writer) {
135 | var f = undefined;
136 | };
137 |
138 |
139 |
--------------------------------------------------------------------------------
/javascript/tokenpb/disassociateprimaryuserresponse.js:
--------------------------------------------------------------------------------
1 | // source: token.proto
2 | /**
3 | * @fileoverview
4 | * @enhanceable
5 | * @suppress {messageConventions} JS Compiler reports an error if a variable or
6 | * field starts with 'MSG_' and isn't a translatable message.
7 | * @public
8 | */
9 | // GENERATED CODE -- DO NOT EDIT!
10 |
11 | goog.provide('proto.tokenpb.DisassociatePrimaryUserResponse');
12 |
13 | goog.require('jspb.BinaryReader');
14 | goog.require('jspb.BinaryWriter');
15 | goog.require('jspb.Message');
16 |
17 | /**
18 | * Generated by JsPbCodeGenerator.
19 | * @param {Array=} opt_data Optional initial data array, typically from a
20 | * server response, or constructed directly in Javascript. The array is used
21 | * in place and becomes part of the constructed object. It is not cloned.
22 | * If no data is provided, the constructed object will be empty, but still
23 | * valid.
24 | * @extends {jspb.Message}
25 | * @constructor
26 | */
27 | proto.tokenpb.DisassociatePrimaryUserResponse = function(opt_data) {
28 | jspb.Message.initialize(this, opt_data, 0, -1, null, null);
29 | };
30 | goog.inherits(proto.tokenpb.DisassociatePrimaryUserResponse, jspb.Message);
31 | if (goog.DEBUG && !COMPILED) {
32 | /**
33 | * @public
34 | * @override
35 | */
36 | proto.tokenpb.DisassociatePrimaryUserResponse.displayName = 'proto.tokenpb.DisassociatePrimaryUserResponse';
37 | }
38 |
39 |
40 |
41 | if (jspb.Message.GENERATE_TO_OBJECT) {
42 | /**
43 | * Creates an object representation of this proto.
44 | * Field names that are reserved in JavaScript and will be renamed to pb_name.
45 | * Optional fields that are not set will be set to undefined.
46 | * To access a reserved field use, foo.pb_, eg, foo.pb_default.
47 | * For the list of reserved names please see:
48 | * net/proto2/compiler/js/internal/generator.cc#kKeyword.
49 | * @param {boolean=} opt_includeInstance Deprecated. whether to include the
50 | * JSPB instance for transitional soy proto support:
51 | * http://goto/soy-param-migration
52 | * @return {!Object}
53 | */
54 | proto.tokenpb.DisassociatePrimaryUserResponse.prototype.toObject = function(opt_includeInstance) {
55 | return proto.tokenpb.DisassociatePrimaryUserResponse.toObject(opt_includeInstance, this);
56 | };
57 |
58 |
59 | /**
60 | * Static version of the {@see toObject} method.
61 | * @param {boolean|undefined} includeInstance Deprecated. Whether to include
62 | * the JSPB instance for transitional soy proto support:
63 | * http://goto/soy-param-migration
64 | * @param {!proto.tokenpb.DisassociatePrimaryUserResponse} msg The msg instance to transform.
65 | * @return {!Object}
66 | * @suppress {unusedLocalVariables} f is only used for nested messages
67 | */
68 | proto.tokenpb.DisassociatePrimaryUserResponse.toObject = function(includeInstance, msg) {
69 | var f, obj = {
70 |
71 | };
72 |
73 | if (includeInstance) {
74 | obj.$jspbMessageInstance = msg;
75 | }
76 | return obj;
77 | };
78 | }
79 |
80 |
81 | /**
82 | * Deserializes binary data (in protobuf wire format).
83 | * @param {jspb.ByteSource} bytes The bytes to deserialize.
84 | * @return {!proto.tokenpb.DisassociatePrimaryUserResponse}
85 | */
86 | proto.tokenpb.DisassociatePrimaryUserResponse.deserializeBinary = function(bytes) {
87 | var reader = new jspb.BinaryReader(bytes);
88 | var msg = new proto.tokenpb.DisassociatePrimaryUserResponse;
89 | return proto.tokenpb.DisassociatePrimaryUserResponse.deserializeBinaryFromReader(msg, reader);
90 | };
91 |
92 |
93 | /**
94 | * Deserializes binary data (in protobuf wire format) from the
95 | * given reader into the given message object.
96 | * @param {!proto.tokenpb.DisassociatePrimaryUserResponse} msg The message object to deserialize into.
97 | * @param {!jspb.BinaryReader} reader The BinaryReader to use.
98 | * @return {!proto.tokenpb.DisassociatePrimaryUserResponse}
99 | */
100 | proto.tokenpb.DisassociatePrimaryUserResponse.deserializeBinaryFromReader = function(msg, reader) {
101 | while (reader.nextField()) {
102 | if (reader.isEndGroup()) {
103 | break;
104 | }
105 | var field = reader.getFieldNumber();
106 | switch (field) {
107 | default:
108 | reader.skipField();
109 | break;
110 | }
111 | }
112 | return msg;
113 | };
114 |
115 |
116 | /**
117 | * Serializes the message to binary data (in protobuf wire format).
118 | * @return {!Uint8Array}
119 | */
120 | proto.tokenpb.DisassociatePrimaryUserResponse.prototype.serializeBinary = function() {
121 | var writer = new jspb.BinaryWriter();
122 | proto.tokenpb.DisassociatePrimaryUserResponse.serializeBinaryToWriter(this, writer);
123 | return writer.getResultBuffer();
124 | };
125 |
126 |
127 | /**
128 | * Serializes the given message to binary data (in protobuf wire
129 | * format), writing to the given BinaryWriter.
130 | * @param {!proto.tokenpb.DisassociatePrimaryUserResponse} message
131 | * @param {!jspb.BinaryWriter} writer
132 | * @suppress {unusedLocalVariables} f is only used for nested messages
133 | */
134 | proto.tokenpb.DisassociatePrimaryUserResponse.serializeBinaryToWriter = function(message, writer) {
135 | var f = undefined;
136 | };
137 |
138 |
139 |
--------------------------------------------------------------------------------
/javascript/tokenpb/revokefactorycertificateresponse.js:
--------------------------------------------------------------------------------
1 | // source: token.proto
2 | /**
3 | * @fileoverview
4 | * @enhanceable
5 | * @suppress {messageConventions} JS Compiler reports an error if a variable or
6 | * field starts with 'MSG_' and isn't a translatable message.
7 | * @public
8 | */
9 | // GENERATED CODE -- DO NOT EDIT!
10 |
11 | goog.provide('proto.tokenpb.RevokeFactoryCertificateResponse');
12 |
13 | goog.require('jspb.BinaryReader');
14 | goog.require('jspb.BinaryWriter');
15 | goog.require('jspb.Message');
16 |
17 | /**
18 | * Generated by JsPbCodeGenerator.
19 | * @param {Array=} opt_data Optional initial data array, typically from a
20 | * server response, or constructed directly in Javascript. The array is used
21 | * in place and becomes part of the constructed object. It is not cloned.
22 | * If no data is provided, the constructed object will be empty, but still
23 | * valid.
24 | * @extends {jspb.Message}
25 | * @constructor
26 | */
27 | proto.tokenpb.RevokeFactoryCertificateResponse = function(opt_data) {
28 | jspb.Message.initialize(this, opt_data, 0, -1, null, null);
29 | };
30 | goog.inherits(proto.tokenpb.RevokeFactoryCertificateResponse, jspb.Message);
31 | if (goog.DEBUG && !COMPILED) {
32 | /**
33 | * @public
34 | * @override
35 | */
36 | proto.tokenpb.RevokeFactoryCertificateResponse.displayName = 'proto.tokenpb.RevokeFactoryCertificateResponse';
37 | }
38 |
39 |
40 |
41 | if (jspb.Message.GENERATE_TO_OBJECT) {
42 | /**
43 | * Creates an object representation of this proto.
44 | * Field names that are reserved in JavaScript and will be renamed to pb_name.
45 | * Optional fields that are not set will be set to undefined.
46 | * To access a reserved field use, foo.pb_, eg, foo.pb_default.
47 | * For the list of reserved names please see:
48 | * net/proto2/compiler/js/internal/generator.cc#kKeyword.
49 | * @param {boolean=} opt_includeInstance Deprecated. whether to include the
50 | * JSPB instance for transitional soy proto support:
51 | * http://goto/soy-param-migration
52 | * @return {!Object}
53 | */
54 | proto.tokenpb.RevokeFactoryCertificateResponse.prototype.toObject = function(opt_includeInstance) {
55 | return proto.tokenpb.RevokeFactoryCertificateResponse.toObject(opt_includeInstance, this);
56 | };
57 |
58 |
59 | /**
60 | * Static version of the {@see toObject} method.
61 | * @param {boolean|undefined} includeInstance Deprecated. Whether to include
62 | * the JSPB instance for transitional soy proto support:
63 | * http://goto/soy-param-migration
64 | * @param {!proto.tokenpb.RevokeFactoryCertificateResponse} msg The msg instance to transform.
65 | * @return {!Object}
66 | * @suppress {unusedLocalVariables} f is only used for nested messages
67 | */
68 | proto.tokenpb.RevokeFactoryCertificateResponse.toObject = function(includeInstance, msg) {
69 | var f, obj = {
70 |
71 | };
72 |
73 | if (includeInstance) {
74 | obj.$jspbMessageInstance = msg;
75 | }
76 | return obj;
77 | };
78 | }
79 |
80 |
81 | /**
82 | * Deserializes binary data (in protobuf wire format).
83 | * @param {jspb.ByteSource} bytes The bytes to deserialize.
84 | * @return {!proto.tokenpb.RevokeFactoryCertificateResponse}
85 | */
86 | proto.tokenpb.RevokeFactoryCertificateResponse.deserializeBinary = function(bytes) {
87 | var reader = new jspb.BinaryReader(bytes);
88 | var msg = new proto.tokenpb.RevokeFactoryCertificateResponse;
89 | return proto.tokenpb.RevokeFactoryCertificateResponse.deserializeBinaryFromReader(msg, reader);
90 | };
91 |
92 |
93 | /**
94 | * Deserializes binary data (in protobuf wire format) from the
95 | * given reader into the given message object.
96 | * @param {!proto.tokenpb.RevokeFactoryCertificateResponse} msg The message object to deserialize into.
97 | * @param {!jspb.BinaryReader} reader The BinaryReader to use.
98 | * @return {!proto.tokenpb.RevokeFactoryCertificateResponse}
99 | */
100 | proto.tokenpb.RevokeFactoryCertificateResponse.deserializeBinaryFromReader = function(msg, reader) {
101 | while (reader.nextField()) {
102 | if (reader.isEndGroup()) {
103 | break;
104 | }
105 | var field = reader.getFieldNumber();
106 | switch (field) {
107 | default:
108 | reader.skipField();
109 | break;
110 | }
111 | }
112 | return msg;
113 | };
114 |
115 |
116 | /**
117 | * Serializes the message to binary data (in protobuf wire format).
118 | * @return {!Uint8Array}
119 | */
120 | proto.tokenpb.RevokeFactoryCertificateResponse.prototype.serializeBinary = function() {
121 | var writer = new jspb.BinaryWriter();
122 | proto.tokenpb.RevokeFactoryCertificateResponse.serializeBinaryToWriter(this, writer);
123 | return writer.getResultBuffer();
124 | };
125 |
126 |
127 | /**
128 | * Serializes the given message to binary data (in protobuf wire
129 | * format), writing to the given BinaryWriter.
130 | * @param {!proto.tokenpb.RevokeFactoryCertificateResponse} message
131 | * @param {!jspb.BinaryWriter} writer
132 | * @suppress {unusedLocalVariables} f is only used for nested messages
133 | */
134 | proto.tokenpb.RevokeFactoryCertificateResponse.serializeBinaryToWriter = function(message, writer) {
135 | var f = undefined;
136 | };
137 |
138 |
139 |
--------------------------------------------------------------------------------
/proto/token/token.proto:
--------------------------------------------------------------------------------
1 | syntax = "proto3";
2 |
3 | package tokenpb;
4 | option go_package = "github.com/digital-dream-labs/api/go/tokenpb";
5 |
6 | service Token {
7 |
8 | //
9 | // Robot Calls
10 | //
11 |
12 | // AssociatePrimaryUser
13 | // Authentication: cert + appkey + user session
14 | //
15 | // Sets the owner of a robot, issuing an access token for further
16 | // access and a client token for Chewy. Requires a valid user
17 | // session and revokes all previously existing tokens. The identity
18 | // of the robot is derived from the CN of the robot factory
19 | // certificate.
20 | rpc AssociatePrimaryUser(AssociatePrimaryUserRequest) returns (AssociatePrimaryUserResponse);
21 |
22 | // ReassociatePrimaryUser
23 | // Authentication: cert + appkey + user session
24 | //
25 | // TODO - documentation
26 | rpc ReassociatePrimaryUser(ReassociatePrimaryUserRequest) returns (ReassociatePrimaryUserResponse);
27 |
28 | // AssociateSecondaryClient
29 | // Authentication: cert + appkey + token
30 | //
31 | // Associates a secondary app for the primary user, generating a
32 | // client token for the secondary app to use. Associating a
33 | // non-primary user is not currently supported.
34 | rpc AssociateSecondaryClient(AssociateSecondaryClientRequest) returns (AssociateSecondaryClientResponse);
35 |
36 | // DisassociatePrimaryUser
37 | // Authentication: cert + token
38 | //
39 | // Remove the primary user's access from the robot - immediately
40 | // revokes all access tokens for robot.
41 | rpc DisassociatePrimaryUser(DisassociatePrimaryUserRequest) returns (DisassociatePrimaryUserResponse);
42 |
43 | // RefreshToken
44 | // Authentication: cert + token
45 | //
46 | // Refresh an existing access token. The access token may be
47 | // refreshed for up to one year, as long as it has not been revoked
48 | // (e.g. by DisassociatePrimaryUser).
49 | rpc RefreshToken(RefreshTokenRequest) returns (RefreshTokenResponse);
50 |
51 | //
52 | // Service Calls
53 | //
54 |
55 | // ListRevokedTokens
56 | // Authentication: appkey
57 | //
58 | // Lists all currently revoked tokens, for populating the cache of
59 | // revoked tokens in each service which handles token-based
60 | // authentication. Only callable by other services (e.g. Chipper,
61 | // Jdocs, etc...)
62 | rpc ListRevokedTokens(ListRevokedTokensRequest) returns (ListRevokedTokensResponse);
63 |
64 | //
65 | // Admin calls
66 | //
67 |
68 | // RevokeFactoryCertificate
69 | // Authentication: cert + appkey (TBD, admin only)
70 | //
71 | // RevokeFactoryCertificate blacklists one of the factory-issued
72 | // robot certificates.
73 | rpc RevokeFactoryCertificate(RevokeFactoryCertificateRequest) returns (RevokeFactoryCertificateResponse);
74 |
75 | // RevokeTokens
76 | // Authentication: cert + appkey (TBD, admin only)
77 | //
78 | // Revoke tokens matching a user or robot.
79 | rpc RevokeTokens(RevokeTokensRequest) returns (RevokeTokensResponse);
80 | }
81 |
82 | //
83 | // Shared types
84 | //
85 |
86 | message TokenBundle {
87 | string token = 1;
88 | string client_token = 2;
89 | //string sts_token = 3;
90 | StsToken sts_token = 4;
91 | }
92 |
93 | message StsToken {
94 | string access_key_id = 1;
95 | string secret_access_key = 2;
96 | string session_token = 3;
97 | string expiration = 4;
98 | }
99 |
100 | message AssociatePrimaryUserRequest {
101 | // string robot_id = 1;
102 | // string user_session = 2;
103 | bool generate_sts_token = 3;
104 | bytes session_certificate = 4;
105 | string client_name = 5;
106 | string app_id = 6;
107 | bool skip_client_token = 7;
108 | bool revoke_client_tokens = 8;
109 | uint32 expiration_minutes = 9;
110 | }
111 |
112 | message ReassociatePrimaryUserRequest {
113 | bool generate_sts_token = 1;
114 | string client_name = 2;
115 | string app_id = 3;
116 | bool skip_client_token = 4;
117 | uint32 expiration_minutes = 5;
118 | }
119 |
120 | message ReassociatePrimaryUserResponse {
121 | TokenBundle data = 1;
122 | }
123 |
124 | message AssociatePrimaryUserResponse {
125 | TokenBundle data = 1;
126 | }
127 |
128 | message AssociateSecondaryClientRequest {
129 | // string token = 1;
130 | string user_session = 2;
131 | string client_name = 3;
132 | string app_id = 4;
133 | }
134 |
135 | message AssociateSecondaryClientResponse {
136 | TokenBundle data = 1;
137 | }
138 |
139 | message DisassociatePrimaryUserRequest {
140 | // string token = 1;
141 | }
142 |
143 | message DisassociatePrimaryUserResponse {}
144 |
145 | message RefreshTokenRequest {
146 | // string token = 1;
147 | bool refresh_jwt_tokens = 2;
148 | bool refresh_sts_tokens = 3;
149 | uint32 expiration_minutes = 4;
150 | }
151 |
152 | message RefreshTokenResponse {
153 | TokenBundle data = 1;
154 | }
155 |
156 | message TokensPage {
157 | repeated string tokens = 1;
158 | string last_key = 2;
159 | bool done = 3;
160 | }
161 |
162 | message ListRevokedTokensRequest {
163 | string previous_key = 1;
164 | }
165 |
166 | message ListRevokedTokensResponse {
167 | TokensPage data = 1;
168 | }
169 |
170 | message RevokeFactoryCertificateRequest {
171 | string certificate_id = 1;
172 | }
173 |
174 | message RevokeFactoryCertificateResponse {}
175 |
176 | message RevokeTokensRequest {
177 | string search_by_index = 1;
178 | string key = 2;
179 | }
180 |
181 | message RevokeTokensResponse {
182 | uint32 tokens_revoked = 1;
183 | }
184 |
--------------------------------------------------------------------------------
/javascript/jdocspb/echoreq.js:
--------------------------------------------------------------------------------
1 | // source: jdocs.proto
2 | /**
3 | * @fileoverview
4 | * @enhanceable
5 | * @suppress {messageConventions} JS Compiler reports an error if a variable or
6 | * field starts with 'MSG_' and isn't a translatable message.
7 | * @public
8 | */
9 | // GENERATED CODE -- DO NOT EDIT!
10 |
11 | goog.provide('proto.jdocspb.EchoReq');
12 |
13 | goog.require('jspb.BinaryReader');
14 | goog.require('jspb.BinaryWriter');
15 | goog.require('jspb.Message');
16 |
17 | /**
18 | * Generated by JsPbCodeGenerator.
19 | * @param {Array=} opt_data Optional initial data array, typically from a
20 | * server response, or constructed directly in Javascript. The array is used
21 | * in place and becomes part of the constructed object. It is not cloned.
22 | * If no data is provided, the constructed object will be empty, but still
23 | * valid.
24 | * @extends {jspb.Message}
25 | * @constructor
26 | */
27 | proto.jdocspb.EchoReq = function(opt_data) {
28 | jspb.Message.initialize(this, opt_data, 0, -1, null, null);
29 | };
30 | goog.inherits(proto.jdocspb.EchoReq, jspb.Message);
31 | if (goog.DEBUG && !COMPILED) {
32 | /**
33 | * @public
34 | * @override
35 | */
36 | proto.jdocspb.EchoReq.displayName = 'proto.jdocspb.EchoReq';
37 | }
38 |
39 |
40 |
41 | if (jspb.Message.GENERATE_TO_OBJECT) {
42 | /**
43 | * Creates an object representation of this proto.
44 | * Field names that are reserved in JavaScript and will be renamed to pb_name.
45 | * Optional fields that are not set will be set to undefined.
46 | * To access a reserved field use, foo.pb_, eg, foo.pb_default.
47 | * For the list of reserved names please see:
48 | * net/proto2/compiler/js/internal/generator.cc#kKeyword.
49 | * @param {boolean=} opt_includeInstance Deprecated. whether to include the
50 | * JSPB instance for transitional soy proto support:
51 | * http://goto/soy-param-migration
52 | * @return {!Object}
53 | */
54 | proto.jdocspb.EchoReq.prototype.toObject = function(opt_includeInstance) {
55 | return proto.jdocspb.EchoReq.toObject(opt_includeInstance, this);
56 | };
57 |
58 |
59 | /**
60 | * Static version of the {@see toObject} method.
61 | * @param {boolean|undefined} includeInstance Deprecated. Whether to include
62 | * the JSPB instance for transitional soy proto support:
63 | * http://goto/soy-param-migration
64 | * @param {!proto.jdocspb.EchoReq} msg The msg instance to transform.
65 | * @return {!Object}
66 | * @suppress {unusedLocalVariables} f is only used for nested messages
67 | */
68 | proto.jdocspb.EchoReq.toObject = function(includeInstance, msg) {
69 | var f, obj = {
70 | data: jspb.Message.getFieldWithDefault(msg, 1, "")
71 | };
72 |
73 | if (includeInstance) {
74 | obj.$jspbMessageInstance = msg;
75 | }
76 | return obj;
77 | };
78 | }
79 |
80 |
81 | /**
82 | * Deserializes binary data (in protobuf wire format).
83 | * @param {jspb.ByteSource} bytes The bytes to deserialize.
84 | * @return {!proto.jdocspb.EchoReq}
85 | */
86 | proto.jdocspb.EchoReq.deserializeBinary = function(bytes) {
87 | var reader = new jspb.BinaryReader(bytes);
88 | var msg = new proto.jdocspb.EchoReq;
89 | return proto.jdocspb.EchoReq.deserializeBinaryFromReader(msg, reader);
90 | };
91 |
92 |
93 | /**
94 | * Deserializes binary data (in protobuf wire format) from the
95 | * given reader into the given message object.
96 | * @param {!proto.jdocspb.EchoReq} msg The message object to deserialize into.
97 | * @param {!jspb.BinaryReader} reader The BinaryReader to use.
98 | * @return {!proto.jdocspb.EchoReq}
99 | */
100 | proto.jdocspb.EchoReq.deserializeBinaryFromReader = function(msg, reader) {
101 | while (reader.nextField()) {
102 | if (reader.isEndGroup()) {
103 | break;
104 | }
105 | var field = reader.getFieldNumber();
106 | switch (field) {
107 | case 1:
108 | var value = /** @type {string} */ (reader.readString());
109 | msg.setData(value);
110 | break;
111 | default:
112 | reader.skipField();
113 | break;
114 | }
115 | }
116 | return msg;
117 | };
118 |
119 |
120 | /**
121 | * Serializes the message to binary data (in protobuf wire format).
122 | * @return {!Uint8Array}
123 | */
124 | proto.jdocspb.EchoReq.prototype.serializeBinary = function() {
125 | var writer = new jspb.BinaryWriter();
126 | proto.jdocspb.EchoReq.serializeBinaryToWriter(this, writer);
127 | return writer.getResultBuffer();
128 | };
129 |
130 |
131 | /**
132 | * Serializes the given message to binary data (in protobuf wire
133 | * format), writing to the given BinaryWriter.
134 | * @param {!proto.jdocspb.EchoReq} message
135 | * @param {!jspb.BinaryWriter} writer
136 | * @suppress {unusedLocalVariables} f is only used for nested messages
137 | */
138 | proto.jdocspb.EchoReq.serializeBinaryToWriter = function(message, writer) {
139 | var f = undefined;
140 | f = message.getData();
141 | if (f.length > 0) {
142 | writer.writeString(
143 | 1,
144 | f
145 | );
146 | }
147 | };
148 |
149 |
150 | /**
151 | * optional string Data = 1;
152 | * @return {string}
153 | */
154 | proto.jdocspb.EchoReq.prototype.getData = function() {
155 | return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
156 | };
157 |
158 |
159 | /**
160 | * @param {string} value
161 | * @return {!proto.jdocspb.EchoReq} returns this
162 | */
163 | proto.jdocspb.EchoReq.prototype.setData = function(value) {
164 | return jspb.Message.setProto3StringField(this, 1, value);
165 | };
166 |
167 |
168 |
--------------------------------------------------------------------------------
/javascript/jdocspb/echoresp.js:
--------------------------------------------------------------------------------
1 | // source: jdocs.proto
2 | /**
3 | * @fileoverview
4 | * @enhanceable
5 | * @suppress {messageConventions} JS Compiler reports an error if a variable or
6 | * field starts with 'MSG_' and isn't a translatable message.
7 | * @public
8 | */
9 | // GENERATED CODE -- DO NOT EDIT!
10 |
11 | goog.provide('proto.jdocspb.EchoResp');
12 |
13 | goog.require('jspb.BinaryReader');
14 | goog.require('jspb.BinaryWriter');
15 | goog.require('jspb.Message');
16 |
17 | /**
18 | * Generated by JsPbCodeGenerator.
19 | * @param {Array=} opt_data Optional initial data array, typically from a
20 | * server response, or constructed directly in Javascript. The array is used
21 | * in place and becomes part of the constructed object. It is not cloned.
22 | * If no data is provided, the constructed object will be empty, but still
23 | * valid.
24 | * @extends {jspb.Message}
25 | * @constructor
26 | */
27 | proto.jdocspb.EchoResp = function(opt_data) {
28 | jspb.Message.initialize(this, opt_data, 0, -1, null, null);
29 | };
30 | goog.inherits(proto.jdocspb.EchoResp, jspb.Message);
31 | if (goog.DEBUG && !COMPILED) {
32 | /**
33 | * @public
34 | * @override
35 | */
36 | proto.jdocspb.EchoResp.displayName = 'proto.jdocspb.EchoResp';
37 | }
38 |
39 |
40 |
41 | if (jspb.Message.GENERATE_TO_OBJECT) {
42 | /**
43 | * Creates an object representation of this proto.
44 | * Field names that are reserved in JavaScript and will be renamed to pb_name.
45 | * Optional fields that are not set will be set to undefined.
46 | * To access a reserved field use, foo.pb_, eg, foo.pb_default.
47 | * For the list of reserved names please see:
48 | * net/proto2/compiler/js/internal/generator.cc#kKeyword.
49 | * @param {boolean=} opt_includeInstance Deprecated. whether to include the
50 | * JSPB instance for transitional soy proto support:
51 | * http://goto/soy-param-migration
52 | * @return {!Object}
53 | */
54 | proto.jdocspb.EchoResp.prototype.toObject = function(opt_includeInstance) {
55 | return proto.jdocspb.EchoResp.toObject(opt_includeInstance, this);
56 | };
57 |
58 |
59 | /**
60 | * Static version of the {@see toObject} method.
61 | * @param {boolean|undefined} includeInstance Deprecated. Whether to include
62 | * the JSPB instance for transitional soy proto support:
63 | * http://goto/soy-param-migration
64 | * @param {!proto.jdocspb.EchoResp} msg The msg instance to transform.
65 | * @return {!Object}
66 | * @suppress {unusedLocalVariables} f is only used for nested messages
67 | */
68 | proto.jdocspb.EchoResp.toObject = function(includeInstance, msg) {
69 | var f, obj = {
70 | data: jspb.Message.getFieldWithDefault(msg, 1, "")
71 | };
72 |
73 | if (includeInstance) {
74 | obj.$jspbMessageInstance = msg;
75 | }
76 | return obj;
77 | };
78 | }
79 |
80 |
81 | /**
82 | * Deserializes binary data (in protobuf wire format).
83 | * @param {jspb.ByteSource} bytes The bytes to deserialize.
84 | * @return {!proto.jdocspb.EchoResp}
85 | */
86 | proto.jdocspb.EchoResp.deserializeBinary = function(bytes) {
87 | var reader = new jspb.BinaryReader(bytes);
88 | var msg = new proto.jdocspb.EchoResp;
89 | return proto.jdocspb.EchoResp.deserializeBinaryFromReader(msg, reader);
90 | };
91 |
92 |
93 | /**
94 | * Deserializes binary data (in protobuf wire format) from the
95 | * given reader into the given message object.
96 | * @param {!proto.jdocspb.EchoResp} msg The message object to deserialize into.
97 | * @param {!jspb.BinaryReader} reader The BinaryReader to use.
98 | * @return {!proto.jdocspb.EchoResp}
99 | */
100 | proto.jdocspb.EchoResp.deserializeBinaryFromReader = function(msg, reader) {
101 | while (reader.nextField()) {
102 | if (reader.isEndGroup()) {
103 | break;
104 | }
105 | var field = reader.getFieldNumber();
106 | switch (field) {
107 | case 1:
108 | var value = /** @type {string} */ (reader.readString());
109 | msg.setData(value);
110 | break;
111 | default:
112 | reader.skipField();
113 | break;
114 | }
115 | }
116 | return msg;
117 | };
118 |
119 |
120 | /**
121 | * Serializes the message to binary data (in protobuf wire format).
122 | * @return {!Uint8Array}
123 | */
124 | proto.jdocspb.EchoResp.prototype.serializeBinary = function() {
125 | var writer = new jspb.BinaryWriter();
126 | proto.jdocspb.EchoResp.serializeBinaryToWriter(this, writer);
127 | return writer.getResultBuffer();
128 | };
129 |
130 |
131 | /**
132 | * Serializes the given message to binary data (in protobuf wire
133 | * format), writing to the given BinaryWriter.
134 | * @param {!proto.jdocspb.EchoResp} message
135 | * @param {!jspb.BinaryWriter} writer
136 | * @suppress {unusedLocalVariables} f is only used for nested messages
137 | */
138 | proto.jdocspb.EchoResp.serializeBinaryToWriter = function(message, writer) {
139 | var f = undefined;
140 | f = message.getData();
141 | if (f.length > 0) {
142 | writer.writeString(
143 | 1,
144 | f
145 | );
146 | }
147 | };
148 |
149 |
150 | /**
151 | * optional string Data = 1;
152 | * @return {string}
153 | */
154 | proto.jdocspb.EchoResp.prototype.getData = function() {
155 | return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
156 | };
157 |
158 |
159 | /**
160 | * @param {string} value
161 | * @return {!proto.jdocspb.EchoResp} returns this
162 | */
163 | proto.jdocspb.EchoResp.prototype.setData = function(value) {
164 | return jspb.Message.setProto3StringField(this, 1, value);
165 | };
166 |
167 |
168 |
--------------------------------------------------------------------------------
/javascript/jdocspb/viewaccountdocsreq.js:
--------------------------------------------------------------------------------
1 | // source: jdocs.proto
2 | /**
3 | * @fileoverview
4 | * @enhanceable
5 | * @suppress {messageConventions} JS Compiler reports an error if a variable or
6 | * field starts with 'MSG_' and isn't a translatable message.
7 | * @public
8 | */
9 | // GENERATED CODE -- DO NOT EDIT!
10 |
11 | goog.provide('proto.jdocspb.ViewAccountDocsReq');
12 |
13 | goog.require('jspb.BinaryReader');
14 | goog.require('jspb.BinaryWriter');
15 | goog.require('jspb.Message');
16 |
17 | /**
18 | * Generated by JsPbCodeGenerator.
19 | * @param {Array=} opt_data Optional initial data array, typically from a
20 | * server response, or constructed directly in Javascript. The array is used
21 | * in place and becomes part of the constructed object. It is not cloned.
22 | * If no data is provided, the constructed object will be empty, but still
23 | * valid.
24 | * @extends {jspb.Message}
25 | * @constructor
26 | */
27 | proto.jdocspb.ViewAccountDocsReq = function(opt_data) {
28 | jspb.Message.initialize(this, opt_data, 0, -1, null, null);
29 | };
30 | goog.inherits(proto.jdocspb.ViewAccountDocsReq, jspb.Message);
31 | if (goog.DEBUG && !COMPILED) {
32 | /**
33 | * @public
34 | * @override
35 | */
36 | proto.jdocspb.ViewAccountDocsReq.displayName = 'proto.jdocspb.ViewAccountDocsReq';
37 | }
38 |
39 |
40 |
41 | if (jspb.Message.GENERATE_TO_OBJECT) {
42 | /**
43 | * Creates an object representation of this proto.
44 | * Field names that are reserved in JavaScript and will be renamed to pb_name.
45 | * Optional fields that are not set will be set to undefined.
46 | * To access a reserved field use, foo.pb_, eg, foo.pb_default.
47 | * For the list of reserved names please see:
48 | * net/proto2/compiler/js/internal/generator.cc#kKeyword.
49 | * @param {boolean=} opt_includeInstance Deprecated. whether to include the
50 | * JSPB instance for transitional soy proto support:
51 | * http://goto/soy-param-migration
52 | * @return {!Object}
53 | */
54 | proto.jdocspb.ViewAccountDocsReq.prototype.toObject = function(opt_includeInstance) {
55 | return proto.jdocspb.ViewAccountDocsReq.toObject(opt_includeInstance, this);
56 | };
57 |
58 |
59 | /**
60 | * Static version of the {@see toObject} method.
61 | * @param {boolean|undefined} includeInstance Deprecated. Whether to include
62 | * the JSPB instance for transitional soy proto support:
63 | * http://goto/soy-param-migration
64 | * @param {!proto.jdocspb.ViewAccountDocsReq} msg The msg instance to transform.
65 | * @return {!Object}
66 | * @suppress {unusedLocalVariables} f is only used for nested messages
67 | */
68 | proto.jdocspb.ViewAccountDocsReq.toObject = function(includeInstance, msg) {
69 | var f, obj = {
70 | userId: jspb.Message.getFieldWithDefault(msg, 1, "")
71 | };
72 |
73 | if (includeInstance) {
74 | obj.$jspbMessageInstance = msg;
75 | }
76 | return obj;
77 | };
78 | }
79 |
80 |
81 | /**
82 | * Deserializes binary data (in protobuf wire format).
83 | * @param {jspb.ByteSource} bytes The bytes to deserialize.
84 | * @return {!proto.jdocspb.ViewAccountDocsReq}
85 | */
86 | proto.jdocspb.ViewAccountDocsReq.deserializeBinary = function(bytes) {
87 | var reader = new jspb.BinaryReader(bytes);
88 | var msg = new proto.jdocspb.ViewAccountDocsReq;
89 | return proto.jdocspb.ViewAccountDocsReq.deserializeBinaryFromReader(msg, reader);
90 | };
91 |
92 |
93 | /**
94 | * Deserializes binary data (in protobuf wire format) from the
95 | * given reader into the given message object.
96 | * @param {!proto.jdocspb.ViewAccountDocsReq} msg The message object to deserialize into.
97 | * @param {!jspb.BinaryReader} reader The BinaryReader to use.
98 | * @return {!proto.jdocspb.ViewAccountDocsReq}
99 | */
100 | proto.jdocspb.ViewAccountDocsReq.deserializeBinaryFromReader = function(msg, reader) {
101 | while (reader.nextField()) {
102 | if (reader.isEndGroup()) {
103 | break;
104 | }
105 | var field = reader.getFieldNumber();
106 | switch (field) {
107 | case 1:
108 | var value = /** @type {string} */ (reader.readString());
109 | msg.setUserId(value);
110 | break;
111 | default:
112 | reader.skipField();
113 | break;
114 | }
115 | }
116 | return msg;
117 | };
118 |
119 |
120 | /**
121 | * Serializes the message to binary data (in protobuf wire format).
122 | * @return {!Uint8Array}
123 | */
124 | proto.jdocspb.ViewAccountDocsReq.prototype.serializeBinary = function() {
125 | var writer = new jspb.BinaryWriter();
126 | proto.jdocspb.ViewAccountDocsReq.serializeBinaryToWriter(this, writer);
127 | return writer.getResultBuffer();
128 | };
129 |
130 |
131 | /**
132 | * Serializes the given message to binary data (in protobuf wire
133 | * format), writing to the given BinaryWriter.
134 | * @param {!proto.jdocspb.ViewAccountDocsReq} message
135 | * @param {!jspb.BinaryWriter} writer
136 | * @suppress {unusedLocalVariables} f is only used for nested messages
137 | */
138 | proto.jdocspb.ViewAccountDocsReq.serializeBinaryToWriter = function(message, writer) {
139 | var f = undefined;
140 | f = message.getUserId();
141 | if (f.length > 0) {
142 | writer.writeString(
143 | 1,
144 | f
145 | );
146 | }
147 | };
148 |
149 |
150 | /**
151 | * optional string user_id = 1;
152 | * @return {string}
153 | */
154 | proto.jdocspb.ViewAccountDocsReq.prototype.getUserId = function() {
155 | return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
156 | };
157 |
158 |
159 | /**
160 | * @param {string} value
161 | * @return {!proto.jdocspb.ViewAccountDocsReq} returns this
162 | */
163 | proto.jdocspb.ViewAccountDocsReq.prototype.setUserId = function(value) {
164 | return jspb.Message.setProto3StringField(this, 1, value);
165 | };
166 |
167 |
168 |
--------------------------------------------------------------------------------
/javascript/tokenpb/revoketokensresponse.js:
--------------------------------------------------------------------------------
1 | // source: token.proto
2 | /**
3 | * @fileoverview
4 | * @enhanceable
5 | * @suppress {messageConventions} JS Compiler reports an error if a variable or
6 | * field starts with 'MSG_' and isn't a translatable message.
7 | * @public
8 | */
9 | // GENERATED CODE -- DO NOT EDIT!
10 |
11 | goog.provide('proto.tokenpb.RevokeTokensResponse');
12 |
13 | goog.require('jspb.BinaryReader');
14 | goog.require('jspb.BinaryWriter');
15 | goog.require('jspb.Message');
16 |
17 | /**
18 | * Generated by JsPbCodeGenerator.
19 | * @param {Array=} opt_data Optional initial data array, typically from a
20 | * server response, or constructed directly in Javascript. The array is used
21 | * in place and becomes part of the constructed object. It is not cloned.
22 | * If no data is provided, the constructed object will be empty, but still
23 | * valid.
24 | * @extends {jspb.Message}
25 | * @constructor
26 | */
27 | proto.tokenpb.RevokeTokensResponse = function(opt_data) {
28 | jspb.Message.initialize(this, opt_data, 0, -1, null, null);
29 | };
30 | goog.inherits(proto.tokenpb.RevokeTokensResponse, jspb.Message);
31 | if (goog.DEBUG && !COMPILED) {
32 | /**
33 | * @public
34 | * @override
35 | */
36 | proto.tokenpb.RevokeTokensResponse.displayName = 'proto.tokenpb.RevokeTokensResponse';
37 | }
38 |
39 |
40 |
41 | if (jspb.Message.GENERATE_TO_OBJECT) {
42 | /**
43 | * Creates an object representation of this proto.
44 | * Field names that are reserved in JavaScript and will be renamed to pb_name.
45 | * Optional fields that are not set will be set to undefined.
46 | * To access a reserved field use, foo.pb_, eg, foo.pb_default.
47 | * For the list of reserved names please see:
48 | * net/proto2/compiler/js/internal/generator.cc#kKeyword.
49 | * @param {boolean=} opt_includeInstance Deprecated. whether to include the
50 | * JSPB instance for transitional soy proto support:
51 | * http://goto/soy-param-migration
52 | * @return {!Object}
53 | */
54 | proto.tokenpb.RevokeTokensResponse.prototype.toObject = function(opt_includeInstance) {
55 | return proto.tokenpb.RevokeTokensResponse.toObject(opt_includeInstance, this);
56 | };
57 |
58 |
59 | /**
60 | * Static version of the {@see toObject} method.
61 | * @param {boolean|undefined} includeInstance Deprecated. Whether to include
62 | * the JSPB instance for transitional soy proto support:
63 | * http://goto/soy-param-migration
64 | * @param {!proto.tokenpb.RevokeTokensResponse} msg The msg instance to transform.
65 | * @return {!Object}
66 | * @suppress {unusedLocalVariables} f is only used for nested messages
67 | */
68 | proto.tokenpb.RevokeTokensResponse.toObject = function(includeInstance, msg) {
69 | var f, obj = {
70 | tokensRevoked: jspb.Message.getFieldWithDefault(msg, 1, 0)
71 | };
72 |
73 | if (includeInstance) {
74 | obj.$jspbMessageInstance = msg;
75 | }
76 | return obj;
77 | };
78 | }
79 |
80 |
81 | /**
82 | * Deserializes binary data (in protobuf wire format).
83 | * @param {jspb.ByteSource} bytes The bytes to deserialize.
84 | * @return {!proto.tokenpb.RevokeTokensResponse}
85 | */
86 | proto.tokenpb.RevokeTokensResponse.deserializeBinary = function(bytes) {
87 | var reader = new jspb.BinaryReader(bytes);
88 | var msg = new proto.tokenpb.RevokeTokensResponse;
89 | return proto.tokenpb.RevokeTokensResponse.deserializeBinaryFromReader(msg, reader);
90 | };
91 |
92 |
93 | /**
94 | * Deserializes binary data (in protobuf wire format) from the
95 | * given reader into the given message object.
96 | * @param {!proto.tokenpb.RevokeTokensResponse} msg The message object to deserialize into.
97 | * @param {!jspb.BinaryReader} reader The BinaryReader to use.
98 | * @return {!proto.tokenpb.RevokeTokensResponse}
99 | */
100 | proto.tokenpb.RevokeTokensResponse.deserializeBinaryFromReader = function(msg, reader) {
101 | while (reader.nextField()) {
102 | if (reader.isEndGroup()) {
103 | break;
104 | }
105 | var field = reader.getFieldNumber();
106 | switch (field) {
107 | case 1:
108 | var value = /** @type {number} */ (reader.readUint32());
109 | msg.setTokensRevoked(value);
110 | break;
111 | default:
112 | reader.skipField();
113 | break;
114 | }
115 | }
116 | return msg;
117 | };
118 |
119 |
120 | /**
121 | * Serializes the message to binary data (in protobuf wire format).
122 | * @return {!Uint8Array}
123 | */
124 | proto.tokenpb.RevokeTokensResponse.prototype.serializeBinary = function() {
125 | var writer = new jspb.BinaryWriter();
126 | proto.tokenpb.RevokeTokensResponse.serializeBinaryToWriter(this, writer);
127 | return writer.getResultBuffer();
128 | };
129 |
130 |
131 | /**
132 | * Serializes the given message to binary data (in protobuf wire
133 | * format), writing to the given BinaryWriter.
134 | * @param {!proto.tokenpb.RevokeTokensResponse} message
135 | * @param {!jspb.BinaryWriter} writer
136 | * @suppress {unusedLocalVariables} f is only used for nested messages
137 | */
138 | proto.tokenpb.RevokeTokensResponse.serializeBinaryToWriter = function(message, writer) {
139 | var f = undefined;
140 | f = message.getTokensRevoked();
141 | if (f !== 0) {
142 | writer.writeUint32(
143 | 1,
144 | f
145 | );
146 | }
147 | };
148 |
149 |
150 | /**
151 | * optional uint32 tokens_revoked = 1;
152 | * @return {number}
153 | */
154 | proto.tokenpb.RevokeTokensResponse.prototype.getTokensRevoked = function() {
155 | return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
156 | };
157 |
158 |
159 | /**
160 | * @param {number} value
161 | * @return {!proto.tokenpb.RevokeTokensResponse} returns this
162 | */
163 | proto.tokenpb.RevokeTokensResponse.prototype.setTokensRevoked = function(value) {
164 | return jspb.Message.setProto3IntField(this, 1, value);
165 | };
166 |
167 |
168 |
--------------------------------------------------------------------------------
/javascript/tokenpb/listrevokedtokensrequest.js:
--------------------------------------------------------------------------------
1 | // source: token.proto
2 | /**
3 | * @fileoverview
4 | * @enhanceable
5 | * @suppress {messageConventions} JS Compiler reports an error if a variable or
6 | * field starts with 'MSG_' and isn't a translatable message.
7 | * @public
8 | */
9 | // GENERATED CODE -- DO NOT EDIT!
10 |
11 | goog.provide('proto.tokenpb.ListRevokedTokensRequest');
12 |
13 | goog.require('jspb.BinaryReader');
14 | goog.require('jspb.BinaryWriter');
15 | goog.require('jspb.Message');
16 |
17 | /**
18 | * Generated by JsPbCodeGenerator.
19 | * @param {Array=} opt_data Optional initial data array, typically from a
20 | * server response, or constructed directly in Javascript. The array is used
21 | * in place and becomes part of the constructed object. It is not cloned.
22 | * If no data is provided, the constructed object will be empty, but still
23 | * valid.
24 | * @extends {jspb.Message}
25 | * @constructor
26 | */
27 | proto.tokenpb.ListRevokedTokensRequest = function(opt_data) {
28 | jspb.Message.initialize(this, opt_data, 0, -1, null, null);
29 | };
30 | goog.inherits(proto.tokenpb.ListRevokedTokensRequest, jspb.Message);
31 | if (goog.DEBUG && !COMPILED) {
32 | /**
33 | * @public
34 | * @override
35 | */
36 | proto.tokenpb.ListRevokedTokensRequest.displayName = 'proto.tokenpb.ListRevokedTokensRequest';
37 | }
38 |
39 |
40 |
41 | if (jspb.Message.GENERATE_TO_OBJECT) {
42 | /**
43 | * Creates an object representation of this proto.
44 | * Field names that are reserved in JavaScript and will be renamed to pb_name.
45 | * Optional fields that are not set will be set to undefined.
46 | * To access a reserved field use, foo.pb_, eg, foo.pb_default.
47 | * For the list of reserved names please see:
48 | * net/proto2/compiler/js/internal/generator.cc#kKeyword.
49 | * @param {boolean=} opt_includeInstance Deprecated. whether to include the
50 | * JSPB instance for transitional soy proto support:
51 | * http://goto/soy-param-migration
52 | * @return {!Object}
53 | */
54 | proto.tokenpb.ListRevokedTokensRequest.prototype.toObject = function(opt_includeInstance) {
55 | return proto.tokenpb.ListRevokedTokensRequest.toObject(opt_includeInstance, this);
56 | };
57 |
58 |
59 | /**
60 | * Static version of the {@see toObject} method.
61 | * @param {boolean|undefined} includeInstance Deprecated. Whether to include
62 | * the JSPB instance for transitional soy proto support:
63 | * http://goto/soy-param-migration
64 | * @param {!proto.tokenpb.ListRevokedTokensRequest} msg The msg instance to transform.
65 | * @return {!Object}
66 | * @suppress {unusedLocalVariables} f is only used for nested messages
67 | */
68 | proto.tokenpb.ListRevokedTokensRequest.toObject = function(includeInstance, msg) {
69 | var f, obj = {
70 | previousKey: jspb.Message.getFieldWithDefault(msg, 1, "")
71 | };
72 |
73 | if (includeInstance) {
74 | obj.$jspbMessageInstance = msg;
75 | }
76 | return obj;
77 | };
78 | }
79 |
80 |
81 | /**
82 | * Deserializes binary data (in protobuf wire format).
83 | * @param {jspb.ByteSource} bytes The bytes to deserialize.
84 | * @return {!proto.tokenpb.ListRevokedTokensRequest}
85 | */
86 | proto.tokenpb.ListRevokedTokensRequest.deserializeBinary = function(bytes) {
87 | var reader = new jspb.BinaryReader(bytes);
88 | var msg = new proto.tokenpb.ListRevokedTokensRequest;
89 | return proto.tokenpb.ListRevokedTokensRequest.deserializeBinaryFromReader(msg, reader);
90 | };
91 |
92 |
93 | /**
94 | * Deserializes binary data (in protobuf wire format) from the
95 | * given reader into the given message object.
96 | * @param {!proto.tokenpb.ListRevokedTokensRequest} msg The message object to deserialize into.
97 | * @param {!jspb.BinaryReader} reader The BinaryReader to use.
98 | * @return {!proto.tokenpb.ListRevokedTokensRequest}
99 | */
100 | proto.tokenpb.ListRevokedTokensRequest.deserializeBinaryFromReader = function(msg, reader) {
101 | while (reader.nextField()) {
102 | if (reader.isEndGroup()) {
103 | break;
104 | }
105 | var field = reader.getFieldNumber();
106 | switch (field) {
107 | case 1:
108 | var value = /** @type {string} */ (reader.readString());
109 | msg.setPreviousKey(value);
110 | break;
111 | default:
112 | reader.skipField();
113 | break;
114 | }
115 | }
116 | return msg;
117 | };
118 |
119 |
120 | /**
121 | * Serializes the message to binary data (in protobuf wire format).
122 | * @return {!Uint8Array}
123 | */
124 | proto.tokenpb.ListRevokedTokensRequest.prototype.serializeBinary = function() {
125 | var writer = new jspb.BinaryWriter();
126 | proto.tokenpb.ListRevokedTokensRequest.serializeBinaryToWriter(this, writer);
127 | return writer.getResultBuffer();
128 | };
129 |
130 |
131 | /**
132 | * Serializes the given message to binary data (in protobuf wire
133 | * format), writing to the given BinaryWriter.
134 | * @param {!proto.tokenpb.ListRevokedTokensRequest} message
135 | * @param {!jspb.BinaryWriter} writer
136 | * @suppress {unusedLocalVariables} f is only used for nested messages
137 | */
138 | proto.tokenpb.ListRevokedTokensRequest.serializeBinaryToWriter = function(message, writer) {
139 | var f = undefined;
140 | f = message.getPreviousKey();
141 | if (f.length > 0) {
142 | writer.writeString(
143 | 1,
144 | f
145 | );
146 | }
147 | };
148 |
149 |
150 | /**
151 | * optional string previous_key = 1;
152 | * @return {string}
153 | */
154 | proto.tokenpb.ListRevokedTokensRequest.prototype.getPreviousKey = function() {
155 | return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
156 | };
157 |
158 |
159 | /**
160 | * @param {string} value
161 | * @return {!proto.tokenpb.ListRevokedTokensRequest} returns this
162 | */
163 | proto.tokenpb.ListRevokedTokensRequest.prototype.setPreviousKey = function(value) {
164 | return jspb.Message.setProto3StringField(this, 1, value);
165 | };
166 |
167 |
168 |
--------------------------------------------------------------------------------
/documents/contributing/code_of_conduct.md:
--------------------------------------------------------------------------------
1 | # Contributor Covenant Code of Conduct
2 |
3 | ## Our Pledge
4 |
5 | We as members, contributors, and leaders pledge to make participation in our
6 | community a harassment-free experience for everyone, regardless of age, body
7 | size, visible or invisible disability, ethnicity, sex characteristics, gender
8 | identity and expression, level of experience, education, socio-economic status,
9 | nationality, personal appearance, race, religion, or sexual identity
10 | and orientation.
11 |
12 | We pledge to act and interact in ways that contribute to an open, welcoming,
13 | diverse, inclusive, and healthy community.
14 |
15 | ## Our Standards
16 |
17 | Examples of behavior that contributes to a positive environment for our
18 | community include:
19 |
20 | * Demonstrating empathy and kindness toward other people
21 | * Being respectful of differing opinions, viewpoints, and experiences
22 | * Giving and gracefully accepting constructive feedback
23 | * Accepting responsibility and apologizing to those affected by our mistakes,
24 | and learning from the experience
25 | * Focusing on what is best not just for us as individuals, but for the
26 | overall community
27 |
28 | Examples of unacceptable behavior include:
29 |
30 | * The use of sexualized language or imagery, and sexual attention or
31 | advances of any kind
32 | * Trolling, insulting or derogatory comments, and personal or political attacks
33 | * Public or private harassment
34 | * Publishing others' private information, such as a physical or email
35 | address, without their explicit permission
36 | * Other conduct which could reasonably be considered inappropriate in a
37 | professional setting
38 |
39 | ## Enforcement Responsibilities
40 |
41 | Community leaders are responsible for clarifying and enforcing our standards of
42 | acceptable behavior and will take appropriate and fair corrective action in
43 | response to any behavior that they deem inappropriate, threatening, offensive,
44 | or harmful.
45 |
46 | Community leaders have the right and responsibility to remove, edit, or reject
47 | comments, commits, code, wiki edits, issues, and other contributions that are
48 | not aligned to this Code of Conduct, and will communicate reasons for moderation
49 | decisions when appropriate.
50 |
51 | ## Scope
52 |
53 | This Code of Conduct applies within all community spaces, and also applies when
54 | an individual is officially representing the community in public spaces.
55 | Examples of representing our community include using an official e-mail address,
56 | posting via an official social media account, or acting as an appointed
57 | representative at an online or offline event.
58 |
59 | ## Enforcement
60 |
61 | Instances of abusive, harassing, or otherwise unacceptable behavior may be
62 | reported to the community leaders responsible for enforcement at
63 | [INSERT CONTACT METHOD].
64 | All complaints will be reviewed and investigated promptly and fairly.
65 |
66 | All community leaders are obligated to respect the privacy and security of the
67 | reporter of any incident.
68 |
69 | ## Enforcement Guidelines
70 |
71 | Community leaders will follow these Community Impact Guidelines in determining
72 | the consequences for any action they deem in violation of this Code of Conduct:
73 |
74 | ### 1. Correction
75 |
76 | **Community Impact**: Use of inappropriate language or other behavior deemed
77 | unprofessional or unwelcome in the community.
78 |
79 | **Consequence**: A private, written warning from community leaders, providing
80 | clarity around the nature of the violation and an explanation of why the
81 | behavior was inappropriate. A public apology may be requested.
82 |
83 | ### 2. Warning
84 |
85 | **Community Impact**: A violation through a single incident or series
86 | of actions.
87 |
88 | **Consequence**: A warning with consequences for continued behavior. No
89 | interaction with the people involved, including unsolicited interaction with
90 | those enforcing the Code of Conduct, for a specified period of time. This
91 | includes avoiding interactions in community spaces as well as external channels
92 | like social media. Violating these terms may lead to a temporary or
93 | permanent ban.
94 |
95 | ### 3. Temporary Ban
96 |
97 | **Community Impact**: A serious violation of community standards, including
98 | sustained inappropriate behavior.
99 |
100 | **Consequence**: A temporary ban from any sort of interaction or public
101 | communication with the community for a specified period of time. No public or
102 | private interaction with the people involved, including unsolicited interaction
103 | with those enforcing the Code of Conduct, is allowed during this period.
104 | Violating these terms may lead to a permanent ban.
105 |
106 | ### 4. Permanent Ban
107 |
108 | **Community Impact**: Demonstrating a pattern of violation of community
109 | standards, including sustained inappropriate behavior, harassment of an
110 | individual, or aggression toward or disparagement of classes of individuals.
111 |
112 | **Consequence**: A permanent ban from any sort of public interaction within
113 | the community.
114 |
115 | ## Attribution
116 |
117 | This Code of Conduct is adapted from the [Contributor Covenant][homepage],
118 | version 2.0, available at
119 | [https://www.contributor-covenant.org/version/2/0/code_of_conduct.html][v2.0].
120 |
121 | Community Impact Guidelines were inspired by
122 | [Mozilla's code of conduct enforcement ladder][Mozilla CoC].
123 |
124 | For answers to common questions about this code of conduct, see the FAQ at
125 | [https://www.contributor-covenant.org/faq][FAQ]. Translations are available
126 | at [https://www.contributor-covenant.org/translations][translations].
127 |
128 | [homepage]: https://www.contributor-covenant.org
129 | [v2.0]: https://www.contributor-covenant.org/version/2/0/code_of_conduct.html
130 | [Mozilla CoC]: https://github.com/mozilla/diversity
131 | [FAQ]: https://www.contributor-covenant.org/faq
132 | [translations]: https://www.contributor-covenant.org/translations
133 |
134 |
--------------------------------------------------------------------------------
/documents/contributing/pull-requests.md:
--------------------------------------------------------------------------------
1 | # Pull Requests
2 |
3 | This document describes what you needed to know about the pull request process.
4 |
5 | A pull request is how you submit your changes to the project.
6 | Before you make any changes, please read the [contributing page](CONTRIBUTING.md)
7 | for information regarding contributions to project overall. This will help you
8 | in making your changes fit within the project and its style; as well as the
9 | steps you must do before creating a pull-request.
10 |
11 |
12 | ## What is a Pull Request (PR)?
13 |
14 | As described above, a pull request is how you submit changes to this project.
15 | It is a _request_ that the project pull in your changes. Here's how the folks
16 | at GitHub [define a pull request][0]:
17 |
18 | > Pull requests let you tell others about changes you've pushed to a branch in
19 | > a repository on GitHub. Once a pull request is opened, you can discuss and
20 | > review the potential changes with collaborators and add follow-up commits
21 | > before your changes are merged into the base branch.
22 |
23 | The pull request allows others to review the changes, test them, and provide
24 | feedback -- including requests to makes to the changees, so that they better
25 | fit into the project.
26 |
27 |
28 | ## Pull Request Process
29 |
30 | Once you have completed the changes on your local development environment,
31 | tested them, and so fprth, the next steps is to create a pull request.
32 | Be sure to check the [contributing guide](CONTRIBUTING.md) for additional
33 | steps and tips to ensure that your changes will fit with the project.
34 |
35 | > When you are ready to generate a pull request, either for preliminary review,
36 | > or for consideration of merging into the project you must first push your
37 | > local topic branch back up to GitHub:
38 |
39 | ```
40 | git push origin newfeature
41 | ```
42 |
43 |
44 |
45 | > Once you've committed and pushed all of your changes to GitHub, go to the
46 | > page for your fork on GitHub, select your development branch, and click the
47 | > pull request button. If you need to make any adjustments to your pull
48 | > request, just push the updates to your branch. Your pull request will
49 | > automatically track the changes on your development branch and update.
50 |
51 | 1. Ensure any install or build dependencies are removed before the end of the
52 | layer when doing a build.
53 | 2. You may merge the Pull Request in once you have the sign-off of two other
54 | developers, or if you do not have permission to do that, you may request the
55 | second reviewer to merge it for you.
56 |
57 | ### Review Process
58 |
59 | After a pull request has been sent to the repository, the team and community
60 | may suggest modifications to the changes you have submitted.
61 |
62 | Many pull requests are likely to open for several days, until the core team
63 | can approve them in Github. In some cases, multiple people will have the
64 | chance to review/comment.
65 |
66 | Please check your pull request for comments, feedback, and suggested changes:
67 |
68 | - Review the suggested changes using the "View changes" button.
69 | - [Commit](https://help.github.com/en/articles/incorporating-feedback-in-your-pull-request#applying-suggested-changes) the suggestions.
70 | - [Discuss suggestions](https://help.github.com/en/articles/about-conversations-on-github) to ask questions about the suggested changes.
71 | - Incoprorate the [suggestions to your changes](https://help.github.com/en/articles/incorporating-feedback-in-your-pull-request)
72 |
73 |
74 | ### Addressing Feedback
75 |
76 | Once a PR has been submitted, your changes will be reviewed and constructive
77 | feedback may be provided. Feedback isn't meant as an attack, but to help make
78 | sure the highest-quality workmanship makes it into our project. Changes will be
79 | approved once required feedback has been addressed.
80 |
81 |
82 | If a maintainer asks you to "rebase" your PR, they're saying that a lot of
83 | files has changed, and that you need to update your fork so it's easier to
84 | merge.
85 |
86 | To update your forked repository, follow these steps:
87 |
88 | ```
89 | # Fetch upstream master and merge with your repo's master branch
90 | git fetch upstream
91 | git checkout master
92 | git merge upstream/master
93 |
94 | # If there were any new commits, rebase your development branch
95 | git checkout newfeature
96 | git rebase master
97 | ```
98 |
99 | If too much code has changed for git to automatically apply your branches
100 | changes to the new master, you will need to manually resolve the merge
101 | conflicts yourself.
102 |
103 | Once your new branch has no conflicts and works correctly, you can override
104 | your old branch using this command:
105 |
106 | ```
107 | git push -f
108 | ```
109 |
110 | Note that this will overwrite the old branch on the server, so make sure you
111 | are happy with your changes first!
112 |
113 |
114 | ## Additional resources
115 |
116 | - [Creating a pull request](https://help.github.com/en/articles/creating-a-pull-request) from GitHub
117 | - [Configuring a remote for a fork](https://help.github.com/en/articles/configuring-a-remote-for-a-fork)
118 | - [Which remote URL should I use?](https://help.github.com/en/articles/which-remote-url-should-i-use)
119 | - [Git Branching and Merging](https://git-scm.com/book/en/v2/Git-Branching-Basic-Branching-and-Merging)
120 | - [Feature Branching and Workflows](https://git-scm.com/book/en/v1/Git-Branching-Branching-Workflows)
121 | - [Resolving merge conflicts](https://help.github.com/en/articles/resolving-a-merge-conflict-on-github)
122 |
123 |
124 | [0]: https://help.github.com/en/articles/about-pull-requests
125 | [1]: http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html
126 |
127 |
128 | _Credits: This page was adapted from an [EmbeddedArtistry template](https://github.com/embeddedartistry/embedded-resources/blob/master/docs/)_
129 | _and adapted from the
130 | [Gatsbj.js project](https://github.com/gatsbyjs/gatsby/blob/master/docs/contributing/)_
131 |
--------------------------------------------------------------------------------
/javascript/tokenpb/revokefactorycertificaterequest.js:
--------------------------------------------------------------------------------
1 | // source: token.proto
2 | /**
3 | * @fileoverview
4 | * @enhanceable
5 | * @suppress {messageConventions} JS Compiler reports an error if a variable or
6 | * field starts with 'MSG_' and isn't a translatable message.
7 | * @public
8 | */
9 | // GENERATED CODE -- DO NOT EDIT!
10 |
11 | goog.provide('proto.tokenpb.RevokeFactoryCertificateRequest');
12 |
13 | goog.require('jspb.BinaryReader');
14 | goog.require('jspb.BinaryWriter');
15 | goog.require('jspb.Message');
16 |
17 | /**
18 | * Generated by JsPbCodeGenerator.
19 | * @param {Array=} opt_data Optional initial data array, typically from a
20 | * server response, or constructed directly in Javascript. The array is used
21 | * in place and becomes part of the constructed object. It is not cloned.
22 | * If no data is provided, the constructed object will be empty, but still
23 | * valid.
24 | * @extends {jspb.Message}
25 | * @constructor
26 | */
27 | proto.tokenpb.RevokeFactoryCertificateRequest = function(opt_data) {
28 | jspb.Message.initialize(this, opt_data, 0, -1, null, null);
29 | };
30 | goog.inherits(proto.tokenpb.RevokeFactoryCertificateRequest, jspb.Message);
31 | if (goog.DEBUG && !COMPILED) {
32 | /**
33 | * @public
34 | * @override
35 | */
36 | proto.tokenpb.RevokeFactoryCertificateRequest.displayName = 'proto.tokenpb.RevokeFactoryCertificateRequest';
37 | }
38 |
39 |
40 |
41 | if (jspb.Message.GENERATE_TO_OBJECT) {
42 | /**
43 | * Creates an object representation of this proto.
44 | * Field names that are reserved in JavaScript and will be renamed to pb_name.
45 | * Optional fields that are not set will be set to undefined.
46 | * To access a reserved field use, foo.pb_, eg, foo.pb_default.
47 | * For the list of reserved names please see:
48 | * net/proto2/compiler/js/internal/generator.cc#kKeyword.
49 | * @param {boolean=} opt_includeInstance Deprecated. whether to include the
50 | * JSPB instance for transitional soy proto support:
51 | * http://goto/soy-param-migration
52 | * @return {!Object}
53 | */
54 | proto.tokenpb.RevokeFactoryCertificateRequest.prototype.toObject = function(opt_includeInstance) {
55 | return proto.tokenpb.RevokeFactoryCertificateRequest.toObject(opt_includeInstance, this);
56 | };
57 |
58 |
59 | /**
60 | * Static version of the {@see toObject} method.
61 | * @param {boolean|undefined} includeInstance Deprecated. Whether to include
62 | * the JSPB instance for transitional soy proto support:
63 | * http://goto/soy-param-migration
64 | * @param {!proto.tokenpb.RevokeFactoryCertificateRequest} msg The msg instance to transform.
65 | * @return {!Object}
66 | * @suppress {unusedLocalVariables} f is only used for nested messages
67 | */
68 | proto.tokenpb.RevokeFactoryCertificateRequest.toObject = function(includeInstance, msg) {
69 | var f, obj = {
70 | certificateId: jspb.Message.getFieldWithDefault(msg, 1, "")
71 | };
72 |
73 | if (includeInstance) {
74 | obj.$jspbMessageInstance = msg;
75 | }
76 | return obj;
77 | };
78 | }
79 |
80 |
81 | /**
82 | * Deserializes binary data (in protobuf wire format).
83 | * @param {jspb.ByteSource} bytes The bytes to deserialize.
84 | * @return {!proto.tokenpb.RevokeFactoryCertificateRequest}
85 | */
86 | proto.tokenpb.RevokeFactoryCertificateRequest.deserializeBinary = function(bytes) {
87 | var reader = new jspb.BinaryReader(bytes);
88 | var msg = new proto.tokenpb.RevokeFactoryCertificateRequest;
89 | return proto.tokenpb.RevokeFactoryCertificateRequest.deserializeBinaryFromReader(msg, reader);
90 | };
91 |
92 |
93 | /**
94 | * Deserializes binary data (in protobuf wire format) from the
95 | * given reader into the given message object.
96 | * @param {!proto.tokenpb.RevokeFactoryCertificateRequest} msg The message object to deserialize into.
97 | * @param {!jspb.BinaryReader} reader The BinaryReader to use.
98 | * @return {!proto.tokenpb.RevokeFactoryCertificateRequest}
99 | */
100 | proto.tokenpb.RevokeFactoryCertificateRequest.deserializeBinaryFromReader = function(msg, reader) {
101 | while (reader.nextField()) {
102 | if (reader.isEndGroup()) {
103 | break;
104 | }
105 | var field = reader.getFieldNumber();
106 | switch (field) {
107 | case 1:
108 | var value = /** @type {string} */ (reader.readString());
109 | msg.setCertificateId(value);
110 | break;
111 | default:
112 | reader.skipField();
113 | break;
114 | }
115 | }
116 | return msg;
117 | };
118 |
119 |
120 | /**
121 | * Serializes the message to binary data (in protobuf wire format).
122 | * @return {!Uint8Array}
123 | */
124 | proto.tokenpb.RevokeFactoryCertificateRequest.prototype.serializeBinary = function() {
125 | var writer = new jspb.BinaryWriter();
126 | proto.tokenpb.RevokeFactoryCertificateRequest.serializeBinaryToWriter(this, writer);
127 | return writer.getResultBuffer();
128 | };
129 |
130 |
131 | /**
132 | * Serializes the given message to binary data (in protobuf wire
133 | * format), writing to the given BinaryWriter.
134 | * @param {!proto.tokenpb.RevokeFactoryCertificateRequest} message
135 | * @param {!jspb.BinaryWriter} writer
136 | * @suppress {unusedLocalVariables} f is only used for nested messages
137 | */
138 | proto.tokenpb.RevokeFactoryCertificateRequest.serializeBinaryToWriter = function(message, writer) {
139 | var f = undefined;
140 | f = message.getCertificateId();
141 | if (f.length > 0) {
142 | writer.writeString(
143 | 1,
144 | f
145 | );
146 | }
147 | };
148 |
149 |
150 | /**
151 | * optional string certificate_id = 1;
152 | * @return {string}
153 | */
154 | proto.tokenpb.RevokeFactoryCertificateRequest.prototype.getCertificateId = function() {
155 | return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
156 | };
157 |
158 |
159 | /**
160 | * @param {string} value
161 | * @return {!proto.tokenpb.RevokeFactoryCertificateRequest} returns this
162 | */
163 | proto.tokenpb.RevokeFactoryCertificateRequest.prototype.setCertificateId = function(value) {
164 | return jspb.Message.setProto3StringField(this, 1, value);
165 | };
166 |
167 |
168 |
--------------------------------------------------------------------------------
/proto/jdocs/jdocs.proto:
--------------------------------------------------------------------------------
1 | syntax = "proto3";
2 |
3 | package jdocspb;
4 |
5 | import "google/api/annotations.proto";
6 |
7 | option go_package = "github.com/digital-dream-labs/api/go/jdocspb";
8 |
9 |
10 | service Jdocs {
11 | // Write = Create or Update one document
12 | rpc WriteDoc(WriteDocReq) returns (WriteDocResp) {
13 | option (google.api.http) = {
14 | post: "/1/write-doc"
15 | body: "*"
16 | };
17 | }
18 |
19 | // Read latest version of one or more documents (single user_id/thing)
20 | rpc ReadDocs(ReadDocsReq) returns (ReadDocsResp) {
21 | option (google.api.http) = {
22 | post: "/1/read-docs"
23 | body: "*"
24 | };
25 | }
26 |
27 | // Delete one document. If the document does not exist, the request
28 | // quietly succeeds (no error).
29 | rpc DeleteDoc(DeleteDocReq) returns (DeleteDocResp) {
30 | option (google.api.http) = {
31 | post: "/1/delete-doc"
32 | body: "*"
33 | };
34 | }
35 |
36 | // Purge all documents associated with an account. Operation is idempotent,
37 | // ie it is not an error to purge the same account multiple times.
38 | rpc PurgeAccountDocs(PurgeAccountDocsReq) returns (PurgeAccountDocsResp);
39 |
40 | // Return all documents associated with a user account, for viewing
41 | // purposes. Purged documents are not returned.
42 | rpc ViewAccountDocs(ViewAccountDocsReq) returns (ViewDocsResp);
43 |
44 | // Return all documents associated with a user account that contain
45 | // personal data, for viewing purposes. Purged documents are not returned.
46 | rpc ViewAccountDocsWithPII(ViewAccountDocsReq) returns (ViewDocsResp);
47 | }
48 |
49 | //////////////////////////////////////////////////////////////////////
50 |
51 | message Jdoc {
52 | uint64 doc_version = 1; // first version = 1; 0 => invalid or doesn't exist
53 | uint64 fmt_version = 2; // first version = 1; 0 => invalid
54 | string client_metadata = 3; // arbitrary client-defined string, eg a data fingerprint (typ "", 32 chars max)
55 | string json_doc = 4; // must be a valid JSON document
56 | // max depth = 16 levels
57 | // max string length = 200KB (204800 bytes)
58 | }
59 |
60 | // All JDOCS documents are keyed by user_id, thing, or user_id+thing.
61 | // user_id = Anki ID from accounts service (globally unique)
62 | // Example: "a3rj8dLt9s7cn1XbR2ufe"
63 | // thing = globally unique identifier; often a physical robot, but
64 | // can be a virtual thing, or a device such as a laptop
65 | // Victor robot with ESN="00e14567" => "vic:00e14567"
66 | // Anki developer for testing => "vic:joe.developer@anki.com:0"
67 | //
68 | // To keep the API simple, all document commands have explicit arguments
69 | // for both user_id and thing, even if one or the other is not used. If a
70 | // particular document does not use user_id or thing for its key, that
71 | // field’s value is ignored.
72 | //
73 | // user_id and thing values have a maximum string length of 64 characters.
74 |
75 | //////////////////////////////////////////////////////////////////////
76 |
77 | message EchoReq {
78 | string Data = 1;
79 | }
80 |
81 | message EchoResp {
82 | string Data = 1;
83 | }
84 |
85 | //////////////////////////////////////////////////////////////////////
86 |
87 | message WriteDocReq {
88 | string user_id = 1; // 64 chars max
89 | string thing = 2; // 64 chars max
90 | string doc_name = 3;
91 | Jdoc doc = 4; // write rejected if (doc.doc_version != svc.doc_version)
92 | // To create a document, set doc.doc_version=0
93 | }
94 |
95 | message WriteDocResp {
96 | enum Status {
97 | ACCEPTED = 0;
98 | REJECTED_BAD_DOC_VERSION = 1; // soft error
99 | REJECTED_BAD_FMT_VERSION = 2; // soft error
100 | }
101 | Status status = 1;
102 | uint64 latest_doc_version = 2; // latest version on service
103 | }
104 |
105 | //////////////////////////////////////////////////////////////////////
106 |
107 | message ReadDocsReq {
108 | message Item {
109 | string doc_name = 1;
110 | uint64 my_doc_version = 2; // 0 => always return latest version
111 | }
112 | string user_id = 1;
113 | string thing = 2;
114 | repeated Item items = 3;
115 | }
116 |
117 | message ReadDocsResp {
118 | enum Status {
119 | UNCHANGED = 0; // (svc.doc_version == my_doc_version)
120 | CHANGED = 1; // (svc.doc_version > my_doc_version) || (svc.doc_version < my_doc_version)
121 | NOT_FOUND = 2; // soft error
122 | }
123 | message Item {
124 | Status status = 1;
125 | Jdoc doc = 2; // json_doc=="" if (svc.doc_version==my_doc_version)
126 | }
127 | repeated Item items = 1;
128 | }
129 |
130 | //////////////////////////////////////////////////////////////////////
131 |
132 | message DeleteDocReq {
133 | string user_id = 1;
134 | string thing = 2;
135 | string doc_name = 3;
136 | }
137 |
138 | message DeleteDocResp {
139 | }
140 |
141 | //////////////////////////////////////////////////////////////////////
142 |
143 | message PurgeAccountDocsReq {
144 | string user_id = 1;
145 | string reason = 2; // concise reason, eg "purged-via-api"
146 | string notes = 3; // free-form text notes, eg "CC requested this via email"
147 | }
148 |
149 | message PurgeAccountDocsResp {
150 | }
151 |
152 | //////////////////////////////////////////////////////////////////////
153 |
154 | // ViewDoc is a more end-user-friendly version of a JDOCS document, for
155 | // viewing purposes by support or the end user. It contains the JSON
156 | // document itself along with account/thing identifiers, but does not
157 | // include doc_version and other metadata needed by a typical JDOCS
158 | // client.
159 | message ViewDoc {
160 | string user_id = 1;
161 | string thing = 2;
162 | string doc_name = 3;
163 | string json_doc = 4;
164 | }
165 |
166 | message ViewAccountDocsReq {
167 | string user_id = 1;
168 | }
169 |
170 | message ViewDocsResp {
171 | repeated ViewDoc docs = 1;
172 | }
173 |
174 |
--------------------------------------------------------------------------------
/javascript/tokenpb/refreshtokenresponse.js:
--------------------------------------------------------------------------------
1 | // source: token.proto
2 | /**
3 | * @fileoverview
4 | * @enhanceable
5 | * @suppress {messageConventions} JS Compiler reports an error if a variable or
6 | * field starts with 'MSG_' and isn't a translatable message.
7 | * @public
8 | */
9 | // GENERATED CODE -- DO NOT EDIT!
10 |
11 | goog.provide('proto.tokenpb.RefreshTokenResponse');
12 |
13 | goog.require('jspb.BinaryReader');
14 | goog.require('jspb.BinaryWriter');
15 | goog.require('jspb.Message');
16 | goog.require('proto.tokenpb.TokenBundle');
17 |
18 | /**
19 | * Generated by JsPbCodeGenerator.
20 | * @param {Array=} opt_data Optional initial data array, typically from a
21 | * server response, or constructed directly in Javascript. The array is used
22 | * in place and becomes part of the constructed object. It is not cloned.
23 | * If no data is provided, the constructed object will be empty, but still
24 | * valid.
25 | * @extends {jspb.Message}
26 | * @constructor
27 | */
28 | proto.tokenpb.RefreshTokenResponse = function(opt_data) {
29 | jspb.Message.initialize(this, opt_data, 0, -1, null, null);
30 | };
31 | goog.inherits(proto.tokenpb.RefreshTokenResponse, jspb.Message);
32 | if (goog.DEBUG && !COMPILED) {
33 | /**
34 | * @public
35 | * @override
36 | */
37 | proto.tokenpb.RefreshTokenResponse.displayName = 'proto.tokenpb.RefreshTokenResponse';
38 | }
39 |
40 |
41 |
42 | if (jspb.Message.GENERATE_TO_OBJECT) {
43 | /**
44 | * Creates an object representation of this proto.
45 | * Field names that are reserved in JavaScript and will be renamed to pb_name.
46 | * Optional fields that are not set will be set to undefined.
47 | * To access a reserved field use, foo.pb_, eg, foo.pb_default.
48 | * For the list of reserved names please see:
49 | * net/proto2/compiler/js/internal/generator.cc#kKeyword.
50 | * @param {boolean=} opt_includeInstance Deprecated. whether to include the
51 | * JSPB instance for transitional soy proto support:
52 | * http://goto/soy-param-migration
53 | * @return {!Object}
54 | */
55 | proto.tokenpb.RefreshTokenResponse.prototype.toObject = function(opt_includeInstance) {
56 | return proto.tokenpb.RefreshTokenResponse.toObject(opt_includeInstance, this);
57 | };
58 |
59 |
60 | /**
61 | * Static version of the {@see toObject} method.
62 | * @param {boolean|undefined} includeInstance Deprecated. Whether to include
63 | * the JSPB instance for transitional soy proto support:
64 | * http://goto/soy-param-migration
65 | * @param {!proto.tokenpb.RefreshTokenResponse} msg The msg instance to transform.
66 | * @return {!Object}
67 | * @suppress {unusedLocalVariables} f is only used for nested messages
68 | */
69 | proto.tokenpb.RefreshTokenResponse.toObject = function(includeInstance, msg) {
70 | var f, obj = {
71 | data: (f = msg.getData()) && proto.tokenpb.TokenBundle.toObject(includeInstance, f)
72 | };
73 |
74 | if (includeInstance) {
75 | obj.$jspbMessageInstance = msg;
76 | }
77 | return obj;
78 | };
79 | }
80 |
81 |
82 | /**
83 | * Deserializes binary data (in protobuf wire format).
84 | * @param {jspb.ByteSource} bytes The bytes to deserialize.
85 | * @return {!proto.tokenpb.RefreshTokenResponse}
86 | */
87 | proto.tokenpb.RefreshTokenResponse.deserializeBinary = function(bytes) {
88 | var reader = new jspb.BinaryReader(bytes);
89 | var msg = new proto.tokenpb.RefreshTokenResponse;
90 | return proto.tokenpb.RefreshTokenResponse.deserializeBinaryFromReader(msg, reader);
91 | };
92 |
93 |
94 | /**
95 | * Deserializes binary data (in protobuf wire format) from the
96 | * given reader into the given message object.
97 | * @param {!proto.tokenpb.RefreshTokenResponse} msg The message object to deserialize into.
98 | * @param {!jspb.BinaryReader} reader The BinaryReader to use.
99 | * @return {!proto.tokenpb.RefreshTokenResponse}
100 | */
101 | proto.tokenpb.RefreshTokenResponse.deserializeBinaryFromReader = function(msg, reader) {
102 | while (reader.nextField()) {
103 | if (reader.isEndGroup()) {
104 | break;
105 | }
106 | var field = reader.getFieldNumber();
107 | switch (field) {
108 | case 1:
109 | var value = new proto.tokenpb.TokenBundle;
110 | reader.readMessage(value,proto.tokenpb.TokenBundle.deserializeBinaryFromReader);
111 | msg.setData(value);
112 | break;
113 | default:
114 | reader.skipField();
115 | break;
116 | }
117 | }
118 | return msg;
119 | };
120 |
121 |
122 | /**
123 | * Serializes the message to binary data (in protobuf wire format).
124 | * @return {!Uint8Array}
125 | */
126 | proto.tokenpb.RefreshTokenResponse.prototype.serializeBinary = function() {
127 | var writer = new jspb.BinaryWriter();
128 | proto.tokenpb.RefreshTokenResponse.serializeBinaryToWriter(this, writer);
129 | return writer.getResultBuffer();
130 | };
131 |
132 |
133 | /**
134 | * Serializes the given message to binary data (in protobuf wire
135 | * format), writing to the given BinaryWriter.
136 | * @param {!proto.tokenpb.RefreshTokenResponse} message
137 | * @param {!jspb.BinaryWriter} writer
138 | * @suppress {unusedLocalVariables} f is only used for nested messages
139 | */
140 | proto.tokenpb.RefreshTokenResponse.serializeBinaryToWriter = function(message, writer) {
141 | var f = undefined;
142 | f = message.getData();
143 | if (f != null) {
144 | writer.writeMessage(
145 | 1,
146 | f,
147 | proto.tokenpb.TokenBundle.serializeBinaryToWriter
148 | );
149 | }
150 | };
151 |
152 |
153 | /**
154 | * optional TokenBundle data = 1;
155 | * @return {?proto.tokenpb.TokenBundle}
156 | */
157 | proto.tokenpb.RefreshTokenResponse.prototype.getData = function() {
158 | return /** @type{?proto.tokenpb.TokenBundle} */ (
159 | jspb.Message.getWrapperField(this, proto.tokenpb.TokenBundle, 1));
160 | };
161 |
162 |
163 | /**
164 | * @param {?proto.tokenpb.TokenBundle|undefined} value
165 | * @return {!proto.tokenpb.RefreshTokenResponse} returns this
166 | */
167 | proto.tokenpb.RefreshTokenResponse.prototype.setData = function(value) {
168 | return jspb.Message.setWrapperField(this, 1, value);
169 | };
170 |
171 |
172 | /**
173 | * Clears the message field making it undefined.
174 | * @return {!proto.tokenpb.RefreshTokenResponse} returns this
175 | */
176 | proto.tokenpb.RefreshTokenResponse.prototype.clearData = function() {
177 | return this.setData(undefined);
178 | };
179 |
180 |
181 | /**
182 | * Returns whether this field is set.
183 | * @return {boolean}
184 | */
185 | proto.tokenpb.RefreshTokenResponse.prototype.hasData = function() {
186 | return jspb.Message.getField(this, 1) != null;
187 | };
188 |
189 |
190 |
--------------------------------------------------------------------------------
/javascript/tokenpb/revoketokensrequest.js:
--------------------------------------------------------------------------------
1 | // source: token.proto
2 | /**
3 | * @fileoverview
4 | * @enhanceable
5 | * @suppress {messageConventions} JS Compiler reports an error if a variable or
6 | * field starts with 'MSG_' and isn't a translatable message.
7 | * @public
8 | */
9 | // GENERATED CODE -- DO NOT EDIT!
10 |
11 | goog.provide('proto.tokenpb.RevokeTokensRequest');
12 |
13 | goog.require('jspb.BinaryReader');
14 | goog.require('jspb.BinaryWriter');
15 | goog.require('jspb.Message');
16 |
17 | /**
18 | * Generated by JsPbCodeGenerator.
19 | * @param {Array=} opt_data Optional initial data array, typically from a
20 | * server response, or constructed directly in Javascript. The array is used
21 | * in place and becomes part of the constructed object. It is not cloned.
22 | * If no data is provided, the constructed object will be empty, but still
23 | * valid.
24 | * @extends {jspb.Message}
25 | * @constructor
26 | */
27 | proto.tokenpb.RevokeTokensRequest = function(opt_data) {
28 | jspb.Message.initialize(this, opt_data, 0, -1, null, null);
29 | };
30 | goog.inherits(proto.tokenpb.RevokeTokensRequest, jspb.Message);
31 | if (goog.DEBUG && !COMPILED) {
32 | /**
33 | * @public
34 | * @override
35 | */
36 | proto.tokenpb.RevokeTokensRequest.displayName = 'proto.tokenpb.RevokeTokensRequest';
37 | }
38 |
39 |
40 |
41 | if (jspb.Message.GENERATE_TO_OBJECT) {
42 | /**
43 | * Creates an object representation of this proto.
44 | * Field names that are reserved in JavaScript and will be renamed to pb_name.
45 | * Optional fields that are not set will be set to undefined.
46 | * To access a reserved field use, foo.pb_, eg, foo.pb_default.
47 | * For the list of reserved names please see:
48 | * net/proto2/compiler/js/internal/generator.cc#kKeyword.
49 | * @param {boolean=} opt_includeInstance Deprecated. whether to include the
50 | * JSPB instance for transitional soy proto support:
51 | * http://goto/soy-param-migration
52 | * @return {!Object}
53 | */
54 | proto.tokenpb.RevokeTokensRequest.prototype.toObject = function(opt_includeInstance) {
55 | return proto.tokenpb.RevokeTokensRequest.toObject(opt_includeInstance, this);
56 | };
57 |
58 |
59 | /**
60 | * Static version of the {@see toObject} method.
61 | * @param {boolean|undefined} includeInstance Deprecated. Whether to include
62 | * the JSPB instance for transitional soy proto support:
63 | * http://goto/soy-param-migration
64 | * @param {!proto.tokenpb.RevokeTokensRequest} msg The msg instance to transform.
65 | * @return {!Object}
66 | * @suppress {unusedLocalVariables} f is only used for nested messages
67 | */
68 | proto.tokenpb.RevokeTokensRequest.toObject = function(includeInstance, msg) {
69 | var f, obj = {
70 | searchByIndex: jspb.Message.getFieldWithDefault(msg, 1, ""),
71 | key: jspb.Message.getFieldWithDefault(msg, 2, "")
72 | };
73 |
74 | if (includeInstance) {
75 | obj.$jspbMessageInstance = msg;
76 | }
77 | return obj;
78 | };
79 | }
80 |
81 |
82 | /**
83 | * Deserializes binary data (in protobuf wire format).
84 | * @param {jspb.ByteSource} bytes The bytes to deserialize.
85 | * @return {!proto.tokenpb.RevokeTokensRequest}
86 | */
87 | proto.tokenpb.RevokeTokensRequest.deserializeBinary = function(bytes) {
88 | var reader = new jspb.BinaryReader(bytes);
89 | var msg = new proto.tokenpb.RevokeTokensRequest;
90 | return proto.tokenpb.RevokeTokensRequest.deserializeBinaryFromReader(msg, reader);
91 | };
92 |
93 |
94 | /**
95 | * Deserializes binary data (in protobuf wire format) from the
96 | * given reader into the given message object.
97 | * @param {!proto.tokenpb.RevokeTokensRequest} msg The message object to deserialize into.
98 | * @param {!jspb.BinaryReader} reader The BinaryReader to use.
99 | * @return {!proto.tokenpb.RevokeTokensRequest}
100 | */
101 | proto.tokenpb.RevokeTokensRequest.deserializeBinaryFromReader = function(msg, reader) {
102 | while (reader.nextField()) {
103 | if (reader.isEndGroup()) {
104 | break;
105 | }
106 | var field = reader.getFieldNumber();
107 | switch (field) {
108 | case 1:
109 | var value = /** @type {string} */ (reader.readString());
110 | msg.setSearchByIndex(value);
111 | break;
112 | case 2:
113 | var value = /** @type {string} */ (reader.readString());
114 | msg.setKey(value);
115 | break;
116 | default:
117 | reader.skipField();
118 | break;
119 | }
120 | }
121 | return msg;
122 | };
123 |
124 |
125 | /**
126 | * Serializes the message to binary data (in protobuf wire format).
127 | * @return {!Uint8Array}
128 | */
129 | proto.tokenpb.RevokeTokensRequest.prototype.serializeBinary = function() {
130 | var writer = new jspb.BinaryWriter();
131 | proto.tokenpb.RevokeTokensRequest.serializeBinaryToWriter(this, writer);
132 | return writer.getResultBuffer();
133 | };
134 |
135 |
136 | /**
137 | * Serializes the given message to binary data (in protobuf wire
138 | * format), writing to the given BinaryWriter.
139 | * @param {!proto.tokenpb.RevokeTokensRequest} message
140 | * @param {!jspb.BinaryWriter} writer
141 | * @suppress {unusedLocalVariables} f is only used for nested messages
142 | */
143 | proto.tokenpb.RevokeTokensRequest.serializeBinaryToWriter = function(message, writer) {
144 | var f = undefined;
145 | f = message.getSearchByIndex();
146 | if (f.length > 0) {
147 | writer.writeString(
148 | 1,
149 | f
150 | );
151 | }
152 | f = message.getKey();
153 | if (f.length > 0) {
154 | writer.writeString(
155 | 2,
156 | f
157 | );
158 | }
159 | };
160 |
161 |
162 | /**
163 | * optional string search_by_index = 1;
164 | * @return {string}
165 | */
166 | proto.tokenpb.RevokeTokensRequest.prototype.getSearchByIndex = function() {
167 | return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
168 | };
169 |
170 |
171 | /**
172 | * @param {string} value
173 | * @return {!proto.tokenpb.RevokeTokensRequest} returns this
174 | */
175 | proto.tokenpb.RevokeTokensRequest.prototype.setSearchByIndex = function(value) {
176 | return jspb.Message.setProto3StringField(this, 1, value);
177 | };
178 |
179 |
180 | /**
181 | * optional string key = 2;
182 | * @return {string}
183 | */
184 | proto.tokenpb.RevokeTokensRequest.prototype.getKey = function() {
185 | return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
186 | };
187 |
188 |
189 | /**
190 | * @param {string} value
191 | * @return {!proto.tokenpb.RevokeTokensRequest} returns this
192 | */
193 | proto.tokenpb.RevokeTokensRequest.prototype.setKey = function(value) {
194 | return jspb.Message.setProto3StringField(this, 2, value);
195 | };
196 |
197 |
198 |
--------------------------------------------------------------------------------
/javascript/chipperpb/speechresult.js:
--------------------------------------------------------------------------------
1 | // source: chipperpb.proto
2 | /**
3 | * @fileoverview
4 | * @enhanceable
5 | * @suppress {messageConventions} JS Compiler reports an error if a variable or
6 | * field starts with 'MSG_' and isn't a translatable message.
7 | * @public
8 | */
9 | // GENERATED CODE -- DO NOT EDIT!
10 | /* eslint-disable */
11 | // @ts-nocheck
12 |
13 | goog.provide('proto.chippergrpc2.SpeechResult');
14 |
15 | goog.require('jspb.BinaryReader');
16 | goog.require('jspb.BinaryWriter');
17 | goog.require('jspb.Message');
18 |
19 | /**
20 | * Generated by JsPbCodeGenerator.
21 | * @param {Array=} opt_data Optional initial data array, typically from a
22 | * server response, or constructed directly in Javascript. The array is used
23 | * in place and becomes part of the constructed object. It is not cloned.
24 | * If no data is provided, the constructed object will be empty, but still
25 | * valid.
26 | * @extends {jspb.Message}
27 | * @constructor
28 | */
29 | proto.chippergrpc2.SpeechResult = function(opt_data) {
30 | jspb.Message.initialize(this, opt_data, 0, -1, null, null);
31 | };
32 | goog.inherits(proto.chippergrpc2.SpeechResult, jspb.Message);
33 | if (goog.DEBUG && !COMPILED) {
34 | /**
35 | * @public
36 | * @override
37 | */
38 | proto.chippergrpc2.SpeechResult.displayName = 'proto.chippergrpc2.SpeechResult';
39 | }
40 |
41 |
42 |
43 | if (jspb.Message.GENERATE_TO_OBJECT) {
44 | /**
45 | * Creates an object representation of this proto.
46 | * Field names that are reserved in JavaScript and will be renamed to pb_name.
47 | * Optional fields that are not set will be set to undefined.
48 | * To access a reserved field use, foo.pb_, eg, foo.pb_default.
49 | * For the list of reserved names please see:
50 | * net/proto2/compiler/js/internal/generator.cc#kKeyword.
51 | * @param {boolean=} opt_includeInstance Deprecated. whether to include the
52 | * JSPB instance for transitional soy proto support:
53 | * http://goto/soy-param-migration
54 | * @return {!Object}
55 | */
56 | proto.chippergrpc2.SpeechResult.prototype.toObject = function(opt_includeInstance) {
57 | return proto.chippergrpc2.SpeechResult.toObject(opt_includeInstance, this);
58 | };
59 |
60 |
61 | /**
62 | * Static version of the {@see toObject} method.
63 | * @param {boolean|undefined} includeInstance Deprecated. Whether to include
64 | * the JSPB instance for transitional soy proto support:
65 | * http://goto/soy-param-migration
66 | * @param {!proto.chippergrpc2.SpeechResult} msg The msg instance to transform.
67 | * @return {!Object}
68 | * @suppress {unusedLocalVariables} f is only used for nested messages
69 | */
70 | proto.chippergrpc2.SpeechResult.toObject = function(includeInstance, msg) {
71 | var f, obj = {
72 | transcript: jspb.Message.getFieldWithDefault(msg, 1, ""),
73 | isFinal: jspb.Message.getBooleanFieldWithDefault(msg, 2, false)
74 | };
75 |
76 | if (includeInstance) {
77 | obj.$jspbMessageInstance = msg;
78 | }
79 | return obj;
80 | };
81 | }
82 |
83 |
84 | /**
85 | * Deserializes binary data (in protobuf wire format).
86 | * @param {jspb.ByteSource} bytes The bytes to deserialize.
87 | * @return {!proto.chippergrpc2.SpeechResult}
88 | */
89 | proto.chippergrpc2.SpeechResult.deserializeBinary = function(bytes) {
90 | var reader = new jspb.BinaryReader(bytes);
91 | var msg = new proto.chippergrpc2.SpeechResult;
92 | return proto.chippergrpc2.SpeechResult.deserializeBinaryFromReader(msg, reader);
93 | };
94 |
95 |
96 | /**
97 | * Deserializes binary data (in protobuf wire format) from the
98 | * given reader into the given message object.
99 | * @param {!proto.chippergrpc2.SpeechResult} msg The message object to deserialize into.
100 | * @param {!jspb.BinaryReader} reader The BinaryReader to use.
101 | * @return {!proto.chippergrpc2.SpeechResult}
102 | */
103 | proto.chippergrpc2.SpeechResult.deserializeBinaryFromReader = function(msg, reader) {
104 | while (reader.nextField()) {
105 | if (reader.isEndGroup()) {
106 | break;
107 | }
108 | var field = reader.getFieldNumber();
109 | switch (field) {
110 | case 1:
111 | var value = /** @type {string} */ (reader.readString());
112 | msg.setTranscript(value);
113 | break;
114 | case 2:
115 | var value = /** @type {boolean} */ (reader.readBool());
116 | msg.setIsFinal(value);
117 | break;
118 | default:
119 | reader.skipField();
120 | break;
121 | }
122 | }
123 | return msg;
124 | };
125 |
126 |
127 | /**
128 | * Serializes the message to binary data (in protobuf wire format).
129 | * @return {!Uint8Array}
130 | */
131 | proto.chippergrpc2.SpeechResult.prototype.serializeBinary = function() {
132 | var writer = new jspb.BinaryWriter();
133 | proto.chippergrpc2.SpeechResult.serializeBinaryToWriter(this, writer);
134 | return writer.getResultBuffer();
135 | };
136 |
137 |
138 | /**
139 | * Serializes the given message to binary data (in protobuf wire
140 | * format), writing to the given BinaryWriter.
141 | * @param {!proto.chippergrpc2.SpeechResult} message
142 | * @param {!jspb.BinaryWriter} writer
143 | * @suppress {unusedLocalVariables} f is only used for nested messages
144 | */
145 | proto.chippergrpc2.SpeechResult.serializeBinaryToWriter = function(message, writer) {
146 | var f = undefined;
147 | f = message.getTranscript();
148 | if (f.length > 0) {
149 | writer.writeString(
150 | 1,
151 | f
152 | );
153 | }
154 | f = message.getIsFinal();
155 | if (f) {
156 | writer.writeBool(
157 | 2,
158 | f
159 | );
160 | }
161 | };
162 |
163 |
164 | /**
165 | * optional string transcript = 1;
166 | * @return {string}
167 | */
168 | proto.chippergrpc2.SpeechResult.prototype.getTranscript = function() {
169 | return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
170 | };
171 |
172 |
173 | /**
174 | * @param {string} value
175 | * @return {!proto.chippergrpc2.SpeechResult} returns this
176 | */
177 | proto.chippergrpc2.SpeechResult.prototype.setTranscript = function(value) {
178 | return jspb.Message.setProto3StringField(this, 1, value);
179 | };
180 |
181 |
182 | /**
183 | * optional bool is_final = 2;
184 | * @return {boolean}
185 | */
186 | proto.chippergrpc2.SpeechResult.prototype.getIsFinal = function() {
187 | return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false));
188 | };
189 |
190 |
191 | /**
192 | * @param {boolean} value
193 | * @return {!proto.chippergrpc2.SpeechResult} returns this
194 | */
195 | proto.chippergrpc2.SpeechResult.prototype.setIsFinal = function(value) {
196 | return jspb.Message.setProto3BooleanField(this, 2, value);
197 | };
198 |
199 |
200 |
--------------------------------------------------------------------------------
/javascript/tokenpb/listrevokedtokensresponse.js:
--------------------------------------------------------------------------------
1 | // source: token.proto
2 | /**
3 | * @fileoverview
4 | * @enhanceable
5 | * @suppress {messageConventions} JS Compiler reports an error if a variable or
6 | * field starts with 'MSG_' and isn't a translatable message.
7 | * @public
8 | */
9 | // GENERATED CODE -- DO NOT EDIT!
10 |
11 | goog.provide('proto.tokenpb.ListRevokedTokensResponse');
12 |
13 | goog.require('jspb.BinaryReader');
14 | goog.require('jspb.BinaryWriter');
15 | goog.require('jspb.Message');
16 | goog.require('proto.tokenpb.TokensPage');
17 |
18 | /**
19 | * Generated by JsPbCodeGenerator.
20 | * @param {Array=} opt_data Optional initial data array, typically from a
21 | * server response, or constructed directly in Javascript. The array is used
22 | * in place and becomes part of the constructed object. It is not cloned.
23 | * If no data is provided, the constructed object will be empty, but still
24 | * valid.
25 | * @extends {jspb.Message}
26 | * @constructor
27 | */
28 | proto.tokenpb.ListRevokedTokensResponse = function(opt_data) {
29 | jspb.Message.initialize(this, opt_data, 0, -1, null, null);
30 | };
31 | goog.inherits(proto.tokenpb.ListRevokedTokensResponse, jspb.Message);
32 | if (goog.DEBUG && !COMPILED) {
33 | /**
34 | * @public
35 | * @override
36 | */
37 | proto.tokenpb.ListRevokedTokensResponse.displayName = 'proto.tokenpb.ListRevokedTokensResponse';
38 | }
39 |
40 |
41 |
42 | if (jspb.Message.GENERATE_TO_OBJECT) {
43 | /**
44 | * Creates an object representation of this proto.
45 | * Field names that are reserved in JavaScript and will be renamed to pb_name.
46 | * Optional fields that are not set will be set to undefined.
47 | * To access a reserved field use, foo.pb_, eg, foo.pb_default.
48 | * For the list of reserved names please see:
49 | * net/proto2/compiler/js/internal/generator.cc#kKeyword.
50 | * @param {boolean=} opt_includeInstance Deprecated. whether to include the
51 | * JSPB instance for transitional soy proto support:
52 | * http://goto/soy-param-migration
53 | * @return {!Object}
54 | */
55 | proto.tokenpb.ListRevokedTokensResponse.prototype.toObject = function(opt_includeInstance) {
56 | return proto.tokenpb.ListRevokedTokensResponse.toObject(opt_includeInstance, this);
57 | };
58 |
59 |
60 | /**
61 | * Static version of the {@see toObject} method.
62 | * @param {boolean|undefined} includeInstance Deprecated. Whether to include
63 | * the JSPB instance for transitional soy proto support:
64 | * http://goto/soy-param-migration
65 | * @param {!proto.tokenpb.ListRevokedTokensResponse} msg The msg instance to transform.
66 | * @return {!Object}
67 | * @suppress {unusedLocalVariables} f is only used for nested messages
68 | */
69 | proto.tokenpb.ListRevokedTokensResponse.toObject = function(includeInstance, msg) {
70 | var f, obj = {
71 | data: (f = msg.getData()) && proto.tokenpb.TokensPage.toObject(includeInstance, f)
72 | };
73 |
74 | if (includeInstance) {
75 | obj.$jspbMessageInstance = msg;
76 | }
77 | return obj;
78 | };
79 | }
80 |
81 |
82 | /**
83 | * Deserializes binary data (in protobuf wire format).
84 | * @param {jspb.ByteSource} bytes The bytes to deserialize.
85 | * @return {!proto.tokenpb.ListRevokedTokensResponse}
86 | */
87 | proto.tokenpb.ListRevokedTokensResponse.deserializeBinary = function(bytes) {
88 | var reader = new jspb.BinaryReader(bytes);
89 | var msg = new proto.tokenpb.ListRevokedTokensResponse;
90 | return proto.tokenpb.ListRevokedTokensResponse.deserializeBinaryFromReader(msg, reader);
91 | };
92 |
93 |
94 | /**
95 | * Deserializes binary data (in protobuf wire format) from the
96 | * given reader into the given message object.
97 | * @param {!proto.tokenpb.ListRevokedTokensResponse} msg The message object to deserialize into.
98 | * @param {!jspb.BinaryReader} reader The BinaryReader to use.
99 | * @return {!proto.tokenpb.ListRevokedTokensResponse}
100 | */
101 | proto.tokenpb.ListRevokedTokensResponse.deserializeBinaryFromReader = function(msg, reader) {
102 | while (reader.nextField()) {
103 | if (reader.isEndGroup()) {
104 | break;
105 | }
106 | var field = reader.getFieldNumber();
107 | switch (field) {
108 | case 1:
109 | var value = new proto.tokenpb.TokensPage;
110 | reader.readMessage(value,proto.tokenpb.TokensPage.deserializeBinaryFromReader);
111 | msg.setData(value);
112 | break;
113 | default:
114 | reader.skipField();
115 | break;
116 | }
117 | }
118 | return msg;
119 | };
120 |
121 |
122 | /**
123 | * Serializes the message to binary data (in protobuf wire format).
124 | * @return {!Uint8Array}
125 | */
126 | proto.tokenpb.ListRevokedTokensResponse.prototype.serializeBinary = function() {
127 | var writer = new jspb.BinaryWriter();
128 | proto.tokenpb.ListRevokedTokensResponse.serializeBinaryToWriter(this, writer);
129 | return writer.getResultBuffer();
130 | };
131 |
132 |
133 | /**
134 | * Serializes the given message to binary data (in protobuf wire
135 | * format), writing to the given BinaryWriter.
136 | * @param {!proto.tokenpb.ListRevokedTokensResponse} message
137 | * @param {!jspb.BinaryWriter} writer
138 | * @suppress {unusedLocalVariables} f is only used for nested messages
139 | */
140 | proto.tokenpb.ListRevokedTokensResponse.serializeBinaryToWriter = function(message, writer) {
141 | var f = undefined;
142 | f = message.getData();
143 | if (f != null) {
144 | writer.writeMessage(
145 | 1,
146 | f,
147 | proto.tokenpb.TokensPage.serializeBinaryToWriter
148 | );
149 | }
150 | };
151 |
152 |
153 | /**
154 | * optional TokensPage data = 1;
155 | * @return {?proto.tokenpb.TokensPage}
156 | */
157 | proto.tokenpb.ListRevokedTokensResponse.prototype.getData = function() {
158 | return /** @type{?proto.tokenpb.TokensPage} */ (
159 | jspb.Message.getWrapperField(this, proto.tokenpb.TokensPage, 1));
160 | };
161 |
162 |
163 | /**
164 | * @param {?proto.tokenpb.TokensPage|undefined} value
165 | * @return {!proto.tokenpb.ListRevokedTokensResponse} returns this
166 | */
167 | proto.tokenpb.ListRevokedTokensResponse.prototype.setData = function(value) {
168 | return jspb.Message.setWrapperField(this, 1, value);
169 | };
170 |
171 |
172 | /**
173 | * Clears the message field making it undefined.
174 | * @return {!proto.tokenpb.ListRevokedTokensResponse} returns this
175 | */
176 | proto.tokenpb.ListRevokedTokensResponse.prototype.clearData = function() {
177 | return this.setData(undefined);
178 | };
179 |
180 |
181 | /**
182 | * Returns whether this field is set.
183 | * @return {boolean}
184 | */
185 | proto.tokenpb.ListRevokedTokensResponse.prototype.hasData = function() {
186 | return jspb.Message.getField(this, 1) != null;
187 | };
188 |
189 |
190 |
--------------------------------------------------------------------------------
/javascript/jdocspb/viewdocsresp.js:
--------------------------------------------------------------------------------
1 | // source: jdocs.proto
2 | /**
3 | * @fileoverview
4 | * @enhanceable
5 | * @suppress {messageConventions} JS Compiler reports an error if a variable or
6 | * field starts with 'MSG_' and isn't a translatable message.
7 | * @public
8 | */
9 | // GENERATED CODE -- DO NOT EDIT!
10 |
11 | goog.provide('proto.jdocspb.ViewDocsResp');
12 |
13 | goog.require('jspb.BinaryReader');
14 | goog.require('jspb.BinaryWriter');
15 | goog.require('jspb.Message');
16 | goog.require('proto.jdocspb.ViewDoc');
17 |
18 | /**
19 | * Generated by JsPbCodeGenerator.
20 | * @param {Array=} opt_data Optional initial data array, typically from a
21 | * server response, or constructed directly in Javascript. The array is used
22 | * in place and becomes part of the constructed object. It is not cloned.
23 | * If no data is provided, the constructed object will be empty, but still
24 | * valid.
25 | * @extends {jspb.Message}
26 | * @constructor
27 | */
28 | proto.jdocspb.ViewDocsResp = function(opt_data) {
29 | jspb.Message.initialize(this, opt_data, 0, -1, proto.jdocspb.ViewDocsResp.repeatedFields_, null);
30 | };
31 | goog.inherits(proto.jdocspb.ViewDocsResp, jspb.Message);
32 | if (goog.DEBUG && !COMPILED) {
33 | /**
34 | * @public
35 | * @override
36 | */
37 | proto.jdocspb.ViewDocsResp.displayName = 'proto.jdocspb.ViewDocsResp';
38 | }
39 |
40 | /**
41 | * List of repeated fields within this message type.
42 | * @private {!Array}
43 | * @const
44 | */
45 | proto.jdocspb.ViewDocsResp.repeatedFields_ = [1];
46 |
47 |
48 |
49 | if (jspb.Message.GENERATE_TO_OBJECT) {
50 | /**
51 | * Creates an object representation of this proto.
52 | * Field names that are reserved in JavaScript and will be renamed to pb_name.
53 | * Optional fields that are not set will be set to undefined.
54 | * To access a reserved field use, foo.pb_, eg, foo.pb_default.
55 | * For the list of reserved names please see:
56 | * net/proto2/compiler/js/internal/generator.cc#kKeyword.
57 | * @param {boolean=} opt_includeInstance Deprecated. whether to include the
58 | * JSPB instance for transitional soy proto support:
59 | * http://goto/soy-param-migration
60 | * @return {!Object}
61 | */
62 | proto.jdocspb.ViewDocsResp.prototype.toObject = function(opt_includeInstance) {
63 | return proto.jdocspb.ViewDocsResp.toObject(opt_includeInstance, this);
64 | };
65 |
66 |
67 | /**
68 | * Static version of the {@see toObject} method.
69 | * @param {boolean|undefined} includeInstance Deprecated. Whether to include
70 | * the JSPB instance for transitional soy proto support:
71 | * http://goto/soy-param-migration
72 | * @param {!proto.jdocspb.ViewDocsResp} msg The msg instance to transform.
73 | * @return {!Object}
74 | * @suppress {unusedLocalVariables} f is only used for nested messages
75 | */
76 | proto.jdocspb.ViewDocsResp.toObject = function(includeInstance, msg) {
77 | var f, obj = {
78 | docsList: jspb.Message.toObjectList(msg.getDocsList(),
79 | proto.jdocspb.ViewDoc.toObject, includeInstance)
80 | };
81 |
82 | if (includeInstance) {
83 | obj.$jspbMessageInstance = msg;
84 | }
85 | return obj;
86 | };
87 | }
88 |
89 |
90 | /**
91 | * Deserializes binary data (in protobuf wire format).
92 | * @param {jspb.ByteSource} bytes The bytes to deserialize.
93 | * @return {!proto.jdocspb.ViewDocsResp}
94 | */
95 | proto.jdocspb.ViewDocsResp.deserializeBinary = function(bytes) {
96 | var reader = new jspb.BinaryReader(bytes);
97 | var msg = new proto.jdocspb.ViewDocsResp;
98 | return proto.jdocspb.ViewDocsResp.deserializeBinaryFromReader(msg, reader);
99 | };
100 |
101 |
102 | /**
103 | * Deserializes binary data (in protobuf wire format) from the
104 | * given reader into the given message object.
105 | * @param {!proto.jdocspb.ViewDocsResp} msg The message object to deserialize into.
106 | * @param {!jspb.BinaryReader} reader The BinaryReader to use.
107 | * @return {!proto.jdocspb.ViewDocsResp}
108 | */
109 | proto.jdocspb.ViewDocsResp.deserializeBinaryFromReader = function(msg, reader) {
110 | while (reader.nextField()) {
111 | if (reader.isEndGroup()) {
112 | break;
113 | }
114 | var field = reader.getFieldNumber();
115 | switch (field) {
116 | case 1:
117 | var value = new proto.jdocspb.ViewDoc;
118 | reader.readMessage(value,proto.jdocspb.ViewDoc.deserializeBinaryFromReader);
119 | msg.addDocs(value);
120 | break;
121 | default:
122 | reader.skipField();
123 | break;
124 | }
125 | }
126 | return msg;
127 | };
128 |
129 |
130 | /**
131 | * Serializes the message to binary data (in protobuf wire format).
132 | * @return {!Uint8Array}
133 | */
134 | proto.jdocspb.ViewDocsResp.prototype.serializeBinary = function() {
135 | var writer = new jspb.BinaryWriter();
136 | proto.jdocspb.ViewDocsResp.serializeBinaryToWriter(this, writer);
137 | return writer.getResultBuffer();
138 | };
139 |
140 |
141 | /**
142 | * Serializes the given message to binary data (in protobuf wire
143 | * format), writing to the given BinaryWriter.
144 | * @param {!proto.jdocspb.ViewDocsResp} message
145 | * @param {!jspb.BinaryWriter} writer
146 | * @suppress {unusedLocalVariables} f is only used for nested messages
147 | */
148 | proto.jdocspb.ViewDocsResp.serializeBinaryToWriter = function(message, writer) {
149 | var f = undefined;
150 | f = message.getDocsList();
151 | if (f.length > 0) {
152 | writer.writeRepeatedMessage(
153 | 1,
154 | f,
155 | proto.jdocspb.ViewDoc.serializeBinaryToWriter
156 | );
157 | }
158 | };
159 |
160 |
161 | /**
162 | * repeated ViewDoc docs = 1;
163 | * @return {!Array}
164 | */
165 | proto.jdocspb.ViewDocsResp.prototype.getDocsList = function() {
166 | return /** @type{!Array} */ (
167 | jspb.Message.getRepeatedWrapperField(this, proto.jdocspb.ViewDoc, 1));
168 | };
169 |
170 |
171 | /**
172 | * @param {!Array} value
173 | * @return {!proto.jdocspb.ViewDocsResp} returns this
174 | */
175 | proto.jdocspb.ViewDocsResp.prototype.setDocsList = function(value) {
176 | return jspb.Message.setRepeatedWrapperField(this, 1, value);
177 | };
178 |
179 |
180 | /**
181 | * @param {!proto.jdocspb.ViewDoc=} opt_value
182 | * @param {number=} opt_index
183 | * @return {!proto.jdocspb.ViewDoc}
184 | */
185 | proto.jdocspb.ViewDocsResp.prototype.addDocs = function(opt_value, opt_index) {
186 | return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.jdocspb.ViewDoc, opt_index);
187 | };
188 |
189 |
190 | /**
191 | * Clears the list making it empty but non-null.
192 | * @return {!proto.jdocspb.ViewDocsResp} returns this
193 | */
194 | proto.jdocspb.ViewDocsResp.prototype.clearDocsList = function() {
195 | return this.setDocsList([]);
196 | };
197 |
198 |
199 |
--------------------------------------------------------------------------------
/javascript/tokenpb/associateprimaryuserresponse.js:
--------------------------------------------------------------------------------
1 | // source: token.proto
2 | /**
3 | * @fileoverview
4 | * @enhanceable
5 | * @suppress {messageConventions} JS Compiler reports an error if a variable or
6 | * field starts with 'MSG_' and isn't a translatable message.
7 | * @public
8 | */
9 | // GENERATED CODE -- DO NOT EDIT!
10 |
11 | goog.provide('proto.tokenpb.AssociatePrimaryUserResponse');
12 |
13 | goog.require('jspb.BinaryReader');
14 | goog.require('jspb.BinaryWriter');
15 | goog.require('jspb.Message');
16 | goog.require('proto.tokenpb.TokenBundle');
17 |
18 | /**
19 | * Generated by JsPbCodeGenerator.
20 | * @param {Array=} opt_data Optional initial data array, typically from a
21 | * server response, or constructed directly in Javascript. The array is used
22 | * in place and becomes part of the constructed object. It is not cloned.
23 | * If no data is provided, the constructed object will be empty, but still
24 | * valid.
25 | * @extends {jspb.Message}
26 | * @constructor
27 | */
28 | proto.tokenpb.AssociatePrimaryUserResponse = function(opt_data) {
29 | jspb.Message.initialize(this, opt_data, 0, -1, null, null);
30 | };
31 | goog.inherits(proto.tokenpb.AssociatePrimaryUserResponse, jspb.Message);
32 | if (goog.DEBUG && !COMPILED) {
33 | /**
34 | * @public
35 | * @override
36 | */
37 | proto.tokenpb.AssociatePrimaryUserResponse.displayName = 'proto.tokenpb.AssociatePrimaryUserResponse';
38 | }
39 |
40 |
41 |
42 | if (jspb.Message.GENERATE_TO_OBJECT) {
43 | /**
44 | * Creates an object representation of this proto.
45 | * Field names that are reserved in JavaScript and will be renamed to pb_name.
46 | * Optional fields that are not set will be set to undefined.
47 | * To access a reserved field use, foo.pb_, eg, foo.pb_default.
48 | * For the list of reserved names please see:
49 | * net/proto2/compiler/js/internal/generator.cc#kKeyword.
50 | * @param {boolean=} opt_includeInstance Deprecated. whether to include the
51 | * JSPB instance for transitional soy proto support:
52 | * http://goto/soy-param-migration
53 | * @return {!Object}
54 | */
55 | proto.tokenpb.AssociatePrimaryUserResponse.prototype.toObject = function(opt_includeInstance) {
56 | return proto.tokenpb.AssociatePrimaryUserResponse.toObject(opt_includeInstance, this);
57 | };
58 |
59 |
60 | /**
61 | * Static version of the {@see toObject} method.
62 | * @param {boolean|undefined} includeInstance Deprecated. Whether to include
63 | * the JSPB instance for transitional soy proto support:
64 | * http://goto/soy-param-migration
65 | * @param {!proto.tokenpb.AssociatePrimaryUserResponse} msg The msg instance to transform.
66 | * @return {!Object}
67 | * @suppress {unusedLocalVariables} f is only used for nested messages
68 | */
69 | proto.tokenpb.AssociatePrimaryUserResponse.toObject = function(includeInstance, msg) {
70 | var f, obj = {
71 | data: (f = msg.getData()) && proto.tokenpb.TokenBundle.toObject(includeInstance, f)
72 | };
73 |
74 | if (includeInstance) {
75 | obj.$jspbMessageInstance = msg;
76 | }
77 | return obj;
78 | };
79 | }
80 |
81 |
82 | /**
83 | * Deserializes binary data (in protobuf wire format).
84 | * @param {jspb.ByteSource} bytes The bytes to deserialize.
85 | * @return {!proto.tokenpb.AssociatePrimaryUserResponse}
86 | */
87 | proto.tokenpb.AssociatePrimaryUserResponse.deserializeBinary = function(bytes) {
88 | var reader = new jspb.BinaryReader(bytes);
89 | var msg = new proto.tokenpb.AssociatePrimaryUserResponse;
90 | return proto.tokenpb.AssociatePrimaryUserResponse.deserializeBinaryFromReader(msg, reader);
91 | };
92 |
93 |
94 | /**
95 | * Deserializes binary data (in protobuf wire format) from the
96 | * given reader into the given message object.
97 | * @param {!proto.tokenpb.AssociatePrimaryUserResponse} msg The message object to deserialize into.
98 | * @param {!jspb.BinaryReader} reader The BinaryReader to use.
99 | * @return {!proto.tokenpb.AssociatePrimaryUserResponse}
100 | */
101 | proto.tokenpb.AssociatePrimaryUserResponse.deserializeBinaryFromReader = function(msg, reader) {
102 | while (reader.nextField()) {
103 | if (reader.isEndGroup()) {
104 | break;
105 | }
106 | var field = reader.getFieldNumber();
107 | switch (field) {
108 | case 1:
109 | var value = new proto.tokenpb.TokenBundle;
110 | reader.readMessage(value,proto.tokenpb.TokenBundle.deserializeBinaryFromReader);
111 | msg.setData(value);
112 | break;
113 | default:
114 | reader.skipField();
115 | break;
116 | }
117 | }
118 | return msg;
119 | };
120 |
121 |
122 | /**
123 | * Serializes the message to binary data (in protobuf wire format).
124 | * @return {!Uint8Array}
125 | */
126 | proto.tokenpb.AssociatePrimaryUserResponse.prototype.serializeBinary = function() {
127 | var writer = new jspb.BinaryWriter();
128 | proto.tokenpb.AssociatePrimaryUserResponse.serializeBinaryToWriter(this, writer);
129 | return writer.getResultBuffer();
130 | };
131 |
132 |
133 | /**
134 | * Serializes the given message to binary data (in protobuf wire
135 | * format), writing to the given BinaryWriter.
136 | * @param {!proto.tokenpb.AssociatePrimaryUserResponse} message
137 | * @param {!jspb.BinaryWriter} writer
138 | * @suppress {unusedLocalVariables} f is only used for nested messages
139 | */
140 | proto.tokenpb.AssociatePrimaryUserResponse.serializeBinaryToWriter = function(message, writer) {
141 | var f = undefined;
142 | f = message.getData();
143 | if (f != null) {
144 | writer.writeMessage(
145 | 1,
146 | f,
147 | proto.tokenpb.TokenBundle.serializeBinaryToWriter
148 | );
149 | }
150 | };
151 |
152 |
153 | /**
154 | * optional TokenBundle data = 1;
155 | * @return {?proto.tokenpb.TokenBundle}
156 | */
157 | proto.tokenpb.AssociatePrimaryUserResponse.prototype.getData = function() {
158 | return /** @type{?proto.tokenpb.TokenBundle} */ (
159 | jspb.Message.getWrapperField(this, proto.tokenpb.TokenBundle, 1));
160 | };
161 |
162 |
163 | /**
164 | * @param {?proto.tokenpb.TokenBundle|undefined} value
165 | * @return {!proto.tokenpb.AssociatePrimaryUserResponse} returns this
166 | */
167 | proto.tokenpb.AssociatePrimaryUserResponse.prototype.setData = function(value) {
168 | return jspb.Message.setWrapperField(this, 1, value);
169 | };
170 |
171 |
172 | /**
173 | * Clears the message field making it undefined.
174 | * @return {!proto.tokenpb.AssociatePrimaryUserResponse} returns this
175 | */
176 | proto.tokenpb.AssociatePrimaryUserResponse.prototype.clearData = function() {
177 | return this.setData(undefined);
178 | };
179 |
180 |
181 | /**
182 | * Returns whether this field is set.
183 | * @return {boolean}
184 | */
185 | proto.tokenpb.AssociatePrimaryUserResponse.prototype.hasData = function() {
186 | return jspb.Message.getField(this, 1) != null;
187 | };
188 |
189 |
190 |
--------------------------------------------------------------------------------
/javascript/jdocspb/writedocresp.js:
--------------------------------------------------------------------------------
1 | // source: jdocs.proto
2 | /**
3 | * @fileoverview
4 | * @enhanceable
5 | * @suppress {messageConventions} JS Compiler reports an error if a variable or
6 | * field starts with 'MSG_' and isn't a translatable message.
7 | * @public
8 | */
9 | // GENERATED CODE -- DO NOT EDIT!
10 |
11 | goog.provide('proto.jdocspb.WriteDocResp');
12 | goog.provide('proto.jdocspb.WriteDocResp.Status');
13 |
14 | goog.require('jspb.BinaryReader');
15 | goog.require('jspb.BinaryWriter');
16 | goog.require('jspb.Message');
17 |
18 | /**
19 | * Generated by JsPbCodeGenerator.
20 | * @param {Array=} opt_data Optional initial data array, typically from a
21 | * server response, or constructed directly in Javascript. The array is used
22 | * in place and becomes part of the constructed object. It is not cloned.
23 | * If no data is provided, the constructed object will be empty, but still
24 | * valid.
25 | * @extends {jspb.Message}
26 | * @constructor
27 | */
28 | proto.jdocspb.WriteDocResp = function(opt_data) {
29 | jspb.Message.initialize(this, opt_data, 0, -1, null, null);
30 | };
31 | goog.inherits(proto.jdocspb.WriteDocResp, jspb.Message);
32 | if (goog.DEBUG && !COMPILED) {
33 | /**
34 | * @public
35 | * @override
36 | */
37 | proto.jdocspb.WriteDocResp.displayName = 'proto.jdocspb.WriteDocResp';
38 | }
39 |
40 |
41 |
42 | if (jspb.Message.GENERATE_TO_OBJECT) {
43 | /**
44 | * Creates an object representation of this proto.
45 | * Field names that are reserved in JavaScript and will be renamed to pb_name.
46 | * Optional fields that are not set will be set to undefined.
47 | * To access a reserved field use, foo.pb_, eg, foo.pb_default.
48 | * For the list of reserved names please see:
49 | * net/proto2/compiler/js/internal/generator.cc#kKeyword.
50 | * @param {boolean=} opt_includeInstance Deprecated. whether to include the
51 | * JSPB instance for transitional soy proto support:
52 | * http://goto/soy-param-migration
53 | * @return {!Object}
54 | */
55 | proto.jdocspb.WriteDocResp.prototype.toObject = function(opt_includeInstance) {
56 | return proto.jdocspb.WriteDocResp.toObject(opt_includeInstance, this);
57 | };
58 |
59 |
60 | /**
61 | * Static version of the {@see toObject} method.
62 | * @param {boolean|undefined} includeInstance Deprecated. Whether to include
63 | * the JSPB instance for transitional soy proto support:
64 | * http://goto/soy-param-migration
65 | * @param {!proto.jdocspb.WriteDocResp} msg The msg instance to transform.
66 | * @return {!Object}
67 | * @suppress {unusedLocalVariables} f is only used for nested messages
68 | */
69 | proto.jdocspb.WriteDocResp.toObject = function(includeInstance, msg) {
70 | var f, obj = {
71 | status: jspb.Message.getFieldWithDefault(msg, 1, 0),
72 | latestDocVersion: jspb.Message.getFieldWithDefault(msg, 2, 0)
73 | };
74 |
75 | if (includeInstance) {
76 | obj.$jspbMessageInstance = msg;
77 | }
78 | return obj;
79 | };
80 | }
81 |
82 |
83 | /**
84 | * Deserializes binary data (in protobuf wire format).
85 | * @param {jspb.ByteSource} bytes The bytes to deserialize.
86 | * @return {!proto.jdocspb.WriteDocResp}
87 | */
88 | proto.jdocspb.WriteDocResp.deserializeBinary = function(bytes) {
89 | var reader = new jspb.BinaryReader(bytes);
90 | var msg = new proto.jdocspb.WriteDocResp;
91 | return proto.jdocspb.WriteDocResp.deserializeBinaryFromReader(msg, reader);
92 | };
93 |
94 |
95 | /**
96 | * Deserializes binary data (in protobuf wire format) from the
97 | * given reader into the given message object.
98 | * @param {!proto.jdocspb.WriteDocResp} msg The message object to deserialize into.
99 | * @param {!jspb.BinaryReader} reader The BinaryReader to use.
100 | * @return {!proto.jdocspb.WriteDocResp}
101 | */
102 | proto.jdocspb.WriteDocResp.deserializeBinaryFromReader = function(msg, reader) {
103 | while (reader.nextField()) {
104 | if (reader.isEndGroup()) {
105 | break;
106 | }
107 | var field = reader.getFieldNumber();
108 | switch (field) {
109 | case 1:
110 | var value = /** @type {!proto.jdocspb.WriteDocResp.Status} */ (reader.readEnum());
111 | msg.setStatus(value);
112 | break;
113 | case 2:
114 | var value = /** @type {number} */ (reader.readUint64());
115 | msg.setLatestDocVersion(value);
116 | break;
117 | default:
118 | reader.skipField();
119 | break;
120 | }
121 | }
122 | return msg;
123 | };
124 |
125 |
126 | /**
127 | * Serializes the message to binary data (in protobuf wire format).
128 | * @return {!Uint8Array}
129 | */
130 | proto.jdocspb.WriteDocResp.prototype.serializeBinary = function() {
131 | var writer = new jspb.BinaryWriter();
132 | proto.jdocspb.WriteDocResp.serializeBinaryToWriter(this, writer);
133 | return writer.getResultBuffer();
134 | };
135 |
136 |
137 | /**
138 | * Serializes the given message to binary data (in protobuf wire
139 | * format), writing to the given BinaryWriter.
140 | * @param {!proto.jdocspb.WriteDocResp} message
141 | * @param {!jspb.BinaryWriter} writer
142 | * @suppress {unusedLocalVariables} f is only used for nested messages
143 | */
144 | proto.jdocspb.WriteDocResp.serializeBinaryToWriter = function(message, writer) {
145 | var f = undefined;
146 | f = message.getStatus();
147 | if (f !== 0.0) {
148 | writer.writeEnum(
149 | 1,
150 | f
151 | );
152 | }
153 | f = message.getLatestDocVersion();
154 | if (f !== 0) {
155 | writer.writeUint64(
156 | 2,
157 | f
158 | );
159 | }
160 | };
161 |
162 |
163 | /**
164 | * @enum {number}
165 | */
166 | proto.jdocspb.WriteDocResp.Status = {
167 | ACCEPTED: 0,
168 | REJECTED_BAD_DOC_VERSION: 1,
169 | REJECTED_BAD_FMT_VERSION: 2
170 | };
171 |
172 | /**
173 | * optional Status status = 1;
174 | * @return {!proto.jdocspb.WriteDocResp.Status}
175 | */
176 | proto.jdocspb.WriteDocResp.prototype.getStatus = function() {
177 | return /** @type {!proto.jdocspb.WriteDocResp.Status} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
178 | };
179 |
180 |
181 | /**
182 | * @param {!proto.jdocspb.WriteDocResp.Status} value
183 | * @return {!proto.jdocspb.WriteDocResp} returns this
184 | */
185 | proto.jdocspb.WriteDocResp.prototype.setStatus = function(value) {
186 | return jspb.Message.setProto3EnumField(this, 1, value);
187 | };
188 |
189 |
190 | /**
191 | * optional uint64 latest_doc_version = 2;
192 | * @return {number}
193 | */
194 | proto.jdocspb.WriteDocResp.prototype.getLatestDocVersion = function() {
195 | return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
196 | };
197 |
198 |
199 | /**
200 | * @param {number} value
201 | * @return {!proto.jdocspb.WriteDocResp} returns this
202 | */
203 | proto.jdocspb.WriteDocResp.prototype.setLatestDocVersion = function(value) {
204 | return jspb.Message.setProto3IntField(this, 2, value);
205 | };
206 |
207 |
208 |
--------------------------------------------------------------------------------
/javascript/tokenpb/reassociateprimaryuserresponse.js:
--------------------------------------------------------------------------------
1 | // source: token.proto
2 | /**
3 | * @fileoverview
4 | * @enhanceable
5 | * @suppress {messageConventions} JS Compiler reports an error if a variable or
6 | * field starts with 'MSG_' and isn't a translatable message.
7 | * @public
8 | */
9 | // GENERATED CODE -- DO NOT EDIT!
10 |
11 | goog.provide('proto.tokenpb.ReassociatePrimaryUserResponse');
12 |
13 | goog.require('jspb.BinaryReader');
14 | goog.require('jspb.BinaryWriter');
15 | goog.require('jspb.Message');
16 | goog.require('proto.tokenpb.TokenBundle');
17 |
18 | /**
19 | * Generated by JsPbCodeGenerator.
20 | * @param {Array=} opt_data Optional initial data array, typically from a
21 | * server response, or constructed directly in Javascript. The array is used
22 | * in place and becomes part of the constructed object. It is not cloned.
23 | * If no data is provided, the constructed object will be empty, but still
24 | * valid.
25 | * @extends {jspb.Message}
26 | * @constructor
27 | */
28 | proto.tokenpb.ReassociatePrimaryUserResponse = function(opt_data) {
29 | jspb.Message.initialize(this, opt_data, 0, -1, null, null);
30 | };
31 | goog.inherits(proto.tokenpb.ReassociatePrimaryUserResponse, jspb.Message);
32 | if (goog.DEBUG && !COMPILED) {
33 | /**
34 | * @public
35 | * @override
36 | */
37 | proto.tokenpb.ReassociatePrimaryUserResponse.displayName = 'proto.tokenpb.ReassociatePrimaryUserResponse';
38 | }
39 |
40 |
41 |
42 | if (jspb.Message.GENERATE_TO_OBJECT) {
43 | /**
44 | * Creates an object representation of this proto.
45 | * Field names that are reserved in JavaScript and will be renamed to pb_name.
46 | * Optional fields that are not set will be set to undefined.
47 | * To access a reserved field use, foo.pb_, eg, foo.pb_default.
48 | * For the list of reserved names please see:
49 | * net/proto2/compiler/js/internal/generator.cc#kKeyword.
50 | * @param {boolean=} opt_includeInstance Deprecated. whether to include the
51 | * JSPB instance for transitional soy proto support:
52 | * http://goto/soy-param-migration
53 | * @return {!Object}
54 | */
55 | proto.tokenpb.ReassociatePrimaryUserResponse.prototype.toObject = function(opt_includeInstance) {
56 | return proto.tokenpb.ReassociatePrimaryUserResponse.toObject(opt_includeInstance, this);
57 | };
58 |
59 |
60 | /**
61 | * Static version of the {@see toObject} method.
62 | * @param {boolean|undefined} includeInstance Deprecated. Whether to include
63 | * the JSPB instance for transitional soy proto support:
64 | * http://goto/soy-param-migration
65 | * @param {!proto.tokenpb.ReassociatePrimaryUserResponse} msg The msg instance to transform.
66 | * @return {!Object}
67 | * @suppress {unusedLocalVariables} f is only used for nested messages
68 | */
69 | proto.tokenpb.ReassociatePrimaryUserResponse.toObject = function(includeInstance, msg) {
70 | var f, obj = {
71 | data: (f = msg.getData()) && proto.tokenpb.TokenBundle.toObject(includeInstance, f)
72 | };
73 |
74 | if (includeInstance) {
75 | obj.$jspbMessageInstance = msg;
76 | }
77 | return obj;
78 | };
79 | }
80 |
81 |
82 | /**
83 | * Deserializes binary data (in protobuf wire format).
84 | * @param {jspb.ByteSource} bytes The bytes to deserialize.
85 | * @return {!proto.tokenpb.ReassociatePrimaryUserResponse}
86 | */
87 | proto.tokenpb.ReassociatePrimaryUserResponse.deserializeBinary = function(bytes) {
88 | var reader = new jspb.BinaryReader(bytes);
89 | var msg = new proto.tokenpb.ReassociatePrimaryUserResponse;
90 | return proto.tokenpb.ReassociatePrimaryUserResponse.deserializeBinaryFromReader(msg, reader);
91 | };
92 |
93 |
94 | /**
95 | * Deserializes binary data (in protobuf wire format) from the
96 | * given reader into the given message object.
97 | * @param {!proto.tokenpb.ReassociatePrimaryUserResponse} msg The message object to deserialize into.
98 | * @param {!jspb.BinaryReader} reader The BinaryReader to use.
99 | * @return {!proto.tokenpb.ReassociatePrimaryUserResponse}
100 | */
101 | proto.tokenpb.ReassociatePrimaryUserResponse.deserializeBinaryFromReader = function(msg, reader) {
102 | while (reader.nextField()) {
103 | if (reader.isEndGroup()) {
104 | break;
105 | }
106 | var field = reader.getFieldNumber();
107 | switch (field) {
108 | case 1:
109 | var value = new proto.tokenpb.TokenBundle;
110 | reader.readMessage(value,proto.tokenpb.TokenBundle.deserializeBinaryFromReader);
111 | msg.setData(value);
112 | break;
113 | default:
114 | reader.skipField();
115 | break;
116 | }
117 | }
118 | return msg;
119 | };
120 |
121 |
122 | /**
123 | * Serializes the message to binary data (in protobuf wire format).
124 | * @return {!Uint8Array}
125 | */
126 | proto.tokenpb.ReassociatePrimaryUserResponse.prototype.serializeBinary = function() {
127 | var writer = new jspb.BinaryWriter();
128 | proto.tokenpb.ReassociatePrimaryUserResponse.serializeBinaryToWriter(this, writer);
129 | return writer.getResultBuffer();
130 | };
131 |
132 |
133 | /**
134 | * Serializes the given message to binary data (in protobuf wire
135 | * format), writing to the given BinaryWriter.
136 | * @param {!proto.tokenpb.ReassociatePrimaryUserResponse} message
137 | * @param {!jspb.BinaryWriter} writer
138 | * @suppress {unusedLocalVariables} f is only used for nested messages
139 | */
140 | proto.tokenpb.ReassociatePrimaryUserResponse.serializeBinaryToWriter = function(message, writer) {
141 | var f = undefined;
142 | f = message.getData();
143 | if (f != null) {
144 | writer.writeMessage(
145 | 1,
146 | f,
147 | proto.tokenpb.TokenBundle.serializeBinaryToWriter
148 | );
149 | }
150 | };
151 |
152 |
153 | /**
154 | * optional TokenBundle data = 1;
155 | * @return {?proto.tokenpb.TokenBundle}
156 | */
157 | proto.tokenpb.ReassociatePrimaryUserResponse.prototype.getData = function() {
158 | return /** @type{?proto.tokenpb.TokenBundle} */ (
159 | jspb.Message.getWrapperField(this, proto.tokenpb.TokenBundle, 1));
160 | };
161 |
162 |
163 | /**
164 | * @param {?proto.tokenpb.TokenBundle|undefined} value
165 | * @return {!proto.tokenpb.ReassociatePrimaryUserResponse} returns this
166 | */
167 | proto.tokenpb.ReassociatePrimaryUserResponse.prototype.setData = function(value) {
168 | return jspb.Message.setWrapperField(this, 1, value);
169 | };
170 |
171 |
172 | /**
173 | * Clears the message field making it undefined.
174 | * @return {!proto.tokenpb.ReassociatePrimaryUserResponse} returns this
175 | */
176 | proto.tokenpb.ReassociatePrimaryUserResponse.prototype.clearData = function() {
177 | return this.setData(undefined);
178 | };
179 |
180 |
181 | /**
182 | * Returns whether this field is set.
183 | * @return {boolean}
184 | */
185 | proto.tokenpb.ReassociatePrimaryUserResponse.prototype.hasData = function() {
186 | return jspb.Message.getField(this, 1) != null;
187 | };
188 |
189 |
190 |
--------------------------------------------------------------------------------
/javascript/tokenpb/associatesecondaryclientresponse.js:
--------------------------------------------------------------------------------
1 | // source: token.proto
2 | /**
3 | * @fileoverview
4 | * @enhanceable
5 | * @suppress {messageConventions} JS Compiler reports an error if a variable or
6 | * field starts with 'MSG_' and isn't a translatable message.
7 | * @public
8 | */
9 | // GENERATED CODE -- DO NOT EDIT!
10 |
11 | goog.provide('proto.tokenpb.AssociateSecondaryClientResponse');
12 |
13 | goog.require('jspb.BinaryReader');
14 | goog.require('jspb.BinaryWriter');
15 | goog.require('jspb.Message');
16 | goog.require('proto.tokenpb.TokenBundle');
17 |
18 | /**
19 | * Generated by JsPbCodeGenerator.
20 | * @param {Array=} opt_data Optional initial data array, typically from a
21 | * server response, or constructed directly in Javascript. The array is used
22 | * in place and becomes part of the constructed object. It is not cloned.
23 | * If no data is provided, the constructed object will be empty, but still
24 | * valid.
25 | * @extends {jspb.Message}
26 | * @constructor
27 | */
28 | proto.tokenpb.AssociateSecondaryClientResponse = function(opt_data) {
29 | jspb.Message.initialize(this, opt_data, 0, -1, null, null);
30 | };
31 | goog.inherits(proto.tokenpb.AssociateSecondaryClientResponse, jspb.Message);
32 | if (goog.DEBUG && !COMPILED) {
33 | /**
34 | * @public
35 | * @override
36 | */
37 | proto.tokenpb.AssociateSecondaryClientResponse.displayName = 'proto.tokenpb.AssociateSecondaryClientResponse';
38 | }
39 |
40 |
41 |
42 | if (jspb.Message.GENERATE_TO_OBJECT) {
43 | /**
44 | * Creates an object representation of this proto.
45 | * Field names that are reserved in JavaScript and will be renamed to pb_name.
46 | * Optional fields that are not set will be set to undefined.
47 | * To access a reserved field use, foo.pb_, eg, foo.pb_default.
48 | * For the list of reserved names please see:
49 | * net/proto2/compiler/js/internal/generator.cc#kKeyword.
50 | * @param {boolean=} opt_includeInstance Deprecated. whether to include the
51 | * JSPB instance for transitional soy proto support:
52 | * http://goto/soy-param-migration
53 | * @return {!Object}
54 | */
55 | proto.tokenpb.AssociateSecondaryClientResponse.prototype.toObject = function(opt_includeInstance) {
56 | return proto.tokenpb.AssociateSecondaryClientResponse.toObject(opt_includeInstance, this);
57 | };
58 |
59 |
60 | /**
61 | * Static version of the {@see toObject} method.
62 | * @param {boolean|undefined} includeInstance Deprecated. Whether to include
63 | * the JSPB instance for transitional soy proto support:
64 | * http://goto/soy-param-migration
65 | * @param {!proto.tokenpb.AssociateSecondaryClientResponse} msg The msg instance to transform.
66 | * @return {!Object}
67 | * @suppress {unusedLocalVariables} f is only used for nested messages
68 | */
69 | proto.tokenpb.AssociateSecondaryClientResponse.toObject = function(includeInstance, msg) {
70 | var f, obj = {
71 | data: (f = msg.getData()) && proto.tokenpb.TokenBundle.toObject(includeInstance, f)
72 | };
73 |
74 | if (includeInstance) {
75 | obj.$jspbMessageInstance = msg;
76 | }
77 | return obj;
78 | };
79 | }
80 |
81 |
82 | /**
83 | * Deserializes binary data (in protobuf wire format).
84 | * @param {jspb.ByteSource} bytes The bytes to deserialize.
85 | * @return {!proto.tokenpb.AssociateSecondaryClientResponse}
86 | */
87 | proto.tokenpb.AssociateSecondaryClientResponse.deserializeBinary = function(bytes) {
88 | var reader = new jspb.BinaryReader(bytes);
89 | var msg = new proto.tokenpb.AssociateSecondaryClientResponse;
90 | return proto.tokenpb.AssociateSecondaryClientResponse.deserializeBinaryFromReader(msg, reader);
91 | };
92 |
93 |
94 | /**
95 | * Deserializes binary data (in protobuf wire format) from the
96 | * given reader into the given message object.
97 | * @param {!proto.tokenpb.AssociateSecondaryClientResponse} msg The message object to deserialize into.
98 | * @param {!jspb.BinaryReader} reader The BinaryReader to use.
99 | * @return {!proto.tokenpb.AssociateSecondaryClientResponse}
100 | */
101 | proto.tokenpb.AssociateSecondaryClientResponse.deserializeBinaryFromReader = function(msg, reader) {
102 | while (reader.nextField()) {
103 | if (reader.isEndGroup()) {
104 | break;
105 | }
106 | var field = reader.getFieldNumber();
107 | switch (field) {
108 | case 1:
109 | var value = new proto.tokenpb.TokenBundle;
110 | reader.readMessage(value,proto.tokenpb.TokenBundle.deserializeBinaryFromReader);
111 | msg.setData(value);
112 | break;
113 | default:
114 | reader.skipField();
115 | break;
116 | }
117 | }
118 | return msg;
119 | };
120 |
121 |
122 | /**
123 | * Serializes the message to binary data (in protobuf wire format).
124 | * @return {!Uint8Array}
125 | */
126 | proto.tokenpb.AssociateSecondaryClientResponse.prototype.serializeBinary = function() {
127 | var writer = new jspb.BinaryWriter();
128 | proto.tokenpb.AssociateSecondaryClientResponse.serializeBinaryToWriter(this, writer);
129 | return writer.getResultBuffer();
130 | };
131 |
132 |
133 | /**
134 | * Serializes the given message to binary data (in protobuf wire
135 | * format), writing to the given BinaryWriter.
136 | * @param {!proto.tokenpb.AssociateSecondaryClientResponse} message
137 | * @param {!jspb.BinaryWriter} writer
138 | * @suppress {unusedLocalVariables} f is only used for nested messages
139 | */
140 | proto.tokenpb.AssociateSecondaryClientResponse.serializeBinaryToWriter = function(message, writer) {
141 | var f = undefined;
142 | f = message.getData();
143 | if (f != null) {
144 | writer.writeMessage(
145 | 1,
146 | f,
147 | proto.tokenpb.TokenBundle.serializeBinaryToWriter
148 | );
149 | }
150 | };
151 |
152 |
153 | /**
154 | * optional TokenBundle data = 1;
155 | * @return {?proto.tokenpb.TokenBundle}
156 | */
157 | proto.tokenpb.AssociateSecondaryClientResponse.prototype.getData = function() {
158 | return /** @type{?proto.tokenpb.TokenBundle} */ (
159 | jspb.Message.getWrapperField(this, proto.tokenpb.TokenBundle, 1));
160 | };
161 |
162 |
163 | /**
164 | * @param {?proto.tokenpb.TokenBundle|undefined} value
165 | * @return {!proto.tokenpb.AssociateSecondaryClientResponse} returns this
166 | */
167 | proto.tokenpb.AssociateSecondaryClientResponse.prototype.setData = function(value) {
168 | return jspb.Message.setWrapperField(this, 1, value);
169 | };
170 |
171 |
172 | /**
173 | * Clears the message field making it undefined.
174 | * @return {!proto.tokenpb.AssociateSecondaryClientResponse} returns this
175 | */
176 | proto.tokenpb.AssociateSecondaryClientResponse.prototype.clearData = function() {
177 | return this.setData(undefined);
178 | };
179 |
180 |
181 | /**
182 | * Returns whether this field is set.
183 | * @return {boolean}
184 | */
185 | proto.tokenpb.AssociateSecondaryClientResponse.prototype.hasData = function() {
186 | return jspb.Message.getField(this, 1) != null;
187 | };
188 |
189 |
190 |
--------------------------------------------------------------------------------
/javascript/chipperpb/connectioncheckresponse.js:
--------------------------------------------------------------------------------
1 | // source: chipperpb.proto
2 | /**
3 | * @fileoverview
4 | * @enhanceable
5 | * @suppress {messageConventions} JS Compiler reports an error if a variable or
6 | * field starts with 'MSG_' and isn't a translatable message.
7 | * @public
8 | */
9 | // GENERATED CODE -- DO NOT EDIT!
10 | /* eslint-disable */
11 | // @ts-nocheck
12 |
13 | goog.provide('proto.chippergrpc2.ConnectionCheckResponse');
14 |
15 | goog.require('jspb.BinaryReader');
16 | goog.require('jspb.BinaryWriter');
17 | goog.require('jspb.Message');
18 |
19 | /**
20 | * Generated by JsPbCodeGenerator.
21 | * @param {Array=} opt_data Optional initial data array, typically from a
22 | * server response, or constructed directly in Javascript. The array is used
23 | * in place and becomes part of the constructed object. It is not cloned.
24 | * If no data is provided, the constructed object will be empty, but still
25 | * valid.
26 | * @extends {jspb.Message}
27 | * @constructor
28 | */
29 | proto.chippergrpc2.ConnectionCheckResponse = function(opt_data) {
30 | jspb.Message.initialize(this, opt_data, 0, -1, null, null);
31 | };
32 | goog.inherits(proto.chippergrpc2.ConnectionCheckResponse, jspb.Message);
33 | if (goog.DEBUG && !COMPILED) {
34 | /**
35 | * @public
36 | * @override
37 | */
38 | proto.chippergrpc2.ConnectionCheckResponse.displayName = 'proto.chippergrpc2.ConnectionCheckResponse';
39 | }
40 |
41 |
42 |
43 | if (jspb.Message.GENERATE_TO_OBJECT) {
44 | /**
45 | * Creates an object representation of this proto.
46 | * Field names that are reserved in JavaScript and will be renamed to pb_name.
47 | * Optional fields that are not set will be set to undefined.
48 | * To access a reserved field use, foo.pb_, eg, foo.pb_default.
49 | * For the list of reserved names please see:
50 | * net/proto2/compiler/js/internal/generator.cc#kKeyword.
51 | * @param {boolean=} opt_includeInstance Deprecated. whether to include the
52 | * JSPB instance for transitional soy proto support:
53 | * http://goto/soy-param-migration
54 | * @return {!Object}
55 | */
56 | proto.chippergrpc2.ConnectionCheckResponse.prototype.toObject = function(opt_includeInstance) {
57 | return proto.chippergrpc2.ConnectionCheckResponse.toObject(opt_includeInstance, this);
58 | };
59 |
60 |
61 | /**
62 | * Static version of the {@see toObject} method.
63 | * @param {boolean|undefined} includeInstance Deprecated. Whether to include
64 | * the JSPB instance for transitional soy proto support:
65 | * http://goto/soy-param-migration
66 | * @param {!proto.chippergrpc2.ConnectionCheckResponse} msg The msg instance to transform.
67 | * @return {!Object}
68 | * @suppress {unusedLocalVariables} f is only used for nested messages
69 | */
70 | proto.chippergrpc2.ConnectionCheckResponse.toObject = function(includeInstance, msg) {
71 | var f, obj = {
72 | status: jspb.Message.getFieldWithDefault(msg, 1, ""),
73 | framesReceived: jspb.Message.getFieldWithDefault(msg, 2, 0)
74 | };
75 |
76 | if (includeInstance) {
77 | obj.$jspbMessageInstance = msg;
78 | }
79 | return obj;
80 | };
81 | }
82 |
83 |
84 | /**
85 | * Deserializes binary data (in protobuf wire format).
86 | * @param {jspb.ByteSource} bytes The bytes to deserialize.
87 | * @return {!proto.chippergrpc2.ConnectionCheckResponse}
88 | */
89 | proto.chippergrpc2.ConnectionCheckResponse.deserializeBinary = function(bytes) {
90 | var reader = new jspb.BinaryReader(bytes);
91 | var msg = new proto.chippergrpc2.ConnectionCheckResponse;
92 | return proto.chippergrpc2.ConnectionCheckResponse.deserializeBinaryFromReader(msg, reader);
93 | };
94 |
95 |
96 | /**
97 | * Deserializes binary data (in protobuf wire format) from the
98 | * given reader into the given message object.
99 | * @param {!proto.chippergrpc2.ConnectionCheckResponse} msg The message object to deserialize into.
100 | * @param {!jspb.BinaryReader} reader The BinaryReader to use.
101 | * @return {!proto.chippergrpc2.ConnectionCheckResponse}
102 | */
103 | proto.chippergrpc2.ConnectionCheckResponse.deserializeBinaryFromReader = function(msg, reader) {
104 | while (reader.nextField()) {
105 | if (reader.isEndGroup()) {
106 | break;
107 | }
108 | var field = reader.getFieldNumber();
109 | switch (field) {
110 | case 1:
111 | var value = /** @type {string} */ (reader.readString());
112 | msg.setStatus(value);
113 | break;
114 | case 2:
115 | var value = /** @type {number} */ (reader.readUint32());
116 | msg.setFramesReceived(value);
117 | break;
118 | default:
119 | reader.skipField();
120 | break;
121 | }
122 | }
123 | return msg;
124 | };
125 |
126 |
127 | /**
128 | * Serializes the message to binary data (in protobuf wire format).
129 | * @return {!Uint8Array}
130 | */
131 | proto.chippergrpc2.ConnectionCheckResponse.prototype.serializeBinary = function() {
132 | var writer = new jspb.BinaryWriter();
133 | proto.chippergrpc2.ConnectionCheckResponse.serializeBinaryToWriter(this, writer);
134 | return writer.getResultBuffer();
135 | };
136 |
137 |
138 | /**
139 | * Serializes the given message to binary data (in protobuf wire
140 | * format), writing to the given BinaryWriter.
141 | * @param {!proto.chippergrpc2.ConnectionCheckResponse} message
142 | * @param {!jspb.BinaryWriter} writer
143 | * @suppress {unusedLocalVariables} f is only used for nested messages
144 | */
145 | proto.chippergrpc2.ConnectionCheckResponse.serializeBinaryToWriter = function(message, writer) {
146 | var f = undefined;
147 | f = message.getStatus();
148 | if (f.length > 0) {
149 | writer.writeString(
150 | 1,
151 | f
152 | );
153 | }
154 | f = message.getFramesReceived();
155 | if (f !== 0) {
156 | writer.writeUint32(
157 | 2,
158 | f
159 | );
160 | }
161 | };
162 |
163 |
164 | /**
165 | * optional string status = 1;
166 | * @return {string}
167 | */
168 | proto.chippergrpc2.ConnectionCheckResponse.prototype.getStatus = function() {
169 | return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
170 | };
171 |
172 |
173 | /**
174 | * @param {string} value
175 | * @return {!proto.chippergrpc2.ConnectionCheckResponse} returns this
176 | */
177 | proto.chippergrpc2.ConnectionCheckResponse.prototype.setStatus = function(value) {
178 | return jspb.Message.setProto3StringField(this, 1, value);
179 | };
180 |
181 |
182 | /**
183 | * optional uint32 frames_received = 2;
184 | * @return {number}
185 | */
186 | proto.chippergrpc2.ConnectionCheckResponse.prototype.getFramesReceived = function() {
187 | return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
188 | };
189 |
190 |
191 | /**
192 | * @param {number} value
193 | * @return {!proto.chippergrpc2.ConnectionCheckResponse} returns this
194 | */
195 | proto.chippergrpc2.ConnectionCheckResponse.prototype.setFramesReceived = function(value) {
196 | return jspb.Message.setProto3IntField(this, 2, value);
197 | };
198 |
199 |
200 |
--------------------------------------------------------------------------------
/javascript/jdocspb/deletedocreq.js:
--------------------------------------------------------------------------------
1 | // source: jdocs.proto
2 | /**
3 | * @fileoverview
4 | * @enhanceable
5 | * @suppress {messageConventions} JS Compiler reports an error if a variable or
6 | * field starts with 'MSG_' and isn't a translatable message.
7 | * @public
8 | */
9 | // GENERATED CODE -- DO NOT EDIT!
10 |
11 | goog.provide('proto.jdocspb.DeleteDocReq');
12 |
13 | goog.require('jspb.BinaryReader');
14 | goog.require('jspb.BinaryWriter');
15 | goog.require('jspb.Message');
16 |
17 | /**
18 | * Generated by JsPbCodeGenerator.
19 | * @param {Array=} opt_data Optional initial data array, typically from a
20 | * server response, or constructed directly in Javascript. The array is used
21 | * in place and becomes part of the constructed object. It is not cloned.
22 | * If no data is provided, the constructed object will be empty, but still
23 | * valid.
24 | * @extends {jspb.Message}
25 | * @constructor
26 | */
27 | proto.jdocspb.DeleteDocReq = function(opt_data) {
28 | jspb.Message.initialize(this, opt_data, 0, -1, null, null);
29 | };
30 | goog.inherits(proto.jdocspb.DeleteDocReq, jspb.Message);
31 | if (goog.DEBUG && !COMPILED) {
32 | /**
33 | * @public
34 | * @override
35 | */
36 | proto.jdocspb.DeleteDocReq.displayName = 'proto.jdocspb.DeleteDocReq';
37 | }
38 |
39 |
40 |
41 | if (jspb.Message.GENERATE_TO_OBJECT) {
42 | /**
43 | * Creates an object representation of this proto.
44 | * Field names that are reserved in JavaScript and will be renamed to pb_name.
45 | * Optional fields that are not set will be set to undefined.
46 | * To access a reserved field use, foo.pb_, eg, foo.pb_default.
47 | * For the list of reserved names please see:
48 | * net/proto2/compiler/js/internal/generator.cc#kKeyword.
49 | * @param {boolean=} opt_includeInstance Deprecated. whether to include the
50 | * JSPB instance for transitional soy proto support:
51 | * http://goto/soy-param-migration
52 | * @return {!Object}
53 | */
54 | proto.jdocspb.DeleteDocReq.prototype.toObject = function(opt_includeInstance) {
55 | return proto.jdocspb.DeleteDocReq.toObject(opt_includeInstance, this);
56 | };
57 |
58 |
59 | /**
60 | * Static version of the {@see toObject} method.
61 | * @param {boolean|undefined} includeInstance Deprecated. Whether to include
62 | * the JSPB instance for transitional soy proto support:
63 | * http://goto/soy-param-migration
64 | * @param {!proto.jdocspb.DeleteDocReq} msg The msg instance to transform.
65 | * @return {!Object}
66 | * @suppress {unusedLocalVariables} f is only used for nested messages
67 | */
68 | proto.jdocspb.DeleteDocReq.toObject = function(includeInstance, msg) {
69 | var f, obj = {
70 | userId: jspb.Message.getFieldWithDefault(msg, 1, ""),
71 | thing: jspb.Message.getFieldWithDefault(msg, 2, ""),
72 | docName: jspb.Message.getFieldWithDefault(msg, 3, "")
73 | };
74 |
75 | if (includeInstance) {
76 | obj.$jspbMessageInstance = msg;
77 | }
78 | return obj;
79 | };
80 | }
81 |
82 |
83 | /**
84 | * Deserializes binary data (in protobuf wire format).
85 | * @param {jspb.ByteSource} bytes The bytes to deserialize.
86 | * @return {!proto.jdocspb.DeleteDocReq}
87 | */
88 | proto.jdocspb.DeleteDocReq.deserializeBinary = function(bytes) {
89 | var reader = new jspb.BinaryReader(bytes);
90 | var msg = new proto.jdocspb.DeleteDocReq;
91 | return proto.jdocspb.DeleteDocReq.deserializeBinaryFromReader(msg, reader);
92 | };
93 |
94 |
95 | /**
96 | * Deserializes binary data (in protobuf wire format) from the
97 | * given reader into the given message object.
98 | * @param {!proto.jdocspb.DeleteDocReq} msg The message object to deserialize into.
99 | * @param {!jspb.BinaryReader} reader The BinaryReader to use.
100 | * @return {!proto.jdocspb.DeleteDocReq}
101 | */
102 | proto.jdocspb.DeleteDocReq.deserializeBinaryFromReader = function(msg, reader) {
103 | while (reader.nextField()) {
104 | if (reader.isEndGroup()) {
105 | break;
106 | }
107 | var field = reader.getFieldNumber();
108 | switch (field) {
109 | case 1:
110 | var value = /** @type {string} */ (reader.readString());
111 | msg.setUserId(value);
112 | break;
113 | case 2:
114 | var value = /** @type {string} */ (reader.readString());
115 | msg.setThing(value);
116 | break;
117 | case 3:
118 | var value = /** @type {string} */ (reader.readString());
119 | msg.setDocName(value);
120 | break;
121 | default:
122 | reader.skipField();
123 | break;
124 | }
125 | }
126 | return msg;
127 | };
128 |
129 |
130 | /**
131 | * Serializes the message to binary data (in protobuf wire format).
132 | * @return {!Uint8Array}
133 | */
134 | proto.jdocspb.DeleteDocReq.prototype.serializeBinary = function() {
135 | var writer = new jspb.BinaryWriter();
136 | proto.jdocspb.DeleteDocReq.serializeBinaryToWriter(this, writer);
137 | return writer.getResultBuffer();
138 | };
139 |
140 |
141 | /**
142 | * Serializes the given message to binary data (in protobuf wire
143 | * format), writing to the given BinaryWriter.
144 | * @param {!proto.jdocspb.DeleteDocReq} message
145 | * @param {!jspb.BinaryWriter} writer
146 | * @suppress {unusedLocalVariables} f is only used for nested messages
147 | */
148 | proto.jdocspb.DeleteDocReq.serializeBinaryToWriter = function(message, writer) {
149 | var f = undefined;
150 | f = message.getUserId();
151 | if (f.length > 0) {
152 | writer.writeString(
153 | 1,
154 | f
155 | );
156 | }
157 | f = message.getThing();
158 | if (f.length > 0) {
159 | writer.writeString(
160 | 2,
161 | f
162 | );
163 | }
164 | f = message.getDocName();
165 | if (f.length > 0) {
166 | writer.writeString(
167 | 3,
168 | f
169 | );
170 | }
171 | };
172 |
173 |
174 | /**
175 | * optional string user_id = 1;
176 | * @return {string}
177 | */
178 | proto.jdocspb.DeleteDocReq.prototype.getUserId = function() {
179 | return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
180 | };
181 |
182 |
183 | /**
184 | * @param {string} value
185 | * @return {!proto.jdocspb.DeleteDocReq} returns this
186 | */
187 | proto.jdocspb.DeleteDocReq.prototype.setUserId = function(value) {
188 | return jspb.Message.setProto3StringField(this, 1, value);
189 | };
190 |
191 |
192 | /**
193 | * optional string thing = 2;
194 | * @return {string}
195 | */
196 | proto.jdocspb.DeleteDocReq.prototype.getThing = function() {
197 | return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
198 | };
199 |
200 |
201 | /**
202 | * @param {string} value
203 | * @return {!proto.jdocspb.DeleteDocReq} returns this
204 | */
205 | proto.jdocspb.DeleteDocReq.prototype.setThing = function(value) {
206 | return jspb.Message.setProto3StringField(this, 2, value);
207 | };
208 |
209 |
210 | /**
211 | * optional string doc_name = 3;
212 | * @return {string}
213 | */
214 | proto.jdocspb.DeleteDocReq.prototype.getDocName = function() {
215 | return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
216 | };
217 |
218 |
219 | /**
220 | * @param {string} value
221 | * @return {!proto.jdocspb.DeleteDocReq} returns this
222 | */
223 | proto.jdocspb.DeleteDocReq.prototype.setDocName = function(value) {
224 | return jspb.Message.setProto3StringField(this, 3, value);
225 | };
226 |
227 |
228 |
--------------------------------------------------------------------------------
/javascript/jdocspb/purgeaccountdocsreq.js:
--------------------------------------------------------------------------------
1 | // source: jdocs.proto
2 | /**
3 | * @fileoverview
4 | * @enhanceable
5 | * @suppress {messageConventions} JS Compiler reports an error if a variable or
6 | * field starts with 'MSG_' and isn't a translatable message.
7 | * @public
8 | */
9 | // GENERATED CODE -- DO NOT EDIT!
10 |
11 | goog.provide('proto.jdocspb.PurgeAccountDocsReq');
12 |
13 | goog.require('jspb.BinaryReader');
14 | goog.require('jspb.BinaryWriter');
15 | goog.require('jspb.Message');
16 |
17 | /**
18 | * Generated by JsPbCodeGenerator.
19 | * @param {Array=} opt_data Optional initial data array, typically from a
20 | * server response, or constructed directly in Javascript. The array is used
21 | * in place and becomes part of the constructed object. It is not cloned.
22 | * If no data is provided, the constructed object will be empty, but still
23 | * valid.
24 | * @extends {jspb.Message}
25 | * @constructor
26 | */
27 | proto.jdocspb.PurgeAccountDocsReq = function(opt_data) {
28 | jspb.Message.initialize(this, opt_data, 0, -1, null, null);
29 | };
30 | goog.inherits(proto.jdocspb.PurgeAccountDocsReq, jspb.Message);
31 | if (goog.DEBUG && !COMPILED) {
32 | /**
33 | * @public
34 | * @override
35 | */
36 | proto.jdocspb.PurgeAccountDocsReq.displayName = 'proto.jdocspb.PurgeAccountDocsReq';
37 | }
38 |
39 |
40 |
41 | if (jspb.Message.GENERATE_TO_OBJECT) {
42 | /**
43 | * Creates an object representation of this proto.
44 | * Field names that are reserved in JavaScript and will be renamed to pb_name.
45 | * Optional fields that are not set will be set to undefined.
46 | * To access a reserved field use, foo.pb_, eg, foo.pb_default.
47 | * For the list of reserved names please see:
48 | * net/proto2/compiler/js/internal/generator.cc#kKeyword.
49 | * @param {boolean=} opt_includeInstance Deprecated. whether to include the
50 | * JSPB instance for transitional soy proto support:
51 | * http://goto/soy-param-migration
52 | * @return {!Object}
53 | */
54 | proto.jdocspb.PurgeAccountDocsReq.prototype.toObject = function(opt_includeInstance) {
55 | return proto.jdocspb.PurgeAccountDocsReq.toObject(opt_includeInstance, this);
56 | };
57 |
58 |
59 | /**
60 | * Static version of the {@see toObject} method.
61 | * @param {boolean|undefined} includeInstance Deprecated. Whether to include
62 | * the JSPB instance for transitional soy proto support:
63 | * http://goto/soy-param-migration
64 | * @param {!proto.jdocspb.PurgeAccountDocsReq} msg The msg instance to transform.
65 | * @return {!Object}
66 | * @suppress {unusedLocalVariables} f is only used for nested messages
67 | */
68 | proto.jdocspb.PurgeAccountDocsReq.toObject = function(includeInstance, msg) {
69 | var f, obj = {
70 | userId: jspb.Message.getFieldWithDefault(msg, 1, ""),
71 | reason: jspb.Message.getFieldWithDefault(msg, 2, ""),
72 | notes: jspb.Message.getFieldWithDefault(msg, 3, "")
73 | };
74 |
75 | if (includeInstance) {
76 | obj.$jspbMessageInstance = msg;
77 | }
78 | return obj;
79 | };
80 | }
81 |
82 |
83 | /**
84 | * Deserializes binary data (in protobuf wire format).
85 | * @param {jspb.ByteSource} bytes The bytes to deserialize.
86 | * @return {!proto.jdocspb.PurgeAccountDocsReq}
87 | */
88 | proto.jdocspb.PurgeAccountDocsReq.deserializeBinary = function(bytes) {
89 | var reader = new jspb.BinaryReader(bytes);
90 | var msg = new proto.jdocspb.PurgeAccountDocsReq;
91 | return proto.jdocspb.PurgeAccountDocsReq.deserializeBinaryFromReader(msg, reader);
92 | };
93 |
94 |
95 | /**
96 | * Deserializes binary data (in protobuf wire format) from the
97 | * given reader into the given message object.
98 | * @param {!proto.jdocspb.PurgeAccountDocsReq} msg The message object to deserialize into.
99 | * @param {!jspb.BinaryReader} reader The BinaryReader to use.
100 | * @return {!proto.jdocspb.PurgeAccountDocsReq}
101 | */
102 | proto.jdocspb.PurgeAccountDocsReq.deserializeBinaryFromReader = function(msg, reader) {
103 | while (reader.nextField()) {
104 | if (reader.isEndGroup()) {
105 | break;
106 | }
107 | var field = reader.getFieldNumber();
108 | switch (field) {
109 | case 1:
110 | var value = /** @type {string} */ (reader.readString());
111 | msg.setUserId(value);
112 | break;
113 | case 2:
114 | var value = /** @type {string} */ (reader.readString());
115 | msg.setReason(value);
116 | break;
117 | case 3:
118 | var value = /** @type {string} */ (reader.readString());
119 | msg.setNotes(value);
120 | break;
121 | default:
122 | reader.skipField();
123 | break;
124 | }
125 | }
126 | return msg;
127 | };
128 |
129 |
130 | /**
131 | * Serializes the message to binary data (in protobuf wire format).
132 | * @return {!Uint8Array}
133 | */
134 | proto.jdocspb.PurgeAccountDocsReq.prototype.serializeBinary = function() {
135 | var writer = new jspb.BinaryWriter();
136 | proto.jdocspb.PurgeAccountDocsReq.serializeBinaryToWriter(this, writer);
137 | return writer.getResultBuffer();
138 | };
139 |
140 |
141 | /**
142 | * Serializes the given message to binary data (in protobuf wire
143 | * format), writing to the given BinaryWriter.
144 | * @param {!proto.jdocspb.PurgeAccountDocsReq} message
145 | * @param {!jspb.BinaryWriter} writer
146 | * @suppress {unusedLocalVariables} f is only used for nested messages
147 | */
148 | proto.jdocspb.PurgeAccountDocsReq.serializeBinaryToWriter = function(message, writer) {
149 | var f = undefined;
150 | f = message.getUserId();
151 | if (f.length > 0) {
152 | writer.writeString(
153 | 1,
154 | f
155 | );
156 | }
157 | f = message.getReason();
158 | if (f.length > 0) {
159 | writer.writeString(
160 | 2,
161 | f
162 | );
163 | }
164 | f = message.getNotes();
165 | if (f.length > 0) {
166 | writer.writeString(
167 | 3,
168 | f
169 | );
170 | }
171 | };
172 |
173 |
174 | /**
175 | * optional string user_id = 1;
176 | * @return {string}
177 | */
178 | proto.jdocspb.PurgeAccountDocsReq.prototype.getUserId = function() {
179 | return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
180 | };
181 |
182 |
183 | /**
184 | * @param {string} value
185 | * @return {!proto.jdocspb.PurgeAccountDocsReq} returns this
186 | */
187 | proto.jdocspb.PurgeAccountDocsReq.prototype.setUserId = function(value) {
188 | return jspb.Message.setProto3StringField(this, 1, value);
189 | };
190 |
191 |
192 | /**
193 | * optional string reason = 2;
194 | * @return {string}
195 | */
196 | proto.jdocspb.PurgeAccountDocsReq.prototype.getReason = function() {
197 | return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
198 | };
199 |
200 |
201 | /**
202 | * @param {string} value
203 | * @return {!proto.jdocspb.PurgeAccountDocsReq} returns this
204 | */
205 | proto.jdocspb.PurgeAccountDocsReq.prototype.setReason = function(value) {
206 | return jspb.Message.setProto3StringField(this, 2, value);
207 | };
208 |
209 |
210 | /**
211 | * optional string notes = 3;
212 | * @return {string}
213 | */
214 | proto.jdocspb.PurgeAccountDocsReq.prototype.getNotes = function() {
215 | return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
216 | };
217 |
218 |
219 | /**
220 | * @param {string} value
221 | * @return {!proto.jdocspb.PurgeAccountDocsReq} returns this
222 | */
223 | proto.jdocspb.PurgeAccountDocsReq.prototype.setNotes = function(value) {
224 | return jspb.Message.setProto3StringField(this, 3, value);
225 | };
226 |
227 |
228 |
--------------------------------------------------------------------------------
/javascript/chipperpb/weatherlocation.js:
--------------------------------------------------------------------------------
1 | // source: chipperpb.proto
2 | /**
3 | * @fileoverview
4 | * @enhanceable
5 | * @suppress {messageConventions} JS Compiler reports an error if a variable or
6 | * field starts with 'MSG_' and isn't a translatable message.
7 | * @public
8 | */
9 | // GENERATED CODE -- DO NOT EDIT!
10 | /* eslint-disable */
11 | // @ts-nocheck
12 |
13 | goog.provide('proto.chippergrpc2.WeatherLocation');
14 |
15 | goog.require('jspb.BinaryReader');
16 | goog.require('jspb.BinaryWriter');
17 | goog.require('jspb.Message');
18 |
19 | /**
20 | * Generated by JsPbCodeGenerator.
21 | * @param {Array=} opt_data Optional initial data array, typically from a
22 | * server response, or constructed directly in Javascript. The array is used
23 | * in place and becomes part of the constructed object. It is not cloned.
24 | * If no data is provided, the constructed object will be empty, but still
25 | * valid.
26 | * @extends {jspb.Message}
27 | * @constructor
28 | */
29 | proto.chippergrpc2.WeatherLocation = function(opt_data) {
30 | jspb.Message.initialize(this, opt_data, 0, -1, null, null);
31 | };
32 | goog.inherits(proto.chippergrpc2.WeatherLocation, jspb.Message);
33 | if (goog.DEBUG && !COMPILED) {
34 | /**
35 | * @public
36 | * @override
37 | */
38 | proto.chippergrpc2.WeatherLocation.displayName = 'proto.chippergrpc2.WeatherLocation';
39 | }
40 |
41 |
42 |
43 | if (jspb.Message.GENERATE_TO_OBJECT) {
44 | /**
45 | * Creates an object representation of this proto.
46 | * Field names that are reserved in JavaScript and will be renamed to pb_name.
47 | * Optional fields that are not set will be set to undefined.
48 | * To access a reserved field use, foo.pb_, eg, foo.pb_default.
49 | * For the list of reserved names please see:
50 | * net/proto2/compiler/js/internal/generator.cc#kKeyword.
51 | * @param {boolean=} opt_includeInstance Deprecated. whether to include the
52 | * JSPB instance for transitional soy proto support:
53 | * http://goto/soy-param-migration
54 | * @return {!Object}
55 | */
56 | proto.chippergrpc2.WeatherLocation.prototype.toObject = function(opt_includeInstance) {
57 | return proto.chippergrpc2.WeatherLocation.toObject(opt_includeInstance, this);
58 | };
59 |
60 |
61 | /**
62 | * Static version of the {@see toObject} method.
63 | * @param {boolean|undefined} includeInstance Deprecated. Whether to include
64 | * the JSPB instance for transitional soy proto support:
65 | * http://goto/soy-param-migration
66 | * @param {!proto.chippergrpc2.WeatherLocation} msg The msg instance to transform.
67 | * @return {!Object}
68 | * @suppress {unusedLocalVariables} f is only used for nested messages
69 | */
70 | proto.chippergrpc2.WeatherLocation.toObject = function(includeInstance, msg) {
71 | var f, obj = {
72 | city: jspb.Message.getFieldWithDefault(msg, 1, ""),
73 | state: jspb.Message.getFieldWithDefault(msg, 2, ""),
74 | country: jspb.Message.getFieldWithDefault(msg, 3, "")
75 | };
76 |
77 | if (includeInstance) {
78 | obj.$jspbMessageInstance = msg;
79 | }
80 | return obj;
81 | };
82 | }
83 |
84 |
85 | /**
86 | * Deserializes binary data (in protobuf wire format).
87 | * @param {jspb.ByteSource} bytes The bytes to deserialize.
88 | * @return {!proto.chippergrpc2.WeatherLocation}
89 | */
90 | proto.chippergrpc2.WeatherLocation.deserializeBinary = function(bytes) {
91 | var reader = new jspb.BinaryReader(bytes);
92 | var msg = new proto.chippergrpc2.WeatherLocation;
93 | return proto.chippergrpc2.WeatherLocation.deserializeBinaryFromReader(msg, reader);
94 | };
95 |
96 |
97 | /**
98 | * Deserializes binary data (in protobuf wire format) from the
99 | * given reader into the given message object.
100 | * @param {!proto.chippergrpc2.WeatherLocation} msg The message object to deserialize into.
101 | * @param {!jspb.BinaryReader} reader The BinaryReader to use.
102 | * @return {!proto.chippergrpc2.WeatherLocation}
103 | */
104 | proto.chippergrpc2.WeatherLocation.deserializeBinaryFromReader = function(msg, reader) {
105 | while (reader.nextField()) {
106 | if (reader.isEndGroup()) {
107 | break;
108 | }
109 | var field = reader.getFieldNumber();
110 | switch (field) {
111 | case 1:
112 | var value = /** @type {string} */ (reader.readString());
113 | msg.setCity(value);
114 | break;
115 | case 2:
116 | var value = /** @type {string} */ (reader.readString());
117 | msg.setState(value);
118 | break;
119 | case 3:
120 | var value = /** @type {string} */ (reader.readString());
121 | msg.setCountry(value);
122 | break;
123 | default:
124 | reader.skipField();
125 | break;
126 | }
127 | }
128 | return msg;
129 | };
130 |
131 |
132 | /**
133 | * Serializes the message to binary data (in protobuf wire format).
134 | * @return {!Uint8Array}
135 | */
136 | proto.chippergrpc2.WeatherLocation.prototype.serializeBinary = function() {
137 | var writer = new jspb.BinaryWriter();
138 | proto.chippergrpc2.WeatherLocation.serializeBinaryToWriter(this, writer);
139 | return writer.getResultBuffer();
140 | };
141 |
142 |
143 | /**
144 | * Serializes the given message to binary data (in protobuf wire
145 | * format), writing to the given BinaryWriter.
146 | * @param {!proto.chippergrpc2.WeatherLocation} message
147 | * @param {!jspb.BinaryWriter} writer
148 | * @suppress {unusedLocalVariables} f is only used for nested messages
149 | */
150 | proto.chippergrpc2.WeatherLocation.serializeBinaryToWriter = function(message, writer) {
151 | var f = undefined;
152 | f = message.getCity();
153 | if (f.length > 0) {
154 | writer.writeString(
155 | 1,
156 | f
157 | );
158 | }
159 | f = message.getState();
160 | if (f.length > 0) {
161 | writer.writeString(
162 | 2,
163 | f
164 | );
165 | }
166 | f = message.getCountry();
167 | if (f.length > 0) {
168 | writer.writeString(
169 | 3,
170 | f
171 | );
172 | }
173 | };
174 |
175 |
176 | /**
177 | * optional string city = 1;
178 | * @return {string}
179 | */
180 | proto.chippergrpc2.WeatherLocation.prototype.getCity = function() {
181 | return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
182 | };
183 |
184 |
185 | /**
186 | * @param {string} value
187 | * @return {!proto.chippergrpc2.WeatherLocation} returns this
188 | */
189 | proto.chippergrpc2.WeatherLocation.prototype.setCity = function(value) {
190 | return jspb.Message.setProto3StringField(this, 1, value);
191 | };
192 |
193 |
194 | /**
195 | * optional string state = 2;
196 | * @return {string}
197 | */
198 | proto.chippergrpc2.WeatherLocation.prototype.getState = function() {
199 | return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
200 | };
201 |
202 |
203 | /**
204 | * @param {string} value
205 | * @return {!proto.chippergrpc2.WeatherLocation} returns this
206 | */
207 | proto.chippergrpc2.WeatherLocation.prototype.setState = function(value) {
208 | return jspb.Message.setProto3StringField(this, 2, value);
209 | };
210 |
211 |
212 | /**
213 | * optional string country = 3;
214 | * @return {string}
215 | */
216 | proto.chippergrpc2.WeatherLocation.prototype.getCountry = function() {
217 | return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
218 | };
219 |
220 |
221 | /**
222 | * @param {string} value
223 | * @return {!proto.chippergrpc2.WeatherLocation} returns this
224 | */
225 | proto.chippergrpc2.WeatherLocation.prototype.setCountry = function(value) {
226 | return jspb.Message.setProto3StringField(this, 3, value);
227 | };
228 |
229 |
230 |
--------------------------------------------------------------------------------
/javascript/tokenpb/refreshtokenrequest.js:
--------------------------------------------------------------------------------
1 | // source: token.proto
2 | /**
3 | * @fileoverview
4 | * @enhanceable
5 | * @suppress {messageConventions} JS Compiler reports an error if a variable or
6 | * field starts with 'MSG_' and isn't a translatable message.
7 | * @public
8 | */
9 | // GENERATED CODE -- DO NOT EDIT!
10 |
11 | goog.provide('proto.tokenpb.RefreshTokenRequest');
12 |
13 | goog.require('jspb.BinaryReader');
14 | goog.require('jspb.BinaryWriter');
15 | goog.require('jspb.Message');
16 |
17 | /**
18 | * Generated by JsPbCodeGenerator.
19 | * @param {Array=} opt_data Optional initial data array, typically from a
20 | * server response, or constructed directly in Javascript. The array is used
21 | * in place and becomes part of the constructed object. It is not cloned.
22 | * If no data is provided, the constructed object will be empty, but still
23 | * valid.
24 | * @extends {jspb.Message}
25 | * @constructor
26 | */
27 | proto.tokenpb.RefreshTokenRequest = function(opt_data) {
28 | jspb.Message.initialize(this, opt_data, 0, -1, null, null);
29 | };
30 | goog.inherits(proto.tokenpb.RefreshTokenRequest, jspb.Message);
31 | if (goog.DEBUG && !COMPILED) {
32 | /**
33 | * @public
34 | * @override
35 | */
36 | proto.tokenpb.RefreshTokenRequest.displayName = 'proto.tokenpb.RefreshTokenRequest';
37 | }
38 |
39 |
40 |
41 | if (jspb.Message.GENERATE_TO_OBJECT) {
42 | /**
43 | * Creates an object representation of this proto.
44 | * Field names that are reserved in JavaScript and will be renamed to pb_name.
45 | * Optional fields that are not set will be set to undefined.
46 | * To access a reserved field use, foo.pb_, eg, foo.pb_default.
47 | * For the list of reserved names please see:
48 | * net/proto2/compiler/js/internal/generator.cc#kKeyword.
49 | * @param {boolean=} opt_includeInstance Deprecated. whether to include the
50 | * JSPB instance for transitional soy proto support:
51 | * http://goto/soy-param-migration
52 | * @return {!Object}
53 | */
54 | proto.tokenpb.RefreshTokenRequest.prototype.toObject = function(opt_includeInstance) {
55 | return proto.tokenpb.RefreshTokenRequest.toObject(opt_includeInstance, this);
56 | };
57 |
58 |
59 | /**
60 | * Static version of the {@see toObject} method.
61 | * @param {boolean|undefined} includeInstance Deprecated. Whether to include
62 | * the JSPB instance for transitional soy proto support:
63 | * http://goto/soy-param-migration
64 | * @param {!proto.tokenpb.RefreshTokenRequest} msg The msg instance to transform.
65 | * @return {!Object}
66 | * @suppress {unusedLocalVariables} f is only used for nested messages
67 | */
68 | proto.tokenpb.RefreshTokenRequest.toObject = function(includeInstance, msg) {
69 | var f, obj = {
70 | refreshJwtTokens: jspb.Message.getBooleanFieldWithDefault(msg, 2, false),
71 | refreshStsTokens: jspb.Message.getBooleanFieldWithDefault(msg, 3, false),
72 | expirationMinutes: jspb.Message.getFieldWithDefault(msg, 4, 0)
73 | };
74 |
75 | if (includeInstance) {
76 | obj.$jspbMessageInstance = msg;
77 | }
78 | return obj;
79 | };
80 | }
81 |
82 |
83 | /**
84 | * Deserializes binary data (in protobuf wire format).
85 | * @param {jspb.ByteSource} bytes The bytes to deserialize.
86 | * @return {!proto.tokenpb.RefreshTokenRequest}
87 | */
88 | proto.tokenpb.RefreshTokenRequest.deserializeBinary = function(bytes) {
89 | var reader = new jspb.BinaryReader(bytes);
90 | var msg = new proto.tokenpb.RefreshTokenRequest;
91 | return proto.tokenpb.RefreshTokenRequest.deserializeBinaryFromReader(msg, reader);
92 | };
93 |
94 |
95 | /**
96 | * Deserializes binary data (in protobuf wire format) from the
97 | * given reader into the given message object.
98 | * @param {!proto.tokenpb.RefreshTokenRequest} msg The message object to deserialize into.
99 | * @param {!jspb.BinaryReader} reader The BinaryReader to use.
100 | * @return {!proto.tokenpb.RefreshTokenRequest}
101 | */
102 | proto.tokenpb.RefreshTokenRequest.deserializeBinaryFromReader = function(msg, reader) {
103 | while (reader.nextField()) {
104 | if (reader.isEndGroup()) {
105 | break;
106 | }
107 | var field = reader.getFieldNumber();
108 | switch (field) {
109 | case 2:
110 | var value = /** @type {boolean} */ (reader.readBool());
111 | msg.setRefreshJwtTokens(value);
112 | break;
113 | case 3:
114 | var value = /** @type {boolean} */ (reader.readBool());
115 | msg.setRefreshStsTokens(value);
116 | break;
117 | case 4:
118 | var value = /** @type {number} */ (reader.readUint32());
119 | msg.setExpirationMinutes(value);
120 | break;
121 | default:
122 | reader.skipField();
123 | break;
124 | }
125 | }
126 | return msg;
127 | };
128 |
129 |
130 | /**
131 | * Serializes the message to binary data (in protobuf wire format).
132 | * @return {!Uint8Array}
133 | */
134 | proto.tokenpb.RefreshTokenRequest.prototype.serializeBinary = function() {
135 | var writer = new jspb.BinaryWriter();
136 | proto.tokenpb.RefreshTokenRequest.serializeBinaryToWriter(this, writer);
137 | return writer.getResultBuffer();
138 | };
139 |
140 |
141 | /**
142 | * Serializes the given message to binary data (in protobuf wire
143 | * format), writing to the given BinaryWriter.
144 | * @param {!proto.tokenpb.RefreshTokenRequest} message
145 | * @param {!jspb.BinaryWriter} writer
146 | * @suppress {unusedLocalVariables} f is only used for nested messages
147 | */
148 | proto.tokenpb.RefreshTokenRequest.serializeBinaryToWriter = function(message, writer) {
149 | var f = undefined;
150 | f = message.getRefreshJwtTokens();
151 | if (f) {
152 | writer.writeBool(
153 | 2,
154 | f
155 | );
156 | }
157 | f = message.getRefreshStsTokens();
158 | if (f) {
159 | writer.writeBool(
160 | 3,
161 | f
162 | );
163 | }
164 | f = message.getExpirationMinutes();
165 | if (f !== 0) {
166 | writer.writeUint32(
167 | 4,
168 | f
169 | );
170 | }
171 | };
172 |
173 |
174 | /**
175 | * optional bool refresh_jwt_tokens = 2;
176 | * @return {boolean}
177 | */
178 | proto.tokenpb.RefreshTokenRequest.prototype.getRefreshJwtTokens = function() {
179 | return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false));
180 | };
181 |
182 |
183 | /**
184 | * @param {boolean} value
185 | * @return {!proto.tokenpb.RefreshTokenRequest} returns this
186 | */
187 | proto.tokenpb.RefreshTokenRequest.prototype.setRefreshJwtTokens = function(value) {
188 | return jspb.Message.setProto3BooleanField(this, 2, value);
189 | };
190 |
191 |
192 | /**
193 | * optional bool refresh_sts_tokens = 3;
194 | * @return {boolean}
195 | */
196 | proto.tokenpb.RefreshTokenRequest.prototype.getRefreshStsTokens = function() {
197 | return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false));
198 | };
199 |
200 |
201 | /**
202 | * @param {boolean} value
203 | * @return {!proto.tokenpb.RefreshTokenRequest} returns this
204 | */
205 | proto.tokenpb.RefreshTokenRequest.prototype.setRefreshStsTokens = function(value) {
206 | return jspb.Message.setProto3BooleanField(this, 3, value);
207 | };
208 |
209 |
210 | /**
211 | * optional uint32 expiration_minutes = 4;
212 | * @return {number}
213 | */
214 | proto.tokenpb.RefreshTokenRequest.prototype.getExpirationMinutes = function() {
215 | return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0));
216 | };
217 |
218 |
219 | /**
220 | * @param {number} value
221 | * @return {!proto.tokenpb.RefreshTokenRequest} returns this
222 | */
223 | proto.tokenpb.RefreshTokenRequest.prototype.setExpirationMinutes = function(value) {
224 | return jspb.Message.setProto3IntField(this, 4, value);
225 | };
226 |
227 |
228 |
--------------------------------------------------------------------------------
/javascript/tokenpb/associatesecondaryclientrequest.js:
--------------------------------------------------------------------------------
1 | // source: token.proto
2 | /**
3 | * @fileoverview
4 | * @enhanceable
5 | * @suppress {messageConventions} JS Compiler reports an error if a variable or
6 | * field starts with 'MSG_' and isn't a translatable message.
7 | * @public
8 | */
9 | // GENERATED CODE -- DO NOT EDIT!
10 |
11 | goog.provide('proto.tokenpb.AssociateSecondaryClientRequest');
12 |
13 | goog.require('jspb.BinaryReader');
14 | goog.require('jspb.BinaryWriter');
15 | goog.require('jspb.Message');
16 |
17 | /**
18 | * Generated by JsPbCodeGenerator.
19 | * @param {Array=} opt_data Optional initial data array, typically from a
20 | * server response, or constructed directly in Javascript. The array is used
21 | * in place and becomes part of the constructed object. It is not cloned.
22 | * If no data is provided, the constructed object will be empty, but still
23 | * valid.
24 | * @extends {jspb.Message}
25 | * @constructor
26 | */
27 | proto.tokenpb.AssociateSecondaryClientRequest = function(opt_data) {
28 | jspb.Message.initialize(this, opt_data, 0, -1, null, null);
29 | };
30 | goog.inherits(proto.tokenpb.AssociateSecondaryClientRequest, jspb.Message);
31 | if (goog.DEBUG && !COMPILED) {
32 | /**
33 | * @public
34 | * @override
35 | */
36 | proto.tokenpb.AssociateSecondaryClientRequest.displayName = 'proto.tokenpb.AssociateSecondaryClientRequest';
37 | }
38 |
39 |
40 |
41 | if (jspb.Message.GENERATE_TO_OBJECT) {
42 | /**
43 | * Creates an object representation of this proto.
44 | * Field names that are reserved in JavaScript and will be renamed to pb_name.
45 | * Optional fields that are not set will be set to undefined.
46 | * To access a reserved field use, foo.pb_, eg, foo.pb_default.
47 | * For the list of reserved names please see:
48 | * net/proto2/compiler/js/internal/generator.cc#kKeyword.
49 | * @param {boolean=} opt_includeInstance Deprecated. whether to include the
50 | * JSPB instance for transitional soy proto support:
51 | * http://goto/soy-param-migration
52 | * @return {!Object}
53 | */
54 | proto.tokenpb.AssociateSecondaryClientRequest.prototype.toObject = function(opt_includeInstance) {
55 | return proto.tokenpb.AssociateSecondaryClientRequest.toObject(opt_includeInstance, this);
56 | };
57 |
58 |
59 | /**
60 | * Static version of the {@see toObject} method.
61 | * @param {boolean|undefined} includeInstance Deprecated. Whether to include
62 | * the JSPB instance for transitional soy proto support:
63 | * http://goto/soy-param-migration
64 | * @param {!proto.tokenpb.AssociateSecondaryClientRequest} msg The msg instance to transform.
65 | * @return {!Object}
66 | * @suppress {unusedLocalVariables} f is only used for nested messages
67 | */
68 | proto.tokenpb.AssociateSecondaryClientRequest.toObject = function(includeInstance, msg) {
69 | var f, obj = {
70 | userSession: jspb.Message.getFieldWithDefault(msg, 2, ""),
71 | clientName: jspb.Message.getFieldWithDefault(msg, 3, ""),
72 | appId: jspb.Message.getFieldWithDefault(msg, 4, "")
73 | };
74 |
75 | if (includeInstance) {
76 | obj.$jspbMessageInstance = msg;
77 | }
78 | return obj;
79 | };
80 | }
81 |
82 |
83 | /**
84 | * Deserializes binary data (in protobuf wire format).
85 | * @param {jspb.ByteSource} bytes The bytes to deserialize.
86 | * @return {!proto.tokenpb.AssociateSecondaryClientRequest}
87 | */
88 | proto.tokenpb.AssociateSecondaryClientRequest.deserializeBinary = function(bytes) {
89 | var reader = new jspb.BinaryReader(bytes);
90 | var msg = new proto.tokenpb.AssociateSecondaryClientRequest;
91 | return proto.tokenpb.AssociateSecondaryClientRequest.deserializeBinaryFromReader(msg, reader);
92 | };
93 |
94 |
95 | /**
96 | * Deserializes binary data (in protobuf wire format) from the
97 | * given reader into the given message object.
98 | * @param {!proto.tokenpb.AssociateSecondaryClientRequest} msg The message object to deserialize into.
99 | * @param {!jspb.BinaryReader} reader The BinaryReader to use.
100 | * @return {!proto.tokenpb.AssociateSecondaryClientRequest}
101 | */
102 | proto.tokenpb.AssociateSecondaryClientRequest.deserializeBinaryFromReader = function(msg, reader) {
103 | while (reader.nextField()) {
104 | if (reader.isEndGroup()) {
105 | break;
106 | }
107 | var field = reader.getFieldNumber();
108 | switch (field) {
109 | case 2:
110 | var value = /** @type {string} */ (reader.readString());
111 | msg.setUserSession(value);
112 | break;
113 | case 3:
114 | var value = /** @type {string} */ (reader.readString());
115 | msg.setClientName(value);
116 | break;
117 | case 4:
118 | var value = /** @type {string} */ (reader.readString());
119 | msg.setAppId(value);
120 | break;
121 | default:
122 | reader.skipField();
123 | break;
124 | }
125 | }
126 | return msg;
127 | };
128 |
129 |
130 | /**
131 | * Serializes the message to binary data (in protobuf wire format).
132 | * @return {!Uint8Array}
133 | */
134 | proto.tokenpb.AssociateSecondaryClientRequest.prototype.serializeBinary = function() {
135 | var writer = new jspb.BinaryWriter();
136 | proto.tokenpb.AssociateSecondaryClientRequest.serializeBinaryToWriter(this, writer);
137 | return writer.getResultBuffer();
138 | };
139 |
140 |
141 | /**
142 | * Serializes the given message to binary data (in protobuf wire
143 | * format), writing to the given BinaryWriter.
144 | * @param {!proto.tokenpb.AssociateSecondaryClientRequest} message
145 | * @param {!jspb.BinaryWriter} writer
146 | * @suppress {unusedLocalVariables} f is only used for nested messages
147 | */
148 | proto.tokenpb.AssociateSecondaryClientRequest.serializeBinaryToWriter = function(message, writer) {
149 | var f = undefined;
150 | f = message.getUserSession();
151 | if (f.length > 0) {
152 | writer.writeString(
153 | 2,
154 | f
155 | );
156 | }
157 | f = message.getClientName();
158 | if (f.length > 0) {
159 | writer.writeString(
160 | 3,
161 | f
162 | );
163 | }
164 | f = message.getAppId();
165 | if (f.length > 0) {
166 | writer.writeString(
167 | 4,
168 | f
169 | );
170 | }
171 | };
172 |
173 |
174 | /**
175 | * optional string user_session = 2;
176 | * @return {string}
177 | */
178 | proto.tokenpb.AssociateSecondaryClientRequest.prototype.getUserSession = function() {
179 | return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
180 | };
181 |
182 |
183 | /**
184 | * @param {string} value
185 | * @return {!proto.tokenpb.AssociateSecondaryClientRequest} returns this
186 | */
187 | proto.tokenpb.AssociateSecondaryClientRequest.prototype.setUserSession = function(value) {
188 | return jspb.Message.setProto3StringField(this, 2, value);
189 | };
190 |
191 |
192 | /**
193 | * optional string client_name = 3;
194 | * @return {string}
195 | */
196 | proto.tokenpb.AssociateSecondaryClientRequest.prototype.getClientName = function() {
197 | return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
198 | };
199 |
200 |
201 | /**
202 | * @param {string} value
203 | * @return {!proto.tokenpb.AssociateSecondaryClientRequest} returns this
204 | */
205 | proto.tokenpb.AssociateSecondaryClientRequest.prototype.setClientName = function(value) {
206 | return jspb.Message.setProto3StringField(this, 3, value);
207 | };
208 |
209 |
210 | /**
211 | * optional string app_id = 4;
212 | * @return {string}
213 | */
214 | proto.tokenpb.AssociateSecondaryClientRequest.prototype.getAppId = function() {
215 | return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
216 | };
217 |
218 |
219 | /**
220 | * @param {string} value
221 | * @return {!proto.tokenpb.AssociateSecondaryClientRequest} returns this
222 | */
223 | proto.tokenpb.AssociateSecondaryClientRequest.prototype.setAppId = function(value) {
224 | return jspb.Message.setProto3StringField(this, 4, value);
225 | };
226 |
227 |
228 |
--------------------------------------------------------------------------------
/javascript/jdocspb/jdoc.js:
--------------------------------------------------------------------------------
1 | // source: jdocs.proto
2 | /**
3 | * @fileoverview
4 | * @enhanceable
5 | * @suppress {messageConventions} JS Compiler reports an error if a variable or
6 | * field starts with 'MSG_' and isn't a translatable message.
7 | * @public
8 | */
9 | // GENERATED CODE -- DO NOT EDIT!
10 |
11 | goog.provide('proto.jdocspb.Jdoc');
12 |
13 | goog.require('jspb.BinaryReader');
14 | goog.require('jspb.BinaryWriter');
15 | goog.require('jspb.Message');
16 |
17 | /**
18 | * Generated by JsPbCodeGenerator.
19 | * @param {Array=} opt_data Optional initial data array, typically from a
20 | * server response, or constructed directly in Javascript. The array is used
21 | * in place and becomes part of the constructed object. It is not cloned.
22 | * If no data is provided, the constructed object will be empty, but still
23 | * valid.
24 | * @extends {jspb.Message}
25 | * @constructor
26 | */
27 | proto.jdocspb.Jdoc = function(opt_data) {
28 | jspb.Message.initialize(this, opt_data, 0, -1, null, null);
29 | };
30 | goog.inherits(proto.jdocspb.Jdoc, jspb.Message);
31 | if (goog.DEBUG && !COMPILED) {
32 | /**
33 | * @public
34 | * @override
35 | */
36 | proto.jdocspb.Jdoc.displayName = 'proto.jdocspb.Jdoc';
37 | }
38 |
39 |
40 |
41 | if (jspb.Message.GENERATE_TO_OBJECT) {
42 | /**
43 | * Creates an object representation of this proto.
44 | * Field names that are reserved in JavaScript and will be renamed to pb_name.
45 | * Optional fields that are not set will be set to undefined.
46 | * To access a reserved field use, foo.pb_, eg, foo.pb_default.
47 | * For the list of reserved names please see:
48 | * net/proto2/compiler/js/internal/generator.cc#kKeyword.
49 | * @param {boolean=} opt_includeInstance Deprecated. whether to include the
50 | * JSPB instance for transitional soy proto support:
51 | * http://goto/soy-param-migration
52 | * @return {!Object}
53 | */
54 | proto.jdocspb.Jdoc.prototype.toObject = function(opt_includeInstance) {
55 | return proto.jdocspb.Jdoc.toObject(opt_includeInstance, this);
56 | };
57 |
58 |
59 | /**
60 | * Static version of the {@see toObject} method.
61 | * @param {boolean|undefined} includeInstance Deprecated. Whether to include
62 | * the JSPB instance for transitional soy proto support:
63 | * http://goto/soy-param-migration
64 | * @param {!proto.jdocspb.Jdoc} msg The msg instance to transform.
65 | * @return {!Object}
66 | * @suppress {unusedLocalVariables} f is only used for nested messages
67 | */
68 | proto.jdocspb.Jdoc.toObject = function(includeInstance, msg) {
69 | var f, obj = {
70 | docVersion: jspb.Message.getFieldWithDefault(msg, 1, 0),
71 | fmtVersion: jspb.Message.getFieldWithDefault(msg, 2, 0),
72 | clientMetadata: jspb.Message.getFieldWithDefault(msg, 3, ""),
73 | jsonDoc: jspb.Message.getFieldWithDefault(msg, 4, "")
74 | };
75 |
76 | if (includeInstance) {
77 | obj.$jspbMessageInstance = msg;
78 | }
79 | return obj;
80 | };
81 | }
82 |
83 |
84 | /**
85 | * Deserializes binary data (in protobuf wire format).
86 | * @param {jspb.ByteSource} bytes The bytes to deserialize.
87 | * @return {!proto.jdocspb.Jdoc}
88 | */
89 | proto.jdocspb.Jdoc.deserializeBinary = function(bytes) {
90 | var reader = new jspb.BinaryReader(bytes);
91 | var msg = new proto.jdocspb.Jdoc;
92 | return proto.jdocspb.Jdoc.deserializeBinaryFromReader(msg, reader);
93 | };
94 |
95 |
96 | /**
97 | * Deserializes binary data (in protobuf wire format) from the
98 | * given reader into the given message object.
99 | * @param {!proto.jdocspb.Jdoc} msg The message object to deserialize into.
100 | * @param {!jspb.BinaryReader} reader The BinaryReader to use.
101 | * @return {!proto.jdocspb.Jdoc}
102 | */
103 | proto.jdocspb.Jdoc.deserializeBinaryFromReader = function(msg, reader) {
104 | while (reader.nextField()) {
105 | if (reader.isEndGroup()) {
106 | break;
107 | }
108 | var field = reader.getFieldNumber();
109 | switch (field) {
110 | case 1:
111 | var value = /** @type {number} */ (reader.readUint64());
112 | msg.setDocVersion(value);
113 | break;
114 | case 2:
115 | var value = /** @type {number} */ (reader.readUint64());
116 | msg.setFmtVersion(value);
117 | break;
118 | case 3:
119 | var value = /** @type {string} */ (reader.readString());
120 | msg.setClientMetadata(value);
121 | break;
122 | case 4:
123 | var value = /** @type {string} */ (reader.readString());
124 | msg.setJsonDoc(value);
125 | break;
126 | default:
127 | reader.skipField();
128 | break;
129 | }
130 | }
131 | return msg;
132 | };
133 |
134 |
135 | /**
136 | * Serializes the message to binary data (in protobuf wire format).
137 | * @return {!Uint8Array}
138 | */
139 | proto.jdocspb.Jdoc.prototype.serializeBinary = function() {
140 | var writer = new jspb.BinaryWriter();
141 | proto.jdocspb.Jdoc.serializeBinaryToWriter(this, writer);
142 | return writer.getResultBuffer();
143 | };
144 |
145 |
146 | /**
147 | * Serializes the given message to binary data (in protobuf wire
148 | * format), writing to the given BinaryWriter.
149 | * @param {!proto.jdocspb.Jdoc} message
150 | * @param {!jspb.BinaryWriter} writer
151 | * @suppress {unusedLocalVariables} f is only used for nested messages
152 | */
153 | proto.jdocspb.Jdoc.serializeBinaryToWriter = function(message, writer) {
154 | var f = undefined;
155 | f = message.getDocVersion();
156 | if (f !== 0) {
157 | writer.writeUint64(
158 | 1,
159 | f
160 | );
161 | }
162 | f = message.getFmtVersion();
163 | if (f !== 0) {
164 | writer.writeUint64(
165 | 2,
166 | f
167 | );
168 | }
169 | f = message.getClientMetadata();
170 | if (f.length > 0) {
171 | writer.writeString(
172 | 3,
173 | f
174 | );
175 | }
176 | f = message.getJsonDoc();
177 | if (f.length > 0) {
178 | writer.writeString(
179 | 4,
180 | f
181 | );
182 | }
183 | };
184 |
185 |
186 | /**
187 | * optional uint64 doc_version = 1;
188 | * @return {number}
189 | */
190 | proto.jdocspb.Jdoc.prototype.getDocVersion = function() {
191 | return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
192 | };
193 |
194 |
195 | /**
196 | * @param {number} value
197 | * @return {!proto.jdocspb.Jdoc} returns this
198 | */
199 | proto.jdocspb.Jdoc.prototype.setDocVersion = function(value) {
200 | return jspb.Message.setProto3IntField(this, 1, value);
201 | };
202 |
203 |
204 | /**
205 | * optional uint64 fmt_version = 2;
206 | * @return {number}
207 | */
208 | proto.jdocspb.Jdoc.prototype.getFmtVersion = function() {
209 | return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
210 | };
211 |
212 |
213 | /**
214 | * @param {number} value
215 | * @return {!proto.jdocspb.Jdoc} returns this
216 | */
217 | proto.jdocspb.Jdoc.prototype.setFmtVersion = function(value) {
218 | return jspb.Message.setProto3IntField(this, 2, value);
219 | };
220 |
221 |
222 | /**
223 | * optional string client_metadata = 3;
224 | * @return {string}
225 | */
226 | proto.jdocspb.Jdoc.prototype.getClientMetadata = function() {
227 | return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
228 | };
229 |
230 |
231 | /**
232 | * @param {string} value
233 | * @return {!proto.jdocspb.Jdoc} returns this
234 | */
235 | proto.jdocspb.Jdoc.prototype.setClientMetadata = function(value) {
236 | return jspb.Message.setProto3StringField(this, 3, value);
237 | };
238 |
239 |
240 | /**
241 | * optional string json_doc = 4;
242 | * @return {string}
243 | */
244 | proto.jdocspb.Jdoc.prototype.getJsonDoc = function() {
245 | return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
246 | };
247 |
248 |
249 | /**
250 | * @param {string} value
251 | * @return {!proto.jdocspb.Jdoc} returns this
252 | */
253 | proto.jdocspb.Jdoc.prototype.setJsonDoc = function(value) {
254 | return jspb.Message.setProto3StringField(this, 4, value);
255 | };
256 |
257 |
258 |
--------------------------------------------------------------------------------
/javascript/jdocspb/viewdoc.js:
--------------------------------------------------------------------------------
1 | // source: jdocs.proto
2 | /**
3 | * @fileoverview
4 | * @enhanceable
5 | * @suppress {messageConventions} JS Compiler reports an error if a variable or
6 | * field starts with 'MSG_' and isn't a translatable message.
7 | * @public
8 | */
9 | // GENERATED CODE -- DO NOT EDIT!
10 |
11 | goog.provide('proto.jdocspb.ViewDoc');
12 |
13 | goog.require('jspb.BinaryReader');
14 | goog.require('jspb.BinaryWriter');
15 | goog.require('jspb.Message');
16 |
17 | /**
18 | * Generated by JsPbCodeGenerator.
19 | * @param {Array=} opt_data Optional initial data array, typically from a
20 | * server response, or constructed directly in Javascript. The array is used
21 | * in place and becomes part of the constructed object. It is not cloned.
22 | * If no data is provided, the constructed object will be empty, but still
23 | * valid.
24 | * @extends {jspb.Message}
25 | * @constructor
26 | */
27 | proto.jdocspb.ViewDoc = function(opt_data) {
28 | jspb.Message.initialize(this, opt_data, 0, -1, null, null);
29 | };
30 | goog.inherits(proto.jdocspb.ViewDoc, jspb.Message);
31 | if (goog.DEBUG && !COMPILED) {
32 | /**
33 | * @public
34 | * @override
35 | */
36 | proto.jdocspb.ViewDoc.displayName = 'proto.jdocspb.ViewDoc';
37 | }
38 |
39 |
40 |
41 | if (jspb.Message.GENERATE_TO_OBJECT) {
42 | /**
43 | * Creates an object representation of this proto.
44 | * Field names that are reserved in JavaScript and will be renamed to pb_name.
45 | * Optional fields that are not set will be set to undefined.
46 | * To access a reserved field use, foo.pb_, eg, foo.pb_default.
47 | * For the list of reserved names please see:
48 | * net/proto2/compiler/js/internal/generator.cc#kKeyword.
49 | * @param {boolean=} opt_includeInstance Deprecated. whether to include the
50 | * JSPB instance for transitional soy proto support:
51 | * http://goto/soy-param-migration
52 | * @return {!Object}
53 | */
54 | proto.jdocspb.ViewDoc.prototype.toObject = function(opt_includeInstance) {
55 | return proto.jdocspb.ViewDoc.toObject(opt_includeInstance, this);
56 | };
57 |
58 |
59 | /**
60 | * Static version of the {@see toObject} method.
61 | * @param {boolean|undefined} includeInstance Deprecated. Whether to include
62 | * the JSPB instance for transitional soy proto support:
63 | * http://goto/soy-param-migration
64 | * @param {!proto.jdocspb.ViewDoc} msg The msg instance to transform.
65 | * @return {!Object}
66 | * @suppress {unusedLocalVariables} f is only used for nested messages
67 | */
68 | proto.jdocspb.ViewDoc.toObject = function(includeInstance, msg) {
69 | var f, obj = {
70 | userId: jspb.Message.getFieldWithDefault(msg, 1, ""),
71 | thing: jspb.Message.getFieldWithDefault(msg, 2, ""),
72 | docName: jspb.Message.getFieldWithDefault(msg, 3, ""),
73 | jsonDoc: jspb.Message.getFieldWithDefault(msg, 4, "")
74 | };
75 |
76 | if (includeInstance) {
77 | obj.$jspbMessageInstance = msg;
78 | }
79 | return obj;
80 | };
81 | }
82 |
83 |
84 | /**
85 | * Deserializes binary data (in protobuf wire format).
86 | * @param {jspb.ByteSource} bytes The bytes to deserialize.
87 | * @return {!proto.jdocspb.ViewDoc}
88 | */
89 | proto.jdocspb.ViewDoc.deserializeBinary = function(bytes) {
90 | var reader = new jspb.BinaryReader(bytes);
91 | var msg = new proto.jdocspb.ViewDoc;
92 | return proto.jdocspb.ViewDoc.deserializeBinaryFromReader(msg, reader);
93 | };
94 |
95 |
96 | /**
97 | * Deserializes binary data (in protobuf wire format) from the
98 | * given reader into the given message object.
99 | * @param {!proto.jdocspb.ViewDoc} msg The message object to deserialize into.
100 | * @param {!jspb.BinaryReader} reader The BinaryReader to use.
101 | * @return {!proto.jdocspb.ViewDoc}
102 | */
103 | proto.jdocspb.ViewDoc.deserializeBinaryFromReader = function(msg, reader) {
104 | while (reader.nextField()) {
105 | if (reader.isEndGroup()) {
106 | break;
107 | }
108 | var field = reader.getFieldNumber();
109 | switch (field) {
110 | case 1:
111 | var value = /** @type {string} */ (reader.readString());
112 | msg.setUserId(value);
113 | break;
114 | case 2:
115 | var value = /** @type {string} */ (reader.readString());
116 | msg.setThing(value);
117 | break;
118 | case 3:
119 | var value = /** @type {string} */ (reader.readString());
120 | msg.setDocName(value);
121 | break;
122 | case 4:
123 | var value = /** @type {string} */ (reader.readString());
124 | msg.setJsonDoc(value);
125 | break;
126 | default:
127 | reader.skipField();
128 | break;
129 | }
130 | }
131 | return msg;
132 | };
133 |
134 |
135 | /**
136 | * Serializes the message to binary data (in protobuf wire format).
137 | * @return {!Uint8Array}
138 | */
139 | proto.jdocspb.ViewDoc.prototype.serializeBinary = function() {
140 | var writer = new jspb.BinaryWriter();
141 | proto.jdocspb.ViewDoc.serializeBinaryToWriter(this, writer);
142 | return writer.getResultBuffer();
143 | };
144 |
145 |
146 | /**
147 | * Serializes the given message to binary data (in protobuf wire
148 | * format), writing to the given BinaryWriter.
149 | * @param {!proto.jdocspb.ViewDoc} message
150 | * @param {!jspb.BinaryWriter} writer
151 | * @suppress {unusedLocalVariables} f is only used for nested messages
152 | */
153 | proto.jdocspb.ViewDoc.serializeBinaryToWriter = function(message, writer) {
154 | var f = undefined;
155 | f = message.getUserId();
156 | if (f.length > 0) {
157 | writer.writeString(
158 | 1,
159 | f
160 | );
161 | }
162 | f = message.getThing();
163 | if (f.length > 0) {
164 | writer.writeString(
165 | 2,
166 | f
167 | );
168 | }
169 | f = message.getDocName();
170 | if (f.length > 0) {
171 | writer.writeString(
172 | 3,
173 | f
174 | );
175 | }
176 | f = message.getJsonDoc();
177 | if (f.length > 0) {
178 | writer.writeString(
179 | 4,
180 | f
181 | );
182 | }
183 | };
184 |
185 |
186 | /**
187 | * optional string user_id = 1;
188 | * @return {string}
189 | */
190 | proto.jdocspb.ViewDoc.prototype.getUserId = function() {
191 | return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
192 | };
193 |
194 |
195 | /**
196 | * @param {string} value
197 | * @return {!proto.jdocspb.ViewDoc} returns this
198 | */
199 | proto.jdocspb.ViewDoc.prototype.setUserId = function(value) {
200 | return jspb.Message.setProto3StringField(this, 1, value);
201 | };
202 |
203 |
204 | /**
205 | * optional string thing = 2;
206 | * @return {string}
207 | */
208 | proto.jdocspb.ViewDoc.prototype.getThing = function() {
209 | return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
210 | };
211 |
212 |
213 | /**
214 | * @param {string} value
215 | * @return {!proto.jdocspb.ViewDoc} returns this
216 | */
217 | proto.jdocspb.ViewDoc.prototype.setThing = function(value) {
218 | return jspb.Message.setProto3StringField(this, 2, value);
219 | };
220 |
221 |
222 | /**
223 | * optional string doc_name = 3;
224 | * @return {string}
225 | */
226 | proto.jdocspb.ViewDoc.prototype.getDocName = function() {
227 | return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
228 | };
229 |
230 |
231 | /**
232 | * @param {string} value
233 | * @return {!proto.jdocspb.ViewDoc} returns this
234 | */
235 | proto.jdocspb.ViewDoc.prototype.setDocName = function(value) {
236 | return jspb.Message.setProto3StringField(this, 3, value);
237 | };
238 |
239 |
240 | /**
241 | * optional string json_doc = 4;
242 | * @return {string}
243 | */
244 | proto.jdocspb.ViewDoc.prototype.getJsonDoc = function() {
245 | return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
246 | };
247 |
248 |
249 | /**
250 | * @param {string} value
251 | * @return {!proto.jdocspb.ViewDoc} returns this
252 | */
253 | proto.jdocspb.ViewDoc.prototype.setJsonDoc = function(value) {
254 | return jspb.Message.setProto3StringField(this, 4, value);
255 | };
256 |
257 |
258 |
--------------------------------------------------------------------------------