From 3a0bcd21e7df5428db27c91619bb2e6df678d744 Mon Sep 17 00:00:00 2001 From: Chris Cummer Date: Sun, 21 Oct 2018 12:48:22 -0700 Subject: [PATCH] Update dependencies --- Gopkg.lock | 77 +- vendor/github.com/adlio/trello/action.go | 27 +- vendor/github.com/adlio/trello/board.go | 5 +- vendor/github.com/adlio/trello/card.go | 63 + vendor/github.com/adlio/trello/client.go | 2 +- .../github.com/adlio/trello/custom-fields.go | 49 + .../andygrunwald/go-gerrit/.travis.yml | 1 + .../andygrunwald/go-gerrit/authentication.go | 8 +- .../andygrunwald/go-gerrit/changes.go | 28 +- vendor/github.com/gdamore/tcell/README.md | 1 + vendor/github.com/gdamore/tcell/cell.go | 7 +- vendor/github.com/golang/protobuf/LICENSE | 3 - .../golang/protobuf/proto/encode.go | 18 - .../github.com/golang/protobuf/proto/lib.go | 62 +- .../golang/protobuf/proto/properties.go | 16 +- .../golang/protobuf/proto/table_marshal.go | 190 +- .../golang/protobuf/proto/table_unmarshal.go | 146 +- .../github.com/golang/protobuf/proto/text.go | 4 +- .../golang/protobuf/proto/text_parser.go | 6 +- vendor/github.com/google/go-github/AUTHORS | 15 + .../go-github/github/activity_events.go | 2 + .../google/go-github/github/activity_star.go | 6 +- .../google/go-github/github/apps.go | 2 +- .../google/go-github/github/checks.go | 35 +- .../google/go-github/github/event_types.go | 26 + .../google/go-github/github/git_commits.go | 2 +- .../google/go-github/github/git_tags.go | 2 +- .../go-github/github/github-accessors.go | 216 +- .../google/go-github/github/github.go | 31 +- .../google/go-github/github/issues.go | 2 +- .../go-github/github/issues_comments.go | 1 + .../google/go-github/github/messages.go | 79 +- .../google/go-github/github/orgs.go | 61 +- .../google/go-github/github/orgs_hooks.go | 14 +- .../google/go-github/github/pulls.go | 26 +- .../google/go-github/github/reactions.go | 101 + .../google/go-github/github/repos.go | 51 +- .../google/go-github/github/repos_forks.go | 13 +- .../google/go-github/github/repos_hooks.go | 44 +- .../google/go-github/github/repos_releases.go | 81 +- .../github/teams_discussion_comments.go | 1 + .../go-github/github/teams_discussions.go | 1 + .../google/go-github/github/users.go | 1 + vendor/github.com/olebedev/config/config.go | 2 +- vendor/github.com/rivo/tview/README.md | 2 + vendor/github.com/rivo/tview/application.go | 47 +- vendor/github.com/rivo/tview/box.go | 40 +- vendor/github.com/rivo/tview/checkbox.go | 6 +- vendor/github.com/rivo/tview/form.go | 12 + vendor/github.com/rivo/tview/inputfield.go | 200 +- vendor/github.com/rivo/tview/list.go | 15 +- vendor/github.com/rivo/tview/modal.go | 10 + vendor/github.com/rivo/tview/table.go | 59 +- vendor/github.com/rivo/tview/textview.go | 126 +- vendor/github.com/rivo/tview/util.go | 546 +- .../sticreations/spotigopher/LICENCE.md | 674 + .../spotigopher/spotigopher/spotigopher.go | 131 +- vendor/github.com/xanzy/go-gitlab/.travis.yml | 4 +- vendor/github.com/xanzy/go-gitlab/README.md | 20 +- .../xanzy/go-gitlab/access_requests.go | 237 + .../xanzy/go-gitlab/ci_yml_templates.go | 70 + .../xanzy/go-gitlab/custom_attributes.go | 171 + .../github.com/xanzy/go-gitlab/discussions.go | 1112 ++ .../github.com/xanzy/go-gitlab/event_types.go | 19 + vendor/github.com/xanzy/go-gitlab/gitlab.go | 63 +- .../xanzy/go-gitlab/group_members.go | 32 +- vendor/github.com/xanzy/go-gitlab/issues.go | 57 +- vendor/github.com/xanzy/go-gitlab/jobs.go | 35 + vendor/github.com/xanzy/go-gitlab/labels.go | 21 + .../xanzy/go-gitlab/license_templates.go | 92 + .../go-gitlab/merge_request_approvals.go | 23 +- .../xanzy/go-gitlab/merge_requests.go | 97 +- vendor/github.com/xanzy/go-gitlab/notes.go | 63 +- .../xanzy/go-gitlab/pages_domains.go | 19 + .../xanzy/go-gitlab/pipeline_schedules.go | 9 - .../github.com/xanzy/go-gitlab/pipelines.go | 12 +- .../xanzy/go-gitlab/project_badges.go | 208 + .../xanzy/go-gitlab/project_members.go | 35 +- vendor/github.com/xanzy/go-gitlab/projects.go | 57 +- .../xanzy/go-gitlab/repository_files.go | 10 +- vendor/github.com/xanzy/go-gitlab/runners.go | 124 +- vendor/github.com/xanzy/go-gitlab/services.go | 142 +- vendor/github.com/xanzy/go-gitlab/session.go | 78 - vendor/github.com/xanzy/go-gitlab/users.go | 62 +- vendor/github.com/zmb3/spotify/.travis.yml | 5 + vendor/github.com/zmb3/spotify/LICENSE | 201 + vendor/github.com/zmb3/spotify/README.md | 106 + vendor/github.com/zmb3/spotify/album.go | 220 + vendor/github.com/zmb3/spotify/artist.go | 152 + .../github.com/zmb3/spotify/audio_analysis.go | 110 + .../github.com/zmb3/spotify/audio_features.go | 123 + vendor/github.com/zmb3/spotify/auth.go | 180 + vendor/github.com/zmb3/spotify/category.go | 140 + vendor/github.com/zmb3/spotify/countries.go | 32 + vendor/github.com/zmb3/spotify/cursor.go | 37 + vendor/github.com/zmb3/spotify/full_tests.bat | 5 + vendor/github.com/zmb3/spotify/library.go | 61 + vendor/github.com/zmb3/spotify/page.go | 87 + vendor/github.com/zmb3/spotify/player.go | 528 + vendor/github.com/zmb3/spotify/playlist.go | 662 + .../github.com/zmb3/spotify/recommendation.go | 121 + vendor/github.com/zmb3/spotify/search.go | 208 + vendor/github.com/zmb3/spotify/spotify.go | 291 + vendor/github.com/zmb3/spotify/track.go | 120 + .../zmb3/spotify/track_attributes.go | 431 + vendor/github.com/zmb3/spotify/user.go | 402 + .../zorkian/go-datadog-api/.travis.yml | 3 +- .../zorkian/go-datadog-api/dashboards.go | 98 +- .../go-datadog-api/datadog-accessors.go | 10793 ++++++---------- .../zorkian/go-datadog-api/integrations.go | 63 + .../zorkian/go-datadog-api/monitors.go | 40 +- .../zorkian/go-datadog-api/request.go | 35 +- .../zorkian/go-datadog-api/screen_widgets.go | 435 +- .../zorkian/go-datadog-api/screenboards.go | 23 - .../zorkian/go-datadog-api/series.go | 10 +- vendor/golang.org/x/oauth2/internal/token.go | 4 + .../api/calendar/v3/calendar-api.json | 169 +- .../api/calendar/v3/calendar-gen.go | 519 +- .../api/gensupport/jsonfloat.go | 2 +- .../google.golang.org/api/gensupport/retry.go | 2 +- .../api/sheets/v4/sheets-gen.go | 102 +- vendor/google.golang.org/appengine/go.mod | 7 + vendor/google.golang.org/appengine/go.sum | 3 + .../app_identity/app_identity_service.pb.go | 396 +- .../appengine/internal/base/api_base.pb.go | 248 +- .../internal/datastore/datastore_v3.pb.go | 2173 +++- .../appengine/internal/identity_vm.go | 43 +- .../appengine/internal/log/log_service.pb.go | 562 +- .../appengine/internal/metadata.go | 3 +- .../internal/modules/modules_service.pb.go | 596 +- .../internal/remote_api/remote_api.pb.go | 174 +- .../internal/urlfetch/urlfetch_service.pb.go | 178 +- 132 files changed, 18033 insertions(+), 9138 deletions(-) create mode 100644 vendor/github.com/adlio/trello/custom-fields.go create mode 100644 vendor/github.com/sticreations/spotigopher/LICENCE.md create mode 100644 vendor/github.com/xanzy/go-gitlab/access_requests.go create mode 100644 vendor/github.com/xanzy/go-gitlab/ci_yml_templates.go create mode 100644 vendor/github.com/xanzy/go-gitlab/custom_attributes.go create mode 100644 vendor/github.com/xanzy/go-gitlab/discussions.go create mode 100644 vendor/github.com/xanzy/go-gitlab/license_templates.go create mode 100644 vendor/github.com/xanzy/go-gitlab/project_badges.go delete mode 100644 vendor/github.com/xanzy/go-gitlab/session.go create mode 100644 vendor/github.com/zmb3/spotify/.travis.yml create mode 100644 vendor/github.com/zmb3/spotify/LICENSE create mode 100644 vendor/github.com/zmb3/spotify/README.md create mode 100644 vendor/github.com/zmb3/spotify/album.go create mode 100644 vendor/github.com/zmb3/spotify/artist.go create mode 100644 vendor/github.com/zmb3/spotify/audio_analysis.go create mode 100644 vendor/github.com/zmb3/spotify/audio_features.go create mode 100644 vendor/github.com/zmb3/spotify/auth.go create mode 100644 vendor/github.com/zmb3/spotify/category.go create mode 100644 vendor/github.com/zmb3/spotify/countries.go create mode 100644 vendor/github.com/zmb3/spotify/cursor.go create mode 100644 vendor/github.com/zmb3/spotify/full_tests.bat create mode 100644 vendor/github.com/zmb3/spotify/library.go create mode 100644 vendor/github.com/zmb3/spotify/page.go create mode 100755 vendor/github.com/zmb3/spotify/player.go create mode 100644 vendor/github.com/zmb3/spotify/playlist.go create mode 100644 vendor/github.com/zmb3/spotify/recommendation.go create mode 100644 vendor/github.com/zmb3/spotify/search.go create mode 100644 vendor/github.com/zmb3/spotify/spotify.go create mode 100644 vendor/github.com/zmb3/spotify/track.go create mode 100644 vendor/github.com/zmb3/spotify/track_attributes.go create mode 100644 vendor/github.com/zmb3/spotify/user.go create mode 100644 vendor/google.golang.org/appengine/go.mod create mode 100644 vendor/google.golang.org/appengine/go.sum diff --git a/Gopkg.lock b/Gopkg.lock index a358ebb7..8de84d9a 100644 --- a/Gopkg.lock +++ b/Gopkg.lock @@ -6,16 +6,16 @@ name = "cloud.google.com/go" packages = ["compute/metadata"] pruneopts = "UT" - revision = "64a2037ec6be8a4b0c1d1f706ed35b428b989239" - version = "v0.26.0" + revision = "dfffe386c33fb24c34ee501e5723df5b97b98514" + version = "v0.30.0" [[projects]] branch = "master" - digest = "1:1164f5eccc8905c03a2c688141c81f06522ed5fd2eb65cb43debeb730a018276" + digest = "1:636ac9f696c988f0038afd43592f7a0fff29038588ab1064ba8ba3476bb41091" name = "github.com/adlio/trello" packages = ["."] pruneopts = "UT" - revision = "8a458717123e328d9103a3bf075e64bc1ec961f8" + revision = "e4cc07c871d0ee17c5579131fc1c786efbb5fe2a" [[projects]] digest = "1:9253f97cfbbe049b631877c80badecc69620711b3e335f6cf97a7809681da388" @@ -59,11 +59,11 @@ [[projects]] branch = "master" - digest = "1:b5d1ba5dc01e8129b7df5cf95380a66b0e0f122850189b7ec255953b15522f16" + digest = "1:579829cc9bf515e2f9e39f91df03b9333c311402bac5a4935dc8ef81e3a57160" name = "github.com/andygrunwald/go-gerrit" packages = ["."] pruneopts = "UT" - revision = "197fe0d2e796b3d985b9cd91be8afd4415692f39" + revision = "30ce279197661497040ec81c4b64539562eb2d4b" [[projects]] branch = "master" @@ -117,12 +117,12 @@ version = "v1.1.6" [[projects]] - branch = "master" digest = "1:6f9339c912bbdda81302633ad7e99a28dfa5a639c864061f1929510a9a64aa74" name = "github.com/dustin/go-humanize" packages = ["."] pruneopts = "UT" revision = "9f541cc9db5d55bce703bd99987c9d5cb8eea45e" + version = "v1.0.0" [[projects]] branch = "master" @@ -134,14 +134,14 @@ [[projects]] branch = "master" - digest = "1:00b9cce210566117aff926677c005aeaea6c85374e67bdcb72783af237c48f97" + digest = "1:490cf9d7deec1b0dcac6cc8b17f307c48c4821bc2140d46e48175a83acbfe40d" name = "github.com/gdamore/tcell" packages = [ ".", "terminfo", ] pruneopts = "UT" - revision = "de7e78efa4a71b3f36c7154989c529dbdf9ae623" + revision = "493f3b46b3c20880afc8e04ceeb1c6d5aa3363d7" [[projects]] digest = "1:57fa4c058c21ce25d0b7272518dd746065117abf6cc706158b0d361202024520" @@ -152,28 +152,28 @@ version = "v4.1.0" [[projects]] - digest = "1:15042ad3498153684d09f393bbaec6b216c8eec6d61f63dff711de7d64ed8861" + digest = "1:97df918963298c287643883209a2c3f642e6593379f97ab400c2a2e219ab647d" name = "github.com/golang/protobuf" packages = ["proto"] pruneopts = "UT" - revision = "b4deda0973fb4c70b50d226b1af49f3da59f5265" - version = "v1.1.0" + revision = "aa810b61a9c79d51363740d207bb46cf8e620ed5" + version = "v1.2.0" [[projects]] branch = "master" - digest = "1:4be3c01ef56542da4f1268c52a8b88bae5309ec3dade7755e250bc933e13ac70" + digest = "1:8c90219e8a1f5f7cad019b77697aaae2b236db5a1a46ae688e5ede406e109182" name = "github.com/google/go-github" packages = ["github"] pruneopts = "UT" - revision = "d7732128a00e8e95e8fe896017da18ee20b2180d" + revision = "68a79fc6a32bab9406083545e667a65ba67b0a3e" [[projects]] - branch = "master" digest = "1:a63cff6b5d8b95638bfe300385d93b2a6d9d687734b863da8e09dc834510a690" name = "github.com/google/go-querystring" packages = ["query"] pruneopts = "UT" - revision = "53e6ce116135b80d037921a7fdd5138cf32d7a8a" + revision = "44c6ddd0a2342c386950e880b658017258da92fc" + version = "v1.0.0" [[projects]] digest = "1:a2cff208d4759f6ba1b1cd228587b0a1869f95f22542ec9cd17fff64430113c7" @@ -201,11 +201,11 @@ [[projects]] branch = "master" - digest = "1:3a16300d913e1050d4a7ff296106a11b72da05c5dd3475f2ae1feb0830866461" + digest = "1:2277d06c9dcd34d70119b624115f3d74672647322349bb76a8adedbc623a3955" name = "github.com/olebedev/config" packages = ["."] pruneopts = "UT" - revision = "ed90d2035b8114c30b9cb65e7d52e10a7148f8c6" + revision = "57f804269e64d41bfe46efb76232c47f49d40902" [[projects]] digest = "1:40e195917a951a8bf867cd05de2a46aaf1806c50cf92eebf4c16f78cd196f747" @@ -241,19 +241,19 @@ [[projects]] branch = "master" - digest = "1:9deb696e9739b45e91369ffb3876d4e0d2bc45e0d35062fb3c5aa44fa77eff6c" + digest = "1:00d9f4017b55d590139b77fbd851aef56f179479fc40a4afdedaf187e828f99d" name = "github.com/rivo/tview" packages = ["."] pruneopts = "UT" - revision = "21f50f5bc400083b4eb23304887d9cd0fc00d075" + revision = "a7c1880d62d37422830f0a15823b51301ca9f354" [[projects]] branch = "master" - digest = "1:de0cf35afb9cad7b20ff8871ae3b64cecc7116bffb583bc7b3c1bb5c37473149" + digest = "1:93ff598337cb35c40079a1ba766729c20eb1756e37f5740eac4c8e943f59664d" name = "github.com/sticreations/spotigopher" packages = ["spotigopher"] pruneopts = "UT" - revision = "995ee350dc1c54259597de65dde7a9e56a4b73af" + revision = "98632f6f94b087f2582be76980f76bc070d37176" [[projects]] digest = "1:18752d0b95816a1b777505a97f71c7467a8445b8ffb55631a7bf779f6ba4fa83" @@ -265,11 +265,11 @@ [[projects]] branch = "master" - digest = "1:ca067f3d378064d50a239b1f0d4dcd2dab6356f7643993bdf02c91d6e621c028" + digest = "1:afc7e1c726a88e6cd5689cca19fbc86128dffe86fd37e3e0841767f3a951182e" name = "github.com/xanzy/go-gitlab" packages = ["."] pruneopts = "UT" - revision = "f3bc634ab936f7e4ee5e21334ccfdfeb5601d477" + revision = "1444249c1b2a8e4cdb5a76dc9c8d02d1133180be" [[projects]] branch = "master" @@ -281,11 +281,19 @@ [[projects]] branch = "master" - digest = "1:f6f2814b88ad3dd5ca45e1e9a7a0caba1ddb1bfaf1c4173ebd991d854e1669eb" + digest = "1:1ff6915a45fb06d272e614e72219aa058aefc545f597a708eb0cc6cb778c344a" + name = "github.com/zmb3/spotify" + packages = ["."] + pruneopts = "UT" + revision = "a4bd83f60e06ab58f3516c61680d0532aabf470e" + +[[projects]] + branch = "master" + digest = "1:02a2f8f0718f239866000d2d1bca016d14f0f6de37615c315f34da17dc630259" name = "github.com/zorkian/go-datadog-api" packages = ["."] pruneopts = "UT" - revision = "d7b8b10db6a7eb1c1c2424b10a795a1662e80c9a" + revision = "dc324c09cf05eef3e3a82bde06ae0c4dd349a767" [[projects]] branch = "master" @@ -296,11 +304,11 @@ "context/ctxhttp", ] pruneopts = "UT" - revision = "aaf60122140d3fcf75376d319f0554393160eb50" + revision = "04a2e542c03f1d053ab3e4d6e5abcd4b66e2be8e" [[projects]] branch = "master" - digest = "1:bea0314c10bd362ab623af4880d853b5bad3b63d0ab9945c47e461b8d04203ed" + digest = "1:faa25cb78cf9c8cec9345d4ed07322cdef6a8c968b3d0a6b6c3609067c7386eb" name = "golang.org/x/oauth2" packages = [ ".", @@ -310,7 +318,7 @@ "jwt", ] pruneopts = "UT" - revision = "3d292e4d0cdc3a0113e6d207bb137145ef1de42f" + revision = "9dcd33a902f40452422c2367fefcb95b54f9f8f8" [[projects]] digest = "1:37672ad5821719e2df8509c2edd4ba5ae192463237c73c3a2d24ef8b2bc9e36f" @@ -328,7 +336,7 @@ [[projects]] branch = "master" - digest = "1:c8d95fbc783cab4e8986b1bf3dbe5312db7521e4342ac755280cfa78ce0ee792" + digest = "1:a1d58b7c9eeceeac201a6f6b10092cd2a5985791a45843c838151ee3f751d3c3" name = "google.golang.org/api" packages = [ "calendar/v3", @@ -338,10 +346,10 @@ "sheets/v4", ] pruneopts = "UT" - revision = "e21acd801f91da814261b938941d193bb036441a" + revision = "a2651947f503a1793446d4058bb073a6fdf99e53" [[projects]] - digest = "1:c8907869850adaa8bd7631887948d0684f3787d0912f1c01ab72581a6c34432e" + digest = "1:193950893ea275f89ed92e5da11ed8fa1436872f755a9ea5d4afa83dc9d9c3a8" name = "google.golang.org/appengine" packages = [ ".", @@ -356,8 +364,8 @@ "urlfetch", ] pruneopts = "UT" - revision = "b1f26356af11148e710935ed1ac8a7f5702c7612" - version = "v1.1.0" + revision = "ae0ab99deb4dc413a2b4bd6c8bdd0eb67f1e4d06" + version = "v1.2.0" [[projects]] digest = "1:342378ac4dcb378a5448dd723f0784ae519383532f5e70ade24132c4c8693202" @@ -390,6 +398,7 @@ "github.com/stretchr/testify/assert", "github.com/xanzy/go-gitlab", "github.com/yfronto/newrelic", + "github.com/zmb3/spotify", "github.com/zorkian/go-datadog-api", "golang.org/x/oauth2", "golang.org/x/oauth2/google", diff --git a/vendor/github.com/adlio/trello/action.go b/vendor/github.com/adlio/trello/action.go index 20f6d8fc..f1f28128 100644 --- a/vendor/github.com/adlio/trello/action.go +++ b/vendor/github.com/adlio/trello/action.go @@ -21,20 +21,29 @@ type Action struct { } type ActionData struct { - Text string `json:"text,omitempty"` - List *List `json:"list,omitempty"` - Card *Card `json:"card,omitempty"` - CardSource *Card `json:"cardSource,omitempty"` - Board *Board `json:"board,omitempty"` - Old *Card `json:"old,omitempty"` - ListBefore *List `json:"listBefore,omitempty"` - ListAfter *List `json:"listAfter,omitempty"` - DateLastEdited time.Time `json:"dateLastEdited"` + Text string `json:"text,omitempty"` + List *List `json:"list,omitempty"` + Card *ActionDataCard `json:"card,omitempty"` + CardSource *ActionDataCard `json:"cardSource,omitempty"` + Board *Board `json:"board,omitempty"` + Old *ActionDataCard `json:"old,omitempty"` + ListBefore *List `json:"listBefore,omitempty"` + ListAfter *List `json:"listAfter,omitempty"` + DateLastEdited time.Time `json:"dateLastEdited"` CheckItem *CheckItem `json:"checkItem"` Checklist *Checklist `json:"checklist"` } +type ActionDataCard struct { + ID string `json:"id"` + Name string `json:"name"` + IDShort int `json:"idShort"` + ShortLink string `json:"shortLink"` + Pos float64 `json:"pos"` + Closed bool `json:"closed"` +} + func (b *Board) GetActions(args Arguments) (actions ActionCollection, err error) { path := fmt.Sprintf("boards/%s/actions", b.ID) err = b.client.Get(path, args, &actions) diff --git a/vendor/github.com/adlio/trello/board.go b/vendor/github.com/adlio/trello/board.go index cc8617ef..dfdd2c0a 100644 --- a/vendor/github.com/adlio/trello/board.go +++ b/vendor/github.com/adlio/trello/board.go @@ -52,8 +52,9 @@ type Board struct { Sky string `json:"sky,omitempty"` Yellow string `json:"yellow,omitempty"` } `json:"labelNames"` - Lists []*List `json:"lists"` - Actions []*Action `json:"actions"` + Lists []*List `json:"lists"` + Actions []*Action `json:"actions"` + Organization Organization `json:"organization"` } type BackgroundImage struct { diff --git a/vendor/github.com/adlio/trello/card.go b/vendor/github.com/adlio/trello/card.go index 23960fd0..8a2c3e9d 100644 --- a/vendor/github.com/adlio/trello/card.go +++ b/vendor/github.com/adlio/trello/card.go @@ -76,6 +76,11 @@ type Card struct { // Labels IDLabels []string `json:"idLabels,omitempty"` Labels []*Label `json:"labels,omitempty"` + + // Custom Fields + CustomFieldItems []*CustomFieldItem `json:"customFieldItems",omitempty` + + customFieldMap *map[string]interface{} } func (c *Card) CreatedAt() time.Time { @@ -83,6 +88,52 @@ func (c *Card) CreatedAt() time.Time { return t } +func (c *Card) CustomFields(boardCustomFields []*CustomField) (map[string]interface{}) { + + cfm := c.customFieldMap + + if cfm == nil { + cfm = &(map[string]interface{} {}) + + // bcfOptionNames[CustomField ID] = Custom Field Name + bcfOptionNames := map[string]string{} + + // bcfOptionsMap[CustomField ID][ID of the option] = Value of the option + bcfOptionsMap := map[string] map[string]interface{}{} + + for _, bcf := range boardCustomFields { + bcfOptionNames[bcf.ID] = bcf.Name + for _, cf := range bcf.Options { + // create 2nd level map when not available yet + map2, ok := bcfOptionsMap[cf.IDCustomField] + if !ok { + map2 = map[string]interface{}{} + bcfOptionsMap[bcf.ID] = map2 + } + + bcfOptionsMap[bcf.ID][cf.ID] = cf.Value.Text + } + } + + for _, cf := range c.CustomFieldItems { + name := bcfOptionNames[cf.IDCustomField] + + // create 2nd level map when not available yet + map2, ok := bcfOptionsMap[cf.IDCustomField] + if !ok { + continue + } + value, ok := map2[cf.IDValue] + + if ok { + (*cfm)[name] = value + } + } + c.customFieldMap = cfm + } + return *cfm +} + func (c *Card) MoveToList(listID string, args Arguments) error { path := fmt.Sprintf("cards/%s", c.ID) args["idList"] = listID @@ -105,6 +156,18 @@ func (c *Card) AddMemberID(memberID string) (member []*Member, err error) { return member, err } +func (c *Card) RemoveIDLabel(labelID string, label *Label) error { + path := fmt.Sprintf("cards/%s/idLabels/%s", c.ID, labelID) + return c.client.Delete(path, Defaults(), label) + +} + +func (c *Card) AddIDLabel(labelID string) error { + path := fmt.Sprintf("cards/%s/idLabels", c.ID) + err := c.client.Post(path, Arguments{"value": labelID}, &c.IDLabels) + return err +} + func (c *Card) MoveToTopOfList() error { path := fmt.Sprintf("cards/%s", c.ID) return c.client.Put(path, Arguments{"pos": "top"}, c) diff --git a/vendor/github.com/adlio/trello/client.go b/vendor/github.com/adlio/trello/client.go index 6e9df9b0..e20ad892 100644 --- a/vendor/github.com/adlio/trello/client.go +++ b/vendor/github.com/adlio/trello/client.go @@ -234,6 +234,6 @@ func (c *Client) Delete(path string, args Arguments, target interface{}) error { func (c *Client) log(format string, args ...interface{}) { if c.Logger != nil { - c.Logger.Debugf(format, args) + c.Logger.Debugf(format, args...) } } diff --git a/vendor/github.com/adlio/trello/custom-fields.go b/vendor/github.com/adlio/trello/custom-fields.go new file mode 100644 index 00000000..69add046 --- /dev/null +++ b/vendor/github.com/adlio/trello/custom-fields.go @@ -0,0 +1,49 @@ +package trello + +import "fmt" + +type CustomFieldItem struct { + ID string `json:"id"` + IDValue string `json:"idValue"` + IDCustomField string `json:"idCustomField"` + IDModel string `json:"idModel"` + IDModelType string `json:"modelType,omitempty"` +} + +type CustomField struct { + ID string `json:"id"` + IDModel string `json:"idModel"` + IDModelType string `json:"modelType,omitempty"` + FieldGroup string `json:"fieldGroup"` + Name string `json:"name"` + Pos int `json:"pos"` + Display struct { + CardFront bool `json:"cardfront"` + } `json:"display"` + Type string `json:"type"` + Options []*CustomFieldOption `json:"options"` +} + +type CustomFieldOption struct { + ID string `json:"id"` + IDCustomField string `json:"idCustomField"` + Value struct { + Text string `json:"text"` + } `json:"value"` + Color string `json:"color,omitempty"` + Pos int `json:"pos"` +} + +func (c *Client) GetCustomField(fieldID string, args Arguments) (customField *CustomField, err error) { + path := fmt.Sprintf("customFields/%s", fieldID) + err = c.Get(path, args, &customField) + return +} + + +func (b *Board) GetCustomFields(args Arguments) (customFields []*CustomField, err error) { + path := fmt.Sprintf("boards/%s/customFields", b.ID) + err = b.client.Get(path, args, &customFields) + return +} + diff --git a/vendor/github.com/andygrunwald/go-gerrit/.travis.yml b/vendor/github.com/andygrunwald/go-gerrit/.travis.yml index b55e33f2..1691fc5a 100644 --- a/vendor/github.com/andygrunwald/go-gerrit/.travis.yml +++ b/vendor/github.com/andygrunwald/go-gerrit/.travis.yml @@ -3,6 +3,7 @@ language: go sudo: false go: + - "1.11.x" - "1.10.x" - "1.9.x" - "1.8.x" diff --git a/vendor/github.com/andygrunwald/go-gerrit/authentication.go b/vendor/github.com/andygrunwald/go-gerrit/authentication.go index 7cb3795c..193f6220 100644 --- a/vendor/github.com/andygrunwald/go-gerrit/authentication.go +++ b/vendor/github.com/andygrunwald/go-gerrit/authentication.go @@ -1,7 +1,7 @@ package gerrit import ( - "crypto/md5" // nolint: gas + "crypto/md5" // nolint: gosec "crypto/rand" "encoding/base64" "errors" @@ -117,7 +117,7 @@ func (s *AuthenticationService) digestAuthHeader(response *http.Response) (strin uriHeader := authenticate["uri"] // A1 - h := md5.New() // nolint: gas + h := md5.New() // nolint: gosec A1 := fmt.Sprintf("%s:%s:%s", s.name, realmHeader, s.secret) if _, err := io.WriteString(h, A1); err != nil { return "", err @@ -125,7 +125,7 @@ func (s *AuthenticationService) digestAuthHeader(response *http.Response) (strin HA1 := fmt.Sprintf("%x", h.Sum(nil)) // A2 - h = md5.New() // nolint: gas + h = md5.New() // nolint: gosec A2 := fmt.Sprintf("%s:%s", response.Request.Method, uriHeader) if _, err := io.WriteString(h, A2); err != nil { return "", err @@ -141,7 +141,7 @@ func (s *AuthenticationService) digestAuthHeader(response *http.Response) (strin bytes += n } cnonce := base64.StdEncoding.EncodeToString(k) - digest := md5.New() // nolint: gas + digest := md5.New() // nolint: gosec if _, err := digest.Write([]byte(strings.Join([]string{HA1, nonceHeader, "00000001", cnonce, qopHeader, HA2}, ":"))); err != nil { return "", err } diff --git a/vendor/github.com/andygrunwald/go-gerrit/changes.go b/vendor/github.com/andygrunwald/go-gerrit/changes.go index 2a13b8f4..09fd6ddf 100644 --- a/vendor/github.com/andygrunwald/go-gerrit/changes.go +++ b/vendor/github.com/andygrunwald/go-gerrit/changes.go @@ -258,11 +258,11 @@ type RobotCommentInput struct { CommentInput // The ID of the robot that generated this comment. - RobotId string `json:"robot_id"` + RobotID string `json:"robot_id"` // An ID of the run of the robot. - RobotRunId string `json:"robot_run_id"` + RobotRunID string `json:"robot_run_id"` // URL to more information. - Url string `json:"url,omitempty"` + URL string `json:"url,omitempty"` // Robot specific properties as map that maps arbitrary keys to values. Properties *map[string]*string `json:"properties,omitempty"` // Suggested fixes for this robot comment as a list of FixSuggestionInfo @@ -277,11 +277,11 @@ type RobotCommentInfo struct { CommentInfo // The ID of the robot that generated this comment. - RobotId string `json:"robot_id"` + RobotID string `json:"robot_id"` // An ID of the run of the robot. - RobotRunId string `json:"robot_run_id"` + RobotRunID string `json:"robot_run_id"` // URL to more information. - Url string `json:"url,omitempty"` + URL string `json:"url,omitempty"` // Robot specific properties as map that maps arbitrary keys to values. Properties map[string]string `json:"properties,omitempty"` // Suggested fixes for this robot comment as a list of FixSuggestionInfo @@ -294,7 +294,7 @@ type RobotCommentInfo struct { type FixSuggestionInfo struct { // The UUID of the suggested fix. It will be generated automatically and // hence will be ignored if it’s set for input objects. - FixId string `json:"fix_id"` + FixID string `json:"fix_id"` // A description of the suggested fix. Description string `json:"description"` // A list of FixReplacementInfo entities indicating how the content of one or @@ -780,11 +780,17 @@ func (s *ChangesService) change(tail string, changeID string, input interface{}) v := new(ChangeInfo) resp, err := s.client.Do(req, v) - if resp.StatusCode == http.StatusConflict { - body, _ := ioutil.ReadAll(resp.Body) - err = errors.New(string(body[:])) + if err != nil { + return nil, resp, err } - return v, resp, err + if resp.StatusCode == http.StatusConflict { + body, err := ioutil.ReadAll(resp.Body) + if err != nil { + return v, resp, err + } + return v, resp, errors.New(string(body[:])) + } + return v, resp, nil } // SubmitChange submits a change. diff --git a/vendor/github.com/gdamore/tcell/README.md b/vendor/github.com/gdamore/tcell/README.md index d59a3ea0..ed7297b5 100644 --- a/vendor/github.com/gdamore/tcell/README.md +++ b/vendor/github.com/gdamore/tcell/README.md @@ -25,6 +25,7 @@ ways. It also adds substantial functionality beyond termbox. * [tui-go](https://github.com/marcusolsson/tui-go) - UI library for terminal apps * [gomandelbrot](https://github.com/rgm3/gomandelbrot) - Mandelbrot! * [WTF](https://github.com/senorprogrammer/wtf)- Personal information dashboard for your terminal +* [browsh](https://github.com/browsh-org/browsh) - A fully-modern text-based browser, rendering to TTY and browsers ([video](https://www.youtube.com/watch?v=HZq86XfBoRo)) ## Pure Go Terminfo Database diff --git a/vendor/github.com/gdamore/tcell/cell.go b/vendor/github.com/gdamore/tcell/cell.go index 496f10f7..957b62f7 100644 --- a/vendor/github.com/gdamore/tcell/cell.go +++ b/vendor/github.com/gdamore/tcell/cell.go @@ -52,6 +52,10 @@ func (cb *CellBuffer) SetContent(x int, y int, i := 0 for i < len(c.currComb) { r := c.currComb[i] + if r == '\u200d' { + i += 2 + continue + } if runewidth.RuneWidth(r) != 0 { // not a combining character, yank it c.currComb = append(c.currComb[:i-1], c.currComb[i+1:]...) @@ -175,12 +179,13 @@ func (cb *CellBuffer) Resize(w, h int) { // Fill fills the entire cell buffer array with the specified character // and style. Normally choose ' ' to clear the screen. This API doesn't -// support combining characters. +// support combining characters, or characters with a width larger than one. func (cb *CellBuffer) Fill(r rune, style Style) { for i := range cb.cells { c := &cb.cells[i] c.currMain = r c.currComb = nil c.currStyle = style + c.width = 1 } } diff --git a/vendor/github.com/golang/protobuf/LICENSE b/vendor/github.com/golang/protobuf/LICENSE index 1b1b1921..0f646931 100644 --- a/vendor/github.com/golang/protobuf/LICENSE +++ b/vendor/github.com/golang/protobuf/LICENSE @@ -1,7 +1,4 @@ -Go support for Protocol Buffers - Google's data interchange format - Copyright 2010 The Go Authors. All rights reserved. -https://github.com/golang/protobuf Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are diff --git a/vendor/github.com/golang/protobuf/proto/encode.go b/vendor/github.com/golang/protobuf/proto/encode.go index c27d35f8..3abfed2c 100644 --- a/vendor/github.com/golang/protobuf/proto/encode.go +++ b/vendor/github.com/golang/protobuf/proto/encode.go @@ -37,27 +37,9 @@ package proto import ( "errors" - "fmt" "reflect" ) -// RequiredNotSetError is the error returned if Marshal is called with -// a protocol buffer struct whose required fields have not -// all been initialized. It is also the error returned if Unmarshal is -// called with an encoded protocol buffer that does not include all the -// required fields. -// -// When printed, RequiredNotSetError reports the first unset required field in a -// message. If the field cannot be precisely determined, it is reported as -// "{Unknown}". -type RequiredNotSetError struct { - field string -} - -func (e *RequiredNotSetError) Error() string { - return fmt.Sprintf("proto: required field %q not set", e.field) -} - var ( // errRepeatedHasNil is the error returned if Marshal is called with // a struct with a repeated field containing a nil element. diff --git a/vendor/github.com/golang/protobuf/proto/lib.go b/vendor/github.com/golang/protobuf/proto/lib.go index 0e2191b8..75565cc6 100644 --- a/vendor/github.com/golang/protobuf/proto/lib.go +++ b/vendor/github.com/golang/protobuf/proto/lib.go @@ -265,7 +265,6 @@ package proto import ( "encoding/json" - "errors" "fmt" "log" "reflect" @@ -274,7 +273,66 @@ import ( "sync" ) -var errInvalidUTF8 = errors.New("proto: invalid UTF-8 string") +// RequiredNotSetError is an error type returned by either Marshal or Unmarshal. +// Marshal reports this when a required field is not initialized. +// Unmarshal reports this when a required field is missing from the wire data. +type RequiredNotSetError struct{ field string } + +func (e *RequiredNotSetError) Error() string { + if e.field == "" { + return fmt.Sprintf("proto: required field not set") + } + return fmt.Sprintf("proto: required field %q not set", e.field) +} +func (e *RequiredNotSetError) RequiredNotSet() bool { + return true +} + +type invalidUTF8Error struct{ field string } + +func (e *invalidUTF8Error) Error() string { + if e.field == "" { + return "proto: invalid UTF-8 detected" + } + return fmt.Sprintf("proto: field %q contains invalid UTF-8", e.field) +} +func (e *invalidUTF8Error) InvalidUTF8() bool { + return true +} + +// errInvalidUTF8 is a sentinel error to identify fields with invalid UTF-8. +// This error should not be exposed to the external API as such errors should +// be recreated with the field information. +var errInvalidUTF8 = &invalidUTF8Error{} + +// isNonFatal reports whether the error is either a RequiredNotSet error +// or a InvalidUTF8 error. +func isNonFatal(err error) bool { + if re, ok := err.(interface{ RequiredNotSet() bool }); ok && re.RequiredNotSet() { + return true + } + if re, ok := err.(interface{ InvalidUTF8() bool }); ok && re.InvalidUTF8() { + return true + } + return false +} + +type nonFatal struct{ E error } + +// Merge merges err into nf and reports whether it was successful. +// Otherwise it returns false for any fatal non-nil errors. +func (nf *nonFatal) Merge(err error) (ok bool) { + if err == nil { + return true // not an error + } + if !isNonFatal(err) { + return false // fatal error + } + if nf.E == nil { + nf.E = err // store first instance of non-fatal error + } + return true +} // Message is implemented by generated protocol buffer messages. type Message interface { diff --git a/vendor/github.com/golang/protobuf/proto/properties.go b/vendor/github.com/golang/protobuf/proto/properties.go index f710adab..50b99b83 100644 --- a/vendor/github.com/golang/protobuf/proto/properties.go +++ b/vendor/github.com/golang/protobuf/proto/properties.go @@ -139,7 +139,7 @@ type Properties struct { Repeated bool Packed bool // relevant for repeated primitives only Enum string // set for enum types only - proto3 bool // whether this is known to be a proto3 field; set for []byte only + proto3 bool // whether this is known to be a proto3 field oneof bool // whether this is a oneof field Default string // default value @@ -148,9 +148,9 @@ type Properties struct { stype reflect.Type // set for struct types only sprop *StructProperties // set for struct types only - mtype reflect.Type // set for map types only - mkeyprop *Properties // set for map types only - mvalprop *Properties // set for map types only + mtype reflect.Type // set for map types only + MapKeyProp *Properties // set for map types only + MapValProp *Properties // set for map types only } // String formats the properties in the protobuf struct field tag style. @@ -275,16 +275,16 @@ func (p *Properties) setFieldProps(typ reflect.Type, f *reflect.StructField, loc case reflect.Map: p.mtype = t1 - p.mkeyprop = &Properties{} - p.mkeyprop.init(reflect.PtrTo(p.mtype.Key()), "Key", f.Tag.Get("protobuf_key"), nil, lockGetProp) - p.mvalprop = &Properties{} + p.MapKeyProp = &Properties{} + p.MapKeyProp.init(reflect.PtrTo(p.mtype.Key()), "Key", f.Tag.Get("protobuf_key"), nil, lockGetProp) + p.MapValProp = &Properties{} vtype := p.mtype.Elem() if vtype.Kind() != reflect.Ptr && vtype.Kind() != reflect.Slice { // The value type is not a message (*T) or bytes ([]byte), // so we need encoders for the pointer to this type. vtype = reflect.PtrTo(vtype) } - p.mvalprop.init(vtype, "Value", f.Tag.Get("protobuf_val"), nil, lockGetProp) + p.MapValProp.init(vtype, "Value", f.Tag.Get("protobuf_val"), nil, lockGetProp) } if p.stype != nil { diff --git a/vendor/github.com/golang/protobuf/proto/table_marshal.go b/vendor/github.com/golang/protobuf/proto/table_marshal.go index 0f212b30..b1679449 100644 --- a/vendor/github.com/golang/protobuf/proto/table_marshal.go +++ b/vendor/github.com/golang/protobuf/proto/table_marshal.go @@ -231,7 +231,7 @@ func (u *marshalInfo) marshal(b []byte, ptr pointer, deterministic bool) ([]byte return b, err } - var err, errreq error + var err, errLater error // The old marshaler encodes extensions at beginning. if u.extensions.IsValid() { e := ptr.offset(u.extensions).toExtensions() @@ -252,11 +252,13 @@ func (u *marshalInfo) marshal(b []byte, ptr pointer, deterministic bool) ([]byte } } for _, f := range u.fields { - if f.required && errreq == nil { + if f.required { if ptr.offset(f.field).getPointer().isNil() { // Required field is not set. // We record the error but keep going, to give a complete marshaling. - errreq = &RequiredNotSetError{f.name} + if errLater == nil { + errLater = &RequiredNotSetError{f.name} + } continue } } @@ -269,14 +271,21 @@ func (u *marshalInfo) marshal(b []byte, ptr pointer, deterministic bool) ([]byte if err1, ok := err.(*RequiredNotSetError); ok { // Required field in submessage is not set. // We record the error but keep going, to give a complete marshaling. - if errreq == nil { - errreq = &RequiredNotSetError{f.name + "." + err1.field} + if errLater == nil { + errLater = &RequiredNotSetError{f.name + "." + err1.field} } continue } if err == errRepeatedHasNil { err = errors.New("proto: repeated field " + f.name + " has nil element") } + if err == errInvalidUTF8 { + if errLater == nil { + fullName := revProtoTypes[reflect.PtrTo(u.typ)] + "." + f.name + errLater = &invalidUTF8Error{fullName} + } + continue + } return b, err } } @@ -284,7 +293,7 @@ func (u *marshalInfo) marshal(b []byte, ptr pointer, deterministic bool) ([]byte s := *ptr.offset(u.unrecognized).toBytes() b = append(b, s...) } - return b, errreq + return b, errLater } // computeMarshalInfo initializes the marshal info. @@ -530,6 +539,7 @@ func typeMarshaler(t reflect.Type, tags []string, nozero, oneof bool) (sizer, ma packed := false proto3 := false + validateUTF8 := true for i := 2; i < len(tags); i++ { if tags[i] == "packed" { packed = true @@ -538,6 +548,7 @@ func typeMarshaler(t reflect.Type, tags []string, nozero, oneof bool) (sizer, ma proto3 = true } } + validateUTF8 = validateUTF8 && proto3 switch t.Kind() { case reflect.Bool: @@ -735,6 +746,18 @@ func typeMarshaler(t reflect.Type, tags []string, nozero, oneof bool) (sizer, ma } return sizeFloat64Value, appendFloat64Value case reflect.String: + if validateUTF8 { + if pointer { + return sizeStringPtr, appendUTF8StringPtr + } + if slice { + return sizeStringSlice, appendUTF8StringSlice + } + if nozero { + return sizeStringValueNoZero, appendUTF8StringValueNoZero + } + return sizeStringValue, appendUTF8StringValue + } if pointer { return sizeStringPtr, appendStringPtr } @@ -1984,9 +2007,6 @@ func appendBoolPackedSlice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byt } func appendStringValue(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { v := *ptr.toString() - if !utf8.ValidString(v) { - return nil, errInvalidUTF8 - } b = appendVarint(b, wiretag) b = appendVarint(b, uint64(len(v))) b = append(b, v...) @@ -1997,9 +2017,6 @@ func appendStringValueNoZero(b []byte, ptr pointer, wiretag uint64, _ bool) ([]b if v == "" { return b, nil } - if !utf8.ValidString(v) { - return nil, errInvalidUTF8 - } b = appendVarint(b, wiretag) b = appendVarint(b, uint64(len(v))) b = append(b, v...) @@ -2011,24 +2028,83 @@ func appendStringPtr(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, err return b, nil } v := *p - if !utf8.ValidString(v) { - return nil, errInvalidUTF8 - } b = appendVarint(b, wiretag) b = appendVarint(b, uint64(len(v))) b = append(b, v...) return b, nil } func appendStringSlice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + s := *ptr.toStringSlice() + for _, v := range s { + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(len(v))) + b = append(b, v...) + } + return b, nil +} +func appendUTF8StringValue(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + var invalidUTF8 bool + v := *ptr.toString() + if !utf8.ValidString(v) { + invalidUTF8 = true + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(len(v))) + b = append(b, v...) + if invalidUTF8 { + return b, errInvalidUTF8 + } + return b, nil +} +func appendUTF8StringValueNoZero(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + var invalidUTF8 bool + v := *ptr.toString() + if v == "" { + return b, nil + } + if !utf8.ValidString(v) { + invalidUTF8 = true + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(len(v))) + b = append(b, v...) + if invalidUTF8 { + return b, errInvalidUTF8 + } + return b, nil +} +func appendUTF8StringPtr(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + var invalidUTF8 bool + p := *ptr.toStringPtr() + if p == nil { + return b, nil + } + v := *p + if !utf8.ValidString(v) { + invalidUTF8 = true + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(len(v))) + b = append(b, v...) + if invalidUTF8 { + return b, errInvalidUTF8 + } + return b, nil +} +func appendUTF8StringSlice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + var invalidUTF8 bool s := *ptr.toStringSlice() for _, v := range s { if !utf8.ValidString(v) { - return nil, errInvalidUTF8 + invalidUTF8 = true } b = appendVarint(b, wiretag) b = appendVarint(b, uint64(len(v))) b = append(b, v...) } + if invalidUTF8 { + return b, errInvalidUTF8 + } return b, nil } func appendBytes(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { @@ -2107,7 +2183,8 @@ func makeGroupSliceMarshaler(u *marshalInfo) (sizer, marshaler) { }, func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) { s := ptr.getPointerSlice() - var err, errreq error + var err error + var nerr nonFatal for _, v := range s { if v.isNil() { return b, errRepeatedHasNil @@ -2115,22 +2192,14 @@ func makeGroupSliceMarshaler(u *marshalInfo) (sizer, marshaler) { b = appendVarint(b, wiretag) // start group b, err = u.marshal(b, v, deterministic) b = appendVarint(b, wiretag+(WireEndGroup-WireStartGroup)) // end group - if err != nil { - if _, ok := err.(*RequiredNotSetError); ok { - // Required field in submessage is not set. - // We record the error but keep going, to give a complete marshaling. - if errreq == nil { - errreq = err - } - continue - } + if !nerr.Merge(err) { if err == ErrNil { err = errRepeatedHasNil } return b, err } } - return b, errreq + return b, nerr.E } } @@ -2174,7 +2243,8 @@ func makeMessageSliceMarshaler(u *marshalInfo) (sizer, marshaler) { }, func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) { s := ptr.getPointerSlice() - var err, errreq error + var err error + var nerr nonFatal for _, v := range s { if v.isNil() { return b, errRepeatedHasNil @@ -2184,22 +2254,14 @@ func makeMessageSliceMarshaler(u *marshalInfo) (sizer, marshaler) { b = appendVarint(b, uint64(siz)) b, err = u.marshal(b, v, deterministic) - if err != nil { - if _, ok := err.(*RequiredNotSetError); ok { - // Required field in submessage is not set. - // We record the error but keep going, to give a complete marshaling. - if errreq == nil { - errreq = err - } - continue - } + if !nerr.Merge(err) { if err == ErrNil { err = errRepeatedHasNil } return b, err } } - return b, errreq + return b, nerr.E } } @@ -2223,6 +2285,25 @@ func makeMapMarshaler(f *reflect.StructField) (sizer, marshaler) { // value. // Key cannot be pointer-typed. valIsPtr := valType.Kind() == reflect.Ptr + + // If value is a message with nested maps, calling + // valSizer in marshal may be quadratic. We should use + // cached version in marshal (but not in size). + // If value is not message type, we don't have size cache, + // but it cannot be nested either. Just use valSizer. + valCachedSizer := valSizer + if valIsPtr && valType.Elem().Kind() == reflect.Struct { + u := getMarshalInfo(valType.Elem()) + valCachedSizer = func(ptr pointer, tagsize int) int { + // Same as message sizer, but use cache. + p := ptr.getPointer() + if p.isNil() { + return 0 + } + siz := u.cachedsize(p) + return siz + SizeVarint(uint64(siz)) + tagsize + } + } return func(ptr pointer, tagsize int) int { m := ptr.asPointerTo(t).Elem() // the map n := 0 @@ -2243,24 +2324,26 @@ func makeMapMarshaler(f *reflect.StructField) (sizer, marshaler) { if len(keys) > 1 && deterministic { sort.Sort(mapKeys(keys)) } + + var nerr nonFatal for _, k := range keys { ki := k.Interface() vi := m.MapIndex(k).Interface() kaddr := toAddrPointer(&ki, false) // pointer to key vaddr := toAddrPointer(&vi, valIsPtr) // pointer to value b = appendVarint(b, tag) - siz := keySizer(kaddr, 1) + valSizer(vaddr, 1) // tag of key = 1 (size=1), tag of val = 2 (size=1) + siz := keySizer(kaddr, 1) + valCachedSizer(vaddr, 1) // tag of key = 1 (size=1), tag of val = 2 (size=1) b = appendVarint(b, uint64(siz)) b, err = keyMarshaler(b, kaddr, keyWireTag, deterministic) - if err != nil { + if !nerr.Merge(err) { return b, err } b, err = valMarshaler(b, vaddr, valWireTag, deterministic) - if err != nil && err != ErrNil { // allow nil value in map + if err != ErrNil && !nerr.Merge(err) { // allow nil value in map return b, err } } - return b, nil + return b, nerr.E } } @@ -2333,6 +2416,7 @@ func (u *marshalInfo) appendExtensions(b []byte, ext *XXX_InternalExtensions, de defer mu.Unlock() var err error + var nerr nonFatal // Fast-path for common cases: zero or one extensions. // Don't bother sorting the keys. @@ -2352,11 +2436,11 @@ func (u *marshalInfo) appendExtensions(b []byte, ext *XXX_InternalExtensions, de v := e.value p := toAddrPointer(&v, ei.isptr) b, err = ei.marshaler(b, p, ei.wiretag, deterministic) - if err != nil { + if !nerr.Merge(err) { return b, err } } - return b, nil + return b, nerr.E } // Sort the keys to provide a deterministic encoding. @@ -2383,11 +2467,11 @@ func (u *marshalInfo) appendExtensions(b []byte, ext *XXX_InternalExtensions, de v := e.value p := toAddrPointer(&v, ei.isptr) b, err = ei.marshaler(b, p, ei.wiretag, deterministic) - if err != nil { + if !nerr.Merge(err) { return b, err } } - return b, nil + return b, nerr.E } // message set format is: @@ -2444,6 +2528,7 @@ func (u *marshalInfo) appendMessageSet(b []byte, ext *XXX_InternalExtensions, de defer mu.Unlock() var err error + var nerr nonFatal // Fast-path for common cases: zero or one extensions. // Don't bother sorting the keys. @@ -2470,12 +2555,12 @@ func (u *marshalInfo) appendMessageSet(b []byte, ext *XXX_InternalExtensions, de v := e.value p := toAddrPointer(&v, ei.isptr) b, err = ei.marshaler(b, p, 3<<3|WireBytes, deterministic) - if err != nil { + if !nerr.Merge(err) { return b, err } b = append(b, 1<<3|WireEndGroup) } - return b, nil + return b, nerr.E } // Sort the keys to provide a deterministic encoding. @@ -2509,11 +2594,11 @@ func (u *marshalInfo) appendMessageSet(b []byte, ext *XXX_InternalExtensions, de p := toAddrPointer(&v, ei.isptr) b, err = ei.marshaler(b, p, 3<<3|WireBytes, deterministic) b = append(b, 1<<3|WireEndGroup) - if err != nil { + if !nerr.Merge(err) { return b, err } } - return b, nil + return b, nerr.E } // sizeV1Extensions computes the size of encoded data for a V1-API extension field. @@ -2556,6 +2641,7 @@ func (u *marshalInfo) appendV1Extensions(b []byte, m map[int32]Extension, determ sort.Ints(keys) var err error + var nerr nonFatal for _, k := range keys { e := m[int32(k)] if e.value == nil || e.desc == nil { @@ -2572,11 +2658,11 @@ func (u *marshalInfo) appendV1Extensions(b []byte, m map[int32]Extension, determ v := e.value p := toAddrPointer(&v, ei.isptr) b, err = ei.marshaler(b, p, ei.wiretag, deterministic) - if err != nil { + if !nerr.Merge(err) { return b, err } } - return b, nil + return b, nerr.E } // newMarshaler is the interface representing objects that can marshal themselves. diff --git a/vendor/github.com/golang/protobuf/proto/table_unmarshal.go b/vendor/github.com/golang/protobuf/proto/table_unmarshal.go index 55f0340a..ebf1caa5 100644 --- a/vendor/github.com/golang/protobuf/proto/table_unmarshal.go +++ b/vendor/github.com/golang/protobuf/proto/table_unmarshal.go @@ -97,6 +97,8 @@ type unmarshalFieldInfo struct { // if a required field, contains a single set bit at this field's index in the required field list. reqMask uint64 + + name string // name of the field, for error reporting } var ( @@ -136,8 +138,8 @@ func (u *unmarshalInfo) unmarshal(m pointer, b []byte) error { if u.isMessageSet { return UnmarshalMessageSet(b, m.offset(u.extensions).toExtensions()) } - var reqMask uint64 // bitmask of required fields we've seen. - var rnse *RequiredNotSetError // an instance of a RequiredNotSetError returned by a submessage. + var reqMask uint64 // bitmask of required fields we've seen. + var errLater error for len(b) > 0 { // Read tag and wire type. // Special case 1 and 2 byte varints. @@ -176,11 +178,20 @@ func (u *unmarshalInfo) unmarshal(m pointer, b []byte) error { if r, ok := err.(*RequiredNotSetError); ok { // Remember this error, but keep parsing. We need to produce // a full parse even if a required field is missing. - rnse = r + if errLater == nil { + errLater = r + } reqMask |= f.reqMask continue } if err != errInternalBadWireType { + if err == errInvalidUTF8 { + if errLater == nil { + fullName := revProtoTypes[reflect.PtrTo(u.typ)] + "." + f.name + errLater = &invalidUTF8Error{fullName} + } + continue + } return err } // Fragments with bad wire type are treated as unknown fields. @@ -239,20 +250,16 @@ func (u *unmarshalInfo) unmarshal(m pointer, b []byte) error { emap[int32(tag)] = e } } - if rnse != nil { - // A required field of a submessage/group is missing. Return that error. - return rnse - } - if reqMask != u.reqMask { + if reqMask != u.reqMask && errLater == nil { // A required field of this message is missing. for _, n := range u.reqFields { if reqMask&1 == 0 { - return &RequiredNotSetError{n} + errLater = &RequiredNotSetError{n} } reqMask >>= 1 } } - return nil + return errLater } // computeUnmarshalInfo fills in u with information for use @@ -351,7 +358,7 @@ func (u *unmarshalInfo) computeUnmarshalInfo() { } // Store the info in the correct slot in the message. - u.setTag(tag, toField(&f), unmarshal, reqMask) + u.setTag(tag, toField(&f), unmarshal, reqMask, name) } // Find any types associated with oneof fields. @@ -366,10 +373,17 @@ func (u *unmarshalInfo) computeUnmarshalInfo() { f := typ.Field(0) // oneof implementers have one field baseUnmarshal := fieldUnmarshaler(&f) - tagstr := strings.Split(f.Tag.Get("protobuf"), ",")[1] - tag, err := strconv.Atoi(tagstr) + tags := strings.Split(f.Tag.Get("protobuf"), ",") + fieldNum, err := strconv.Atoi(tags[1]) if err != nil { - panic("protobuf tag field not an integer: " + tagstr) + panic("protobuf tag field not an integer: " + tags[1]) + } + var name string + for _, tag := range tags { + if strings.HasPrefix(tag, "name=") { + name = strings.TrimPrefix(tag, "name=") + break + } } // Find the oneof field that this struct implements. @@ -380,7 +394,7 @@ func (u *unmarshalInfo) computeUnmarshalInfo() { // That lets us know where this struct should be stored // when we encounter it during unmarshaling. unmarshal := makeUnmarshalOneof(typ, of.ityp, baseUnmarshal) - u.setTag(tag, of.field, unmarshal, 0) + u.setTag(fieldNum, of.field, unmarshal, 0, name) } } } @@ -401,7 +415,7 @@ func (u *unmarshalInfo) computeUnmarshalInfo() { // [0 0] is [tag=0/wiretype=varint varint-encoded-0]. u.setTag(0, zeroField, func(b []byte, f pointer, w int) ([]byte, error) { return nil, fmt.Errorf("proto: %s: illegal tag 0 (wire type %d)", t, w) - }, 0) + }, 0, "") // Set mask for required field check. u.reqMask = uint64(1)<= 0 && (tag < 16 || tag < 2*n) { // TODO: what are the right numbers here? for len(u.dense) <= tag { @@ -442,11 +457,17 @@ func typeUnmarshaler(t reflect.Type, tags string) unmarshaler { tagArray := strings.Split(tags, ",") encoding := tagArray[0] name := "unknown" + proto3 := false + validateUTF8 := true for _, tag := range tagArray[3:] { if strings.HasPrefix(tag, "name=") { name = tag[5:] } + if tag == "proto3" { + proto3 = true + } } + validateUTF8 = validateUTF8 && proto3 // Figure out packaging (pointer, slice, or both) slice := false @@ -594,6 +615,15 @@ func typeUnmarshaler(t reflect.Type, tags string) unmarshaler { } return unmarshalBytesValue case reflect.String: + if validateUTF8 { + if pointer { + return unmarshalUTF8StringPtr + } + if slice { + return unmarshalUTF8StringSlice + } + return unmarshalUTF8StringValue + } if pointer { return unmarshalStringPtr } @@ -1448,9 +1478,6 @@ func unmarshalStringValue(b []byte, f pointer, w int) ([]byte, error) { return nil, io.ErrUnexpectedEOF } v := string(b[:x]) - if !utf8.ValidString(v) { - return nil, errInvalidUTF8 - } *f.toString() = v return b[x:], nil } @@ -1468,9 +1495,6 @@ func unmarshalStringPtr(b []byte, f pointer, w int) ([]byte, error) { return nil, io.ErrUnexpectedEOF } v := string(b[:x]) - if !utf8.ValidString(v) { - return nil, errInvalidUTF8 - } *f.toStringPtr() = &v return b[x:], nil } @@ -1488,14 +1512,72 @@ func unmarshalStringSlice(b []byte, f pointer, w int) ([]byte, error) { return nil, io.ErrUnexpectedEOF } v := string(b[:x]) - if !utf8.ValidString(v) { - return nil, errInvalidUTF8 - } s := f.toStringSlice() *s = append(*s, v) return b[x:], nil } +func unmarshalUTF8StringValue(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return b, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + v := string(b[:x]) + *f.toString() = v + if !utf8.ValidString(v) { + return b[x:], errInvalidUTF8 + } + return b[x:], nil +} + +func unmarshalUTF8StringPtr(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return b, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + v := string(b[:x]) + *f.toStringPtr() = &v + if !utf8.ValidString(v) { + return b[x:], errInvalidUTF8 + } + return b[x:], nil +} + +func unmarshalUTF8StringSlice(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return b, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + v := string(b[:x]) + s := f.toStringSlice() + *s = append(*s, v) + if !utf8.ValidString(v) { + return b[x:], errInvalidUTF8 + } + return b[x:], nil +} + var emptyBuf [0]byte func unmarshalBytesValue(b []byte, f pointer, w int) ([]byte, error) { @@ -1674,6 +1756,7 @@ func makeUnmarshalMap(f *reflect.StructField) unmarshaler { // Maps will be somewhat slow. Oh well. // Read key and value from data. + var nerr nonFatal k := reflect.New(kt) v := reflect.New(vt) for len(b) > 0 { @@ -1694,7 +1777,7 @@ func makeUnmarshalMap(f *reflect.StructField) unmarshaler { err = errInternalBadWireType // skip unknown tag } - if err == nil { + if nerr.Merge(err) { continue } if err != errInternalBadWireType { @@ -1717,7 +1800,7 @@ func makeUnmarshalMap(f *reflect.StructField) unmarshaler { // Insert into map. m.SetMapIndex(k.Elem(), v.Elem()) - return r, nil + return r, nerr.E } } @@ -1743,15 +1826,16 @@ func makeUnmarshalOneof(typ, ityp reflect.Type, unmarshal unmarshaler) unmarshal // Unmarshal data into holder. // We unmarshal into the first field of the holder object. var err error + var nerr nonFatal b, err = unmarshal(b, valToPointer(v).offset(field0), w) - if err != nil { + if !nerr.Merge(err) { return nil, err } // Write pointer to holder into target field. f.asPointerTo(ityp).Elem().Set(v) - return b, nil + return b, nerr.E } } diff --git a/vendor/github.com/golang/protobuf/proto/text.go b/vendor/github.com/golang/protobuf/proto/text.go index 2205fdaa..1aaee725 100644 --- a/vendor/github.com/golang/protobuf/proto/text.go +++ b/vendor/github.com/golang/protobuf/proto/text.go @@ -353,7 +353,7 @@ func (tm *TextMarshaler) writeStruct(w *textWriter, sv reflect.Value) error { return err } } - if err := tm.writeAny(w, key, props.mkeyprop); err != nil { + if err := tm.writeAny(w, key, props.MapKeyProp); err != nil { return err } if err := w.WriteByte('\n'); err != nil { @@ -370,7 +370,7 @@ func (tm *TextMarshaler) writeStruct(w *textWriter, sv reflect.Value) error { return err } } - if err := tm.writeAny(w, val, props.mvalprop); err != nil { + if err := tm.writeAny(w, val, props.MapValProp); err != nil { return err } if err := w.WriteByte('\n'); err != nil { diff --git a/vendor/github.com/golang/protobuf/proto/text_parser.go b/vendor/github.com/golang/protobuf/proto/text_parser.go index 0685bae3..bb55a3af 100644 --- a/vendor/github.com/golang/protobuf/proto/text_parser.go +++ b/vendor/github.com/golang/protobuf/proto/text_parser.go @@ -630,17 +630,17 @@ func (p *textParser) readStruct(sv reflect.Value, terminator string) error { if err := p.consumeToken(":"); err != nil { return err } - if err := p.readAny(key, props.mkeyprop); err != nil { + if err := p.readAny(key, props.MapKeyProp); err != nil { return err } if err := p.consumeOptionalSeparator(); err != nil { return err } case "value": - if err := p.checkForColon(props.mvalprop, dst.Type().Elem()); err != nil { + if err := p.checkForColon(props.MapValProp, dst.Type().Elem()); err != nil { return err } - if err := p.readAny(val, props.mvalprop); err != nil { + if err := p.readAny(val, props.MapValProp); err != nil { return err } if err := p.consumeOptionalSeparator(); err != nil { diff --git a/vendor/github.com/google/go-github/AUTHORS b/vendor/github.com/google/go-github/AUTHORS index 7c2f1291..19396ee0 100644 --- a/vendor/github.com/google/go-github/AUTHORS +++ b/vendor/github.com/google/go-github/AUTHORS @@ -13,6 +13,7 @@ Abhinav Gupta Ahmed Hagy Ainsley Chong Akeda Bagus +Akhil Mohan Alec Thomas Aleks Clark Alex Bramley @@ -38,6 +39,7 @@ Björn Häuser Brad Harris Brad Moylan Bradley Falzon +Brandon Cook Brian Egizi Bryan Boreham Cami Diez @@ -70,6 +72,7 @@ Drew Fradette Eli Uriegas Elliott Beach Emerson Wood +eperm erwinvaneyk Fabrice Filippo Valsorda @@ -78,6 +81,7 @@ Francesc Gil Francis Fredrik Jönsson Garrett Squire +George Kontridze Georgy Buranov Gnahz Google Inc. @@ -95,15 +99,19 @@ Isao Jonas isqua Jameel Haffejee Jan Kosecki +Javier Campanini Jeremy Morris +Jesse Newland Jihoon Chung Jimmi Dyson Joan Saum Joe Tsai John Barton John Engelman +JP Phillips jpbelanger-mtl Juan Basso +Julien Garcia Gonzalez Julien Rostand Justin Abrahms Jusung Lee @@ -123,9 +131,11 @@ Luke Roberts Luke Young Maksim Zhylinski Martin-Louis Bright +Marwan Sulaiman Mat Geist Matt Matt Brender +Matt Gaunt Matt Landis Maxime Bury Michael Spiegel @@ -145,17 +155,20 @@ Parham Alvani Parker Moore parkhyukjun89 Pavel Shtanko +Pete Wagner Petr Shevtsov Pierre Carrier Piotr Zurek Quinn Slack Rackspace US, Inc. Radek Simko +Radliński Ignacy Rajendra arora RaviTeja Pothana rc1140 Red Hat, Inc. Rob Figueiredo +Rohit Upadhyay Ronak Jain Ruben Vereecken Ryan Lower @@ -176,6 +189,7 @@ Shawn Smith sona-tar SoundCloud, Ltd. Stian Eikeland +Tasya Aditya Rukmana Thomas Bruyelle Timothée Peignier Trey Tacon @@ -186,6 +200,7 @@ Victor Vrantchan Vlad Ungureanu Will Maier William Bailey +xibz Yann Malet Yannick Utard Yicheng Qin diff --git a/vendor/github.com/google/go-github/github/activity_events.go b/vendor/github.com/google/go-github/github/activity_events.go index a919b11c..47f0c735 100644 --- a/vendor/github.com/google/go-github/github/activity_events.go +++ b/vendor/github.com/google/go-github/github/activity_events.go @@ -96,6 +96,8 @@ func (e *Event) ParsePayload() (payload interface{}, err error) { payload = &ReleaseEvent{} case "RepositoryEvent": payload = &RepositoryEvent{} + case "RepositoryVulnerabilityAlertEvent": + payload = &RepositoryVulnerabilityAlertEvent{} case "StatusEvent": payload = &StatusEvent{} case "TeamEvent": diff --git a/vendor/github.com/google/go-github/github/activity_star.go b/vendor/github.com/google/go-github/github/activity_star.go index d5b06712..5ae5c101 100644 --- a/vendor/github.com/google/go-github/github/activity_star.go +++ b/vendor/github.com/google/go-github/github/activity_star.go @@ -8,6 +8,7 @@ package github import ( "context" "fmt" + "strings" ) // StarredRepository is returned by ListStarred. @@ -84,8 +85,9 @@ func (s *ActivityService) ListStarred(ctx context.Context, user string, opt *Act return nil, nil, err } - // TODO: remove custom Accept header when this API fully launches - req.Header.Set("Accept", mediaTypeStarringPreview) + // TODO: remove custom Accept header when APIs fully launch + acceptHeaders := []string{mediaTypeStarringPreview, mediaTypeTopicsPreview} + req.Header.Set("Accept", strings.Join(acceptHeaders, ", ")) var repos []*StarredRepository resp, err := s.client.Do(ctx, req, &repos) diff --git a/vendor/github.com/google/go-github/github/apps.go b/vendor/github.com/google/go-github/github/apps.go index 32d4f2f4..ae3aabda 100644 --- a/vendor/github.com/google/go-github/github/apps.go +++ b/vendor/github.com/google/go-github/github/apps.go @@ -164,7 +164,7 @@ func (s *AppsService) ListUserInstallations(ctx context.Context, opt *ListOption // // GitHub API docs: https://developer.github.com/v3/apps/#create-a-new-installation-token func (s *AppsService) CreateInstallationToken(ctx context.Context, id int64) (*InstallationToken, *Response, error) { - u := fmt.Sprintf("installations/%v/access_tokens", id) + u := fmt.Sprintf("app/installations/%v/access_tokens", id) req, err := s.client.NewRequest("POST", u, nil) if err != nil { diff --git a/vendor/github.com/google/go-github/github/checks.go b/vendor/github.com/google/go-github/github/checks.go index 35490899..2a6ce419 100644 --- a/vendor/github.com/google/go-github/github/checks.go +++ b/vendor/github.com/google/go-github/github/checks.go @@ -19,6 +19,7 @@ type ChecksService service // CheckRun represents a GitHub check run on a repository associated with a GitHub app. type CheckRun struct { ID *int64 `json:"id,omitempty"` + NodeID *string `json:"node_id,omitempty"` HeadSHA *string `json:"head_sha,omitempty"` ExternalID *string `json:"external_id,omitempty"` URL *string `json:"url,omitempty"` @@ -47,14 +48,14 @@ type CheckRunOutput struct { // CheckRunAnnotation represents an annotation object for a CheckRun output. type CheckRunAnnotation struct { - FileName *string `json:"filename,omitempty"` - BlobHRef *string `json:"blob_href,omitempty"` - StartLine *int `json:"start_line,omitempty"` - EndLine *int `json:"end_line,omitempty"` - WarningLevel *string `json:"warning_level,omitempty"` - Message *string `json:"message,omitempty"` - Title *string `json:"title,omitempty"` - RawDetails *string `json:"raw_details,omitempty"` + Path *string `json:"path,omitempty"` + BlobHRef *string `json:"blob_href,omitempty"` + StartLine *int `json:"start_line,omitempty"` + EndLine *int `json:"end_line,omitempty"` + AnnotationLevel *string `json:"annotation_level,omitempty"` + Message *string `json:"message,omitempty"` + Title *string `json:"title,omitempty"` + RawDetails *string `json:"raw_details,omitempty"` } // CheckRunImage represents an image object for a CheckRun output. @@ -67,6 +68,7 @@ type CheckRunImage struct { // CheckSuite represents a suite of check runs. type CheckSuite struct { ID *int64 `json:"id,omitempty"` + NodeID *string `json:"node_id,omitempty"` HeadBranch *string `json:"head_branch,omitempty"` HeadSHA *string `json:"head_sha,omitempty"` URL *string `json:"url,omitempty"` @@ -401,20 +403,11 @@ func (s *ChecksService) CreateCheckSuite(ctx context.Context, owner, repo string return checkSuite, resp, nil } -// RequestCheckSuiteOptions sets up the parameters for a request check suite endpoint. -type RequestCheckSuiteOptions struct { - HeadSHA string `json:"head_sha"` // The sha of the head commit. (Required.) -} - -// RequestCheckSuite triggers GitHub to create a new check suite, without pushing new code to a repository. +// ReRequestCheckSuite triggers GitHub to rerequest an existing check suite, without pushing new code to a repository. // -// GitHub API docs: https://developer.github.com/v3/checks/suites/#request-check-suites -func (s *ChecksService) RequestCheckSuite(ctx context.Context, owner, repo string, opt RequestCheckSuiteOptions) (*Response, error) { - u := fmt.Sprintf("repos/%v/%v/check-suite-requests", owner, repo) - u, err := addOptions(u, opt) - if err != nil { - return nil, err - } +// GitHub API docs: https://developer.github.com/v3/checks/suites/#rerequest-check-suite +func (s *ChecksService) ReRequestCheckSuite(ctx context.Context, owner, repo string, checkSuiteID int64) (*Response, error) { + u := fmt.Sprintf("repos/%v/%v/check-suites/%v/rerequest", owner, repo, checkSuiteID) req, err := s.client.NewRequest("POST", u, nil) if err != nil { diff --git a/vendor/github.com/google/go-github/github/event_types.go b/vendor/github.com/google/go-github/github/event_types.go index d68bf581..1792f43c 100644 --- a/vendor/github.com/google/go-github/github/event_types.go +++ b/vendor/github.com/google/go-github/github/event_types.go @@ -519,6 +519,7 @@ type PullRequestEvent struct { // the pull request was closed with unmerged commits. If the action is "closed" // and the merged key is true, the pull request was merged. Action *string `json:"action,omitempty"` + Assignee *User `json:"assignee,omitempty"` Number *int `json:"number,omitempty"` PullRequest *PullRequest `json:"pull_request,omitempty"` @@ -532,6 +533,10 @@ type PullRequestEvent struct { Sender *User `json:"sender,omitempty"` Installation *Installation `json:"installation,omitempty"` Label *Label `json:"label,omitempty"` // Populated in "labeled" event deliveries. + + // The following field is only present when the webhook is triggered on + // a repository belonging to an organization. + Organization *Organization `json:"organization,omitempty"` } // PullRequestReviewEvent is triggered when a review is submitted on a pull @@ -705,6 +710,27 @@ type RepositoryEvent struct { Installation *Installation `json:"installation,omitempty"` } +// RepositoryVulnerabilityAlertEvent is triggered when a security alert is created, dismissed, or resolved. +// +// GitHub API docs: https://developer.github.com/v3/activity/events/types/#repositoryvulnerabilityalertevent +type RepositoryVulnerabilityAlertEvent struct { + // Action is the action that was performed. This can be: "create", "dismiss", "resolve". + Action *string `json:"action,omitempty"` + + //The security alert of the vulnerable dependency. + Alert *struct { + ID *int64 `json:"id,omitempty"` + AffectedRange *string `json:"affected_range,omitempty"` + AffectedPackageName *string `json:"affected_package_name,omitempty"` + ExternalReference *string `json:"external_reference,omitempty"` + ExternalIdentifier *string `json:"external_identifier,omitempty"` + FixedIn *string `json:"fixed_in,omitempty"` + Dismisser *User `json:"dismisser,omitempty"` + DismissReason *string `json:"dismiss_reason,omitempty"` + DismissedAt *Timestamp `json:"dismissed_at,omitempty"` + } `json:"alert,omitempty"` +} + // StatusEvent is triggered when the status of a Git commit changes. // The Webhook event name is "status". // diff --git a/vendor/github.com/google/go-github/github/git_commits.go b/vendor/github.com/google/go-github/github/git_commits.go index 1eb48a8e..a2b17fcc 100644 --- a/vendor/github.com/google/go-github/github/git_commits.go +++ b/vendor/github.com/google/go-github/github/git_commits.go @@ -58,7 +58,7 @@ func (c CommitAuthor) String() string { return Stringify(c) } -// GetCommit fetchs the Commit object for a given SHA. +// GetCommit fetches the Commit object for a given SHA. // // GitHub API docs: https://developer.github.com/v3/git/commits/#get-a-commit func (s *GitService) GetCommit(ctx context.Context, owner string, repo string, sha string) (*Commit, *Response, error) { diff --git a/vendor/github.com/google/go-github/github/git_tags.go b/vendor/github.com/google/go-github/github/git_tags.go index 90398b38..f66e4028 100644 --- a/vendor/github.com/google/go-github/github/git_tags.go +++ b/vendor/github.com/google/go-github/github/git_tags.go @@ -33,7 +33,7 @@ type createTagRequest struct { Tagger *CommitAuthor `json:"tagger,omitempty"` } -// GetTag fetchs a tag from a repo given a SHA. +// GetTag fetches a tag from a repo given a SHA. // // GitHub API docs: https://developer.github.com/v3/git/tags/#get-a-tag func (s *GitService) GetTag(ctx context.Context, owner string, repo string, sha string) (*Tag, *Response, error) { diff --git a/vendor/github.com/google/go-github/github/github-accessors.go b/vendor/github.com/google/go-github/github/github-accessors.go index 8d03cc95..3ec79c2c 100644 --- a/vendor/github.com/google/go-github/github/github-accessors.go +++ b/vendor/github.com/google/go-github/github/github-accessors.go @@ -532,6 +532,14 @@ func (c *CheckRun) GetName() string { return *c.Name } +// GetNodeID returns the NodeID field if it's non-nil, zero value otherwise. +func (c *CheckRun) GetNodeID() string { + if c == nil || c.NodeID == nil { + return "" + } + return *c.NodeID +} + // GetOutput returns the Output field. func (c *CheckRun) GetOutput() *CheckRunOutput { if c == nil { @@ -564,6 +572,14 @@ func (c *CheckRun) GetURL() string { return *c.URL } +// GetAnnotationLevel returns the AnnotationLevel field if it's non-nil, zero value otherwise. +func (c *CheckRunAnnotation) GetAnnotationLevel() string { + if c == nil || c.AnnotationLevel == nil { + return "" + } + return *c.AnnotationLevel +} + // GetBlobHRef returns the BlobHRef field if it's non-nil, zero value otherwise. func (c *CheckRunAnnotation) GetBlobHRef() string { if c == nil || c.BlobHRef == nil { @@ -580,14 +596,6 @@ func (c *CheckRunAnnotation) GetEndLine() int { return *c.EndLine } -// GetFileName returns the FileName field if it's non-nil, zero value otherwise. -func (c *CheckRunAnnotation) GetFileName() string { - if c == nil || c.FileName == nil { - return "" - } - return *c.FileName -} - // GetMessage returns the Message field if it's non-nil, zero value otherwise. func (c *CheckRunAnnotation) GetMessage() string { if c == nil || c.Message == nil { @@ -596,6 +604,14 @@ func (c *CheckRunAnnotation) GetMessage() string { return *c.Message } +// GetPath returns the Path field if it's non-nil, zero value otherwise. +func (c *CheckRunAnnotation) GetPath() string { + if c == nil || c.Path == nil { + return "" + } + return *c.Path +} + // GetRawDetails returns the RawDetails field if it's non-nil, zero value otherwise. func (c *CheckRunAnnotation) GetRawDetails() string { if c == nil || c.RawDetails == nil { @@ -620,14 +636,6 @@ func (c *CheckRunAnnotation) GetTitle() string { return *c.Title } -// GetWarningLevel returns the WarningLevel field if it's non-nil, zero value otherwise. -func (c *CheckRunAnnotation) GetWarningLevel() string { - if c == nil || c.WarningLevel == nil { - return "" - } - return *c.WarningLevel -} - // GetAction returns the Action field if it's non-nil, zero value otherwise. func (c *CheckRunEvent) GetAction() string { if c == nil || c.Action == nil { @@ -796,6 +804,14 @@ func (c *CheckSuite) GetID() int64 { return *c.ID } +// GetNodeID returns the NodeID field if it's non-nil, zero value otherwise. +func (c *CheckSuite) GetNodeID() string { + if c == nil || c.NodeID == nil { + return "" + } + return *c.NodeID +} + // GetRepository returns the Repository field. func (c *CheckSuite) GetRepository() *Repository { if c == nil { @@ -2380,6 +2396,14 @@ func (d *DiscussionComment) GetNumber() int { return *d.Number } +// GetReactions returns the Reactions field. +func (d *DiscussionComment) GetReactions() *Reactions { + if d == nil { + return nil + } + return d.Reactions +} + // GetUpdatedAt returns the UpdatedAt field if it's non-nil, zero value otherwise. func (d *DiscussionComment) GetUpdatedAt() Timestamp { if d == nil || d.UpdatedAt == nil { @@ -3116,14 +3140,6 @@ func (h *Hook) GetID() int64 { return *h.ID } -// GetName returns the Name field if it's non-nil, zero value otherwise. -func (h *Hook) GetName() string { - if h == nil || h.Name == nil { - return "" - } - return *h.Name -} - // GetUpdatedAt returns the UpdatedAt field if it's non-nil, zero value otherwise. func (h *Hook) GetUpdatedAt() time.Time { if h == nil || h.UpdatedAt == nil { @@ -3860,6 +3876,14 @@ func (i *IssueComment) GetIssueURL() string { return *i.IssueURL } +// GetNodeID returns the NodeID field if it's non-nil, zero value otherwise. +func (i *IssueComment) GetNodeID() string { + if i == nil || i.NodeID == nil { + return "" + } + return *i.NodeID +} + // GetReactions returns the Reactions field. func (i *IssueComment) GetReactions() *Reactions { if i == nil { @@ -5524,6 +5548,22 @@ func (o *Organization) GetCreatedAt() time.Time { return *o.CreatedAt } +// GetDefaultRepoPermission returns the DefaultRepoPermission field if it's non-nil, zero value otherwise. +func (o *Organization) GetDefaultRepoPermission() string { + if o == nil || o.DefaultRepoPermission == nil { + return "" + } + return *o.DefaultRepoPermission +} + +// GetDefaultRepoSettings returns the DefaultRepoSettings field if it's non-nil, zero value otherwise. +func (o *Organization) GetDefaultRepoSettings() string { + if o == nil || o.DefaultRepoSettings == nil { + return "" + } + return *o.DefaultRepoSettings +} + // GetDescription returns the Description field if it's non-nil, zero value otherwise. func (o *Organization) GetDescription() string { if o == nil || o.Description == nil { @@ -5620,6 +5660,14 @@ func (o *Organization) GetLogin() string { return *o.Login } +// GetMembersCanCreateRepos returns the MembersCanCreateRepos field if it's non-nil, zero value otherwise. +func (o *Organization) GetMembersCanCreateRepos() bool { + if o == nil || o.MembersCanCreateRepos == nil { + return false + } + return *o.MembersCanCreateRepos +} + // GetMembersURL returns the MembersURL field if it's non-nil, zero value otherwise. func (o *Organization) GetMembersURL() string { if o == nil || o.MembersURL == nil { @@ -5708,6 +5756,14 @@ func (o *Organization) GetTotalPrivateRepos() int { return *o.TotalPrivateRepos } +// GetTwoFactorRequirementEnabled returns the TwoFactorRequirementEnabled field if it's non-nil, zero value otherwise. +func (o *Organization) GetTwoFactorRequirementEnabled() bool { + if o == nil || o.TwoFactorRequirementEnabled == nil { + return false + } + return *o.TwoFactorRequirementEnabled +} + // GetType returns the Type field if it's non-nil, zero value otherwise. func (o *Organization) GetType() string { if o == nil || o.Type == nil { @@ -6156,6 +6212,78 @@ func (p *PreReceiveHook) GetName() string { return *p.Name } +// GetHRef returns the HRef field if it's non-nil, zero value otherwise. +func (p *PRLink) GetHRef() string { + if p == nil || p.HRef == nil { + return "" + } + return *p.HRef +} + +// GetComments returns the Comments field. +func (p *PRLinks) GetComments() *PRLink { + if p == nil { + return nil + } + return p.Comments +} + +// GetCommits returns the Commits field. +func (p *PRLinks) GetCommits() *PRLink { + if p == nil { + return nil + } + return p.Commits +} + +// GetHTML returns the HTML field. +func (p *PRLinks) GetHTML() *PRLink { + if p == nil { + return nil + } + return p.HTML +} + +// GetIssue returns the Issue field. +func (p *PRLinks) GetIssue() *PRLink { + if p == nil { + return nil + } + return p.Issue +} + +// GetReviewComment returns the ReviewComment field. +func (p *PRLinks) GetReviewComment() *PRLink { + if p == nil { + return nil + } + return p.ReviewComment +} + +// GetReviewComments returns the ReviewComments field. +func (p *PRLinks) GetReviewComments() *PRLink { + if p == nil { + return nil + } + return p.ReviewComments +} + +// GetSelf returns the Self field. +func (p *PRLinks) GetSelf() *PRLink { + if p == nil { + return nil + } + return p.Self +} + +// GetStatuses returns the Statuses field. +func (p *PRLinks) GetStatuses() *PRLink { + if p == nil { + return nil + } + return p.Statuses +} + // GetBody returns the Body field if it's non-nil, zero value otherwise. func (p *Project) GetBody() string { if p == nil || p.Body == nil { @@ -6884,6 +7012,14 @@ func (p *PullRequest) GetIssueURL() string { return *p.IssueURL } +// GetLinks returns the Links field. +func (p *PullRequest) GetLinks() *PRLinks { + if p == nil { + return nil + } + return p.Links +} + // GetMaintainerCanModify returns the MaintainerCanModify field if it's non-nil, zero value otherwise. func (p *PullRequest) GetMaintainerCanModify() bool { if p == nil || p.MaintainerCanModify == nil { @@ -7228,6 +7364,14 @@ func (p *PullRequestEvent) GetAction() string { return *p.Action } +// GetAssignee returns the Assignee field. +func (p *PullRequestEvent) GetAssignee() *User { + if p == nil { + return nil + } + return p.Assignee +} + // GetChanges returns the Changes field. func (p *PullRequestEvent) GetChanges() *EditChange { if p == nil { @@ -7260,6 +7404,14 @@ func (p *PullRequestEvent) GetNumber() int { return *p.Number } +// GetOrganization returns the Organization field. +func (p *PullRequestEvent) GetOrganization() *Organization { + if p == nil { + return nil + } + return p.Organization +} + // GetPullRequest returns the PullRequest field. func (p *PullRequestEvent) GetPullRequest() *PullRequest { if p == nil { @@ -9804,6 +9956,14 @@ func (r *RepositoryTag) GetZipballURL() string { return *r.ZipballURL } +// GetAction returns the Action field if it's non-nil, zero value otherwise. +func (r *RepositoryVulnerabilityAlertEvent) GetAction() string { + if r == nil || r.Action == nil { + return "" + } + return *r.Action +} + // GetForkRepos returns the ForkRepos field if it's non-nil, zero value otherwise. func (r *RepoStats) GetForkRepos() int { if r == nil || r.ForkRepos == nil { @@ -10564,6 +10724,14 @@ func (t *TeamDiscussion) GetPrivate() bool { return *t.Private } +// GetReactions returns the Reactions field. +func (t *TeamDiscussion) GetReactions() *Reactions { + if t == nil { + return nil + } + return t.Reactions +} + // GetTeamURL returns the TeamURL field if it's non-nil, zero value otherwise. func (t *TeamDiscussion) GetTeamURL() string { if t == nil || t.TeamURL == nil { diff --git a/vendor/github.com/google/go-github/github/github.go b/vendor/github.com/google/go-github/github/github.go index 0685852d..320b8104 100644 --- a/vendor/github.com/google/go-github/github/github.go +++ b/vendor/github.com/google/go-github/github/github.go @@ -375,7 +375,9 @@ type Response struct { FirstPage int LastPage int - Rate + // Explicitly specify the Rate type so Rate's String() receiver doesn't + // propagate to Response. + Rate Rate } // newResponse creates a new Response for the provided http.Response. @@ -500,13 +502,23 @@ func (c *Client) Do(ctx context.Context, req *http.Request, v interface{}) (*Res err = CheckResponse(resp) if err != nil { - // Even though there was an error, we still return the response - // in case the caller wants to inspect it further. - // However, if the error is AcceptedError, decode it below before - // returning from this function and closing the response body. - if _, ok := err.(*AcceptedError); !ok { - return response, err + // Special case for AcceptedErrors. If an AcceptedError + // has been encountered, the response's payload will be + // added to the AcceptedError and returned. + // + // Issue #1022 + aerr, ok := err.(*AcceptedError) + if ok { + b, readErr := ioutil.ReadAll(resp.Body) + if readErr != nil { + return response, readErr + } + + aerr.Raw = b + return response, aerr } + + return response, err } if v != nil { @@ -608,7 +620,10 @@ func (r *RateLimitError) Error() string { // Technically, 202 Accepted is not a real error, it's just used to // indicate that results are not ready yet, but should be available soon. // The request can be repeated after some time. -type AcceptedError struct{} +type AcceptedError struct { + // Raw contains the response body. + Raw []byte +} func (*AcceptedError) Error() string { return "job scheduled on GitHub side; try again later" diff --git a/vendor/github.com/google/go-github/github/issues.go b/vendor/github.com/google/go-github/github/issues.go index 47537544..1e0991ce 100644 --- a/vendor/github.com/google/go-github/github/issues.go +++ b/vendor/github.com/google/go-github/github/issues.go @@ -228,7 +228,7 @@ func (s *IssuesService) ListByRepo(ctx context.Context, owner string, repo strin } // TODO: remove custom Accept headers when APIs fully launch. - acceptHeaders := []string{mediaTypeReactionsPreview, mediaTypeLabelDescriptionSearchPreview, mediaTypeLockReasonPreview} + acceptHeaders := []string{mediaTypeReactionsPreview, mediaTypeLabelDescriptionSearchPreview, mediaTypeIntegrationPreview} req.Header.Set("Accept", strings.Join(acceptHeaders, ", ")) var issues []*Issue diff --git a/vendor/github.com/google/go-github/github/issues_comments.go b/vendor/github.com/google/go-github/github/issues_comments.go index e6f6f219..ab68afe2 100644 --- a/vendor/github.com/google/go-github/github/issues_comments.go +++ b/vendor/github.com/google/go-github/github/issues_comments.go @@ -14,6 +14,7 @@ import ( // IssueComment represents a comment left on an issue. type IssueComment struct { ID *int64 `json:"id,omitempty"` + NodeID *string `json:"node_id,omitempty"` Body *string `json:"body,omitempty"` User *User `json:"user,omitempty"` Reactions *Reactions `json:"reactions,omitempty"` diff --git a/vendor/github.com/google/go-github/github/messages.go b/vendor/github.com/google/go-github/github/messages.go index b8d3380e..75bc7705 100644 --- a/vendor/github.com/google/go-github/github/messages.go +++ b/vendor/github.com/google/go-github/github/messages.go @@ -41,42 +41,43 @@ const ( var ( // eventTypeMapping maps webhooks types to their corresponding go-github struct types. eventTypeMapping = map[string]string{ - "check_run": "CheckRunEvent", - "check_suite": "CheckSuiteEvent", - "commit_comment": "CommitCommentEvent", - "create": "CreateEvent", - "delete": "DeleteEvent", - "deployment": "DeploymentEvent", - "deployment_status": "DeploymentStatusEvent", - "fork": "ForkEvent", - "gollum": "GollumEvent", - "installation": "InstallationEvent", - "installation_repositories": "InstallationRepositoriesEvent", - "issue_comment": "IssueCommentEvent", - "issues": "IssuesEvent", - "label": "LabelEvent", - "marketplace_purchase": "MarketplacePurchaseEvent", - "member": "MemberEvent", - "membership": "MembershipEvent", - "milestone": "MilestoneEvent", - "organization": "OrganizationEvent", - "org_block": "OrgBlockEvent", - "page_build": "PageBuildEvent", - "ping": "PingEvent", - "project": "ProjectEvent", - "project_card": "ProjectCardEvent", - "project_column": "ProjectColumnEvent", - "public": "PublicEvent", - "pull_request_review": "PullRequestReviewEvent", - "pull_request_review_comment": "PullRequestReviewCommentEvent", - "pull_request": "PullRequestEvent", - "push": "PushEvent", - "repository": "RepositoryEvent", - "release": "ReleaseEvent", - "status": "StatusEvent", - "team": "TeamEvent", - "team_add": "TeamAddEvent", - "watch": "WatchEvent", + "check_run": "CheckRunEvent", + "check_suite": "CheckSuiteEvent", + "commit_comment": "CommitCommentEvent", + "create": "CreateEvent", + "delete": "DeleteEvent", + "deployment": "DeploymentEvent", + "deployment_status": "DeploymentStatusEvent", + "fork": "ForkEvent", + "gollum": "GollumEvent", + "installation": "InstallationEvent", + "installation_repositories": "InstallationRepositoriesEvent", + "issue_comment": "IssueCommentEvent", + "issues": "IssuesEvent", + "label": "LabelEvent", + "marketplace_purchase": "MarketplacePurchaseEvent", + "member": "MemberEvent", + "membership": "MembershipEvent", + "milestone": "MilestoneEvent", + "organization": "OrganizationEvent", + "org_block": "OrgBlockEvent", + "page_build": "PageBuildEvent", + "ping": "PingEvent", + "project": "ProjectEvent", + "project_card": "ProjectCardEvent", + "project_column": "ProjectColumnEvent", + "public": "PublicEvent", + "pull_request_review": "PullRequestReviewEvent", + "pull_request_review_comment": "PullRequestReviewCommentEvent", + "pull_request": "PullRequestEvent", + "push": "PushEvent", + "repository": "RepositoryEvent", + "repository_vulnerability_alert": "RepositoryVulnerabilityAlertEvent", + "release": "ReleaseEvent", + "status": "StatusEvent", + "team": "TeamEvent", + "team_add": "TeamAddEvent", + "watch": "WatchEvent", } ) @@ -175,19 +176,19 @@ func ValidatePayload(r *http.Request, secretKey []byte) (payload []byte, err err } sig := r.Header.Get(signatureHeader) - if err := validateSignature(sig, body, secretKey); err != nil { + if err := ValidateSignature(sig, body, secretKey); err != nil { return nil, err } return payload, nil } -// validateSignature validates the signature for the given payload. +// ValidateSignature validates the signature for the given payload. // signature is the GitHub hash signature delivered in the X-Hub-Signature header. // payload is the JSON payload sent by GitHub Webhooks. // secretKey is the GitHub Webhook secret message. // // GitHub API docs: https://developer.github.com/webhooks/securing/#validating-payloads-from-github -func validateSignature(signature string, payload, secretKey []byte) error { +func ValidateSignature(signature string, payload, secretKey []byte) error { messageMAC, hashFunc, err := messageMAC(signature) if err != nil { return err diff --git a/vendor/github.com/google/go-github/github/orgs.go b/vendor/github.com/google/go-github/github/orgs.go index 044dff57..c70039ba 100644 --- a/vendor/github.com/google/go-github/github/orgs.go +++ b/vendor/github.com/google/go-github/github/orgs.go @@ -19,31 +19,42 @@ type OrganizationsService service // Organization represents a GitHub organization account. type Organization struct { - Login *string `json:"login,omitempty"` - ID *int64 `json:"id,omitempty"` - NodeID *string `json:"node_id,omitempty"` - AvatarURL *string `json:"avatar_url,omitempty"` - HTMLURL *string `json:"html_url,omitempty"` - Name *string `json:"name,omitempty"` - Company *string `json:"company,omitempty"` - Blog *string `json:"blog,omitempty"` - Location *string `json:"location,omitempty"` - Email *string `json:"email,omitempty"` - Description *string `json:"description,omitempty"` - PublicRepos *int `json:"public_repos,omitempty"` - PublicGists *int `json:"public_gists,omitempty"` - Followers *int `json:"followers,omitempty"` - Following *int `json:"following,omitempty"` - CreatedAt *time.Time `json:"created_at,omitempty"` - UpdatedAt *time.Time `json:"updated_at,omitempty"` - TotalPrivateRepos *int `json:"total_private_repos,omitempty"` - OwnedPrivateRepos *int `json:"owned_private_repos,omitempty"` - PrivateGists *int `json:"private_gists,omitempty"` - DiskUsage *int `json:"disk_usage,omitempty"` - Collaborators *int `json:"collaborators,omitempty"` - BillingEmail *string `json:"billing_email,omitempty"` - Type *string `json:"type,omitempty"` - Plan *Plan `json:"plan,omitempty"` + Login *string `json:"login,omitempty"` + ID *int64 `json:"id,omitempty"` + NodeID *string `json:"node_id,omitempty"` + AvatarURL *string `json:"avatar_url,omitempty"` + HTMLURL *string `json:"html_url,omitempty"` + Name *string `json:"name,omitempty"` + Company *string `json:"company,omitempty"` + Blog *string `json:"blog,omitempty"` + Location *string `json:"location,omitempty"` + Email *string `json:"email,omitempty"` + Description *string `json:"description,omitempty"` + PublicRepos *int `json:"public_repos,omitempty"` + PublicGists *int `json:"public_gists,omitempty"` + Followers *int `json:"followers,omitempty"` + Following *int `json:"following,omitempty"` + CreatedAt *time.Time `json:"created_at,omitempty"` + UpdatedAt *time.Time `json:"updated_at,omitempty"` + TotalPrivateRepos *int `json:"total_private_repos,omitempty"` + OwnedPrivateRepos *int `json:"owned_private_repos,omitempty"` + PrivateGists *int `json:"private_gists,omitempty"` + DiskUsage *int `json:"disk_usage,omitempty"` + Collaborators *int `json:"collaborators,omitempty"` + BillingEmail *string `json:"billing_email,omitempty"` + Type *string `json:"type,omitempty"` + Plan *Plan `json:"plan,omitempty"` + TwoFactorRequirementEnabled *bool `json:"two_factor_requirement_enabled,omitempty"` + + // DefaultRepoPermission can be one of: "read", "write", "admin", or "none". (Default: "read"). + // It is only used in OrganizationsService.Edit. + DefaultRepoPermission *string `json:"default_repository_permission,omitempty"` + // DefaultRepoSettings can be one of: "read", "write", "admin", or "none". (Default: "read"). + // It is only used in OrganizationsService.Get. + DefaultRepoSettings *string `json:"default_repository_settings,omitempty"` + + // MembersCanCreateRepos default value is true and is only used in Organizations.Edit. + MembersCanCreateRepos *bool `json:"members_can_create_repositories,omitempty"` // API URLs URL *string `json:"url,omitempty"` diff --git a/vendor/github.com/google/go-github/github/orgs_hooks.go b/vendor/github.com/google/go-github/github/orgs_hooks.go index ab1d02da..b710ea40 100644 --- a/vendor/github.com/google/go-github/github/orgs_hooks.go +++ b/vendor/github.com/google/go-github/github/orgs_hooks.go @@ -49,12 +49,22 @@ func (s *OrganizationsService) GetHook(ctx context.Context, org string, id int64 } // CreateHook creates a Hook for the specified org. -// Name and Config are required fields. +// Config is a required field. +// +// Note that only a subset of the hook fields are used and hook must +// not be nil. // // GitHub API docs: https://developer.github.com/v3/orgs/hooks/#create-a-hook func (s *OrganizationsService) CreateHook(ctx context.Context, org string, hook *Hook) (*Hook, *Response, error) { u := fmt.Sprintf("orgs/%v/hooks", org) - req, err := s.client.NewRequest("POST", u, hook) + + hookReq := &createHookRequest{ + Events: hook.Events, + Active: hook.Active, + Config: hook.Config, + } + + req, err := s.client.NewRequest("POST", u, hookReq) if err != nil { return nil, nil, err } diff --git a/vendor/github.com/google/go-github/github/pulls.go b/vendor/github.com/google/go-github/github/pulls.go index a123ec56..a0c3c041 100644 --- a/vendor/github.com/google/go-github/github/pulls.go +++ b/vendor/github.com/google/go-github/github/pulls.go @@ -60,8 +60,13 @@ type PullRequest struct { NodeID *string `json:"node_id,omitempty"` RequestedReviewers []*User `json:"requested_reviewers,omitempty"` - Head *PullRequestBranch `json:"head,omitempty"` - Base *PullRequestBranch `json:"base,omitempty"` + // RequestedTeams is populated as part of the PullRequestEvent. + // See, https://developer.github.com/v3/activity/events/types/#pullrequestevent for an example. + RequestedTeams []*Team `json:"requested_teams,omitempty"` + + Links *PRLinks `json:"_links,omitempty"` + Head *PullRequestBranch `json:"head,omitempty"` + Base *PullRequestBranch `json:"base,omitempty"` // ActiveLockReason is populated only when LockReason is provided while locking the pull request. // Possible values are: "off-topic", "too heated", "resolved", and "spam". @@ -72,6 +77,23 @@ func (p PullRequest) String() string { return Stringify(p) } +// PRLink represents a single link object from Github pull request _links. +type PRLink struct { + HRef *string `json:"href,omitempty"` +} + +// PRLinks represents the "_links" object in a Github pull request. +type PRLinks struct { + Self *PRLink `json:"self,omitempty"` + HTML *PRLink `json:"html,omitempty"` + Issue *PRLink `json:"issue,omitempty"` + Comments *PRLink `json:"comments,omitempty"` + ReviewComments *PRLink `json:"review_comments,omitempty"` + ReviewComment *PRLink `json:"review_comment,omitempty"` + Commits *PRLink `json:"commits,omitempty"` + Statuses *PRLink `json:"statuses,omitempty"` +} + // PullRequestBranch represents a base or head branch in a GitHub pull request. type PullRequestBranch struct { Label *string `json:"label,omitempty"` diff --git a/vendor/github.com/google/go-github/github/reactions.go b/vendor/github.com/google/go-github/github/reactions.go index 97b2818c..ddc055cb 100644 --- a/vendor/github.com/google/go-github/github/reactions.go +++ b/vendor/github.com/google/go-github/github/reactions.go @@ -74,6 +74,7 @@ func (s *ReactionsService) ListCommentReactions(ctx context.Context, owner, repo // CreateCommentReaction creates a reaction for a commit comment. // Note that if you have already created a reaction of type content, the // previously created reaction will be returned with Status: 200 OK. +// The content should have one of the following values: "+1", "-1", "laugh", "confused", "heart", "hooray". // // GitHub API docs: https://developer.github.com/v3/reactions/#create-reaction-for-a-commit-comment func (s ReactionsService) CreateCommentReaction(ctx context.Context, owner, repo string, id int64, content string) (*Reaction, *Response, error) { @@ -127,6 +128,7 @@ func (s *ReactionsService) ListIssueReactions(ctx context.Context, owner, repo s // CreateIssueReaction creates a reaction for an issue. // Note that if you have already created a reaction of type content, the // previously created reaction will be returned with Status: 200 OK. +// The content should have one of the following values: "+1", "-1", "laugh", "confused", "heart", "hooray". // // GitHub API docs: https://developer.github.com/v3/reactions/#create-reaction-for-an-issue func (s ReactionsService) CreateIssueReaction(ctx context.Context, owner, repo string, number int, content string) (*Reaction, *Response, error) { @@ -180,6 +182,7 @@ func (s *ReactionsService) ListIssueCommentReactions(ctx context.Context, owner, // CreateIssueCommentReaction creates a reaction for an issue comment. // Note that if you have already created a reaction of type content, the // previously created reaction will be returned with Status: 200 OK. +// The content should have one of the following values: "+1", "-1", "laugh", "confused", "heart", "hooray". // // GitHub API docs: https://developer.github.com/v3/reactions/#create-reaction-for-an-issue-comment func (s ReactionsService) CreateIssueCommentReaction(ctx context.Context, owner, repo string, id int64, content string) (*Reaction, *Response, error) { @@ -233,6 +236,7 @@ func (s *ReactionsService) ListPullRequestCommentReactions(ctx context.Context, // CreatePullRequestCommentReaction creates a reaction for a pull request review comment. // Note that if you have already created a reaction of type content, the // previously created reaction will be returned with Status: 200 OK. +// The content should have one of the following values: "+1", "-1", "laugh", "confused", "heart", "hooray". // // GitHub API docs: https://developer.github.com/v3/reactions/#create-reaction-for-an-issue-comment func (s ReactionsService) CreatePullRequestCommentReaction(ctx context.Context, owner, repo string, id int64, content string) (*Reaction, *Response, error) { @@ -256,6 +260,103 @@ func (s ReactionsService) CreatePullRequestCommentReaction(ctx context.Context, return m, resp, nil } +// ListTeamDiscussionReactions lists the reactions for a team discussion. +// +// GitHub API docs: https://developer.github.com/v3/reactions/#list-reactions-for-a-team-discussion +func (s *ReactionsService) ListTeamDiscussionReactions(ctx context.Context, teamID int64, discussionNumber int, opt *ListOptions) ([]*Reaction, *Response, error) { + u := fmt.Sprintf("teams/%v/discussions/%v/reactions", teamID, discussionNumber) + u, err := addOptions(u, opt) + if err != nil { + return nil, nil, err + } + + req, err := s.client.NewRequest("GET", u, nil) + if err != nil { + return nil, nil, err + } + + req.Header.Set("Accept", mediaTypeReactionsPreview) + + var m []*Reaction + resp, err := s.client.Do(ctx, req, &m) + if err != nil { + return nil, resp, err + } + + return m, resp, nil +} + +// CreateTeamDiscussionReaction creates a reaction for a team discussion. +// The content should have one of the following values: "+1", "-1", "laugh", "confused", "heart", "hooray". +// +// GitHub API docs: https://developer.github.com/v3/reactions/#create-reaction-for-a-team-discussion +func (s *ReactionsService) CreateTeamDiscussionReaction(ctx context.Context, teamID int64, discussionNumber int, content string) (*Reaction, *Response, error) { + u := fmt.Sprintf("teams/%v/discussions/%v/reactions", teamID, discussionNumber) + + body := &Reaction{Content: String(content)} + req, err := s.client.NewRequest("POST", u, body) + if err != nil { + return nil, nil, err + } + + req.Header.Set("Accept", mediaTypeReactionsPreview) + + m := &Reaction{} + resp, err := s.client.Do(ctx, req, m) + if err != nil { + return nil, resp, err + } + + return m, resp, nil +} + +// ListTeamDiscussionCommentReactions lists the reactions for a team discussion comment. +// +// GitHub API docs: https://developer.github.com/v3/reactions/#list-reactions-for-a-team-discussion-comment +func (s *ReactionsService) ListTeamDiscussionCommentReactions(ctx context.Context, teamID int64, discussionNumber, commentNumber int, opt *ListOptions) ([]*Reaction, *Response, error) { + u := fmt.Sprintf("teams/%v/discussions/%v/comments/%v/reactions", teamID, discussionNumber, commentNumber) + u, err := addOptions(u, opt) + if err != nil { + return nil, nil, err + } + + req, err := s.client.NewRequest("GET", u, nil) + if err != nil { + return nil, nil, err + } + + req.Header.Set("Accept", mediaTypeReactionsPreview) + + var m []*Reaction + resp, err := s.client.Do(ctx, req, &m) + + return m, resp, nil +} + +// CreateTeamDiscussionCommentReaction creates a reaction for a team discussion comment. +// The content should have one of the following values: "+1", "-1", "laugh", "confused", "heart", "hooray". +// +// GitHub API docs: https://developer.github.com/v3/reactions/#create-reaction-for-a-team-discussion-comment +func (s *ReactionsService) CreateTeamDiscussionCommentReaction(ctx context.Context, teamID int64, discussionNumber, commentNumber int, content string) (*Reaction, *Response, error) { + u := fmt.Sprintf("teams/%v/discussions/%v/comments/%v/reactions", teamID, discussionNumber, commentNumber) + + body := &Reaction{Content: String(content)} + req, err := s.client.NewRequest("POST", u, body) + if err != nil { + return nil, nil, err + } + + req.Header.Set("Accept", mediaTypeReactionsPreview) + + m := &Reaction{} + resp, err := s.client.Do(ctx, req, m) + if err != nil { + return nil, resp, err + } + + return m, resp, nil +} + // DeleteReaction deletes a reaction. // // GitHub API docs: https://developer.github.com/v3/reaction/reactions/#delete-a-reaction-archive diff --git a/vendor/github.com/google/go-github/github/repos.go b/vendor/github.com/google/go-github/github/repos.go index fe05272a..e783ccbe 100644 --- a/vendor/github.com/google/go-github/github/repos.go +++ b/vendor/github.com/google/go-github/github/repos.go @@ -56,6 +56,7 @@ type Repository struct { AllowSquashMerge *bool `json:"allow_squash_merge,omitempty"` AllowMergeCommit *bool `json:"allow_merge_commit,omitempty"` Topics []string `json:"topics,omitempty"` + Archived *bool `json:"archived,omitempty"` // Only provided when using RepositoriesService.Get while in preview License *License `json:"license,omitempty"` @@ -69,7 +70,6 @@ type Repository struct { HasDownloads *bool `json:"has_downloads,omitempty"` LicenseTemplate *string `json:"license_template,omitempty"` GitignoreTemplate *string `json:"gitignore_template,omitempty"` - Archived *bool `json:"archived,omitempty"` // Creating an organization repository. Required for non-owners. TeamID *int64 `json:"team_id,omitempty"` @@ -259,10 +259,40 @@ func (s *RepositoriesService) ListAll(ctx context.Context, opt *RepositoryListAl return repos, resp, nil } +// createRepoRequest is a subset of Repository and is used internally +// by Create to pass only the known fields for the endpoint. +// +// See https://github.com/google/go-github/issues/1014 for more +// information. +type createRepoRequest struct { + // Name is required when creating a repo. + Name *string `json:"name,omitempty"` + Description *string `json:"description,omitempty"` + Homepage *string `json:"homepage,omitempty"` + + Private *bool `json:"private,omitempty"` + HasIssues *bool `json:"has_issues,omitempty"` + HasProjects *bool `json:"has_projects,omitempty"` + HasWiki *bool `json:"has_wiki,omitempty"` + + // Creating an organization repository. Required for non-owners. + TeamID *int64 `json:"team_id,omitempty"` + + AutoInit *bool `json:"auto_init,omitempty"` + GitignoreTemplate *string `json:"gitignore_template,omitempty"` + LicenseTemplate *string `json:"license_template,omitempty"` + AllowSquashMerge *bool `json:"allow_squash_merge,omitempty"` + AllowMergeCommit *bool `json:"allow_merge_commit,omitempty"` + AllowRebaseMerge *bool `json:"allow_rebase_merge,omitempty"` +} + // Create a new repository. If an organization is specified, the new // repository will be created under that org. If the empty string is // specified, it will be created for the authenticated user. // +// Note that only a subset of the repo fields are used and repo must +// not be nil. +// // GitHub API docs: https://developer.github.com/v3/repos/#create func (s *RepositoriesService) Create(ctx context.Context, org string, repo *Repository) (*Repository, *Response, error) { var u string @@ -272,7 +302,24 @@ func (s *RepositoriesService) Create(ctx context.Context, org string, repo *Repo u = "user/repos" } - req, err := s.client.NewRequest("POST", u, repo) + repoReq := &createRepoRequest{ + Name: repo.Name, + Description: repo.Description, + Homepage: repo.Homepage, + Private: repo.Private, + HasIssues: repo.HasIssues, + HasProjects: repo.HasProjects, + HasWiki: repo.HasWiki, + TeamID: repo.TeamID, + AutoInit: repo.AutoInit, + GitignoreTemplate: repo.GitignoreTemplate, + LicenseTemplate: repo.LicenseTemplate, + AllowSquashMerge: repo.AllowSquashMerge, + AllowMergeCommit: repo.AllowMergeCommit, + AllowRebaseMerge: repo.AllowRebaseMerge, + } + + req, err := s.client.NewRequest("POST", u, repoReq) if err != nil { return nil, nil, err } diff --git a/vendor/github.com/google/go-github/github/repos_forks.go b/vendor/github.com/google/go-github/github/repos_forks.go index d0bff544..bfff27bb 100644 --- a/vendor/github.com/google/go-github/github/repos_forks.go +++ b/vendor/github.com/google/go-github/github/repos_forks.go @@ -8,6 +8,8 @@ package github import ( "context" "fmt" + + "encoding/json" ) // RepositoryListForksOptions specifies the optional parameters to the @@ -78,10 +80,15 @@ func (s *RepositoriesService) CreateFork(ctx context.Context, owner, repo string fork := new(Repository) resp, err := s.client.Do(ctx, req, fork) - if _, ok := err.(*AcceptedError); ok { - return fork, resp, err - } if err != nil { + // Persist AcceptedError's metadata to the Repository object. + if aerr, ok := err.(*AcceptedError); ok { + if err := json.Unmarshal(aerr.Raw, fork); err != nil { + return fork, resp, err + } + + return fork, resp, err + } return nil, resp, err } diff --git a/vendor/github.com/google/go-github/github/repos_hooks.go b/vendor/github.com/google/go-github/github/repos_hooks.go index 1e9e8848..56374b3e 100644 --- a/vendor/github.com/google/go-github/github/repos_hooks.go +++ b/vendor/github.com/google/go-github/github/repos_hooks.go @@ -69,27 +69,51 @@ func (w WebHookAuthor) String() string { // Hook represents a GitHub (web and service) hook for a repository. type Hook struct { - CreatedAt *time.Time `json:"created_at,omitempty"` - UpdatedAt *time.Time `json:"updated_at,omitempty"` - Name *string `json:"name,omitempty"` - URL *string `json:"url,omitempty"` - Events []string `json:"events,omitempty"` - Active *bool `json:"active,omitempty"` - Config map[string]interface{} `json:"config,omitempty"` - ID *int64 `json:"id,omitempty"` + CreatedAt *time.Time `json:"created_at,omitempty"` + UpdatedAt *time.Time `json:"updated_at,omitempty"` + URL *string `json:"url,omitempty"` + ID *int64 `json:"id,omitempty"` + + // Only the following fields are used when creating a hook. + // Config is required. + Config map[string]interface{} `json:"config,omitempty"` + Events []string `json:"events,omitempty"` + Active *bool `json:"active,omitempty"` } func (h Hook) String() string { return Stringify(h) } +// createHookRequest is a subset of Hook and is used internally +// by CreateHook to pass only the known fields for the endpoint. +// +// See https://github.com/google/go-github/issues/1015 for more +// information. +type createHookRequest struct { + // Config is required. + Config map[string]interface{} `json:"config,omitempty"` + Events []string `json:"events,omitempty"` + Active *bool `json:"active,omitempty"` +} + // CreateHook creates a Hook for the specified repository. -// Name and Config are required fields. +// Config is a required field. +// +// Note that only a subset of the hook fields are used and hook must +// not be nil. // // GitHub API docs: https://developer.github.com/v3/repos/hooks/#create-a-hook func (s *RepositoriesService) CreateHook(ctx context.Context, owner, repo string, hook *Hook) (*Hook, *Response, error) { u := fmt.Sprintf("repos/%v/%v/hooks", owner, repo) - req, err := s.client.NewRequest("POST", u, hook) + + hookReq := &createHookRequest{ + Events: hook.Events, + Active: hook.Active, + Config: hook.Config, + } + + req, err := s.client.NewRequest("POST", u, hookReq) if err != nil { return nil, nil, err } diff --git a/vendor/github.com/google/go-github/github/repos_releases.go b/vendor/github.com/google/go-github/github/repos_releases.go index c23601d1..bf58743e 100644 --- a/vendor/github.com/google/go-github/github/repos_releases.go +++ b/vendor/github.com/google/go-github/github/repos_releases.go @@ -19,24 +19,26 @@ import ( // RepositoryRelease represents a GitHub release in a repository. type RepositoryRelease struct { - ID *int64 `json:"id,omitempty"` - TagName *string `json:"tag_name,omitempty"` - TargetCommitish *string `json:"target_commitish,omitempty"` - Name *string `json:"name,omitempty"` - Body *string `json:"body,omitempty"` - Draft *bool `json:"draft,omitempty"` - Prerelease *bool `json:"prerelease,omitempty"` - CreatedAt *Timestamp `json:"created_at,omitempty"` - PublishedAt *Timestamp `json:"published_at,omitempty"` - URL *string `json:"url,omitempty"` - HTMLURL *string `json:"html_url,omitempty"` - AssetsURL *string `json:"assets_url,omitempty"` - Assets []ReleaseAsset `json:"assets,omitempty"` - UploadURL *string `json:"upload_url,omitempty"` - ZipballURL *string `json:"zipball_url,omitempty"` - TarballURL *string `json:"tarball_url,omitempty"` - Author *User `json:"author,omitempty"` - NodeID *string `json:"node_id,omitempty"` + TagName *string `json:"tag_name,omitempty"` + TargetCommitish *string `json:"target_commitish,omitempty"` + Name *string `json:"name,omitempty"` + Body *string `json:"body,omitempty"` + Draft *bool `json:"draft,omitempty"` + Prerelease *bool `json:"prerelease,omitempty"` + + // The following fields are not used in CreateRelease or EditRelease: + ID *int64 `json:"id,omitempty"` + CreatedAt *Timestamp `json:"created_at,omitempty"` + PublishedAt *Timestamp `json:"published_at,omitempty"` + URL *string `json:"url,omitempty"` + HTMLURL *string `json:"html_url,omitempty"` + AssetsURL *string `json:"assets_url,omitempty"` + Assets []ReleaseAsset `json:"assets,omitempty"` + UploadURL *string `json:"upload_url,omitempty"` + ZipballURL *string `json:"zipball_url,omitempty"` + TarballURL *string `json:"tarball_url,omitempty"` + Author *User `json:"author,omitempty"` + NodeID *string `json:"node_id,omitempty"` } func (r RepositoryRelease) String() string { @@ -125,13 +127,40 @@ func (s *RepositoriesService) getSingleRelease(ctx context.Context, url string) return release, resp, nil } +// repositoryReleaseRequest is a subset of RepositoryRelease and +// is used internally by CreateRelease and EditRelease to pass +// only the known fields for these endpoints. +// +// See https://github.com/google/go-github/issues/992 for more +// information. +type repositoryReleaseRequest struct { + TagName *string `json:"tag_name,omitempty"` + TargetCommitish *string `json:"target_commitish,omitempty"` + Name *string `json:"name,omitempty"` + Body *string `json:"body,omitempty"` + Draft *bool `json:"draft,omitempty"` + Prerelease *bool `json:"prerelease,omitempty"` +} + // CreateRelease adds a new release for a repository. // +// Note that only a subset of the release fields are used. +// See RepositoryRelease for more information. +// // GitHub API docs: https://developer.github.com/v3/repos/releases/#create-a-release func (s *RepositoriesService) CreateRelease(ctx context.Context, owner, repo string, release *RepositoryRelease) (*RepositoryRelease, *Response, error) { u := fmt.Sprintf("repos/%s/%s/releases", owner, repo) - req, err := s.client.NewRequest("POST", u, release) + releaseReq := &repositoryReleaseRequest{ + TagName: release.TagName, + TargetCommitish: release.TargetCommitish, + Name: release.Name, + Body: release.Body, + Draft: release.Draft, + Prerelease: release.Prerelease, + } + + req, err := s.client.NewRequest("POST", u, releaseReq) if err != nil { return nil, nil, err } @@ -146,11 +175,23 @@ func (s *RepositoriesService) CreateRelease(ctx context.Context, owner, repo str // EditRelease edits a repository release. // +// Note that only a subset of the release fields are used. +// See RepositoryRelease for more information. +// // GitHub API docs: https://developer.github.com/v3/repos/releases/#edit-a-release func (s *RepositoriesService) EditRelease(ctx context.Context, owner, repo string, id int64, release *RepositoryRelease) (*RepositoryRelease, *Response, error) { u := fmt.Sprintf("repos/%s/%s/releases/%d", owner, repo, id) - req, err := s.client.NewRequest("PATCH", u, release) + releaseReq := &repositoryReleaseRequest{ + TagName: release.TagName, + TargetCommitish: release.TargetCommitish, + Name: release.Name, + Body: release.Body, + Draft: release.Draft, + Prerelease: release.Prerelease, + } + + req, err := s.client.NewRequest("PATCH", u, releaseReq) if err != nil { return nil, nil, err } diff --git a/vendor/github.com/google/go-github/github/teams_discussion_comments.go b/vendor/github.com/google/go-github/github/teams_discussion_comments.go index 383d559e..a0206b9c 100644 --- a/vendor/github.com/google/go-github/github/teams_discussion_comments.go +++ b/vendor/github.com/google/go-github/github/teams_discussion_comments.go @@ -24,6 +24,7 @@ type DiscussionComment struct { Number *int `json:"number,omitempty"` UpdatedAt *Timestamp `json:"updated_at,omitempty"` URL *string `json:"url,omitempty"` + Reactions *Reactions `json:"reactions,omitempty"` } func (c DiscussionComment) String() string { diff --git a/vendor/github.com/google/go-github/github/teams_discussions.go b/vendor/github.com/google/go-github/github/teams_discussions.go index 5db06d10..f491c9d1 100644 --- a/vendor/github.com/google/go-github/github/teams_discussions.go +++ b/vendor/github.com/google/go-github/github/teams_discussions.go @@ -29,6 +29,7 @@ type TeamDiscussion struct { Title *string `json:"title,omitempty"` UpdatedAt *Timestamp `json:"updated_at,omitempty"` URL *string `json:"url,omitempty"` + Reactions *Reactions `json:"reactions,omitempty"` } func (d TeamDiscussion) String() string { diff --git a/vendor/github.com/google/go-github/github/users.go b/vendor/github.com/google/go-github/github/users.go index f164d559..c4fd09b4 100644 --- a/vendor/github.com/google/go-github/github/users.go +++ b/vendor/github.com/google/go-github/github/users.go @@ -76,6 +76,7 @@ func (u User) String() string { // user. // // GitHub API docs: https://developer.github.com/v3/users/#get-a-single-user +// and: https://developer.github.com/v3/users/#get-the-authenticated-user func (s *UsersService) Get(ctx context.Context, user string) (*User, *Response, error) { var u string if user != "" { diff --git a/vendor/github.com/olebedev/config/config.go b/vendor/github.com/olebedev/config/config.go index b007f9db..17af79e0 100644 --- a/vendor/github.com/olebedev/config/config.go +++ b/vendor/github.com/olebedev/config/config.go @@ -498,7 +498,7 @@ func Set(cfg interface{}, path string, value interface{}) error { default: return fmt.Errorf( "Invalid type at %q: expected []interface{} or map[string]interface{}; got %T", - strings.Join(parts[:pos+1], "."), cfg) + strings.Join(parts[:pos+1], "."), c) } } diff --git a/vendor/github.com/rivo/tview/README.md b/vendor/github.com/rivo/tview/README.md index e40fc3a0..99e89b6b 100644 --- a/vendor/github.com/rivo/tview/README.md +++ b/vendor/github.com/rivo/tview/README.md @@ -65,6 +65,8 @@ Add your issue here on GitHub. Feel free to get in touch if you have any questio (There are no corresponding tags in the project. I only keep such a history in this README.) +- v0.18 (2018-10-18) + - `InputField` elements can now be navigated freely. - v0.17 (2018-06-20) - Added `TreeView`. - v0.15 (2018-05-02) diff --git a/vendor/github.com/rivo/tview/application.go b/vendor/github.com/rivo/tview/application.go index bd4c5ac8..146954a1 100644 --- a/vendor/github.com/rivo/tview/application.go +++ b/vendor/github.com/rivo/tview/application.go @@ -19,6 +19,9 @@ type Application struct { // The application's screen. screen tcell.Screen + // Indicates whether the application's screen is currently active. + running bool + // The primitive which currently has the keyboard focus. focus Primitive @@ -70,22 +73,53 @@ func (a *Application) GetInputCapture() func(event *tcell.EventKey) *tcell.Event return a.inputCapture } +// SetScreen allows you to provide your own tcell.Screen object. For most +// applications, this is not needed and you should be familiar with +// tcell.Screen when using this function. Run() will call Init() and Fini() on +// the provided screen object. +// +// This function is typically called before calling Run(). Calling it while an +// application is running will switch the application to the new screen. Fini() +// will be called on the old screen and Init() on the new screen (errors +// returned by Init() will lead to a panic). +// +// Note that calling Suspend() will invoke Fini() on your screen object and it +// will not be restored when suspended mode ends. Instead, a new default screen +// object will be created. +func (a *Application) SetScreen(screen tcell.Screen) *Application { + a.Lock() + defer a.Unlock() + if a.running { + a.screen.Fini() + } + a.screen = screen + if a.running { + if err := a.screen.Init(); err != nil { + panic(err) + } + } + return a +} + // Run starts the application and thus the event loop. This function returns // when Stop() was called. func (a *Application) Run() error { var err error a.Lock() - // Make a screen. - a.screen, err = tcell.NewScreen() - if err != nil { - a.Unlock() - return err + // Make a screen if there is none yet. + if a.screen == nil { + a.screen, err = tcell.NewScreen() + if err != nil { + a.Unlock() + return err + } } if err = a.screen.Init(); err != nil { a.Unlock() return err } + a.running = true // We catch panics to clean up because they mess up the terminal. defer func() { @@ -93,6 +127,7 @@ func (a *Application) Run() error { if a.screen != nil { a.screen.Fini() } + a.running = false panic(p) } }() @@ -170,6 +205,7 @@ func (a *Application) Stop() { } a.screen.Fini() a.screen = nil + a.running = false } // Suspend temporarily suspends the application by exiting terminal UI mode and @@ -217,6 +253,7 @@ func (a *Application) Suspend(f func()) bool { a.Unlock() panic(err) } + a.running = true a.Unlock() a.Draw() diff --git a/vendor/github.com/rivo/tview/box.go b/vendor/github.com/rivo/tview/box.go index acbb1492..46df9c85 100644 --- a/vendor/github.com/rivo/tview/box.go +++ b/vendor/github.com/rivo/tview/box.go @@ -51,10 +51,6 @@ type Box struct { // Whether or not this box has focus. hasFocus bool - // If set to true, the inner rect of this box will be within the screen at the - // last time the box was drawn. - clampToScreen bool - // An optional capture function which receives a key event and returns the // event to be forwarded to the primitive's default input handler (nil if // nothing should be forwarded). @@ -74,7 +70,6 @@ func NewBox() *Box { borderColor: Styles.BorderColor, titleColor: Styles.TitleColor, titleAlign: AlignCenter, - clampToScreen: true, } b.focus = b return b @@ -117,6 +112,7 @@ func (b *Box) SetRect(x, y, width, height int) { b.y = y b.width = width b.height = height + b.innerX = -1 // Mark inner rect as uninitialized. } // SetDrawFunc sets a callback function which is invoked after the box primitive @@ -277,8 +273,8 @@ func (b *Box) Draw(screen tcell.Screen) { // Draw title. if b.title != "" && b.width >= 4 { - _, printed := Print(screen, b.title, b.x+1, b.y, b.width-2, b.titleAlign, b.titleColor) - if StringWidth(b.title)-printed > 0 && printed > 0 { + printed, _ := Print(screen, b.title, b.x+1, b.y, b.width-2, b.titleAlign, b.titleColor) + if len(b.title)-printed > 0 && printed > 0 { _, _, style, _ := screen.GetContent(b.x+b.width-2, b.y) fg, _, _ := style.Decompose() Print(screen, string(SemigraphicsHorizontalEllipsis), b.x+b.width-2, b.y, 1, AlignLeft, fg) @@ -296,22 +292,20 @@ func (b *Box) Draw(screen tcell.Screen) { } // Clamp inner rect to screen. - if b.clampToScreen { - width, height := screen.Size() - if b.innerX < 0 { - b.innerWidth += b.innerX - b.innerX = 0 - } - if b.innerX+b.innerWidth >= width { - b.innerWidth = width - b.innerX - } - if b.innerY+b.innerHeight >= height { - b.innerHeight = height - b.innerY - } - if b.innerY < 0 { - b.innerHeight += b.innerY - b.innerY = 0 - } + width, height := screen.Size() + if b.innerX < 0 { + b.innerWidth += b.innerX + b.innerX = 0 + } + if b.innerX+b.innerWidth >= width { + b.innerWidth = width - b.innerX + } + if b.innerY+b.innerHeight >= height { + b.innerHeight = height - b.innerY + } + if b.innerY < 0 { + b.innerHeight += b.innerY + b.innerY = 0 } } diff --git a/vendor/github.com/rivo/tview/checkbox.go b/vendor/github.com/rivo/tview/checkbox.go index 768c112e..8f099d8b 100644 --- a/vendor/github.com/rivo/tview/checkbox.go +++ b/vendor/github.com/rivo/tview/checkbox.go @@ -124,9 +124,9 @@ func (c *Checkbox) SetChangedFunc(handler func(checked bool)) *Checkbox { return c } -// SetDoneFunc sets a handler which is called when the user is done entering -// text. The callback function is provided with the key that was pressed, which -// is one of the following: +// SetDoneFunc sets a handler which is called when the user is done using the +// checkbox. The callback function is provided with the key that was pressed, +// which is one of the following: // // - KeyEscape: Abort text input. // - KeyTab: Move to the next field. diff --git a/vendor/github.com/rivo/tview/form.go b/vendor/github.com/rivo/tview/form.go index 3593adfd..289e4936 100644 --- a/vendor/github.com/rivo/tview/form.go +++ b/vendor/github.com/rivo/tview/form.go @@ -218,6 +218,13 @@ func (f *Form) AddButton(label string, selected func()) *Form { return f } +// GetButton returns the button at the specified 0-based index. Note that +// buttons have been specially prepared for this form and modifying some of +// their attributes may have unintended side effects. +func (f *Form) GetButton(index int) *Button { + return f.buttons[index] +} + // RemoveButton removes the button at the specified position, starting with 0 // for the button that was added first. func (f *Form) RemoveButton(index int) *Form { @@ -225,6 +232,11 @@ func (f *Form) RemoveButton(index int) *Form { return f } +// GetButtonCount returns the number of buttons in this form. +func (f *Form) GetButtonCount() int { + return len(f.buttons) +} + // GetButtonIndex returns the index of the button with the given label, starting // with 0 for the button that was added first. If no such label was found, -1 // is returned. diff --git a/vendor/github.com/rivo/tview/inputfield.go b/vendor/github.com/rivo/tview/inputfield.go index f738859c..86c9c208 100644 --- a/vendor/github.com/rivo/tview/inputfield.go +++ b/vendor/github.com/rivo/tview/inputfield.go @@ -11,10 +11,23 @@ import ( ) // InputField is a one-line box (three lines if there is a title) where the -// user can enter text. +// user can enter text. Use SetAcceptanceFunc() to accept or reject input, +// SetChangedFunc() to listen for changes, and SetMaskCharacter() to hide input +// from onlookers (e.g. for password input). // -// Use SetMaskCharacter() to hide input from onlookers (e.g. for password -// input). +// The following keys can be used for navigation and editing: +// +// - Left arrow: Move left by one character. +// - Right arrow: Move right by one character. +// - Home, Ctrl-A, Alt-a: Move to the beginning of the line. +// - End, Ctrl-E, Alt-e: Move to the end of the line. +// - Alt-left, Alt-b: Move left by one word. +// - Alt-right, Alt-f: Move right by one word. +// - Backspace: Delete the character before the cursor. +// - Delete: Delete the character after the cursor. +// - Ctrl-K: Delete from the cursor to the end of the line. +// - Ctrl-W: Delete the last word before the cursor. +// - Ctrl-U: Delete the entire line. // // See https://github.com/rivo/tview/wiki/InputField for an example. type InputField struct { @@ -53,6 +66,12 @@ type InputField struct { // disables masking. maskCharacter rune + // The cursor position as a byte index into the text string. + cursorPos int + + // The number of bytes of the text string skipped ahead while drawing. + offset int + // An optional function which may reject the last character that was entered. accept func(text string, ch rune) bool @@ -174,7 +193,7 @@ func (i *InputField) SetMaskCharacter(mask rune) *InputField { // SetAcceptanceFunc sets a handler which may reject the last character that was // entered (by returning false). // -// This package defines a number of variables Prefixed with InputField which may +// This package defines a number of variables prefixed with InputField which may // be used for common input (e.g. numbers, maximum text length). func (i *InputField) SetAcceptanceFunc(handler func(textToCheck string, lastChar rune) bool) *InputField { i.accept = handler @@ -244,56 +263,69 @@ func (i *InputField) Draw(screen tcell.Screen) { screen.SetContent(x+index, y, ' ', nil, fieldStyle) } - // Draw placeholder text. + // Text. + var cursorScreenPos int text := i.text if text == "" && i.placeholder != "" { - Print(screen, i.placeholder, x, y, fieldWidth, AlignLeft, i.placeholderTextColor) + // Draw placeholder text. + Print(screen, Escape(i.placeholder), x, y, fieldWidth, AlignLeft, i.placeholderTextColor) + i.offset = 0 } else { // Draw entered text. if i.maskCharacter > 0 { text = strings.Repeat(string(i.maskCharacter), utf8.RuneCountInString(i.text)) - } else { - text = Escape(text) } - fieldWidth-- // We need one cell for the cursor. - if fieldWidth < runewidth.StringWidth(text) { - Print(screen, text, x, y, fieldWidth, AlignRight, i.fieldTextColor) + stringWidth := runewidth.StringWidth(text) + if fieldWidth >= stringWidth { + // We have enough space for the full text. + Print(screen, Escape(text), x, y, fieldWidth, AlignLeft, i.fieldTextColor) + i.offset = 0 + iterateString(text, func(main rune, comb []rune, textPos, textWidth, screenPos, screenWidth int) bool { + if textPos >= i.cursorPos { + return true + } + cursorScreenPos += screenWidth + return false + }) } else { - Print(screen, text, x, y, fieldWidth, AlignLeft, i.fieldTextColor) + // The text doesn't fit. Where is the cursor? + if i.cursorPos < 0 { + i.cursorPos = 0 + } else if i.cursorPos > len(text) { + i.cursorPos = len(text) + } + // Shift the text so the cursor is inside the field. + var shiftLeft int + if i.offset > i.cursorPos { + i.offset = i.cursorPos + } else if subWidth := runewidth.StringWidth(text[i.offset:i.cursorPos]); subWidth > fieldWidth-1 { + shiftLeft = subWidth - fieldWidth + 1 + } + currentOffset := i.offset + iterateString(text, func(main rune, comb []rune, textPos, textWidth, screenPos, screenWidth int) bool { + if textPos >= currentOffset { + if shiftLeft > 0 { + i.offset = textPos + textWidth + shiftLeft -= screenWidth + } else { + if textPos+textWidth > i.cursorPos { + return true + } + cursorScreenPos += screenWidth + } + } + return false + }) + Print(screen, Escape(text[i.offset:]), x, y, fieldWidth, AlignLeft, i.fieldTextColor) } } // Set cursor. if i.focus.HasFocus() { - i.setCursor(screen) + screen.ShowCursor(x+cursorScreenPos, y) } } -// setCursor sets the cursor position. -func (i *InputField) setCursor(screen tcell.Screen) { - x := i.x - y := i.y - rightLimit := x + i.width - if i.border { - x++ - y++ - rightLimit -= 2 - } - fieldWidth := runewidth.StringWidth(i.text) - if i.fieldWidth > 0 && fieldWidth > i.fieldWidth-1 { - fieldWidth = i.fieldWidth - 1 - } - if i.labelWidth > 0 { - x += i.labelWidth + fieldWidth - } else { - x += StringWidth(i.label) + fieldWidth - } - if x >= rightLimit { - x = rightLimit - 1 - } - screen.ShowCursor(x, y) -} - // InputHandler returns the handler for this primitive. func (i *InputField) InputHandler() func(event *tcell.EventKey, setFocus func(p Primitive)) { return i.WrapInputHandler(func(event *tcell.EventKey, setFocus func(p Primitive)) { @@ -305,27 +337,95 @@ func (i *InputField) InputHandler() func(event *tcell.EventKey, setFocus func(p } }() + // Movement functions. + home := func() { i.cursorPos = 0 } + end := func() { i.cursorPos = len(i.text) } + moveLeft := func() { + iterateStringReverse(i.text[:i.cursorPos], func(main rune, comb []rune, textPos, textWidth, screenPos, screenWidth int) bool { + i.cursorPos -= textWidth + return true + }) + } + moveRight := func() { + iterateString(i.text[i.cursorPos:], func(main rune, comb []rune, textPos, textWidth, screenPos, screenWidth int) bool { + i.cursorPos += textWidth + return true + }) + } + moveWordLeft := func() { + i.cursorPos = len(regexp.MustCompile(`\S+\s*$`).ReplaceAllString(i.text[:i.cursorPos], "")) + } + moveWordRight := func() { + i.cursorPos = len(i.text) - len(regexp.MustCompile(`^\s*\S+\s*`).ReplaceAllString(i.text[i.cursorPos:], "")) + } + // Process key event. switch key := event.Key(); key { case tcell.KeyRune: // Regular character. - newText := i.text + string(event.Rune()) - if i.accept != nil { - if !i.accept(newText, event.Rune()) { - break + modifiers := event.Modifiers() + if modifiers == tcell.ModNone { + ch := string(event.Rune()) + newText := i.text[:i.cursorPos] + ch + i.text[i.cursorPos:] + if i.accept != nil { + if !i.accept(newText, event.Rune()) { + break + } + } + i.text = newText + i.cursorPos += len(ch) + } else if modifiers&tcell.ModAlt > 0 { + // We accept some Alt- key combinations. + switch event.Rune() { + case 'a': // Home. + home() + case 'e': // End. + end() + case 'b': // Move word left. + moveWordLeft() + case 'f': // Move word right. + moveWordRight() } } - i.text = newText case tcell.KeyCtrlU: // Delete all. i.text = "" + i.cursorPos = 0 + case tcell.KeyCtrlK: // Delete until the end of the line. + i.text = i.text[:i.cursorPos] case tcell.KeyCtrlW: // Delete last word. - lastWord := regexp.MustCompile(`\s*\S+\s*$`) - i.text = lastWord.ReplaceAllString(i.text, "") - case tcell.KeyBackspace, tcell.KeyBackspace2: // Delete last character. - if len(i.text) == 0 { - break + lastWord := regexp.MustCompile(`\S+\s*$`) + newText := lastWord.ReplaceAllString(i.text[:i.cursorPos], "") + i.text[i.cursorPos:] + i.cursorPos -= len(i.text) - len(newText) + i.text = newText + case tcell.KeyBackspace, tcell.KeyBackspace2: // Delete character before the cursor. + iterateStringReverse(i.text[:i.cursorPos], func(main rune, comb []rune, textPos, textWidth, screenPos, screenWidth int) bool { + i.text = i.text[:textPos] + i.text[textPos+textWidth:] + i.cursorPos -= textWidth + return true + }) + if i.offset >= i.cursorPos { + i.offset = 0 } - runes := []rune(i.text) - i.text = string(runes[:len(runes)-1]) + case tcell.KeyDelete: // Delete character after the cursor. + iterateString(i.text[i.cursorPos:], func(main rune, comb []rune, textPos, textWidth, screenPos, screenWidth int) bool { + i.text = i.text[:i.cursorPos] + i.text[i.cursorPos+textWidth:] + return true + }) + case tcell.KeyLeft: + if event.Modifiers()&tcell.ModAlt > 0 { + moveWordLeft() + } else { + moveLeft() + } + case tcell.KeyRight: + if event.Modifiers()&tcell.ModAlt > 0 { + moveWordRight() + } else { + moveRight() + } + case tcell.KeyHome, tcell.KeyCtrlA: + home() + case tcell.KeyEnd, tcell.KeyCtrlE: + end() case tcell.KeyEnter, tcell.KeyTab, tcell.KeyBacktab, tcell.KeyEscape: // We're done. if i.done != nil { i.done(key) diff --git a/vendor/github.com/rivo/tview/list.go b/vendor/github.com/rivo/tview/list.go index 296141a8..c255b158 100644 --- a/vendor/github.com/rivo/tview/list.go +++ b/vendor/github.com/rivo/tview/list.go @@ -85,6 +85,19 @@ func (l *List) GetCurrentItem() int { return l.currentItem } +// RemoveItem removes the item with the given index (starting at 0) from the +// list. Does nothing if the index is out of range. +func (l *List) RemoveItem(index int) *List { + if index < 0 || index >= len(l.items) { + return l + } + l.items = append(l.items[:index], l.items[index+1:]...) + if l.currentItem >= len(l.items) { + l.currentItem = len(l.items) - 1 + } + return l +} + // SetMainTextColor sets the color of the items' main text. func (l *List) SetMainTextColor(color tcell.Color) *List { l.mainTextColor = color @@ -127,7 +140,7 @@ func (l *List) ShowSecondaryText(show bool) *List { // // This function is also called when the first item is added or when // SetCurrentItem() is called. -func (l *List) SetChangedFunc(handler func(int, string, string, rune)) *List { +func (l *List) SetChangedFunc(handler func(index int, mainText string, secondaryText string, shortcut rune)) *List { l.changed = handler return l } diff --git a/vendor/github.com/rivo/tview/modal.go b/vendor/github.com/rivo/tview/modal.go index 9ef7e382..c388f222 100644 --- a/vendor/github.com/rivo/tview/modal.go +++ b/vendor/github.com/rivo/tview/modal.go @@ -86,6 +86,16 @@ func (m *Modal) AddButtons(labels []string) *Modal { m.done(i, l) } }) + button := m.form.GetButton(m.form.GetButtonCount() - 1) + button.SetInputCapture(func(event *tcell.EventKey) *tcell.EventKey { + switch event.Key() { + case tcell.KeyDown, tcell.KeyRight: + return tcell.NewEventKey(tcell.KeyTab, 0, tcell.ModNone) + case tcell.KeyUp, tcell.KeyLeft: + return tcell.NewEventKey(tcell.KeyBacktab, 0, tcell.ModNone) + } + return event + }) }(index, label) } return m diff --git a/vendor/github.com/rivo/tview/table.go b/vendor/github.com/rivo/tview/table.go index 38f50069..cd0de94a 100644 --- a/vendor/github.com/rivo/tview/table.go +++ b/vendor/github.com/rivo/tview/table.go @@ -231,6 +231,10 @@ type Table struct { // The number of visible rows the last time the table was drawn. visibleRows int + // The style of the selected rows. If this value is 0, selected rows are + // simply inverted. + selectedStyle tcell.Style + // An optional function which gets called when the user presses Enter on a // selected cell. If entire rows selected, the column value is undefined. // Likewise for entire columns. @@ -276,6 +280,18 @@ func (t *Table) SetBordersColor(color tcell.Color) *Table { return t } +// SetSelectedStyle sets a specific style for selected cells. If no such style +// is set, per default, selected cells are inverted (i.e. their foreground and +// background colors are swapped). +// +// To reset a previous setting to its default, make the following call: +// +// table.SetSelectedStyle(tcell.ColorDefault, tcell.ColorDefault, 0) +func (t *Table) SetSelectedStyle(foregroundColor, backgroundColor tcell.Color, attributes tcell.AttrMask) *Table { + t.selectedStyle = tcell.StyleDefault.Foreground(foregroundColor).Background(backgroundColor) | tcell.Style(attributes) + return t +} + // SetSeparator sets the character used to fill the space between two // neighboring cells. This is a space character ' ' per default but you may // want to set it to Borders.Vertical (or any other rune) if the column @@ -743,12 +759,17 @@ ColumnLoop: } // Helper function which colors the background of a box. - colorBackground := func(fromX, fromY, w, h int, backgroundColor, textColor tcell.Color, selected bool) { + // backgroundColor == tcell.ColorDefault => Don't color the background. + // textColor == tcell.ColorDefault => Don't change the text color. + // attr == 0 => Don't change attributes. + // invert == true => Ignore attr, set text to backgroundColor or t.backgroundColor; + // set background to textColor. + colorBackground := func(fromX, fromY, w, h int, backgroundColor, textColor tcell.Color, attr tcell.AttrMask, invert bool) { for by := 0; by < h && fromY+by < y+height; by++ { for bx := 0; bx < w && fromX+bx < x+width; bx++ { m, c, style, _ := screen.GetContent(fromX+bx, fromY+by) - if selected { - fg, _, _ := style.Decompose() + fg, bg, a := style.Decompose() + if invert { if fg == textColor || fg == t.bordersColor { fg = backgroundColor } @@ -757,10 +778,16 @@ ColumnLoop: } style = style.Background(textColor).Foreground(fg) } else { - if backgroundColor == tcell.ColorDefault { - continue + if backgroundColor != tcell.ColorDefault { + bg = backgroundColor } - style = style.Background(backgroundColor) + if textColor != tcell.ColorDefault { + fg = textColor + } + if attr != 0 { + a = attr + } + style = style.Background(bg).Foreground(fg) | tcell.Style(a) } screen.SetContent(fromX+bx, fromY+by, m, c, style) } @@ -769,11 +796,12 @@ ColumnLoop: // Color the cell backgrounds. To avoid undesirable artefacts, we combine // the drawing of a cell by background color, selected cells last. - cellsByBackgroundColor := make(map[tcell.Color][]*struct { + type cellInfo struct { x, y, w, h int text tcell.Color selected bool - }) + } + cellsByBackgroundColor := make(map[tcell.Color][]*cellInfo) var backgroundColors []tcell.Color for rowY, row := range rows { columnX := 0 @@ -793,11 +821,7 @@ ColumnLoop: columnSelected := t.columnsSelectable && !t.rowsSelectable && column == t.selectedColumn cellSelected := !cell.NotSelectable && (columnSelected || rowSelected || t.rowsSelectable && t.columnsSelectable && column == t.selectedColumn && row == t.selectedRow) entries, ok := cellsByBackgroundColor[cell.BackgroundColor] - cellsByBackgroundColor[cell.BackgroundColor] = append(entries, &struct { - x, y, w, h int - text tcell.Color - selected bool - }{ + cellsByBackgroundColor[cell.BackgroundColor] = append(entries, &cellInfo{ x: bx, y: by, w: bw, @@ -821,13 +845,18 @@ ColumnLoop: _, _, lj := c.Hcl() return li < lj }) + selFg, selBg, selAttr := t.selectedStyle.Decompose() for _, bgColor := range backgroundColors { entries := cellsByBackgroundColor[bgColor] for _, cell := range entries { if cell.selected { - defer colorBackground(cell.x, cell.y, cell.w, cell.h, bgColor, cell.text, true) + if t.selectedStyle != 0 { + defer colorBackground(cell.x, cell.y, cell.w, cell.h, selBg, selFg, selAttr, false) + } else { + defer colorBackground(cell.x, cell.y, cell.w, cell.h, bgColor, cell.text, 0, true) + } } else { - colorBackground(cell.x, cell.y, cell.w, cell.h, bgColor, cell.text, false) + colorBackground(cell.x, cell.y, cell.w, cell.h, bgColor, tcell.ColorDefault, 0, false) } } } diff --git a/vendor/github.com/rivo/tview/textview.go b/vendor/github.com/rivo/tview/textview.go index ddad69d3..d3c5f5e7 100644 --- a/vendor/github.com/rivo/tview/textview.go +++ b/vendor/github.com/rivo/tview/textview.go @@ -5,7 +5,6 @@ import ( "fmt" "regexp" "sync" - "unicode" "unicode/utf8" "github.com/gdamore/tcell" @@ -549,12 +548,6 @@ func (t *TextView) reindexBuffer(width int) { strippedStr = regionPattern.ReplaceAllString(strippedStr, "") } - // Find all escape tags in this line. Escape them. - if t.dynamicColors || t.regions { - escapeIndices = escapePattern.FindAllStringIndex(str, -1) - strippedStr = escapePattern.ReplaceAllString(strippedStr, "[$1$2]") - } - // We don't need the original string anymore for now. str = strippedStr @@ -810,8 +803,9 @@ func (t *TextView) Draw(screen tcell.Screen) { colorTags [][]string escapeIndices [][]int ) + strippedText := text if t.dynamicColors { - colorTagIndices, colorTags, escapeIndices, _, _ = decomposeString(text) + colorTagIndices, colorTags, escapeIndices, strippedText, _ = decomposeString(text) } // Get regions. @@ -822,8 +816,10 @@ func (t *TextView) Draw(screen tcell.Screen) { if t.regions { regionIndices = regionPattern.FindAllStringIndex(text, -1) regions = regionPattern.FindAllStringSubmatch(text, -1) + strippedText = regionPattern.ReplaceAllString(strippedText, "") if !t.dynamicColors { escapeIndices = escapePattern.FindAllStringIndex(text, -1) + strippedText = string(escapePattern.ReplaceAllString(strippedText, "[$1$2]")) } } @@ -842,11 +838,26 @@ func (t *TextView) Draw(screen tcell.Screen) { } // Print the line. - var currentTag, currentRegion, currentEscapeTag, skipped, runeSeqWidth int - runeSequence := make([]rune, 0, 10) - flush := func() { - if len(runeSequence) == 0 { - return + var colorPos, regionPos, escapePos, tagOffset, skipped int + iterateString(strippedText, func(main rune, comb []rune, textPos, textWidth, screenPos, screenWidth int) bool { + // Get the color. + if colorPos < len(colorTags) && textPos+tagOffset >= colorTagIndices[colorPos][0] && textPos+tagOffset < colorTagIndices[colorPos][1] { + foregroundColor, backgroundColor, attributes = styleFromTag(foregroundColor, backgroundColor, attributes, colorTags[colorPos]) + tagOffset += colorTagIndices[colorPos][1] - colorTagIndices[colorPos][0] + colorPos++ + } + + // Get the region. + if regionPos < len(regionIndices) && textPos+tagOffset >= regionIndices[regionPos][0] && textPos+tagOffset < regionIndices[regionPos][1] { + regionID = regions[regionPos][1] + tagOffset += regionIndices[regionPos][1] - regionIndices[regionPos][0] + regionPos++ + } + + // Skip the second-to-last character of an escape tag. + if escapePos < len(escapeIndices) && textPos+tagOffset == escapeIndices[escapePos][1]-2 { + tagOffset++ + escapePos++ } // Mix the existing style with the new style. @@ -876,87 +887,30 @@ func (t *TextView) Draw(screen tcell.Screen) { style = style.Background(fg).Foreground(bg) } - // Draw the character. - var comb []rune - if len(runeSequence) > 1 && !unicode.IsControl(runeSequence[1]) { - // Allocate space for the combining characters only when necessary. - comb = make([]rune, len(runeSequence)-1) - copy(comb, runeSequence[1:]) - } - for offset := 0; offset < runeSeqWidth; offset++ { - screen.SetContent(x+posX+offset, y+line-t.lineOffset, runeSequence[0], comb, style) - } - - // Advance. - posX += runeSeqWidth - runeSequence = runeSequence[:0] - runeSeqWidth = 0 - } - for pos, ch := range text { - // Get the color. - if currentTag < len(colorTags) && pos >= colorTagIndices[currentTag][0] && pos < colorTagIndices[currentTag][1] { - flush() - if pos == colorTagIndices[currentTag][1]-1 { - foregroundColor, backgroundColor, attributes = styleFromTag(foregroundColor, backgroundColor, attributes, colorTags[currentTag]) - currentTag++ - } - continue - } - - // Get the region. - if currentRegion < len(regionIndices) && pos >= regionIndices[currentRegion][0] && pos < regionIndices[currentRegion][1] { - flush() - if pos == regionIndices[currentRegion][1]-1 { - regionID = regions[currentRegion][1] - currentRegion++ - } - continue - } - - // Skip the second-to-last character of an escape tag. - if currentEscapeTag < len(escapeIndices) && pos >= escapeIndices[currentEscapeTag][0] && pos < escapeIndices[currentEscapeTag][1] { - flush() - if pos == escapeIndices[currentEscapeTag][1]-1 { - currentEscapeTag++ - } else if pos == escapeIndices[currentEscapeTag][1]-2 { - continue - } - } - - // Determine the width of this rune. - chWidth := runewidth.RuneWidth(ch) - if chWidth == 0 { - // If this is not a modifier, we treat it as a space character. - if len(runeSequence) == 0 { - ch = ' ' - chWidth = 1 - } else { - runeSequence = append(runeSequence, ch) - continue - } - } - // Skip to the right. if !t.wrap && skipped < skip { - skipped += chWidth - continue + skipped += screenWidth + return false } // Stop at the right border. - if posX+runeSeqWidth+chWidth > width { - break + if posX+screenWidth >= width { + return true } - // Flush the rune sequence. - flush() + // Draw the character. + for offset := screenWidth - 1; offset >= 0; offset-- { + if offset == 0 { + screen.SetContent(x+posX+offset, y+line-t.lineOffset, main, comb, style) + } else { + screen.SetContent(x+posX+offset, y+line-t.lineOffset, ' ', nil, style) + } + } - // Queue this rune. - runeSequence = append(runeSequence, ch) - runeSeqWidth += chWidth - } - if posX+runeSeqWidth <= width { - flush() - } + // Advance. + posX += screenWidth + return false + }) } // If this view is not scrollable, we'll purge the buffer of lines that have diff --git a/vendor/github.com/rivo/tview/util.go b/vendor/github.com/rivo/tview/util.go index 44c80579..ce61d244 100644 --- a/vendor/github.com/rivo/tview/util.go +++ b/vendor/github.com/rivo/tview/util.go @@ -1,11 +1,9 @@ package tview import ( - "fmt" "math" "regexp" "strconv" - "strings" "unicode" "github.com/gdamore/tcell" @@ -25,7 +23,7 @@ var ( regionPattern = regexp.MustCompile(`\["([a-zA-Z0-9_,;: \-\.]*)"\]`) escapePattern = regexp.MustCompile(`\[([a-zA-Z0-9_,;: \-\."#]+)\[(\[*)\]`) nonEscapePattern = regexp.MustCompile(`(\[[a-zA-Z0-9_,;: \-\."#]+\[*)\]`) - boundaryPattern = regexp.MustCompile("([[:punct:]]\\s*|\\s+)") + boundaryPattern = regexp.MustCompile(`(([[:punct:]]|\n)[ \t\f\r]*|(\s+))`) spacePattern = regexp.MustCompile(`\s+`) ) @@ -203,8 +201,8 @@ func decomposeString(text string) (colorIndices [][]int, colors [][]string, esca // You can change the colors and text styles mid-text by inserting a color tag. // See the package description for details. // -// Returns the number of actual runes printed (not including color tags) and the -// actual width used for the printed runes. +// Returns the number of actual bytes of the text printed (including color tags) +// and the actual width used for the printed runes. func Print(screen tcell.Screen, text string, x, y, maxWidth, align int, color tcell.Color) (int, int) { return printWithStyle(screen, text, x, y, maxWidth, align, tcell.StyleDefault.Foreground(color)) } @@ -217,115 +215,136 @@ func printWithStyle(screen tcell.Screen, text string, x, y, maxWidth, align int, } // Decompose the text. - colorIndices, colors, escapeIndices, strippedText, _ := decomposeString(text) + colorIndices, colors, escapeIndices, strippedText, strippedWidth := decomposeString(text) - // We deal with runes, not with bytes. - runes := []rune(strippedText) - - // This helper function takes positions for a substring of "runes" and returns - // a new string corresponding to this substring, making sure printing that - // substring will observe color tags. - substring := func(from, to int) string { + // We want to reduce all alignments to AlignLeft. + if align == AlignRight { + if strippedWidth <= maxWidth { + // There's enough space for the entire text. + return printWithStyle(screen, text, x+maxWidth-strippedWidth, y, maxWidth, AlignLeft, style) + } + // Trim characters off the beginning. var ( - colorPos, escapePos, runePos, startPos int + bytes, width, colorPos, escapePos, tagOffset int foregroundColor, backgroundColor, attributes string ) - if from >= len(runes) { - return "" - } - for pos := range text { - // Handle color tags. - if colorPos < len(colorIndices) && pos >= colorIndices[colorPos][0] && pos < colorIndices[colorPos][1] { - if pos == colorIndices[colorPos][1]-1 { - if runePos <= from { - foregroundColor, backgroundColor, attributes = styleFromTag(foregroundColor, backgroundColor, attributes, colors[colorPos]) - } - colorPos++ + _, originalBackground, _ := style.Decompose() + iterateString(strippedText, func(main rune, comb []rune, textPos, textWidth, screenPos, screenWidth int) bool { + // Update color/escape tag offset and style. + if colorPos < len(colorIndices) && textPos+tagOffset >= colorIndices[colorPos][0] && textPos+tagOffset < colorIndices[colorPos][1] { + foregroundColor, backgroundColor, attributes = styleFromTag(foregroundColor, backgroundColor, attributes, colors[colorPos]) + style = overlayStyle(originalBackground, style, foregroundColor, backgroundColor, attributes) + tagOffset += colorIndices[colorPos][1] - colorIndices[colorPos][0] + colorPos++ + } + if escapePos < len(escapeIndices) && textPos+tagOffset >= escapeIndices[escapePos][0] && textPos+tagOffset < escapeIndices[escapePos][1] { + tagOffset++ + escapePos++ + } + if strippedWidth-screenPos < maxWidth { + // We chopped off enough. + if escapePos > 0 && textPos+tagOffset-1 >= escapeIndices[escapePos-1][0] && textPos+tagOffset-1 < escapeIndices[escapePos-1][1] { + // Unescape open escape sequences. + escapeCharPos := escapeIndices[escapePos-1][1] - 2 + text = text[:escapeCharPos] + text[escapeCharPos+1:] } - continue + // Print and return. + bytes, width = printWithStyle(screen, text[textPos+tagOffset:], x, y, maxWidth, AlignLeft, style) + return true } - - // Handle escape tags. - if escapePos < len(escapeIndices) && pos >= escapeIndices[escapePos][0] && pos < escapeIndices[escapePos][1] { - if pos == escapeIndices[escapePos][1]-1 { - escapePos++ - } else if pos == escapeIndices[escapePos][1]-2 { - continue - } - } - - // Check boundaries. - if runePos == from { - startPos = pos - } else if runePos >= to { - return fmt.Sprintf(`[%s:%s:%s]%s`, foregroundColor, backgroundColor, attributes, text[startPos:pos]) - } - - runePos++ - } - - return fmt.Sprintf(`[%s:%s:%s]%s`, foregroundColor, backgroundColor, attributes, text[startPos:]) - } - - // We want to reduce everything to AlignLeft. - if align == AlignRight { - width := 0 - start := len(runes) - for index := start - 1; index >= 0; index-- { - w := runewidth.RuneWidth(runes[index]) - if width+w > maxWidth { - break - } - width += w - start = index - } - for start < len(runes) && runewidth.RuneWidth(runes[start]) == 0 { - start++ - } - return printWithStyle(screen, substring(start, len(runes)), x+maxWidth-width, y, width, AlignLeft, style) + return false + }) + return bytes, width } else if align == AlignCenter { - width := runewidth.StringWidth(strippedText) - if width == maxWidth { + if strippedWidth == maxWidth { // Use the exact space. return printWithStyle(screen, text, x, y, maxWidth, AlignLeft, style) - } else if width < maxWidth { + } else if strippedWidth < maxWidth { // We have more space than we need. - half := (maxWidth - width) / 2 + half := (maxWidth - strippedWidth) / 2 return printWithStyle(screen, text, x+half, y, maxWidth-half, AlignLeft, style) } else { // Chop off runes until we have a perfect fit. var choppedLeft, choppedRight, leftIndex, rightIndex int - rightIndex = len(runes) - 1 - for rightIndex > leftIndex && width-choppedLeft-choppedRight > maxWidth { + rightIndex = len(strippedText) + for rightIndex-1 > leftIndex && strippedWidth-choppedLeft-choppedRight > maxWidth { if choppedLeft < choppedRight { - leftWidth := runewidth.RuneWidth(runes[leftIndex]) - choppedLeft += leftWidth - leftIndex++ - for leftIndex < len(runes) && leftIndex < rightIndex && runewidth.RuneWidth(runes[leftIndex]) == 0 { - leftIndex++ - } + // Iterate on the left by one character. + iterateString(strippedText[leftIndex:], func(main rune, comb []rune, textPos, textWidth, screenPos, screenWidth int) bool { + choppedLeft += screenWidth + leftIndex += textWidth + return true + }) } else { - rightWidth := runewidth.RuneWidth(runes[rightIndex]) - choppedRight += rightWidth - rightIndex-- + // Iterate on the right by one character. + iterateStringReverse(strippedText[leftIndex:rightIndex], func(main rune, comb []rune, textPos, textWidth, screenPos, screenWidth int) bool { + choppedRight += screenWidth + rightIndex -= textWidth + return true + }) } } - return printWithStyle(screen, substring(leftIndex, rightIndex), x, y, maxWidth, AlignLeft, style) + + // Add tag offsets and determine start style. + var ( + colorPos, escapePos, tagOffset int + foregroundColor, backgroundColor, attributes string + ) + _, originalBackground, _ := style.Decompose() + for index := range strippedText { + // We only need the offset of the left index. + if index > leftIndex { + // We're done. + if escapePos > 0 && leftIndex+tagOffset-1 >= escapeIndices[escapePos-1][0] && leftIndex+tagOffset-1 < escapeIndices[escapePos-1][1] { + // Unescape open escape sequences. + escapeCharPos := escapeIndices[escapePos-1][1] - 2 + text = text[:escapeCharPos] + text[escapeCharPos+1:] + } + break + } + + // Update color/escape tag offset. + if colorPos < len(colorIndices) && index+tagOffset >= colorIndices[colorPos][0] && index+tagOffset < colorIndices[colorPos][1] { + if index <= leftIndex { + foregroundColor, backgroundColor, attributes = styleFromTag(foregroundColor, backgroundColor, attributes, colors[colorPos]) + style = overlayStyle(originalBackground, style, foregroundColor, backgroundColor, attributes) + } + tagOffset += colorIndices[colorPos][1] - colorIndices[colorPos][0] + colorPos++ + } + if escapePos < len(escapeIndices) && index+tagOffset >= escapeIndices[escapePos][0] && index+tagOffset < escapeIndices[escapePos][1] { + tagOffset++ + escapePos++ + } + } + return printWithStyle(screen, text[leftIndex+tagOffset:], x, y, maxWidth, AlignLeft, style) } } // Draw text. - drawn := 0 - drawnWidth := 0 var ( - colorPos, escapePos int - foregroundColor, backgroundColor, attributes string + drawn, drawnWidth, colorPos, escapePos, tagOffset int + foregroundColor, backgroundColor, attributes string ) - runeSequence := make([]rune, 0, 10) - runeSeqWidth := 0 - flush := func() { - if len(runeSequence) == 0 { - return // Nothing to flush. + iterateString(strippedText, func(main rune, comb []rune, textPos, length, screenPos, screenWidth int) bool { + // Only continue if there is still space. + if drawnWidth+screenWidth > maxWidth { + return true + } + + // Handle color tags. + if colorPos < len(colorIndices) && textPos+tagOffset >= colorIndices[colorPos][0] && textPos+tagOffset < colorIndices[colorPos][1] { + foregroundColor, backgroundColor, attributes = styleFromTag(foregroundColor, backgroundColor, attributes, colors[colorPos]) + tagOffset += colorIndices[colorPos][1] - colorIndices[colorPos][0] + colorPos++ + } + + // Handle scape tags. + if escapePos < len(escapeIndices) && textPos+tagOffset >= escapeIndices[escapePos][0] && textPos+tagOffset < escapeIndices[escapePos][1] { + if textPos+tagOffset == escapeIndices[escapePos][1]-2 { + tagOffset++ + escapePos++ + } } // Print the rune sequence. @@ -333,69 +352,23 @@ func printWithStyle(screen tcell.Screen, text string, x, y, maxWidth, align int, _, _, finalStyle, _ := screen.GetContent(finalX, y) _, background, _ := finalStyle.Decompose() finalStyle = overlayStyle(background, style, foregroundColor, backgroundColor, attributes) - var comb []rune - if len(runeSequence) > 1 && !unicode.IsControl(runeSequence[1]) { - // Allocate space for the combining characters only when necessary. - comb = make([]rune, len(runeSequence)-1) - copy(comb, runeSequence[1:]) - } - for offset := 0; offset < runeSeqWidth; offset++ { - // To avoid undesired effects, we place the same character in all cells. - screen.SetContent(finalX+offset, y, runeSequence[0], comb, finalStyle) - } - - // Advance and reset. - drawn += len(runeSequence) - drawnWidth += runeSeqWidth - runeSequence = runeSequence[:0] - runeSeqWidth = 0 - } - for pos, ch := range text { - // Handle color tags. - if colorPos < len(colorIndices) && pos >= colorIndices[colorPos][0] && pos < colorIndices[colorPos][1] { - flush() - if pos == colorIndices[colorPos][1]-1 { - foregroundColor, backgroundColor, attributes = styleFromTag(foregroundColor, backgroundColor, attributes, colors[colorPos]) - colorPos++ - } - continue - } - - // Handle escape tags. - if escapePos < len(escapeIndices) && pos >= escapeIndices[escapePos][0] && pos < escapeIndices[escapePos][1] { - flush() - if pos == escapeIndices[escapePos][1]-1 { - escapePos++ - } else if pos == escapeIndices[escapePos][1]-2 { - continue + for offset := screenWidth - 1; offset >= 0; offset-- { + // To avoid undesired effects, we populate all cells. + if offset == 0 { + screen.SetContent(finalX+offset, y, main, comb, finalStyle) + } else { + screen.SetContent(finalX+offset, y, ' ', nil, finalStyle) } } - // Check if we have enough space for this rune. - chWidth := runewidth.RuneWidth(ch) - if drawnWidth+chWidth > maxWidth { - break // No. We're done then. - } + // Advance. + drawn += length + drawnWidth += screenWidth - // Put this rune in the queue. - if chWidth == 0 { - // If this is not a modifier, we treat it as a space character. - if len(runeSequence) == 0 { - ch = ' ' - chWidth = 1 - } - } else { - // We have a character. Flush all previous runes. - flush() - } - runeSequence = append(runeSequence, ch) - runeSeqWidth += chWidth - } - if drawnWidth+runeSeqWidth <= maxWidth { - flush() - } + return false + }) - return drawn, drawnWidth + return drawn + tagOffset + len(escapeIndices), drawnWidth } // PrintSimple prints white text to the screen at the given position. @@ -421,102 +394,83 @@ func WordWrap(text string, width int) (lines []string) { colorTagIndices, _, escapeIndices, strippedText, _ := decomposeString(text) // Find candidate breakpoints. - breakPoints := boundaryPattern.FindAllStringIndex(strippedText, -1) + breakpoints := boundaryPattern.FindAllStringSubmatchIndex(strippedText, -1) + // Results in one entry for each candidate. Each entry is an array a of + // indices into strippedText where a[6] < 0 for newline/punctuation matches + // and a[4] < 0 for whitespace matches. - // This helper function adds a new line to the result slice. The provided - // positions are in stripped index space. - addLine := func(from, to int) { - // Shift indices back to original index space. - var colorTagIndex, escapeIndex int - for colorTagIndex < len(colorTagIndices) && to >= colorTagIndices[colorTagIndex][0] || - escapeIndex < len(escapeIndices) && to >= escapeIndices[escapeIndex][0] { - past := 0 - if colorTagIndex < len(colorTagIndices) { - tagWidth := colorTagIndices[colorTagIndex][1] - colorTagIndices[colorTagIndex][0] - if colorTagIndices[colorTagIndex][0] < from { - from += tagWidth - to += tagWidth - colorTagIndex++ - } else if colorTagIndices[colorTagIndex][0] < to { - to += tagWidth - colorTagIndex++ - } else { - past++ - } - } else { - past++ - } - if escapeIndex < len(escapeIndices) { - tagWidth := escapeIndices[escapeIndex][1] - escapeIndices[escapeIndex][0] - if escapeIndices[escapeIndex][0] < from { - from += tagWidth - to += tagWidth - escapeIndex++ - } else if escapeIndices[escapeIndex][0] < to { - to += tagWidth - escapeIndex++ - } else { - past++ - } - } else { - past++ - } - if past == 2 { - break // All other indices are beyond the requested string. + // Process stripped text one character at a time. + var ( + colorPos, escapePos, breakpointPos, tagOffset int + lastBreakpoint, lastContinuation, currentLineStart int + lineWidth, continuationWidth int + newlineBreakpoint bool + ) + unescape := func(substr string, startIndex int) string { + // A helper function to unescape escaped tags. + for index := escapePos; index >= 0; index-- { + if index < len(escapeIndices) && startIndex > escapeIndices[index][0] && startIndex < escapeIndices[index][1]-1 { + pos := escapeIndices[index][1] - 2 - startIndex + return substr[:pos] + substr[pos+1:] } } - lines = append(lines, text[from:to]) + return substr } - - // Determine final breakpoints. - var start, lastEnd, newStart, breakPoint int - for { - // What's our candidate string? - var candidate string - if breakPoint < len(breakPoints) { - candidate = text[start:breakPoints[breakPoint][1]] - } else { - candidate = text[start:] + iterateString(strippedText, func(main rune, comb []rune, textPos, textWidth, screenPos, screenWidth int) bool { + // Handle colour tags. + if colorPos < len(colorTagIndices) && textPos+tagOffset >= colorTagIndices[colorPos][0] && textPos+tagOffset < colorTagIndices[colorPos][1] { + tagOffset += colorTagIndices[colorPos][1] - colorTagIndices[colorPos][0] + colorPos++ } - candidate = strings.TrimRightFunc(candidate, unicode.IsSpace) - if runewidth.StringWidth(candidate) >= width { - // We're past the available width. - if lastEnd > start { - // Use the previous candidate. - addLine(start, lastEnd) - start = newStart - } else { - // We have no previous candidate. Make a hard break. - var lineWidth int - for index, ch := range text { - if index < start { - continue - } - chWidth := runewidth.RuneWidth(ch) - if lineWidth > 0 && lineWidth+chWidth >= width { - addLine(start, index) - start = index - break - } - lineWidth += chWidth - } - } - } else { - // We haven't hit the right border yet. - if breakPoint >= len(breakPoints) { - // It's the last line. We're done. - if len(candidate) > 0 { - addLine(start, len(strippedText)) - } - break - } else { - // We have a new candidate. - lastEnd = start + len(candidate) - newStart = breakPoints[breakPoint][1] - breakPoint++ - } + // Handle escape tags. + if escapePos < len(escapeIndices) && textPos+tagOffset == escapeIndices[escapePos][1]-2 { + tagOffset++ + escapePos++ } + + // Check if a break is warranted. + afterContinuation := lastContinuation > 0 && textPos+tagOffset >= lastContinuation + noBreakpoint := lastContinuation == 0 + beyondWidth := lineWidth > 0 && lineWidth > width + if beyondWidth && noBreakpoint { + // We need a hard break without a breakpoint. + lines = append(lines, unescape(text[currentLineStart:textPos+tagOffset], currentLineStart)) + currentLineStart = textPos + tagOffset + lineWidth = continuationWidth + } else if afterContinuation && (beyondWidth || newlineBreakpoint) { + // Break at last breakpoint or at newline. + lines = append(lines, unescape(text[currentLineStart:lastBreakpoint], currentLineStart)) + currentLineStart = lastContinuation + lineWidth = continuationWidth + lastBreakpoint, lastContinuation, newlineBreakpoint = 0, 0, false + } + + // Is this a breakpoint? + if breakpointPos < len(breakpoints) && textPos == breakpoints[breakpointPos][0] { + // Yes, it is. Set up breakpoint infos depending on its type. + lastBreakpoint = breakpoints[breakpointPos][0] + tagOffset + lastContinuation = breakpoints[breakpointPos][1] + tagOffset + newlineBreakpoint = main == '\n' + if breakpoints[breakpointPos][6] < 0 && !newlineBreakpoint { + lastBreakpoint++ // Don't skip punctuation. + } + breakpointPos++ + } + + // Once we hit the continuation point, we start buffering widths. + if textPos+tagOffset < lastContinuation { + continuationWidth = 0 + } + + lineWidth += screenWidth + continuationWidth += screenWidth + return false + }) + + // Flush the rest. + if currentLineStart < len(text) { + lines = append(lines, unescape(text[currentLineStart:], currentLineStart)) } return @@ -531,3 +485,121 @@ func WordWrap(text string, width int) (lines []string) { func Escape(text string) string { return nonEscapePattern.ReplaceAllString(text, "$1[]") } + +// iterateString iterates through the given string one printed character at a +// time. For each such character, the callback function is called with the +// Unicode code points of the character (the first rune and any combining runes +// which may be nil if there aren't any), the starting position (in bytes) +// within the original string, its length in bytes, the screen position of the +// character, and the screen width of it. The iteration stops if the callback +// returns true. This function returns true if the iteration was stopped before +// the last character. +func iterateString(text string, callback func(main rune, comb []rune, textPos, textWidth, screenPos, screenWidth int) bool) bool { + var ( + runes []rune + lastZeroWidthJoiner bool + startIndex int + startPos int + pos int + ) + + // Helper function which invokes the callback. + flush := func(index int) bool { + var comb []rune + if len(runes) > 1 { + comb = runes[1:] + } + return callback(runes[0], comb, startIndex, index-startIndex, startPos, pos-startPos) + } + + for index, r := range text { + if unicode.In(r, unicode.Lm, unicode.M) || r == '\u200d' { + lastZeroWidthJoiner = r == '\u200d' + } else { + // We have a rune that's not a modifier. It could be the beginning of a + // new character. + if !lastZeroWidthJoiner { + if len(runes) > 0 { + // It is. Invoke callback. + if flush(index) { + return true // We're done. + } + // Reset rune store. + runes = runes[:0] + startIndex = index + startPos = pos + } + pos += runewidth.RuneWidth(r) + } else { + lastZeroWidthJoiner = false + } + } + runes = append(runes, r) + } + + // Flush any remaining runes. + if len(runes) > 0 { + flush(len(text)) + } + + return false +} + +// iterateStringReverse iterates through the given string in reverse, starting +// from the end of the string, one printed character at a time. For each such +// character, the callback function is called with the Unicode code points of +// the character (the first rune and any combining runes which may be nil if +// there aren't any), the starting position (in bytes) within the original +// string, its length in bytes, the screen position of the character, and the +// screen width of it. The iteration stops if the callback returns true. This +// function returns true if the iteration was stopped before the last character. +func iterateStringReverse(text string, callback func(main rune, comb []rune, textPos, textWidth, screenPos, screenWidth int) bool) bool { + type runePos struct { + r rune + pos int // The byte position of the rune in the original string. + width int // The screen width of the rune. + mod bool // Modifier or zero-width-joiner. + } + + // We use the following: + // len(text) >= number of runes in text. + + // Put all runes into a runePos slice in reverse. + runesReverse := make([]runePos, len(text)) + index := len(text) - 1 + for pos, ch := range text { + runesReverse[index].r = ch + runesReverse[index].pos = pos + runesReverse[index].width = runewidth.RuneWidth(ch) + runesReverse[index].mod = unicode.In(ch, unicode.Lm, unicode.M) || ch == '\u200d' + index-- + } + runesReverse = runesReverse[index+1:] + + // Parse reverse runes. + var screenWidth int + buffer := make([]rune, len(text)) // We fill this up from the back so it's forward again. + bufferPos := len(text) + stringWidth := runewidth.StringWidth(text) + for index, r := range runesReverse { + // Put this rune into the buffer. + bufferPos-- + buffer[bufferPos] = r.r + + // Do we need to flush the buffer? + if r.pos == 0 || !r.mod && runesReverse[index+1].r != '\u200d' { + // Yes, invoke callback. + var comb []rune + if len(text)-bufferPos > 1 { + comb = buffer[bufferPos+1:] + } + if callback(r.r, comb, r.pos, len(text)-r.pos, stringWidth-screenWidth, r.width) { + return true + } + screenWidth += r.width + bufferPos = len(text) + } + } + + return false +} diff --git a/vendor/github.com/sticreations/spotigopher/LICENCE.md b/vendor/github.com/sticreations/spotigopher/LICENCE.md new file mode 100644 index 00000000..61d18602 --- /dev/null +++ b/vendor/github.com/sticreations/spotigopher/LICENCE.md @@ -0,0 +1,674 @@ +GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. \ No newline at end of file diff --git a/vendor/github.com/sticreations/spotigopher/spotigopher/spotigopher.go b/vendor/github.com/sticreations/spotigopher/spotigopher/spotigopher.go index 37da1b2f..4e999ee4 100644 --- a/vendor/github.com/sticreations/spotigopher/spotigopher/spotigopher.go +++ b/vendor/github.com/sticreations/spotigopher/spotigopher/spotigopher.go @@ -3,6 +3,10 @@ package spotigopher import ( "errors" "log" + "os/exec" + "runtime" + "strconv" + "strings" "github.com/godbus/dbus" ) @@ -51,29 +55,44 @@ func getSpotifyBus() dbus.BusObject { PlayPause sends a PlayPause Command on the DBus */ func (s *SpotifyClient) PlayPause() { - sendAction("org.mpris.MediaPlayer2.Player.PlayPause") + if runtime.GOOS == "darwin" { + sendDarwinAction("playpause") + } else { + sendAction("org.mpris.MediaPlayer2.Player.PlayPause") + } } /* Next sends a Next Command on the DBus */ func (s *SpotifyClient) Next() { - sendAction("org.mpris.MediaPlayer2.Player.Next") + if runtime.GOOS == "darwin" { + sendDarwinAction("next") + } else { + sendAction("org.mpris.MediaPlayer2.Player.Next") + } } /* Previous sends a Previous Command on the DBus */ func (s *SpotifyClient) Previous() { - sendAction("org.mpris.MediaPlayer2.Player.Previous") + if runtime.GOOS == "darwin" { + sendDarwinAction("previous") + } else { + sendAction("org.mpris.MediaPlayer2.Player.Previous") + } } /* Stop sends a Stop Command on the DBus */ func (s *SpotifyClient) Stop() { - sendAction("org.mpris.MediaPlayer2.Player.Stop") - + if runtime.GOOS == "darwin" { + sendDarwinAction("stop") + } else { + sendAction("org.mpris.MediaPlayer2.Player.Stop") + } } /* @@ -82,29 +101,97 @@ GetInfo returns all Spotify related Information, when Spotify is running func (s *SpotifyClient) GetInfo() (Info, error) { info := Info{} - spotifyBus := getSpotifyBus() - props, err := spotifyBus.GetProperty("org.mpris.MediaPlayer2.Player.Metadata") - if err != nil { - return Info{}, errors.New("Could not get any Info from Spotify. Are you sure Spotify is running?") - } - songData := props.Value().(map[string]dbus.Variant) - info.TrackID = songData["mpris:trackid"].Value().(string) - info.Artist = songData["xesam:artist"].Value().([]string) - info.Title = songData["xesam:title"].Value().(string) - info.Album = songData["xesam:album"].Value().(string) - info.TrackNumber = songData["xesam:trackNumber"].Value().(int32) - info.URL = songData["xesam:url"].Value().(string) - info.ArtworkURL = songData["mpris:artUrl"].Value().(string) + if runtime.GOOS == "linux" { + spotifyBus := getSpotifyBus() + props, err := spotifyBus.GetProperty("org.mpris.MediaPlayer2.Player.Metadata") + if err != nil { + return Info{}, errors.New("Could not get any Info from Spotify. Are you sure Spotify is running?") + } + songData := props.Value().(map[string]dbus.Variant) + info.TrackID = songData["mpris:trackid"].Value().(string) + info.Artist = songData["xesam:artist"].Value().([]string) + info.Title = songData["xesam:title"].Value().(string) + info.Album = songData["xesam:album"].Value().(string) + info.TrackNumber = songData["xesam:trackNumber"].Value().(int32) + info.URL = songData["xesam:url"].Value().(string) + info.ArtworkURL = songData["mpris:artUrl"].Value().(string) - status, err := spotifyBus.GetProperty("org.mpris.MediaPlayer2.Player.PlaybackStatus") - if err != nil { - log.Fatalf("Could not get Playback Status : %v", err) + status, err := spotifyBus.GetProperty("org.mpris.MediaPlayer2.Player.PlaybackStatus") + if err != nil { + log.Fatalf("Could not get Playback Status : %v", err) + } + info.Status = status.Value().(string) + } else if runtime.GOOS == "darwin" { + info.TrackID = getDarwinInfo("trackid") + info.Artist = strings.Split(getDarwinInfo("artist"), ",") + info.Album = getDarwinInfo("album") + info.Title = getDarwinInfo("track") + tmpTrackNumber, err := strconv.ParseInt(getDarwinInfo("tracknumber"), 0, 32) + if err != nil { + log.Fatalf("Could not get track number: %s", err) + } + info.TrackNumber = int32(tmpTrackNumber) + info.URL = getDarwinInfo("url") + info.ArtworkURL = getDarwinInfo("artworkurl") + info.Status = getDarwinInfo("status") } - info.Status = status.Value().(string) return info, nil } +func getDarwinInfo(infoType string) string { + args := []string{`-etell application "Spotify" to name of current track as string`} + switch infoType { + case "trackid": + args = []string{`-etell application "Spotify" to id of current track as string`} + case "artist": + args = []string{`-etell application "Spotify" to artist of current track as string`} + case "title": + args = []string{`-etell application "Spotify" to name of current track as string`} + case "album": + args = []string{`-etell application "Spotify" to album of current track as string`} + case "tracknumber": + args = []string{`-etell application "Spotify" to track number of current track as string`} + case "url": + args = []string{`-etell application "Spotify" to spotify url of current track as string`} + case "artworkurl": + args = []string{`-etell application "Spotify" to artwork url of current track as string`} + case "status": + args = []string{`-etell application "Spotify" to player state as string`} + default: + args = []string{`-etell application "Spotify" to name of current track as string`} + } + info, err := exec.Command("osascript", args...).Output() + if err != nil { + log.Fatalf("Could not get info: %s", infoType) + } + return strings.Trim(string(info), "\n") +} + +func sendDarwinAction(action string) { + args := []string{`-etell application "Spotify" to pause`} + switch action { + case "play": + args = []string{`-etell application "Spotify" to play`} + case "pause": + args = []string{`-etell application "Spotify" to pause`} + case "stop": + args = []string{`-etell application "Spotify" to pause`} + case "playpause": + args = []string{`-etell application "Spotify" to playpause`} + case "next": + args = []string{`-etell application "Spotify" to next track`} + case "previous": + args = []string{`-etell application "Spotify" to previous track`} + default: + args = []string{`-etell application "Spotify" to pause`} + } + err := exec.Command("osascript", args...).Run() + if err != nil { + log.Fatalf("Could not completed action: %s", action) + } +} + func sendAction(method string) error { sdbus := getSpotifyBus() call := sdbus.Call(method, 0) diff --git a/vendor/github.com/xanzy/go-gitlab/.travis.yml b/vendor/github.com/xanzy/go-gitlab/.travis.yml index 26203291..09075b6d 100644 --- a/vendor/github.com/xanzy/go-gitlab/.travis.yml +++ b/vendor/github.com/xanzy/go-gitlab/.travis.yml @@ -1,9 +1,9 @@ language: go go: - - 1.8.x - 1.9.x - 1.10.x + - 1.11.x - master stages: @@ -14,7 +14,7 @@ jobs: include: - stage: lint script: - - go get github.com/golang/lint/golint + - go get golang.org/x/lint/golint - golint -set_exit_status - go vet -v - stage: test diff --git a/vendor/github.com/xanzy/go-gitlab/README.md b/vendor/github.com/xanzy/go-gitlab/README.md index da749949..dc918d3b 100644 --- a/vendor/github.com/xanzy/go-gitlab/README.md +++ b/vendor/github.com/xanzy/go-gitlab/README.md @@ -26,7 +26,7 @@ to add new and/or missing endpoints. Currently the following services are suppor - [x] Project-level Variables - [x] Group-level Variables - [x] Commits -- [ ] Custom Attributes +- [x] Custom Attributes - [x] Deployments - [x] Deploy Keys - [x] Environments @@ -36,13 +36,13 @@ to add new and/or missing endpoints. Currently the following services are suppor - [x] Feature flags - [ ] Geo Nodes - [x] Gitignores templates -- [ ] GitLab CI Config templates +- [x] GitLab CI Config templates - [x] Groups -- [ ] Group Access Requests +- [x] Group Access Requests - [x] Group Members - [x] Issues - [x] Issue Boards -- [x] Group Issue Boards +- [x] Group Issue Boards - [x] Jobs - [x] Keys - [x] Labels @@ -50,19 +50,19 @@ to add new and/or missing endpoints. Currently the following services are suppor - [x] Merge Requests - [x] Merge Request Approvals - [x] Project Milestones -- [ ] Group Milestones +- [x] Group Milestones - [x] Namespaces - [x] Notes (comments) - [ ] Discussions (threaded comments) - [x] Notification settings -- [ ] Open source license templates +- [x] Open source license templates - [x] Pages Domains - [x] Pipelines - [x] Pipeline Triggers - [x] Pipeline Schedules - [x] Projects (including setting Webhooks) -- [ ] Project Access Requests -- [ ] Project badges +- [x] Project Access Requests +- [x] Project badges - [ ] Project import/export - [x] Project Members - [x] Project Snippets @@ -70,11 +70,10 @@ to add new and/or missing endpoints. Currently the following services are suppor - [x] Repositories - [x] Repository Files - [x] Runners -- [ ] Search +- [x] Search - [x] Services - [x] Settings - [x] Sidekiq metrics -- [x] Session - [x] System Hooks - [x] Tags - [x] Todos @@ -150,7 +149,6 @@ func main() { log.Fatal(err) } } - ``` For complete usage of go-gitlab, see the full [package docs](https://godoc.org/github.com/xanzy/go-gitlab). diff --git a/vendor/github.com/xanzy/go-gitlab/access_requests.go b/vendor/github.com/xanzy/go-gitlab/access_requests.go new file mode 100644 index 00000000..609af9d9 --- /dev/null +++ b/vendor/github.com/xanzy/go-gitlab/access_requests.go @@ -0,0 +1,237 @@ +package gitlab + +import ( + "fmt" + "net/url" + "time" +) + +// AccessRequest represents a access request for a group or project. +// +// GitLab API docs: +// https://docs.gitlab.com/ce/api/access_requests.html +type AccessRequest struct { + ID int `json:"id"` + Username string `json:"username"` + Name string `json:"name"` + State string `json:"state"` + CreatedAt *time.Time `json:"created_at"` + RequestedAt *time.Time `json:"requested_at"` + AccessLevel AccessLevelValue `json:"access_level"` +} + +// AccessRequestsService handles communication with the project/group +// access requests related methods of the GitLab API. +// +// GitLab API docs: https://docs.gitlab.com/ce/api/access_requests.html +type AccessRequestsService struct { + client *Client +} + +// ListAccessRequestsOptions represents the available +// ListProjectAccessRequests() or ListGroupAccessRequests() options. +// +// GitLab API docs: +// https://docs.gitlab.com/ce/api/access_requests.html#list-access-requests-for-a-group-or-project +type ListAccessRequestsOptions ListOptions + +// ListProjectAccessRequests gets a list of access requests +// viewable by the authenticated user. +// +// GitLab API docs: +// https://docs.gitlab.com/ce/api/access_requests.html#list-access-requests-for-a-group-or-project +func (s *AccessRequestsService) ListProjectAccessRequests(pid interface{}, opt *ListAccessRequestsOptions, options ...OptionFunc) ([]*AccessRequest, *Response, error) { + project, err := parseID(pid) + if err != nil { + return nil, nil, err + } + u := fmt.Sprintf("projects/%s/access_requests", url.QueryEscape(project)) + + req, err := s.client.NewRequest("GET", u, opt, options) + if err != nil { + return nil, nil, err + } + + var ars []*AccessRequest + resp, err := s.client.Do(req, &ars) + if err != nil { + return nil, resp, err + } + + return ars, resp, err +} + +// ListGroupAccessRequests gets a list of access requests +// viewable by the authenticated user. +// +// GitLab API docs: +// https://docs.gitlab.com/ce/api/access_requests.html#list-access-requests-for-a-group-or-project +func (s *AccessRequestsService) ListGroupAccessRequests(gid interface{}, opt *ListAccessRequestsOptions, options ...OptionFunc) ([]*AccessRequest, *Response, error) { + group, err := parseID(gid) + if err != nil { + return nil, nil, err + } + u := fmt.Sprintf("groups/%s/access_requests", url.QueryEscape(group)) + + req, err := s.client.NewRequest("GET", u, opt, options) + if err != nil { + return nil, nil, err + } + + var ars []*AccessRequest + resp, err := s.client.Do(req, &ars) + if err != nil { + return nil, resp, err + } + + return ars, resp, err +} + +// RequestProjectAccess requests access for the authenticated user +// to a group or project. +// +// GitLab API docs: +// https://docs.gitlab.com/ce/api/access_requests.html#request-access-to-a-group-or-project +func (s *AccessRequestsService) RequestProjectAccess(pid interface{}, options ...OptionFunc) (*AccessRequest, *Response, error) { + project, err := parseID(pid) + if err != nil { + return nil, nil, err + } + u := fmt.Sprintf("projects/%s/access_requests", url.QueryEscape(project)) + + req, err := s.client.NewRequest("POST", u, nil, options) + if err != nil { + return nil, nil, err + } + + ar := new(AccessRequest) + resp, err := s.client.Do(req, ar) + if err != nil { + return nil, resp, err + } + + return ar, resp, err +} + +// RequestGroupAccess requests access for the authenticated user +// to a group or project. +// +// GitLab API docs: +// https://docs.gitlab.com/ce/api/access_requests.html#request-access-to-a-group-or-project +func (s *AccessRequestsService) RequestGroupAccess(gid interface{}, options ...OptionFunc) (*AccessRequest, *Response, error) { + group, err := parseID(gid) + if err != nil { + return nil, nil, err + } + u := fmt.Sprintf("groups/%s/access_requests", url.QueryEscape(group)) + + req, err := s.client.NewRequest("POST", u, nil, options) + if err != nil { + return nil, nil, err + } + + ar := new(AccessRequest) + resp, err := s.client.Do(req, ar) + if err != nil { + return nil, resp, err + } + + return ar, resp, err +} + +// ApproveAccessRequestOptions represents the available +// ApproveProjectAccessRequest() and ApproveGroupAccessRequest() options. +// +// GitLab API docs: +// https://docs.gitlab.com/ce/api/access_requests.html#approve-an-access-request +type ApproveAccessRequestOptions struct { + AccessLevel *AccessLevelValue `url:"access_level,omitempty" json:"access_level,omitempty"` +} + +// ApproveProjectAccessRequest approves an access request for the given user. +// +// GitLab API docs: +// https://docs.gitlab.com/ce/api/access_requests.html#approve-an-access-request +func (s *AccessRequestsService) ApproveProjectAccessRequest(pid interface{}, user int, opt *ApproveAccessRequestOptions, options ...OptionFunc) (*AccessRequest, *Response, error) { + project, err := parseID(pid) + if err != nil { + return nil, nil, err + } + u := fmt.Sprintf("projects/%s/access_requests/%d/approve", url.QueryEscape(project), user) + + req, err := s.client.NewRequest("PUT", u, opt, options) + if err != nil { + return nil, nil, err + } + + ar := new(AccessRequest) + resp, err := s.client.Do(req, ar) + if err != nil { + return nil, resp, err + } + + return ar, resp, err +} + +// ApproveGroupAccessRequest approves an access request for the given user. +// +// GitLab API docs: +// https://docs.gitlab.com/ce/api/access_requests.html#approve-an-access-request +func (s *AccessRequestsService) ApproveGroupAccessRequest(gid interface{}, user int, opt *ApproveAccessRequestOptions, options ...OptionFunc) (*AccessRequest, *Response, error) { + group, err := parseID(gid) + if err != nil { + return nil, nil, err + } + u := fmt.Sprintf("groups/%s/access_requests/%d/approve", url.QueryEscape(group), user) + + req, err := s.client.NewRequest("PUT", u, opt, options) + if err != nil { + return nil, nil, err + } + + ar := new(AccessRequest) + resp, err := s.client.Do(req, ar) + if err != nil { + return nil, resp, err + } + + return ar, resp, err +} + +// DenyProjectAccessRequest denies an access request for the given user. +// +// GitLab API docs: +// https://docs.gitlab.com/ce/api/access_requests.html#deny-an-access-request +func (s *AccessRequestsService) DenyProjectAccessRequest(pid interface{}, user int, options ...OptionFunc) (*Response, error) { + project, err := parseID(pid) + if err != nil { + return nil, err + } + u := fmt.Sprintf("projects/%s/access_requests/%d", url.QueryEscape(project), user) + + req, err := s.client.NewRequest("DELETE", u, nil, options) + if err != nil { + return nil, err + } + + return s.client.Do(req, nil) +} + +// DenyGroupAccessRequest denies an access request for the given user. +// +// GitLab API docs: +// https://docs.gitlab.com/ce/api/access_requests.html#deny-an-access-request +func (s *AccessRequestsService) DenyGroupAccessRequest(gid interface{}, user int, options ...OptionFunc) (*Response, error) { + group, err := parseID(gid) + if err != nil { + return nil, err + } + u := fmt.Sprintf("groups/%s/access_requests/%d", url.QueryEscape(group), user) + + req, err := s.client.NewRequest("DELETE", u, nil, options) + if err != nil { + return nil, err + } + + return s.client.Do(req, nil) +} diff --git a/vendor/github.com/xanzy/go-gitlab/ci_yml_templates.go b/vendor/github.com/xanzy/go-gitlab/ci_yml_templates.go new file mode 100644 index 00000000..abd85662 --- /dev/null +++ b/vendor/github.com/xanzy/go-gitlab/ci_yml_templates.go @@ -0,0 +1,70 @@ +package gitlab + +import ( + "fmt" + "net/url" +) + +// CIYMLTemplatesService handles communication with the gitlab +// CI YML templates related methods of the GitLab API. +// +// GitLab API docs: +// https://docs.gitlab.com/ce/api/templates/gitlab_ci_ymls.html +type CIYMLTemplatesService struct { + client *Client +} + +// CIYMLTemplate represents a GitLab CI YML template. +// +// GitLab API docs: +// https://docs.gitlab.com/ce/api/templates/gitlab_ci_ymls.html +type CIYMLTemplate struct { + Name string `json:"name"` + Content string `json:"content"` +} + +// ListCIYMLTemplatesOptions represents the available ListAllTemplates() options. +// +// GitLab API docs: +// https://docs.gitlab.com/ce/api/templates/gitignores.html#list-gitignore-templates +type ListCIYMLTemplatesOptions ListOptions + +// ListAllTemplates get all GitLab CI YML templates. +// +// GitLab API docs: +// https://docs.gitlab.com/ce/api/templates/gitlab_ci_ymls.html#list-gitlab-ci-yml-templates +func (s *CIYMLTemplatesService) ListAllTemplates(opt *ListCIYMLTemplatesOptions, options ...OptionFunc) ([]*CIYMLTemplate, *Response, error) { + req, err := s.client.NewRequest("GET", "templates/gitlab_ci_ymls", opt, options) + if err != nil { + return nil, nil, err + } + + var cts []*CIYMLTemplate + resp, err := s.client.Do(req, &cts) + if err != nil { + return nil, resp, err + } + + return cts, resp, err +} + +// GetTemplate get a single GitLab CI YML template. +// +// GitLab API docs: +// https://docs.gitlab.com/ce/api/templates/gitlab_ci_ymls.html#single-gitlab-ci-yml-template +func (s *CIYMLTemplatesService) GetTemplate(key string, options ...OptionFunc) (*CIYMLTemplate, *Response, error) { + u := fmt.Sprintf("templates/gitlab_ci_ymls/%s", url.QueryEscape(key)) + + req, err := s.client.NewRequest("GET", u, nil, options) + if err != nil { + return nil, nil, err + } + + ct := new(CIYMLTemplate) + resp, err := s.client.Do(req, ct) + if err != nil { + return nil, resp, err + } + + return ct, resp, err +} diff --git a/vendor/github.com/xanzy/go-gitlab/custom_attributes.go b/vendor/github.com/xanzy/go-gitlab/custom_attributes.go new file mode 100644 index 00000000..ce165c80 --- /dev/null +++ b/vendor/github.com/xanzy/go-gitlab/custom_attributes.go @@ -0,0 +1,171 @@ +package gitlab + +import ( + "fmt" +) + +// CustomAttributesService handles communication with the group, project and +// user custom attributes related methods of the GitLab API. +// +// GitLab API docs: https://docs.gitlab.com/ce/api/custom_attributes.html +type CustomAttributesService struct { + client *Client +} + +// CustomAttribute struct is used to unmarshal response to api calls. +// +// GitLab API docs: https://docs.gitlab.com/ce/api/custom_attributes.html +type CustomAttribute struct { + Key string `json:"key"` + Value string `json:"value"` +} + +// ListCustomUserAttributes lists the custom attributes of the specified user. +// +// GitLab API docs: +// https://docs.gitlab.com/ce/api/custom_attributes.html#list-custom-attributes +func (s *CustomAttributesService) ListCustomUserAttributes(user int, options ...OptionFunc) ([]*CustomAttribute, *Response, error) { + return s.listCustomAttributes("users", user, options...) +} + +// ListCustomGroupAttributes lists the custom attributes of the specified group. +// +// GitLab API docs: +// https://docs.gitlab.com/ce/api/custom_attributes.html#list-custom-attributes +func (s *CustomAttributesService) ListCustomGroupAttributes(group int, options ...OptionFunc) ([]*CustomAttribute, *Response, error) { + return s.listCustomAttributes("groups", group, options...) +} + +// ListCustomProjectAttributes lists the custom attributes of the specified project. +// +// GitLab API docs: +// https://docs.gitlab.com/ce/api/custom_attributes.html#list-custom-attributes +func (s *CustomAttributesService) ListCustomProjectAttributes(project int, options ...OptionFunc) ([]*CustomAttribute, *Response, error) { + return s.listCustomAttributes("projects", project, options...) +} + +func (s *CustomAttributesService) listCustomAttributes(resource string, id int, options ...OptionFunc) ([]*CustomAttribute, *Response, error) { + u := fmt.Sprintf("%s/%d/custom_attributes", resource, id) + req, err := s.client.NewRequest("GET", u, nil, options) + if err != nil { + return nil, nil, err + } + + var cas []*CustomAttribute + resp, err := s.client.Do(req, &cas) + if err != nil { + return nil, resp, err + } + return cas, resp, err +} + +// GetCustomUserAttribute returns the user attribute with a speciifc key. +// +// GitLab API docs: +// https://docs.gitlab.com/ce/api/custom_attributes.html#single-custom-attribute +func (s *CustomAttributesService) GetCustomUserAttribute(user int, key string, options ...OptionFunc) (*CustomAttribute, *Response, error) { + return s.getCustomAttribute("users", user, key, options...) +} + +// GetCustomGroupAttribute returns the group attribute with a speciifc key. +// +// GitLab API docs: +// https://docs.gitlab.com/ce/api/custom_attributes.html#single-custom-attribute +func (s *CustomAttributesService) GetCustomGroupAttribute(group int, key string, options ...OptionFunc) (*CustomAttribute, *Response, error) { + return s.getCustomAttribute("groups", group, key, options...) +} + +// GetCustomProjectAttribute returns the project attribute with a speciifc key. +// +// GitLab API docs: +// https://docs.gitlab.com/ce/api/custom_attributes.html#single-custom-attribute +func (s *CustomAttributesService) GetCustomProjectAttribute(project int, key string, options ...OptionFunc) (*CustomAttribute, *Response, error) { + return s.getCustomAttribute("projects", project, key, options...) +} + +func (s *CustomAttributesService) getCustomAttribute(resource string, id int, key string, options ...OptionFunc) (*CustomAttribute, *Response, error) { + u := fmt.Sprintf("%s/%d/custom_attributes/%s", resource, id, key) + req, err := s.client.NewRequest("GET", u, nil, options) + if err != nil { + return nil, nil, err + } + + var ca *CustomAttribute + resp, err := s.client.Do(req, &ca) + if err != nil { + return nil, resp, err + } + return ca, resp, err +} + +// SetCustomUserAttribute sets the custom attributes of the specified user. +// +// GitLab API docs: +// https://docs.gitlab.com/ce/api/custom_attributes.html#set-custom-attribute +func (s *CustomAttributesService) SetCustomUserAttribute(user int, c CustomAttribute, options ...OptionFunc) (*CustomAttribute, *Response, error) { + return s.setCustomAttribute("users", user, c, options...) +} + +// SetCustomGroupAttribute sets the custom attributes of the specified group. +// +// GitLab API docs: +// https://docs.gitlab.com/ce/api/custom_attributes.html#set-custom-attribute +func (s *CustomAttributesService) SetCustomGroupAttribute(group int, c CustomAttribute, options ...OptionFunc) (*CustomAttribute, *Response, error) { + return s.setCustomAttribute("groups", group, c, options...) +} + +// SetCustomProjectAttribute sets the custom attributes of the specified project. +// +// GitLab API docs: +// https://docs.gitlab.com/ce/api/custom_attributes.html#set-custom-attribute +func (s *CustomAttributesService) SetCustomProjectAttribute(project int, c CustomAttribute, options ...OptionFunc) (*CustomAttribute, *Response, error) { + return s.setCustomAttribute("projects", project, c, options...) +} + +func (s *CustomAttributesService) setCustomAttribute(resource string, id int, c CustomAttribute, options ...OptionFunc) (*CustomAttribute, *Response, error) { + u := fmt.Sprintf("%s/%d/custom_attributes/%s", resource, id, c.Key) + req, err := s.client.NewRequest("PUT", u, c, options) + if err != nil { + return nil, nil, err + } + + ca := new(CustomAttribute) + resp, err := s.client.Do(req, ca) + if err != nil { + return nil, resp, err + } + return ca, resp, err +} + +// DeleteCustomUserAttribute removes the custom attribute of the specified user. +// +// GitLab API docs: +// https://docs.gitlab.com/ce/api/custom_attributes.html#delete-custom-attribute +func (s *CustomAttributesService) DeleteCustomUserAttribute(user int, key string, options ...OptionFunc) (*Response, error) { + return s.deleteCustomAttribute("users", user, key, options...) +} + +// DeleteCustomGroupAttribute removes the custom attribute of the specified group. +// +// GitLab API docs: +// https://docs.gitlab.com/ce/api/custom_attributes.html#delete-custom-attribute +func (s *CustomAttributesService) DeleteCustomGroupAttribute(group int, key string, options ...OptionFunc) (*Response, error) { + return s.deleteCustomAttribute("groups", group, key, options...) +} + +// DeleteCustomProjectAttribute removes the custom attribute of the specified project. +// +// GitLab API docs: +// https://docs.gitlab.com/ce/api/custom_attributes.html#delete-custom-attribute +func (s *CustomAttributesService) DeleteCustomProjectAttribute(project int, key string, options ...OptionFunc) (*Response, error) { + return s.deleteCustomAttribute("projects", project, key, options...) +} + +func (s *CustomAttributesService) deleteCustomAttribute(resource string, id int, key string, options ...OptionFunc) (*Response, error) { + u := fmt.Sprintf("%s/%d/custom_attributes/%s", resource, id, key) + req, err := s.client.NewRequest("DELETE", u, nil, options) + if err != nil { + return nil, err + } + return s.client.Do(req, nil) +} diff --git a/vendor/github.com/xanzy/go-gitlab/discussions.go b/vendor/github.com/xanzy/go-gitlab/discussions.go new file mode 100644 index 00000000..fd3e5dfb --- /dev/null +++ b/vendor/github.com/xanzy/go-gitlab/discussions.go @@ -0,0 +1,1112 @@ +// +// Copyright 2018, Sander van Harmelen +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +package gitlab + +import ( + "fmt" + "net/url" + "time" +) + +// DiscussionsService handles communication with the discussions related +// methods of the GitLab API. +// +// GitLab API docs: https://docs.gitlab.com/ce/api/discussions.html +type DiscussionsService struct { + client *Client +} + +// Discussion represents a GitLab discussion. +// +// GitLab API docs: https://docs.gitlab.com/ce/api/discussions.html +type Discussion struct { + ID string `json:"id"` + IndividualNote bool `json:"individual_note"` + Notes []*Note `json:"notes"` +} + +func (d Discussion) String() string { + return Stringify(d) +} + +// ListIssueDiscussionsOptions represents the available ListIssueDiscussions() +// options. +// +// GitLab API docs: +// https://docs.gitlab.com/ce/api/discussions.html#list-project-issue-discussions +type ListIssueDiscussionsOptions ListOptions + +// ListIssueDiscussions gets a list of all discussions for a single +// issue. +// +// GitLab API docs: +// https://docs.gitlab.com/ce/api/discussions.html#list-project-issue-discussions +func (s *DiscussionsService) ListIssueDiscussions(pid interface{}, issue int, opt *ListIssueDiscussionsOptions, options ...OptionFunc) ([]*Discussion, *Response, error) { + project, err := parseID(pid) + if err != nil { + return nil, nil, err + } + u := fmt.Sprintf("projects/%s/issues/%d/discussions", url.QueryEscape(project), issue) + + req, err := s.client.NewRequest("GET", u, opt, options) + if err != nil { + return nil, nil, err + } + + var ds []*Discussion + resp, err := s.client.Do(req, &ds) + if err != nil { + return nil, resp, err + } + + return ds, resp, err +} + +// GetIssueDiscussion returns a single discussion for a specific project issue. +// +// GitLab API docs: +// https://docs.gitlab.com/ce/api/discussions.html#get-single-issue-discussion +func (s *DiscussionsService) GetIssueDiscussion(pid interface{}, issue int, discussion string, options ...OptionFunc) (*Discussion, *Response, error) { + project, err := parseID(pid) + if err != nil { + return nil, nil, err + } + u := fmt.Sprintf("projects/%s/issues/%d/discussions/%s", + url.QueryEscape(project), + issue, + discussion, + ) + + req, err := s.client.NewRequest("GET", u, nil, options) + if err != nil { + return nil, nil, err + } + + d := new(Discussion) + resp, err := s.client.Do(req, d) + if err != nil { + return nil, resp, err + } + + return d, resp, err +} + +// CreateIssueDiscussionOptions represents the available CreateIssueDiscussion() +// options. +// +// GitLab API docs: +// https://docs.gitlab.com/ce/api/discussions.html#create-new-issue-discussion +type CreateIssueDiscussionOptions struct { + Body *string `url:"body,omitempty" json:"body,omitempty"` + CreatedAt *time.Time `url:"created_at,omitempty" json:"created_at,omitempty"` +} + +// CreateIssueDiscussion creates a new discussion to a single project issue. +// +// GitLab API docs: +// https://docs.gitlab.com/ce/api/discussions.html#create-new-issue-discussion +func (s *DiscussionsService) CreateIssueDiscussion(pid interface{}, issue int, opt *CreateIssueDiscussionOptions, options ...OptionFunc) (*Discussion, *Response, error) { + project, err := parseID(pid) + if err != nil { + return nil, nil, err + } + u := fmt.Sprintf("projects/%s/issues/%d/discussions", url.QueryEscape(project), issue) + + req, err := s.client.NewRequest("POST", u, opt, options) + if err != nil { + return nil, nil, err + } + + d := new(Discussion) + resp, err := s.client.Do(req, d) + if err != nil { + return nil, resp, err + } + + return d, resp, err +} + +// AddIssueDiscussionNoteOptions represents the available AddIssueDiscussionNote() +// options. +// +// GitLab API docs: +// https://docs.gitlab.com/ce/api/discussions.html#add-note-to-existing-issue-discussion +type AddIssueDiscussionNoteOptions struct { + Body *string `url:"body,omitempty" json:"body,omitempty"` + CreatedAt *time.Time `url:"created_at,omitempty" json:"created_at,omitempty"` +} + +// AddIssueDiscussionNote creates a new discussion to a single project issue. +// +// GitLab API docs: +// https://docs.gitlab.com/ce/api/discussions.html#add-note-to-existing-issue-discussion +func (s *DiscussionsService) AddIssueDiscussionNote(pid interface{}, issue int, discussion string, opt *AddIssueDiscussionNoteOptions, options ...OptionFunc) (*Discussion, *Response, error) { + project, err := parseID(pid) + if err != nil { + return nil, nil, err + } + u := fmt.Sprintf("projects/%s/issues/%d/discussions/%s/notes", + url.QueryEscape(project), + issue, + discussion, + ) + + req, err := s.client.NewRequest("POST", u, opt, options) + if err != nil { + return nil, nil, err + } + + d := new(Discussion) + resp, err := s.client.Do(req, d) + if err != nil { + return nil, resp, err + } + + return d, resp, err +} + +// UpdateIssueDiscussionNoteOptions represents the available +// UpdateIssueDiscussion() options. +// +// GitLab API docs: +// https://docs.gitlab.com/ce/api/discussions.html#modify-existing-issue-discussion-note +type UpdateIssueDiscussionNoteOptions struct { + Body *string `url:"body,omitempty" json:"body,omitempty"` + CreatedAt *time.Time `url:"created_at,omitempty" json:"created_at,omitempty"` +} + +// UpdateIssueDiscussionNote modifies existing discussion of an issue. +// +// GitLab API docs: +// https://docs.gitlab.com/ce/api/discussions.html#modify-existing-issue-discussion-note +func (s *DiscussionsService) UpdateIssueDiscussionNote(pid interface{}, issue int, discussion string, note int, opt *UpdateIssueDiscussionNoteOptions, options ...OptionFunc) (*Discussion, *Response, error) { + project, err := parseID(pid) + if err != nil { + return nil, nil, err + } + u := fmt.Sprintf("projects/%s/issues/%d/discussions/%s/notes/%d", + url.QueryEscape(project), + issue, + discussion, + note, + ) + + req, err := s.client.NewRequest("PUT", u, opt, options) + if err != nil { + return nil, nil, err + } + + d := new(Discussion) + resp, err := s.client.Do(req, d) + if err != nil { + return nil, resp, err + } + + return d, resp, err +} + +// DeleteIssueDiscussionNote deletes an existing discussion of an issue. +// +// GitLab API docs: +// https://docs.gitlab.com/ce/api/discussions.html#delete-an-issue-discussion-note +func (s *DiscussionsService) DeleteIssueDiscussionNote(pid interface{}, issue int, discussion string, note int, options ...OptionFunc) (*Response, error) { + project, err := parseID(pid) + if err != nil { + return nil, err + } + u := fmt.Sprintf("projects/%s/issues/%d/discussions/%s/notes/%d", + url.QueryEscape(project), + issue, + discussion, + note, + ) + + req, err := s.client.NewRequest("DELETE", u, nil, options) + if err != nil { + return nil, err + } + + return s.client.Do(req, nil) +} + +// ListSnippetDiscussionsOptions represents the available ListSnippetDiscussions() +// options. +// +// GitLab API docs: +// https://docs.gitlab.com/ce/api/discussions.html#list-all-snippet-discussions +type ListSnippetDiscussionsOptions ListOptions + +// ListSnippetDiscussions gets a list of all discussions for a single +// snippet. Snippet discussions are comments users can post to a snippet. +// +// GitLab API docs: +// https://docs.gitlab.com/ce/api/discussions.html#list-all-snippet-discussions +func (s *DiscussionsService) ListSnippetDiscussions(pid interface{}, snippet int, opt *ListSnippetDiscussionsOptions, options ...OptionFunc) ([]*Discussion, *Response, error) { + project, err := parseID(pid) + if err != nil { + return nil, nil, err + } + u := fmt.Sprintf("projects/%s/snippets/%d/discussions", url.QueryEscape(project), snippet) + + req, err := s.client.NewRequest("GET", u, opt, options) + if err != nil { + return nil, nil, err + } + + var ds []*Discussion + resp, err := s.client.Do(req, &ds) + if err != nil { + return nil, resp, err + } + + return ds, resp, err +} + +// GetSnippetDiscussion returns a single discussion for a given snippet. +// +// GitLab API docs: +// https://docs.gitlab.com/ce/api/discussions.html#get-single-snippet-discussion +func (s *DiscussionsService) GetSnippetDiscussion(pid interface{}, snippet int, discussion string, options ...OptionFunc) (*Discussion, *Response, error) { + project, err := parseID(pid) + if err != nil { + return nil, nil, err + } + u := fmt.Sprintf("projects/%s/snippets/%d/discussions/%s", + url.QueryEscape(project), + snippet, + discussion, + ) + + req, err := s.client.NewRequest("GET", u, nil, options) + if err != nil { + return nil, nil, err + } + + d := new(Discussion) + resp, err := s.client.Do(req, d) + if err != nil { + return nil, resp, err + } + + return d, resp, err +} + +// CreateSnippetDiscussionOptions represents the available +// CreateSnippetDiscussion() options. +// +// GitLab API docs: +// https://docs.gitlab.com/ce/api/discussions.html#create-new-snippet-discussion +type CreateSnippetDiscussionOptions struct { + Body *string `url:"body,omitempty" json:"body,omitempty"` + CreatedAt *time.Time `url:"created_at,omitempty" json:"created_at,omitempty"` +} + +// CreateSnippetDiscussion creates a new discussion for a single snippet. +// Snippet discussions are comments users can post to a snippet. +// +// GitLab API docs: +// https://docs.gitlab.com/ce/api/discussions.html#create-new-snippet-discussion +func (s *DiscussionsService) CreateSnippetDiscussion(pid interface{}, snippet int, opt *CreateSnippetDiscussionOptions, options ...OptionFunc) (*Discussion, *Response, error) { + project, err := parseID(pid) + if err != nil { + return nil, nil, err + } + u := fmt.Sprintf("projects/%s/snippets/%d/discussions", url.QueryEscape(project), snippet) + + req, err := s.client.NewRequest("POST", u, opt, options) + if err != nil { + return nil, nil, err + } + + d := new(Discussion) + resp, err := s.client.Do(req, d) + if err != nil { + return nil, resp, err + } + + return d, resp, err +} + +// AddSnippetDiscussionNoteOptions represents the available +// AddSnippetDiscussionNote() options. +// +// GitLab API docs: +// https://docs.gitlab.com/ce/api/discussions.html#add-note-to-existing-snippet-discussion +type AddSnippetDiscussionNoteOptions struct { + Body *string `url:"body,omitempty" json:"body,omitempty"` + CreatedAt *time.Time `url:"created_at,omitempty" json:"created_at,omitempty"` +} + +// AddSnippetDiscussionNote creates a new discussion to a single project +// snippet. +// +// GitLab API docs: +// https://docs.gitlab.com/ce/api/discussions.html#add-note-to-existing-snippet-discussion +func (s *DiscussionsService) AddSnippetDiscussionNote(pid interface{}, snippet int, discussion string, opt *AddSnippetDiscussionNoteOptions, options ...OptionFunc) (*Discussion, *Response, error) { + project, err := parseID(pid) + if err != nil { + return nil, nil, err + } + u := fmt.Sprintf("projects/%s/snippets/%d/discussions/%s/notes", + url.QueryEscape(project), + snippet, + discussion, + ) + + req, err := s.client.NewRequest("POST", u, opt, options) + if err != nil { + return nil, nil, err + } + + d := new(Discussion) + resp, err := s.client.Do(req, d) + if err != nil { + return nil, resp, err + } + + return d, resp, err +} + +// UpdateSnippetDiscussionNoteOptions represents the available +// UpdateSnippetDiscussion() options. +// +// GitLab API docs: +// https://docs.gitlab.com/ce/api/discussions.html#modify-existing-snippet-discussion-note +type UpdateSnippetDiscussionNoteOptions struct { + Body *string `url:"body,omitempty" json:"body,omitempty"` + CreatedAt *time.Time `url:"created_at,omitempty" json:"created_at,omitempty"` +} + +// UpdateSnippetDiscussionNote modifies existing discussion of a snippet. +// +// GitLab API docs: +// https://docs.gitlab.com/ce/api/discussions.html#modify-existing-snippet-discussion-note +func (s *DiscussionsService) UpdateSnippetDiscussionNote(pid interface{}, snippet int, discussion string, note int, opt *UpdateSnippetDiscussionNoteOptions, options ...OptionFunc) (*Discussion, *Response, error) { + project, err := parseID(pid) + if err != nil { + return nil, nil, err + } + u := fmt.Sprintf("projects/%s/snippets/%d/discussions/%s/notes/%d", + url.QueryEscape(project), + snippet, + discussion, + note, + ) + + req, err := s.client.NewRequest("PUT", u, opt, options) + if err != nil { + return nil, nil, err + } + + d := new(Discussion) + resp, err := s.client.Do(req, d) + if err != nil { + return nil, resp, err + } + + return d, resp, err +} + +// DeleteSnippetDiscussionNote deletes an existing discussion of a snippet. +// +// GitLab API docs: +// https://docs.gitlab.com/ce/api/discussions.html#delete-a-snippet-discussion-note +func (s *DiscussionsService) DeleteSnippetDiscussionNote(pid interface{}, snippet int, discussion string, note int, options ...OptionFunc) (*Response, error) { + project, err := parseID(pid) + if err != nil { + return nil, err + } + u := fmt.Sprintf("projects/%s/snippets/%d/discussions/%s/notes/%d", + url.QueryEscape(project), + snippet, + discussion, + note, + ) + + req, err := s.client.NewRequest("DELETE", u, nil, options) + if err != nil { + return nil, err + } + + return s.client.Do(req, nil) +} + +// ListGroupEpicDiscussionsOptions represents the available +// ListEpicDiscussions() options. +// +// GitLab API docs: +// https://docs.gitlab.com/ee/api/discussions.html#list-all-epic-discussions +type ListGroupEpicDiscussionsOptions ListOptions + +// ListGroupEpicDiscussions gets a list of all discussions for a single +// epic. Epic discussions are comments users can post to a epic. +// +// GitLab API docs: +// https://docs.gitlab.com/ee/api/discussions.html#list-all-epic-discussions +func (s *DiscussionsService) ListGroupEpicDiscussions(gid interface{}, epic int, opt *ListGroupEpicDiscussionsOptions, options ...OptionFunc) ([]*Discussion, *Response, error) { + group, err := parseID(gid) + if err != nil { + return nil, nil, err + } + u := fmt.Sprintf("groups/%s/epics/%d/discussions", + url.QueryEscape(group), + epic, + ) + + req, err := s.client.NewRequest("GET", u, opt, options) + if err != nil { + return nil, nil, err + } + + var ds []*Discussion + resp, err := s.client.Do(req, &ds) + if err != nil { + return nil, resp, err + } + + return ds, resp, err +} + +// GetEpicDiscussion returns a single discussion for a given epic. +// +// GitLab API docs: +// https://docs.gitlab.com/ee/api/discussions.html#get-single-epic-discussion +func (s *DiscussionsService) GetEpicDiscussion(gid interface{}, epic int, discussion string, options ...OptionFunc) (*Discussion, *Response, error) { + group, err := parseID(gid) + if err != nil { + return nil, nil, err + } + u := fmt.Sprintf("groups/%s/epics/%d/discussions/%s", + url.QueryEscape(group), + epic, + discussion, + ) + + req, err := s.client.NewRequest("GET", u, nil, options) + if err != nil { + return nil, nil, err + } + + d := new(Discussion) + resp, err := s.client.Do(req, d) + if err != nil { + return nil, resp, err + } + + return d, resp, err +} + +// CreateEpicDiscussionOptions represents the available CreateEpicDiscussion() +// options. +// +// GitLab API docs: +// https://docs.gitlab.com/ee/api/discussions.html#create-new-epic-discussion +type CreateEpicDiscussionOptions struct { + Body *string `url:"body,omitempty" json:"body,omitempty"` + CreatedAt *time.Time `url:"created_at,omitempty" json:"created_at,omitempty"` +} + +// CreateEpicDiscussion creates a new discussion for a single epic. Epic +// discussions are comments users can post to a epic. +// +// GitLab API docs: +// https://docs.gitlab.com/ee/api/discussions.html#create-new-epic-discussion +func (s *DiscussionsService) CreateEpicDiscussion(gid interface{}, epic int, opt *CreateEpicDiscussionOptions, options ...OptionFunc) (*Discussion, *Response, error) { + group, err := parseID(gid) + if err != nil { + return nil, nil, err + } + u := fmt.Sprintf("groups/%s/epics/%d/discussions", + url.QueryEscape(group), + epic, + ) + + req, err := s.client.NewRequest("POST", u, opt, options) + if err != nil { + return nil, nil, err + } + + d := new(Discussion) + resp, err := s.client.Do(req, d) + if err != nil { + return nil, resp, err + } + + return d, resp, err +} + +// AddEpicDiscussionNoteOptions represents the available +// AddEpicDiscussionNote() options. +// +// GitLab API docs: +// https://docs.gitlab.com/ee/api/discussions.html#add-note-to-existing-epic-discussion +type AddEpicDiscussionNoteOptions struct { + Body *string `url:"body,omitempty" json:"body,omitempty"` + CreatedAt *time.Time `url:"created_at,omitempty" json:"created_at,omitempty"` +} + +// AddEpicDiscussionNote creates a new discussion to a single project epic. +// +// GitLab API docs: +// https://docs.gitlab.com/ee/api/discussions.html#add-note-to-existing-epic-discussion +func (s *DiscussionsService) AddEpicDiscussionNote(gid interface{}, epic int, discussion string, opt *AddEpicDiscussionNoteOptions, options ...OptionFunc) (*Discussion, *Response, error) { + group, err := parseID(gid) + if err != nil { + return nil, nil, err + } + u := fmt.Sprintf("groups/%s/epics/%d/discussions/%s/notes", + url.QueryEscape(group), + epic, + discussion, + ) + + req, err := s.client.NewRequest("POST", u, opt, options) + if err != nil { + return nil, nil, err + } + + d := new(Discussion) + resp, err := s.client.Do(req, d) + if err != nil { + return nil, resp, err + } + + return d, resp, err +} + +// UpdateEpicDiscussionNoteOptions represents the available UpdateEpicDiscussion() +// options. +// +// GitLab API docs: +// https://docs.gitlab.com/ee/api/discussions.html#modify-existing-epic-discussion-note +type UpdateEpicDiscussionNoteOptions struct { + Body *string `url:"body,omitempty" json:"body,omitempty"` + CreatedAt *time.Time `url:"created_at,omitempty" json:"created_at,omitempty"` +} + +// UpdateEpicDiscussionNote modifies existing discussion of a epic. +// +// GitLab API docs: +// https://docs.gitlab.com/ee/api/discussions.html#modify-existing-epic-discussion-note +func (s *DiscussionsService) UpdateEpicDiscussionNote(gid interface{}, epic int, discussion string, note int, opt *UpdateEpicDiscussionNoteOptions, options ...OptionFunc) (*Discussion, *Response, error) { + group, err := parseID(gid) + if err != nil { + return nil, nil, err + } + u := fmt.Sprintf("groups/%s/epics/%d/discussions/%s/notes/%d", + url.QueryEscape(group), + epic, + discussion, + note, + ) + + req, err := s.client.NewRequest("PUT", u, opt, options) + if err != nil { + return nil, nil, err + } + + d := new(Discussion) + resp, err := s.client.Do(req, d) + if err != nil { + return nil, resp, err + } + + return d, resp, err +} + +// DeleteEpicDiscussionNote deletes an existing discussion of a epic. +// +// GitLab API docs: +// https://docs.gitlab.com/ee/api/discussions.html#delete-an-epic-discussion-note +func (s *DiscussionsService) DeleteEpicDiscussionNote(gid interface{}, epic int, discussion string, note int, options ...OptionFunc) (*Response, error) { + group, err := parseID(gid) + if err != nil { + return nil, err + } + u := fmt.Sprintf("groups/%s/epics/%d/discussions/%s/notes/%d", + url.QueryEscape(group), + epic, + discussion, + note, + ) + + req, err := s.client.NewRequest("DELETE", u, nil, options) + if err != nil { + return nil, err + } + + return s.client.Do(req, nil) +} + +// ListMergeRequestDiscussionsOptions represents the available +// ListMergeRequestDiscussions() options. +// +// GitLab API docs: +// https://docs.gitlab.com/ce/api/discussions.html#list-all-merge-request-discussions +type ListMergeRequestDiscussionsOptions ListOptions + +// ListMergeRequestDiscussions gets a list of all discussions for a single +// merge request. +// +// GitLab API docs: +// https://docs.gitlab.com/ce/api/discussions.html#list-all-merge-request-discussions +func (s *DiscussionsService) ListMergeRequestDiscussions(pid interface{}, mergeRequest int, opt *ListMergeRequestDiscussionsOptions, options ...OptionFunc) ([]*Discussion, *Response, error) { + project, err := parseID(pid) + if err != nil { + return nil, nil, err + } + u := fmt.Sprintf("projects/%s/merge_requests/%d/discussions", + url.QueryEscape(project), + mergeRequest, + ) + + req, err := s.client.NewRequest("GET", u, opt, options) + if err != nil { + return nil, nil, err + } + + var ds []*Discussion + resp, err := s.client.Do(req, &ds) + if err != nil { + return nil, resp, err + } + + return ds, resp, err +} + +// GetMergeRequestDiscussion returns a single discussion for a given merge +// request. +// +// GitLab API docs: +// https://docs.gitlab.com/ce/api/discussions.html#get-single-merge-request-discussion +func (s *DiscussionsService) GetMergeRequestDiscussion(pid interface{}, mergeRequest int, discussion string, options ...OptionFunc) (*Discussion, *Response, error) { + project, err := parseID(pid) + if err != nil { + return nil, nil, err + } + u := fmt.Sprintf("projects/%s/merge_requests/%d/discussions/%s", + url.QueryEscape(project), + mergeRequest, + discussion, + ) + + req, err := s.client.NewRequest("GET", u, nil, options) + if err != nil { + return nil, nil, err + } + + d := new(Discussion) + resp, err := s.client.Do(req, d) + if err != nil { + return nil, resp, err + } + + return d, resp, err +} + +// CreateMergeRequestDiscussionOptions represents the available +// CreateMergeRequestDiscussion() options. +// +// GitLab API docs: +// https://docs.gitlab.com/ce/api/discussions.html#create-new-merge-request-discussion +type CreateMergeRequestDiscussionOptions struct { + Body *string `url:"body,omitempty" json:"body,omitempty"` + CreatedAt *time.Time `url:"created_at,omitempty" json:"created_at,omitempty"` + Position *NotePosition `url:"position,omitempty" json:"position,omitempty"` +} + +// CreateMergeRequestDiscussion creates a new discussion for a single merge +// request. +// +// GitLab API docs: +// https://docs.gitlab.com/ce/api/discussions.html#create-new-merge-request-discussion +func (s *DiscussionsService) CreateMergeRequestDiscussion(pid interface{}, mergeRequest int, opt *CreateMergeRequestDiscussionOptions, options ...OptionFunc) (*Discussion, *Response, error) { + project, err := parseID(pid) + if err != nil { + return nil, nil, err + } + u := fmt.Sprintf("projects/%s/merge_requests/%d/discussions", + url.QueryEscape(project), + mergeRequest, + ) + + req, err := s.client.NewRequest("POST", u, opt, options) + if err != nil { + return nil, nil, err + } + + d := new(Discussion) + resp, err := s.client.Do(req, d) + if err != nil { + return nil, resp, err + } + + return d, resp, err +} + +// ResolveMergeRequestDiscussionOptions represents the available +// ResolveMergeRequestDiscussion() options. +// +// GitLab API docs: +// https://docs.gitlab.com/ee/api/discussions.html#resolve-a-merge-request-discussion +type ResolveMergeRequestDiscussionOptions struct { + Resolved *bool `url:"resolved,omitempty" json:"resolved,omitempty"` +} + +// ResolveMergeRequestDiscussion resolves/unresolves whole discussion of a merge +// request. +// +// GitLab API docs: +// https://docs.gitlab.com/ee/api/discussions.html#resolve-a-merge-request-discussion +func (s *DiscussionsService) ResolveMergeRequestDiscussion(pid interface{}, mergeRequest int, discussion string, opt *ResolveMergeRequestDiscussionOptions, options ...OptionFunc) (*Discussion, *Response, error) { + project, err := parseID(pid) + if err != nil { + return nil, nil, err + } + u := fmt.Sprintf("projects/%s/merge_requests/%d/discussions/%s", + url.QueryEscape(project), + mergeRequest, + discussion, + ) + + req, err := s.client.NewRequest("PUT", u, opt, options) + if err != nil { + return nil, nil, err + } + + d := new(Discussion) + resp, err := s.client.Do(req, d) + if err != nil { + return nil, resp, err + } + + return d, resp, err +} + +// AddMergeRequestDiscussionNoteOptions represents the available +// AddMergeRequestDiscussionNote() options. +// +// GitLab API docs: +// https://docs.gitlab.com/ce/api/discussions.html#add-note-to-existing-merge-request-discussion +type AddMergeRequestDiscussionNoteOptions struct { + Body *string `url:"body,omitempty" json:"body,omitempty"` + CreatedAt *time.Time `url:"created_at,omitempty" json:"created_at,omitempty"` +} + +// AddMergeRequestDiscussionNote creates a new discussion to a single project +// merge request. +// +// GitLab API docs: +// https://docs.gitlab.com/ce/api/discussions.html#add-note-to-existing-merge-request-discussion +func (s *DiscussionsService) AddMergeRequestDiscussionNote(pid interface{}, mergeRequest int, discussion string, opt *AddMergeRequestDiscussionNoteOptions, options ...OptionFunc) (*Discussion, *Response, error) { + project, err := parseID(pid) + if err != nil { + return nil, nil, err + } + u := fmt.Sprintf("projects/%s/merge_requests/%d/discussions/%s/notes", + url.QueryEscape(project), + mergeRequest, + discussion, + ) + + req, err := s.client.NewRequest("POST", u, opt, options) + if err != nil { + return nil, nil, err + } + + d := new(Discussion) + resp, err := s.client.Do(req, d) + if err != nil { + return nil, resp, err + } + + return d, resp, err +} + +// UpdateMergeRequestDiscussionNoteOptions represents the available +// UpdateMergeRequestDiscussion() options. +// +// GitLab API docs: +// https://docs.gitlab.com/ce/api/discussions.html#modify-existing-merge-request-discussion-note +type UpdateMergeRequestDiscussionNoteOptions struct { + Body *string `url:"body,omitempty" json:"body,omitempty"` + CreatedAt *time.Time `url:"created_at,omitempty" json:"created_at,omitempty"` +} + +// UpdateMergeRequestDiscussionNote modifies existing discussion of a merge +// request. +// +// GitLab API docs: +// https://docs.gitlab.com/ce/api/discussions.html#modify-existing-merge-request-discussion-note +func (s *DiscussionsService) UpdateMergeRequestDiscussionNote(pid interface{}, mergeRequest int, discussion string, note int, opt *UpdateMergeRequestDiscussionNoteOptions, options ...OptionFunc) (*Discussion, *Response, error) { + project, err := parseID(pid) + if err != nil { + return nil, nil, err + } + u := fmt.Sprintf("projects/%s/merge_requests/%d/discussions/%s/notes/%d", + url.QueryEscape(project), + mergeRequest, + discussion, + note, + ) + + req, err := s.client.NewRequest("PUT", u, opt, options) + if err != nil { + return nil, nil, err + } + + d := new(Discussion) + resp, err := s.client.Do(req, d) + if err != nil { + return nil, resp, err + } + + return d, resp, err +} + +// DeleteMergeRequestDiscussionNote deletes an existing discussion of a merge +// request. +// +// GitLab API docs: +// https://docs.gitlab.com/ce/api/discussions.html#delete-a-merge-request-discussion-note +func (s *DiscussionsService) DeleteMergeRequestDiscussionNote(pid interface{}, mergeRequest int, discussion string, note int, options ...OptionFunc) (*Response, error) { + project, err := parseID(pid) + if err != nil { + return nil, err + } + u := fmt.Sprintf("projects/%s/merge_requests/%d/discussions/%s/notes/%d", + url.QueryEscape(project), + mergeRequest, + discussion, + note, + ) + + req, err := s.client.NewRequest("DELETE", u, nil, options) + if err != nil { + return nil, err + } + + return s.client.Do(req, nil) +} + +// ListCommitDiscussionsOptions represents the available +// ListCommitDiscussions() options. +// +// GitLab API docs: +// https://docs.gitlab.com/ce/api/discussions.html#list-project-commit-discussions +type ListCommitDiscussionsOptions ListOptions + +// ListCommitDiscussions gets a list of all discussions for a single +// commit. +// +// GitLab API docs: +// https://docs.gitlab.com/ce/api/discussions.html#list-project-commit-discussions +func (s *DiscussionsService) ListCommitDiscussions(pid interface{}, commit string, opt *ListCommitDiscussionsOptions, options ...OptionFunc) ([]*Discussion, *Response, error) { + project, err := parseID(pid) + if err != nil { + return nil, nil, err + } + u := fmt.Sprintf("projects/%s/repository/commits/%s/discussions", + url.QueryEscape(project), + commit, + ) + + req, err := s.client.NewRequest("GET", u, opt, options) + if err != nil { + return nil, nil, err + } + + var ds []*Discussion + resp, err := s.client.Do(req, &ds) + if err != nil { + return nil, resp, err + } + + return ds, resp, err +} + +// GetCommitDiscussion returns a single discussion for a specific project +// commit. +// +// GitLab API docs: +// https://docs.gitlab.com/ce/api/discussions.html#get-single-commit-discussion +func (s *DiscussionsService) GetCommitDiscussion(pid interface{}, commit string, discussion string, options ...OptionFunc) (*Discussion, *Response, error) { + project, err := parseID(pid) + if err != nil { + return nil, nil, err + } + u := fmt.Sprintf("projects/%s/repository/commits/%s/discussions/%s", + url.QueryEscape(project), + commit, + discussion, + ) + + req, err := s.client.NewRequest("GET", u, nil, options) + if err != nil { + return nil, nil, err + } + + d := new(Discussion) + resp, err := s.client.Do(req, d) + if err != nil { + return nil, resp, err + } + + return d, resp, err +} + +// CreateCommitDiscussionOptions represents the available +// CreateCommitDiscussion() options. +// +// GitLab API docs: +// https://docs.gitlab.com/ce/api/discussions.html#create-new-commit-discussion +type CreateCommitDiscussionOptions struct { + Body *string `url:"body,omitempty" json:"body,omitempty"` + CreatedAt *time.Time `url:"created_at,omitempty" json:"created_at,omitempty"` + Position *NotePosition `url:"position,omitempty" json:"position,omitempty"` +} + +// CreateCommitDiscussion creates a new discussion to a single project commit. +// +// GitLab API docs: +// https://docs.gitlab.com/ce/api/discussions.html#create-new-commit-discussion +func (s *DiscussionsService) CreateCommitDiscussion(pid interface{}, commit string, opt *CreateCommitDiscussionOptions, options ...OptionFunc) (*Discussion, *Response, error) { + project, err := parseID(pid) + if err != nil { + return nil, nil, err + } + u := fmt.Sprintf("projects/%s/repository/commits/%s/discussions", + url.QueryEscape(project), + commit, + ) + + req, err := s.client.NewRequest("POST", u, opt, options) + if err != nil { + return nil, nil, err + } + + d := new(Discussion) + resp, err := s.client.Do(req, d) + if err != nil { + return nil, resp, err + } + + return d, resp, err +} + +// AddCommitDiscussionNoteOptions represents the available +// AddCommitDiscussionNote() options. +// +// GitLab API docs: +// https://docs.gitlab.com/ce/api/discussions.html#add-note-to-existing-commit-discussion +type AddCommitDiscussionNoteOptions struct { + Body *string `url:"body,omitempty" json:"body,omitempty"` + CreatedAt *time.Time `url:"created_at,omitempty" json:"created_at,omitempty"` +} + +// AddCommitDiscussionNote creates a new discussion to a single project commit. +// +// GitLab API docs: +// https://docs.gitlab.com/ce/api/discussions.html#add-note-to-existing-commit-discussion +func (s *DiscussionsService) AddCommitDiscussionNote(pid interface{}, commit string, discussion string, opt *AddCommitDiscussionNoteOptions, options ...OptionFunc) (*Discussion, *Response, error) { + project, err := parseID(pid) + if err != nil { + return nil, nil, err + } + u := fmt.Sprintf("projects/%s/repository/commits/%s/discussions/%s/notes", + url.QueryEscape(project), + commit, + discussion, + ) + + req, err := s.client.NewRequest("POST", u, opt, options) + if err != nil { + return nil, nil, err + } + + d := new(Discussion) + resp, err := s.client.Do(req, d) + if err != nil { + return nil, resp, err + } + + return d, resp, err +} + +// UpdateCommitDiscussionNoteOptions represents the available +// UpdateCommitDiscussion() options. +// +// GitLab API docs: +// https://docs.gitlab.com/ce/api/discussions.html#modify-existing-commit-discussion-note +type UpdateCommitDiscussionNoteOptions struct { + Body *string `url:"body,omitempty" json:"body,omitempty"` + CreatedAt *time.Time `url:"created_at,omitempty" json:"created_at,omitempty"` +} + +// UpdateCommitDiscussionNote modifies existing discussion of an commit. +// +// GitLab API docs: +// https://docs.gitlab.com/ce/api/discussions.html#modify-existing-commit-discussion-note +func (s *DiscussionsService) UpdateCommitDiscussionNote(pid interface{}, commit string, discussion string, note int, opt *UpdateCommitDiscussionNoteOptions, options ...OptionFunc) (*Discussion, *Response, error) { + project, err := parseID(pid) + if err != nil { + return nil, nil, err + } + u := fmt.Sprintf("projects/%s/repository/commits/%s/discussions/%s/notes/%d", + url.QueryEscape(project), + commit, + discussion, + note, + ) + + req, err := s.client.NewRequest("PUT", u, opt, options) + if err != nil { + return nil, nil, err + } + + d := new(Discussion) + resp, err := s.client.Do(req, d) + if err != nil { + return nil, resp, err + } + + return d, resp, err +} + +// DeleteCommitDiscussionNote deletes an existing discussion of an commit. +// +// GitLab API docs: +// https://docs.gitlab.com/ce/api/discussions.html#delete-an-commit-discussion-note +func (s *DiscussionsService) DeleteCommitDiscussionNote(pid interface{}, commit string, discussion string, note int, options ...OptionFunc) (*Response, error) { + project, err := parseID(pid) + if err != nil { + return nil, err + } + u := fmt.Sprintf("projects/%s/repository/commits/%s/discussions/%s/notes/%d", + url.QueryEscape(project), + commit, + discussion, + note, + ) + + req, err := s.client.NewRequest("DELETE", u, nil, options) + if err != nil { + return nil, err + } + + return s.client.Do(req, nil) +} diff --git a/vendor/github.com/xanzy/go-gitlab/event_types.go b/vendor/github.com/xanzy/go-gitlab/event_types.go index f051726e..2d632b01 100644 --- a/vendor/github.com/xanzy/go-gitlab/event_types.go +++ b/vendor/github.com/xanzy/go-gitlab/event_types.go @@ -477,6 +477,7 @@ type MergeEvent struct { WorkInProgress bool `json:"work_in_progress"` URL string `json:"url"` Action string `json:"action"` + OldRev string `json:"oldrev"` Assignee struct { Name string `json:"name"` Username string `json:"username"` @@ -489,6 +490,24 @@ type MergeEvent struct { Username string `json:"username"` AvatarURL string `json:"avatar_url"` } `json:"assignee"` + Changes struct { + AssigneeID struct { + Previous int `json:"previous"` + Current int `json:"current"` + } `json:"assignee_id"` + Description struct { + Previous string `json:"previous"` + Current string `json:"current"` + } `json:"description"` + Labels struct { + Previous []Label `json:"previous"` + Current []Label `json:"current"` + } `json:"labels"` + UpdatedByID struct { + Previous int `json:"previous"` + Current int `json:"current"` + } `json:"updated_by_id"` + } `json:"changes"` } // WikiPageEvent represents a wiki page event. diff --git a/vendor/github.com/xanzy/go-gitlab/gitlab.go b/vendor/github.com/xanzy/go-gitlab/gitlab.go index e600f158..1b82e9b6 100644 --- a/vendor/github.com/xanzy/go-gitlab/gitlab.go +++ b/vendor/github.com/xanzy/go-gitlab/gitlab.go @@ -64,12 +64,16 @@ type AccessLevelValue int // // GitLab API docs: https://docs.gitlab.com/ce/permissions/permissions.html const ( - NoPermissions AccessLevelValue = 0 - GuestPermissions AccessLevelValue = 10 - ReporterPermissions AccessLevelValue = 20 - DeveloperPermissions AccessLevelValue = 30 - MasterPermissions AccessLevelValue = 40 - OwnerPermission AccessLevelValue = 50 + NoPermissions AccessLevelValue = 0 + GuestPermissions AccessLevelValue = 10 + ReporterPermissions AccessLevelValue = 20 + DeveloperPermissions AccessLevelValue = 30 + MaintainerPermissions AccessLevelValue = 40 + OwnerPermissions AccessLevelValue = 50 + + // These are deprecated and should be removed in a future version + MasterPermissions AccessLevelValue = 40 + OwnerPermission AccessLevelValue = 50 ) // BuildStateValue represents a GitLab build state. @@ -273,13 +277,17 @@ type Client struct { UserAgent string // Services used for talking to different parts of the GitLab API. + AccessRequests *AccessRequestsService AwardEmoji *AwardEmojiService Branches *BranchesService BuildVariables *BuildVariablesService BroadcastMessage *BroadcastMessagesService + CIYMLTemplate *CIYMLTemplatesService Commits *CommitsService + CustomAttribute *CustomAttributesService DeployKeys *DeployKeysService Deployments *DeploymentsService + Discussions *DiscussionsService Environments *EnvironmentsService Events *EventsService Features *FeaturesService @@ -295,6 +303,7 @@ type Client struct { Keys *KeysService Boards *IssueBoardsService Labels *LabelsService + LicenseTemplates *LicenseTemplatesService MergeRequests *MergeRequestsService MergeRequestApprovals *MergeRequestApprovalsService Milestones *MilestonesService @@ -307,6 +316,7 @@ type Client struct { PipelineTriggers *PipelineTriggersService Projects *ProjectsService ProjectMembers *ProjectMembersService + ProjectBadges *ProjectBadgesService ProjectSnippets *ProjectSnippetsService ProjectVariables *ProjectVariablesService ProtectedBranches *ProtectedBranchesService @@ -315,7 +325,6 @@ type Client struct { Runners *RunnersService Search *SearchService Services *ServicesService - Session *SessionService Settings *SettingsService Sidekiq *SidekiqService Snippets *SnippetsService @@ -407,13 +416,17 @@ func newClient(httpClient *http.Client) *Client { timeStats := &timeStatsService{client: c} // Create all the public services. + c.AccessRequests = &AccessRequestsService{client: c} c.AwardEmoji = &AwardEmojiService{client: c} c.Branches = &BranchesService{client: c} c.BuildVariables = &BuildVariablesService{client: c} c.BroadcastMessage = &BroadcastMessagesService{client: c} + c.CIYMLTemplate = &CIYMLTemplatesService{client: c} c.Commits = &CommitsService{client: c} + c.CustomAttribute = &CustomAttributesService{client: c} c.DeployKeys = &DeployKeysService{client: c} c.Deployments = &DeploymentsService{client: c} + c.Discussions = &DiscussionsService{client: c} c.Environments = &EnvironmentsService{client: c} c.Events = &EventsService{client: c} c.Features = &FeaturesService{client: c} @@ -429,6 +442,7 @@ func newClient(httpClient *http.Client) *Client { c.Keys = &KeysService{client: c} c.Boards = &IssueBoardsService{client: c} c.Labels = &LabelsService{client: c} + c.LicenseTemplates = &LicenseTemplatesService{client: c} c.MergeRequests = &MergeRequestsService{client: c, timeStats: timeStats} c.MergeRequestApprovals = &MergeRequestApprovalsService{client: c} c.Milestones = &MilestonesService{client: c} @@ -441,6 +455,7 @@ func newClient(httpClient *http.Client) *Client { c.PipelineTriggers = &PipelineTriggersService{client: c} c.Projects = &ProjectsService{client: c} c.ProjectMembers = &ProjectMembersService{client: c} + c.ProjectBadges = &ProjectBadgesService{client: c} c.ProjectSnippets = &ProjectSnippetsService{client: c} c.ProjectVariables = &ProjectVariablesService{client: c} c.ProtectedBranches = &ProtectedBranchesService{client: c} @@ -449,7 +464,6 @@ func newClient(httpClient *http.Client) *Client { c.Runners = &RunnersService{client: c} c.Services = &ServicesService{client: c} c.Search = &SearchService{client: c} - c.Session = &SessionService{client: c} c.Settings = &SettingsService{client: c} c.Sidekiq = &SidekiqService{client: c} c.Snippets = &SnippetsService{client: c} @@ -500,8 +514,14 @@ func (c *Client) SetBaseURL(urlStr string) error { // request body. func (c *Client) NewRequest(method, path string, opt interface{}, options []OptionFunc) (*http.Request, error) { u := *c.baseURL - // Set the encoded opaque data - u.Opaque = c.baseURL.Path + path + unescaped, err := url.PathUnescape(path) + if err != nil { + return nil, err + } + + // Set the encoded path data + u.RawPath = c.baseURL.Path + path + u.Path = c.baseURL.Path + unescaped if opt != nil { q, err := query.Values(opt) @@ -681,7 +701,7 @@ type ErrorResponse struct { } func (e *ErrorResponse) Error() string { - path, _ := url.QueryUnescape(e.Response.Request.URL.Opaque) + path, _ := url.QueryUnescape(e.Response.Request.URL.Path) u := fmt.Sprintf("%s://%s%s", e.Response.Request.URL.Scheme, e.Response.Request.URL.Host, path) return fmt.Sprintf("%s %s: %d %s", e.Response.Request.Method, u, e.Response.StatusCode, e.Message) } @@ -842,3 +862,24 @@ func MergeMethod(v MergeMethodValue) *MergeMethodValue { *p = v return p } + +// BoolValue is a boolean value with advanced json unmarshaling features. +type BoolValue bool + +// UnmarshalJSON allows 1 and 0 to be considered as boolean values +// Needed for https://gitlab.com/gitlab-org/gitlab-ce/issues/50122 +func (t *BoolValue) UnmarshalJSON(b []byte) error { + switch string(b) { + case `"1"`: + *t = true + return nil + case `"0"`: + *t = false + return nil + default: + var v bool + err := json.Unmarshal(b, &v) + *t = BoolValue(v) + return err + } +} diff --git a/vendor/github.com/xanzy/go-gitlab/group_members.go b/vendor/github.com/xanzy/go-gitlab/group_members.go index 9423ff68..27e7064c 100644 --- a/vendor/github.com/xanzy/go-gitlab/group_members.go +++ b/vendor/github.com/xanzy/go-gitlab/group_members.go @@ -44,8 +44,8 @@ type GroupMember struct { ExpiresAt *ISOTime `json:"expires_at"` } -// ListGroupMembersOptions represents the available ListGroupMembers() -// options. +// ListGroupMembersOptions represents the available ListGroupMembers() and +// ListAllGroupMembers() options. // // GitLab API docs: // https://docs.gitlab.com/ce/api/members.html#list-all-members-of-a-group-or-project @@ -55,7 +55,7 @@ type ListGroupMembersOptions struct { } // ListGroupMembers get a list of group members viewable by the authenticated -// user. +// user. Returns a list including inherited members through ancestor groups. // // GitLab API docs: // https://docs.gitlab.com/ce/api/members.html#list-all-members-of-a-group-or-project @@ -80,6 +80,32 @@ func (s *GroupsService) ListGroupMembers(gid interface{}, opt *ListGroupMembersO return gm, resp, err } +// ListAllGroupMembers get a list of group members viewable by the authenticated +// user. Returns a list including inherited members through ancestor groups. +// +// GitLab API docs: +// https://docs.gitlab.com/ce/api/members.html#list-all-members-of-a-group-or-project-including-inherited-members +func (s *GroupsService) ListAllGroupMembers(gid interface{}, opt *ListGroupMembersOptions, options ...OptionFunc) ([]*GroupMember, *Response, error) { + group, err := parseID(gid) + if err != nil { + return nil, nil, err + } + u := fmt.Sprintf("groups/%s/members/all", url.QueryEscape(group)) + + req, err := s.client.NewRequest("GET", u, opt, options) + if err != nil { + return nil, nil, err + } + + var gm []*GroupMember + resp, err := s.client.Do(req, &gm) + if err != nil { + return nil, resp, err + } + + return gm, resp, err +} + // AddGroupMemberOptions represents the available AddGroupMember() options. // // GitLab API docs: diff --git a/vendor/github.com/xanzy/go-gitlab/issues.go b/vendor/github.com/xanzy/go-gitlab/issues.go index 481721d9..04852942 100644 --- a/vendor/github.com/xanzy/go-gitlab/issues.go +++ b/vendor/github.com/xanzy/go-gitlab/issues.go @@ -305,7 +305,7 @@ func (s *IssuesService) CreateIssue(pid interface{}, opt *CreateIssueOptions, op // UpdateIssueOptions represents the available UpdateIssue() options. // -// GitLab API docs: https://docs.gitlab.com/ce/api/issues.html#edit-issues +// GitLab API docs: https://docs.gitlab.com/ee/api/issues.html#edit-issue type UpdateIssueOptions struct { Title *string `url:"title,omitempty" json:"title,omitempty"` Description *string `url:"description,omitempty" json:"description,omitempty"` @@ -316,6 +316,7 @@ type UpdateIssueOptions struct { StateEvent *string `url:"state_event,omitempty" json:"state_event,omitempty"` UpdatedAt *time.Time `url:"updated_at,omitempty" json:"updated_at,omitempty"` DueDate *ISOTime `url:"due_date,omitempty" json:"due_date,omitempty"` + Weight *int `url:"weight,omitempty" json:"weight,omitempty"` DiscussionLocked *bool `url:"discussion_locked,omitempty" json:"discussion_locked,omitempty"` } @@ -362,6 +363,60 @@ func (s *IssuesService) DeleteIssue(pid interface{}, issue int, options ...Optio return s.client.Do(req, nil) } +// SubscribeToIssue subscribes the authenticated user to the given issue to +// receive notifications. If the user is already subscribed to the issue, the +// status code 304 is returned. +// +// GitLab API docs: +// https://docs.gitlab.com/ce/api/merge_requests.html#subscribe-to-a-merge-request +func (s *IssuesService) SubscribeToIssue(pid interface{}, issue int, options ...OptionFunc) (*Issue, *Response, error) { + project, err := parseID(pid) + if err != nil { + return nil, nil, err + } + u := fmt.Sprintf("projects/%s/issues/%d/subscribe", url.QueryEscape(project), issue) + + req, err := s.client.NewRequest("POST", u, nil, options) + if err != nil { + return nil, nil, err + } + + i := new(Issue) + resp, err := s.client.Do(req, i) + if err != nil { + return nil, resp, err + } + + return i, resp, err +} + +// UnsubscribeFromIssue unsubscribes the authenticated user from the given +// issue to not receive notifications from that merge request. If the user +// is not subscribed to the issue, status code 304 is returned. +// +// GitLab API docs: +// https://docs.gitlab.com/ce/api/merge_requests.html#unsubscribe-from-a-merge-request +func (s *IssuesService) UnsubscribeFromIssue(pid interface{}, issue int, options ...OptionFunc) (*Issue, *Response, error) { + project, err := parseID(pid) + if err != nil { + return nil, nil, err + } + u := fmt.Sprintf("projects/%s/issues/%d/unsubscribe", url.QueryEscape(project), issue) + + req, err := s.client.NewRequest("POST", u, nil, options) + if err != nil { + return nil, nil, err + } + + i := new(Issue) + resp, err := s.client.Do(req, i) + if err != nil { + return nil, resp, err + } + + return i, resp, err +} + // ListMergeRequestsClosingIssueOptions represents the available // ListMergeRequestsClosingIssue() options. // diff --git a/vendor/github.com/xanzy/go-gitlab/jobs.go b/vendor/github.com/xanzy/go-gitlab/jobs.go index 669f96dd..b0a096f4 100644 --- a/vendor/github.com/xanzy/go-gitlab/jobs.go +++ b/vendor/github.com/xanzy/go-gitlab/jobs.go @@ -59,6 +59,7 @@ type Job struct { Status string `json:"status"` Tag bool `json:"tag"` User *User `json:"user"` + WebURL string `json:"web_url"` } // ListJobsOptions are options for two list apis @@ -197,6 +198,40 @@ func (s *JobsService) DownloadArtifactsFile(pid interface{}, refName string, job return artifactsBuf, resp, err } +// DownloadSingleArtifactsFile download a file from the artifacts from the +// given reference name and job provided the job finished successfully. +// Only a single file is going to be extracted from the archive and streamed +// to a client. +// +// GitLab API docs: +// https://docs.gitlab.com/ce/api/jobs.html#download-a-single-artifact-file +func (s *JobsService) DownloadSingleArtifactsFile(pid interface{}, jobID int, artifactPath string, options ...OptionFunc) (io.Reader, *Response, error) { + project, err := parseID(pid) + if err != nil { + return nil, nil, err + } + + u := fmt.Sprintf( + "projects/%s/jobs/%d/artifacts/%s", + url.QueryEscape(project), + jobID, + artifactPath, + ) + + req, err := s.client.NewRequest("GET", u, nil, options) + if err != nil { + return nil, nil, err + } + + artifactBuf := new(bytes.Buffer) + resp, err := s.client.Do(req, artifactBuf) + if err != nil { + return nil, resp, err + } + + return artifactBuf, resp, err +} + // GetTraceFile gets a trace of a specific job of a project // // GitLab API docs: diff --git a/vendor/github.com/xanzy/go-gitlab/labels.go b/vendor/github.com/xanzy/go-gitlab/labels.go index 2f8307d2..5134846d 100644 --- a/vendor/github.com/xanzy/go-gitlab/labels.go +++ b/vendor/github.com/xanzy/go-gitlab/labels.go @@ -17,6 +17,7 @@ package gitlab import ( + "encoding/json" "fmt" "net/url" ) @@ -44,6 +45,26 @@ type Label struct { Priority int `json:"priority"` } +// UnmarshalJSON implements the json.Unmarshaler interface. +func (l *Label) UnmarshalJSON(data []byte) error { + type alias Label + if err := json.Unmarshal(data, (*alias)(l)); err != nil { + return err + } + + if l.Name == "" { + var raw map[string]interface{} + if err := json.Unmarshal(data, &raw); err != nil { + return err + } + if title, ok := raw["title"].(string); ok { + l.Name = title + } + } + + return nil +} + func (l Label) String() string { return Stringify(l) } diff --git a/vendor/github.com/xanzy/go-gitlab/license_templates.go b/vendor/github.com/xanzy/go-gitlab/license_templates.go new file mode 100644 index 00000000..83f8259b --- /dev/null +++ b/vendor/github.com/xanzy/go-gitlab/license_templates.go @@ -0,0 +1,92 @@ +package gitlab + +import ( + "fmt" +) + +// LicenseTemplate represents a license template. +// +// GitLab API docs: +// https://docs.gitlab.com/ce/api/templates/licenses.html +type LicenseTemplate struct { + Key string `json:"key"` + Name string `json:"name"` + Nickname string `json:"nickname"` + Featured bool `json:"featured"` + HTMLURL string `json:"html_url"` + SourceURL string `json:"source_url"` + Description string `json:"description"` + Conditions []string `json:"conditions"` + Permissions []string `json:"permissions"` + Limitations []string `json:"limitations"` + Content string `json:"content"` +} + +// LicenseTemplatesService handles communication with the license templates +// related methods of the GitLab API. +// +// GitLab API docs: https://docs.gitlab.com/ce/api/templates/licenses.html +type LicenseTemplatesService struct { + client *Client +} + +// ListLicenseTemplatesOptions represents the available +// ListLicenseTemplates() options. +// +// GitLab API docs: +// https://docs.gitlab.com/ce/api/templates/licenses.html#list-license-templates +type ListLicenseTemplatesOptions struct { + ListOptions + Popular *bool `url:"popular,omitempty" json:"popular,omitempty"` +} + +// ListLicenseTemplates get all license templates. +// +// GitLab API docs: +// https://docs.gitlab.com/ce/api/templates/licenses.html#list-license-templates +func (s *LicenseTemplatesService) ListLicenseTemplates(opt *ListLicenseTemplatesOptions, options ...OptionFunc) ([]*LicenseTemplate, *Response, error) { + req, err := s.client.NewRequest("GET", "templates/licenses", opt, options) + if err != nil { + return nil, nil, err + } + + var lts []*LicenseTemplate + resp, err := s.client.Do(req, <s) + if err != nil { + return nil, resp, err + } + + return lts, resp, err +} + +// GetLicenseTemplateOptions represents the available +// GetLicenseTemplate() options. +// +// GitLab API docs: +// https://docs.gitlab.com/ce/api/templates/licenses.html#single-license-template +type GetLicenseTemplateOptions struct { + Project *string `url:"project,omitempty" json:"project,omitempty"` + Fullname *string `url:"fullname,omitempty" json:"fullname,omitempty"` +} + +// GetLicenseTemplate get a single license template. You can pass parameters +// to replace the license placeholder. +// +// GitLab API docs: +// https://docs.gitlab.com/ce/api/templates/licenses.html#single-license-template +func (s *LicenseTemplatesService) GetLicenseTemplate(template string, opt *GetLicenseTemplateOptions, options ...OptionFunc) (*LicenseTemplate, *Response, error) { + u := fmt.Sprintf("templates/licenses/%s", template) + + req, err := s.client.NewRequest("GET", u, opt, options) + if err != nil { + return nil, nil, err + } + + lt := new(LicenseTemplate) + resp, err := s.client.Do(req, lt) + if err != nil { + return nil, resp, err + } + + return lt, resp, err +} diff --git a/vendor/github.com/xanzy/go-gitlab/merge_request_approvals.go b/vendor/github.com/xanzy/go-gitlab/merge_request_approvals.go index e03cb618..81aa4fb4 100644 --- a/vendor/github.com/xanzy/go-gitlab/merge_request_approvals.go +++ b/vendor/github.com/xanzy/go-gitlab/merge_request_approvals.go @@ -20,17 +20,18 @@ type MergeRequestApprovalsService struct { // GitLab API docs: // https://docs.gitlab.com/ee/api/merge_request_approvals.html#merge-request-level-mr-approvals type MergeRequestApprovals struct { - ID int `json:"id"` - ProjectID int `json:"project_id"` - Title string `json:"title"` - Description string `json:"description"` - State string `json:"state"` - CreatedAt *time.Time `json:"created_at"` - UpdatedAt *time.Time `json:"updated_at"` - MergeStatus string `json:"merge_status"` - ApprovalsRequired int `json:"approvals_required"` - ApprovalsLeft int `json:"approvals_left"` - ApprovedBy []struct { + ID int `json:"id"` + ProjectID int `json:"project_id"` + Title string `json:"title"` + Description string `json:"description"` + State string `json:"state"` + CreatedAt *time.Time `json:"created_at"` + UpdatedAt *time.Time `json:"updated_at"` + MergeStatus string `json:"merge_status"` + ApprovalsBeforeMerge int `json:"approvals_before_merge"` + ApprovalsRequired int `json:"approvals_required"` + ApprovalsLeft int `json:"approvals_left"` + ApprovedBy []struct { User struct { ID int `json:"id"` Name string `json:"name"` diff --git a/vendor/github.com/xanzy/go-gitlab/merge_requests.go b/vendor/github.com/xanzy/go-gitlab/merge_requests.go index da1794cb..aefa6042 100644 --- a/vendor/github.com/xanzy/go-gitlab/merge_requests.go +++ b/vendor/github.com/xanzy/go-gitlab/merge_requests.go @@ -153,10 +153,15 @@ type ListMergeRequestsOptions struct { Labels Labels `url:"labels,omitempty" json:"labels,omitempty"` CreatedAfter *time.Time `url:"created_after,omitempty" json:"created_after,omitempty"` CreatedBefore *time.Time `url:"created_before,omitempty" json:"created_before,omitempty"` + UpdatedAfter *time.Time `url:"updated_after,omitempty" json:"updated_after,omitempty"` + UpdatedBefore *time.Time `url:"updated_before,omitempty" json:"updated_before,omitempty"` Scope *string `url:"scope,omitempty" json:"scope,omitempty"` AuthorID *int `url:"author_id,omitempty" json:"author_id,omitempty"` AssigneeID *int `url:"assignee_id,omitempty" json:"assignee_id,omitempty"` MyReactionEmoji *string `url:"my_reaction_emoji,omitempty" json:"my_reaction_emoji,omitempty"` + SourceBranch *string `url:"source_branch,omitempty" json:"source_branch,omitempty"` + TargetBranch *string `url:"target_branch,omitempty" json:"target_branch,omitempty"` + Search *string `url:"search,omitempty" json:"search,omitempty"` } // ListMergeRequests gets all merge requests. The state parameter can be used @@ -181,6 +186,57 @@ func (s *MergeRequestsService) ListMergeRequests(opt *ListMergeRequestsOptions, return m, resp, err } +// ListGroupMergeRequestsOptions represents the available ListGroupMergeRequests() +// options. +// +// GitLab API docs: +// https://docs.gitlab.com/ce/api/merge_requests.html#list-group-merge-requests +type ListGroupMergeRequestsOptions struct { + ListOptions + State *string `url:"state,omitempty" json:"state,omitempty"` + OrderBy *string `url:"order_by,omitempty" json:"order_by,omitempty"` + Sort *string `url:"sort,omitempty" json:"sort,omitempty"` + Milestone *string `url:"milestone,omitempty" json:"milestone,omitempty"` + View *string `url:"view,omitempty" json:"view,omitempty"` + Labels Labels `url:"labels,omitempty" json:"labels,omitempty"` + CreatedAfter *time.Time `url:"created_after,omitempty" json:"created_after,omitempty"` + CreatedBefore *time.Time `url:"created_before,omitempty" json:"created_before,omitempty"` + UpdatedAfter *time.Time `url:"updated_after,omitempty" json:"updated_after,omitempty"` + UpdatedBefore *time.Time `url:"updated_before,omitempty" json:"updated_before,omitempty"` + Scope *string `url:"scope,omitempty" json:"scope,omitempty"` + AuthorID *int `url:"author_id,omitempty" json:"author_id,omitempty"` + AssigneeID *int `url:"assignee_id,omitempty" json:"assignee_id,omitempty"` + MyReactionEmoji *string `url:"my_reaction_emoji,omitempty" json:"my_reaction_emoji,omitempty"` + SourceBranch *string `url:"source_branch,omitempty" json:"source_branch,omitempty"` + TargetBranch *string `url:"target_branch,omitempty" json:"target_branch,omitempty"` + Search *string `url:"search,omitempty" json:"search,omitempty"` +} + +// ListGroupMergeRequests gets all merge requests for this group. +// +// GitLab API docs: +// https://docs.gitlab.com/ce/api/merge_requests.html#list-group-merge-requests +func (s *MergeRequestsService) ListGroupMergeRequests(gid interface{}, opt *ListGroupMergeRequestsOptions, options ...OptionFunc) ([]*MergeRequest, *Response, error) { + group, err := parseID(gid) + if err != nil { + return nil, nil, err + } + u := fmt.Sprintf("groups/%s/merge_requests", url.QueryEscape(group)) + + req, err := s.client.NewRequest("GET", u, opt, options) + if err != nil { + return nil, nil, err + } + + var m []*MergeRequest + resp, err := s.client.Do(req, &m) + if err != nil { + return nil, resp, err + } + + return m, resp, err +} + // ListProjectMergeRequestsOptions represents the available ListMergeRequests() // options. // @@ -197,19 +253,21 @@ type ListProjectMergeRequestsOptions struct { Labels Labels `url:"labels,omitempty" json:"labels,omitempty"` CreatedAfter *time.Time `url:"created_after,omitempty" json:"created_after,omitempty"` CreatedBefore *time.Time `url:"created_before,omitempty" json:"created_before,omitempty"` + UpdatedAfter *time.Time `url:"updated_after,omitempty" json:"updated_after,omitempty"` + UpdatedBefore *time.Time `url:"updated_before,omitempty" json:"updated_before,omitempty"` Scope *string `url:"scope,omitempty" json:"scope,omitempty"` AuthorID *int `url:"author_id,omitempty" json:"author_id,omitempty"` AssigneeID *int `url:"assignee_id,omitempty" json:"assignee_id,omitempty"` MyReactionEmoji *string `url:"my_reaction_emoji,omitempty" json:"my_reaction_emoji,omitempty"` + SourceBranch *string `url:"source_branch,omitempty" json:"source_branch,omitempty"` + TargetBranch *string `url:"target_branch,omitempty" json:"target_branch,omitempty"` + Search *string `url:"search,omitempty" json:"search,omitempty"` } -// ListProjectMergeRequests gets all merge requests for this project. The state -// parameter can be used to get only merge requests with a given state (opened, -// closed, or merged) or all of them (all). The pagination parameters page and -// per_page can be used to restrict the list of merge requests. +// ListProjectMergeRequests gets all merge requests for this project. // // GitLab API docs: -// https://docs.gitlab.com/ce/api/merge_requests.html#list-merge-requests +// https://docs.gitlab.com/ce/api/merge_requests.html#list-project-merge-requests func (s *MergeRequestsService) ListProjectMergeRequests(pid interface{}, opt *ListProjectMergeRequestsOptions, options ...OptionFunc) ([]*MergeRequest, *Response, error) { project, err := parseID(pid) if err != nil { @@ -447,13 +505,17 @@ func (s *MergeRequestsService) CreateMergeRequest(pid interface{}, opt *CreateMe // GitLab API docs: // https://docs.gitlab.com/ce/api/merge_requests.html#update-mr type UpdateMergeRequestOptions struct { - Title *string `url:"title,omitempty" json:"title,omitempty"` - Description *string `url:"description,omitempty" json:"description,omitempty"` - TargetBranch *string `url:"target_branch,omitempty" json:"target_branch,omitempty"` - AssigneeID *int `url:"assignee_id,omitempty" json:"assignee_id,omitempty"` - Labels Labels `url:"labels,comma,omitempty" json:"labels,omitempty"` - MilestoneID *int `url:"milestone_id,omitempty" json:"milestone_id,omitempty"` - StateEvent *string `url:"state_event,omitempty" json:"state_event,omitempty"` + Title *string `url:"title,omitempty" json:"title,omitempty"` + Description *string `url:"description,omitempty" json:"description,omitempty"` + TargetBranch *string `url:"target_branch,omitempty" json:"target_branch,omitempty"` + AssigneeID *int `url:"assignee_id,omitempty" json:"assignee_id,omitempty"` + Labels Labels `url:"labels,comma,omitempty" json:"labels,omitempty"` + MilestoneID *int `url:"milestone_id,omitempty" json:"milestone_id,omitempty"` + StateEvent *string `url:"state_event,omitempty" json:"state_event,omitempty"` + RemoveSourceBranch *bool `url:"remove_source_branch,omitempty" json:"remove_source_branch,omitempty"` + Squash *bool `url:"squash,omitempty" json:"squash,omitempty"` + DiscussionLocked *bool `url:"discussion_locked,omitempty" json:"discussion_locked,omitempty"` + AllowCollaboration *bool `url:"allow_collaboration,omitempty" json:"allow_collaboration,omitempty"` } // UpdateMergeRequest updates an existing project milestone. @@ -626,8 +688,8 @@ func (s *MergeRequestsService) GetSingleMergeRequestDiffVersion(pid interface{}, return v, resp, err } -// SubscribeToMergeRequest subscribes the authenticated user to the given merge request -// to receive notifications. If the user is already subscribed to the +// SubscribeToMergeRequest subscribes the authenticated user to the given merge +// request to receive notifications. If the user is already subscribed to the // merge request, the status code 304 is returned. // // GitLab API docs: @@ -653,9 +715,10 @@ func (s *MergeRequestsService) SubscribeToMergeRequest(pid interface{}, mergeReq return m, resp, err } -// UnsubscribeFromMergeRequest unsubscribes the authenticated user from the given merge request -// to not receive notifications from that merge request. If the user is -// not subscribed to the merge request, status code 304 is returned. +// UnsubscribeFromMergeRequest unsubscribes the authenticated user from the +// given merge request to not receive notifications from that merge request. +// If the user is not subscribed to the merge request, status code 304 is +// returned. // // GitLab API docs: // https://docs.gitlab.com/ce/api/merge_requests.html#unsubscribe-from-a-merge-request diff --git a/vendor/github.com/xanzy/go-gitlab/notes.go b/vendor/github.com/xanzy/go-gitlab/notes.go index 2ad7f9d4..0543174b 100644 --- a/vendor/github.com/xanzy/go-gitlab/notes.go +++ b/vendor/github.com/xanzy/go-gitlab/notes.go @@ -40,22 +40,49 @@ type Note struct { Title string `json:"title"` FileName string `json:"file_name"` Author struct { - ID int `json:"id"` - Username string `json:"username"` - Email string `json:"email"` - Name string `json:"name"` - State string `json:"state"` - CreatedAt *time.Time `json:"created_at"` - AvatarURL string `json:"avatar_url"` - WebURL string `json:"web_url"` + ID int `json:"id"` + Username string `json:"username"` + Email string `json:"email"` + Name string `json:"name"` + State string `json:"state"` + AvatarURL string `json:"avatar_url"` + WebURL string `json:"web_url"` } `json:"author"` - System bool `json:"system"` - ExpiresAt *time.Time `json:"expires_at"` - UpdatedAt *time.Time `json:"updated_at"` - CreatedAt *time.Time `json:"created_at"` - NoteableID int `json:"noteable_id"` - NoteableType string `json:"noteable_type"` - NoteableIID int `json:"noteable_iid"` + System bool `json:"system"` + ExpiresAt *time.Time `json:"expires_at"` + UpdatedAt *time.Time `json:"updated_at"` + CreatedAt *time.Time `json:"created_at"` + NoteableID int `json:"noteable_id"` + NoteableType string `json:"noteable_type"` + Position *NotePosition `json:"position"` + Resolvable bool `json:"resolvable"` + Resolved bool `json:"resolved"` + ResolvedBy struct { + ID int `json:"id"` + Username string `json:"username"` + Email string `json:"email"` + Name string `json:"name"` + State string `json:"state"` + AvatarURL string `json:"avatar_url"` + WebURL string `json:"web_url"` + } `json:"resolved_by"` + NoteableIID int `json:"noteable_iid"` +} + +// NotePosition represents the position attributes of a note. +type NotePosition struct { + BaseSHA string `json:"base_sha"` + StartSHA string `json:"start_sha"` + HeadSHA string `json:"head_sha"` + PositionType string `json:"position_type"` + NewPath string `json:"new_path,omitempty"` + NewLine int `json:"new_line,omitempty"` + OldPath string `json:"old_path,omitempty"` + OldLine int `json:"old_line,omitempty"` + Width int `json:"width,omitempty"` + Height int `json:"height,omitempty"` + X int `json:"x,omitempty"` + Y int `json:"y,omitempty"` } func (n Note) String() string { @@ -66,7 +93,11 @@ func (n Note) String() string { // // GitLab API docs: // https://docs.gitlab.com/ce/api/notes.html#list-project-issue-notes -type ListIssueNotesOptions ListOptions +type ListIssueNotesOptions struct { + ListOptions + OrderBy *string `url:"order_by,omitempty" json:"order_by,omitempty"` + Sort *string `url:"sort,omitempty" json:"sort,omitempty"` +} // ListIssueNotes gets a list of all notes for a single issue. // diff --git a/vendor/github.com/xanzy/go-gitlab/pages_domains.go b/vendor/github.com/xanzy/go-gitlab/pages_domains.go index 3cd72e21..c1db4eaa 100644 --- a/vendor/github.com/xanzy/go-gitlab/pages_domains.go +++ b/vendor/github.com/xanzy/go-gitlab/pages_domains.go @@ -61,6 +61,25 @@ func (s *PagesDomainsService) ListPagesDomains(pid interface{}, opt *ListPagesDo return pd, resp, err } +// ListAllPagesDomains gets a list of all pages domains. +// +// GitLab API docs: +// https://docs.gitlab.com/ce/api/pages_domains.html#list-all-pages-domains +func (s *PagesDomainsService) ListAllPagesDomains(options ...OptionFunc) ([]*PagesDomain, *Response, error) { + req, err := s.client.NewRequest("GET", "pages/domains", nil, options) + if err != nil { + return nil, nil, err + } + + var pd []*PagesDomain + resp, err := s.client.Do(req, &pd) + if err != nil { + return nil, resp, err + } + + return pd, resp, err +} + // GetPagesDomain get a specific pages domain for a project. // // GitLab API docs: diff --git a/vendor/github.com/xanzy/go-gitlab/pipeline_schedules.go b/vendor/github.com/xanzy/go-gitlab/pipeline_schedules.go index bb935835..9ed568e0 100644 --- a/vendor/github.com/xanzy/go-gitlab/pipeline_schedules.go +++ b/vendor/github.com/xanzy/go-gitlab/pipeline_schedules.go @@ -30,15 +30,6 @@ type PipelineSchedulesService struct { client *Client } -// PipelineVariable represents a pipeline schedule variable. -// -// GitLab API docs: -// https://docs.gitlab.com/ce/api/pipeline_schedules.html#pipeline-schedule-variable -type PipelineVariable struct { - Key string `json:"key"` - Value string `json:"value"` -} - // PipelineSchedule represents a pipeline schedule. // // GitLab API docs: diff --git a/vendor/github.com/xanzy/go-gitlab/pipelines.go b/vendor/github.com/xanzy/go-gitlab/pipelines.go index 952d0d2c..3edcb36f 100644 --- a/vendor/github.com/xanzy/go-gitlab/pipelines.go +++ b/vendor/github.com/xanzy/go-gitlab/pipelines.go @@ -30,6 +30,14 @@ type PipelinesService struct { client *Client } +// PipelineVariable represents a pipeline variable. +// +// GitLab API docs: https://docs.gitlab.com/ce/api/pipelines.html +type PipelineVariable struct { + Key string `json:"key"` + Value string `json:"value"` +} + // Pipeline represents a GitLab pipeline. // // GitLab API docs: https://docs.gitlab.com/ce/api/pipelines.html @@ -84,6 +92,7 @@ type ListProjectPipelinesOptions struct { Scope *string `url:"scope,omitempty" json:"scope,omitempty"` Status *BuildStateValue `url:"status,omitempty" json:"status,omitempty"` Ref *string `url:"ref,omitempty" json:"ref,omitempty"` + SHA *string `url:"sha,omitempty" json:"sha,omitempty"` YamlErrors *bool `url:"yaml_errors,omitempty" json:"yaml_errors,omitempty"` Name *string `url:"name,omitempty" json:"name,omitempty"` Username *string `url:"username,omitempty" json:"username,omitempty"` @@ -142,7 +151,8 @@ func (s *PipelinesService) GetPipeline(pid interface{}, pipeline int, options .. // // GitLab API docs: https://docs.gitlab.com/ce/api/pipelines.html#create-a-new-pipeline type CreatePipelineOptions struct { - Ref *string `url:"ref,omitempty" json:"ref"` + Ref *string `url:"ref" json:"ref"` + Variables []*PipelineVariable `url:"variables,omitempty" json:"variables,omitempty"` } // CreatePipeline creates a new project pipeline. diff --git a/vendor/github.com/xanzy/go-gitlab/project_badges.go b/vendor/github.com/xanzy/go-gitlab/project_badges.go new file mode 100644 index 00000000..0c398387 --- /dev/null +++ b/vendor/github.com/xanzy/go-gitlab/project_badges.go @@ -0,0 +1,208 @@ +package gitlab + +import ( + "fmt" + "net/url" +) + +// ProjectBadge represents a project badge. +// +// GitLab API docs: +// https://docs.gitlab.com/ee/api/project_badges.html#list-all-badges-of-a-project +type ProjectBadge struct { + ID int `json:"id"` + LinkURL string `json:"link_url"` + ImageURL string `json:"image_url"` + RenderedLinkURL string `json:"rendered_link_url"` + RenderedImageURL string `json:"rendered_image_url"` + // Kind represents a project badge kind. Can be empty, when used PreviewProjectBadge(). + Kind string `json:"kind"` +} + +// ProjectBadgesService handles communication with the project badges +// related methods of the GitLab API. +// +// GitLab API docs: https://docs.gitlab.com/ee/api/project_badges.html +type ProjectBadgesService struct { + client *Client +} + +// ListProjectBadgesOptions represents the available ListProjectBadges() +// options. +// +// GitLab API docs: +// https://docs.gitlab.com/ee/api/project_badges.html#list-all-badges-of-a-project +type ListProjectBadgesOptions ListOptions + +// ListProjectBadges gets a list of a project's badges and its group badges. +// +// GitLab API docs: +// https://docs.gitlab.com/ee/api/project_badges.html#list-all-badges-of-a-project +func (s *ProjectBadgesService) ListProjectBadges(pid interface{}, opt *ListProjectBadgesOptions, options ...OptionFunc) ([]*ProjectBadge, *Response, error) { + project, err := parseID(pid) + if err != nil { + return nil, nil, err + } + u := fmt.Sprintf("projects/%s/badges", url.QueryEscape(project)) + + req, err := s.client.NewRequest("GET", u, opt, options) + if err != nil { + return nil, nil, err + } + + var pb []*ProjectBadge + resp, err := s.client.Do(req, &pb) + if err != nil { + return nil, resp, err + } + + return pb, resp, err +} + +// GetProjectBadge gets a project badge. +// +// GitLab API docs: +// https://docs.gitlab.com/ee/api/project_badges.html#get-a-badge-of-a-project +func (s *ProjectBadgesService) GetProjectBadge(pid interface{}, badge int, options ...OptionFunc) (*ProjectBadge, *Response, error) { + project, err := parseID(pid) + if err != nil { + return nil, nil, err + } + u := fmt.Sprintf("projects/%s/badges/%d", url.QueryEscape(project), badge) + + req, err := s.client.NewRequest("GET", u, nil, options) + if err != nil { + return nil, nil, err + } + + pb := new(ProjectBadge) + resp, err := s.client.Do(req, pb) + if err != nil { + return nil, resp, err + } + + return pb, resp, err +} + +// AddProjectBadgeOptions represents the available AddProjectBadge() options. +// +// GitLab API docs: +// https://docs.gitlab.com/ee/api/project_badges.html#add-a-badge-to-a-project +type AddProjectBadgeOptions struct { + LinkURL *string `url:"link_url,omitempty" json:"link_url,omitempty"` + ImageURL *string `url:"image_url,omitempty" json:"image_url,omitempty"` +} + +// AddProjectBadge adds a badge to a project. +// +// GitLab API docs: +// https://docs.gitlab.com/ee/api/project_badges.html#add-a-badge-to-a-project +func (s *ProjectBadgesService) AddProjectBadge(pid interface{}, opt *AddProjectBadgeOptions, options ...OptionFunc) (*ProjectBadge, *Response, error) { + project, err := parseID(pid) + if err != nil { + return nil, nil, err + } + u := fmt.Sprintf("projects/%s/badges", url.QueryEscape(project)) + + req, err := s.client.NewRequest("POST", u, opt, options) + if err != nil { + return nil, nil, err + } + + pb := new(ProjectBadge) + resp, err := s.client.Do(req, pb) + if err != nil { + return nil, resp, err + } + + return pb, resp, err +} + +// EditProjectBadgeOptions represents the available EditProjectBadge() options. +// +// GitLab API docs: +// https://docs.gitlab.com/ee/api/project_badges.html#edit-a-badge-of-a-project +type EditProjectBadgeOptions struct { + LinkURL *string `url:"link_url,omitempty" json:"link_url,omitempty"` + ImageURL *string `url:"image_url,omitempty" json:"image_url,omitempty"` +} + +// EditProjectBadge updates a badge of a project. +// +// GitLab API docs: +// https://docs.gitlab.com/ee/api/project_badges.html#edit-a-badge-of-a-project +func (s *ProjectBadgesService) EditProjectBadge(pid interface{}, badge int, opt *EditProjectBadgeOptions, options ...OptionFunc) (*ProjectBadge, *Response, error) { + project, err := parseID(pid) + if err != nil { + return nil, nil, err + } + u := fmt.Sprintf("projects/%s/badges/%d", url.QueryEscape(project), badge) + + req, err := s.client.NewRequest("PUT", u, opt, options) + if err != nil { + return nil, nil, err + } + + pb := new(ProjectBadge) + resp, err := s.client.Do(req, pb) + if err != nil { + return nil, resp, err + } + + return pb, resp, err +} + +// DeleteProjectBadge removes a badge from a project. Only project's +// badges will be removed by using this endpoint. +// +// GitLab API docs: +// https://docs.gitlab.com/ee/api/project_badges.html#remove-a-badge-from-a-project +func (s *ProjectBadgesService) DeleteProjectBadge(pid interface{}, badge int, options ...OptionFunc) (*Response, error) { + project, err := parseID(pid) + if err != nil { + return nil, err + } + u := fmt.Sprintf("projects/%s/badges/%d", url.QueryEscape(project), badge) + + req, err := s.client.NewRequest("DELETE", u, nil, options) + if err != nil { + return nil, err + } + + return s.client.Do(req, nil) +} + +// ProjectBadgePreviewOptions represents the available PreviewProjectBadge() options. +// +// GitLab API docs: +// https://docs.gitlab.com/ee/api/project_badges.html#preview-a-badge-from-a-project +type ProjectBadgePreviewOptions struct { + LinkURL *string `url:"link_url,omitempty" json:"link_url,omitempty"` + ImageURL *string `url:"image_url,omitempty" json:"image_url,omitempty"` +} + +// PreviewProjectBadge returns how the link_url and image_url final URLs would be after +// resolving the placeholder interpolation. +// +// GitLab API docs: +// https://docs.gitlab.com/ee/api/project_badges.html#preview-a-badge-from-a-project +func (s *ProjectBadgesService) PreviewProjectBadge(pid interface{}, opt *ProjectBadgePreviewOptions, options ...OptionFunc) (*ProjectBadge, *Response, error) { + project, err := parseID(pid) + if err != nil { + return nil, nil, err + } + u := fmt.Sprintf("projects/%s/badges/render", url.QueryEscape(project)) + + req, err := s.client.NewRequest("GET", u, opt, options) + if err != nil { + return nil, nil, err + } + + pb := new(ProjectBadge) + resp, err := s.client.Do(req, &pb) + if err != nil { + return nil, resp, err + } + + return pb, resp, err +} diff --git a/vendor/github.com/xanzy/go-gitlab/project_members.go b/vendor/github.com/xanzy/go-gitlab/project_members.go index 70beb72d..94b618cf 100644 --- a/vendor/github.com/xanzy/go-gitlab/project_members.go +++ b/vendor/github.com/xanzy/go-gitlab/project_members.go @@ -29,8 +29,8 @@ type ProjectMembersService struct { client *Client } -// ListProjectMembersOptions represents the available ListProjectMembers() -// options. +// ListProjectMembersOptions represents the available ListProjectMembers() and +// ListAllProjectMembers() options. // // GitLab API docs: // https://docs.gitlab.com/ce/api/members.html#list-all-members-of-a-group-or-project @@ -39,7 +39,9 @@ type ListProjectMembersOptions struct { Query *string `url:"query,omitempty" json:"query,omitempty"` } -// ListProjectMembers gets a list of a project's team members. +// ListProjectMembers gets a list of a project's team members viewable by the +// authenticated user. Returns only direct members and not inherited members +// through ancestors groups. // // GitLab API docs: // https://docs.gitlab.com/ce/api/members.html#list-all-members-of-a-group-or-project @@ -64,6 +66,33 @@ func (s *ProjectMembersService) ListProjectMembers(pid interface{}, opt *ListPro return pm, resp, err } +// ListAllProjectMembers gets a list of a project's team members viewable by the +// authenticated user. Returns a list including inherited members through +// ancestor groups. +// +// GitLab API docs: +// https://docs.gitlab.com/ce/api/members.html#list-all-members-of-a-group-or-project-including-inherited-members +func (s *ProjectMembersService) ListAllProjectMembers(pid interface{}, opt *ListProjectMembersOptions, options ...OptionFunc) ([]*ProjectMember, *Response, error) { + project, err := parseID(pid) + if err != nil { + return nil, nil, err + } + u := fmt.Sprintf("projects/%s/members/all", url.QueryEscape(project)) + + req, err := s.client.NewRequest("GET", u, opt, options) + if err != nil { + return nil, nil, err + } + + var pm []*ProjectMember + resp, err := s.client.Do(req, &pm) + if err != nil { + return nil, resp, err + } + + return pm, resp, err +} + // GetProjectMember gets a project team member. // // GitLab API docs: diff --git a/vendor/github.com/xanzy/go-gitlab/projects.go b/vendor/github.com/xanzy/go-gitlab/projects.go index 4a252a99..7afbd42b 100644 --- a/vendor/github.com/xanzy/go-gitlab/projects.go +++ b/vendor/github.com/xanzy/go-gitlab/projects.go @@ -182,18 +182,19 @@ func (s Project) String() string { // GitLab API docs: https://docs.gitlab.com/ce/api/projects.html#list-projects type ListProjectsOptions struct { ListOptions - Archived *bool `url:"archived,omitempty" json:"archived,omitempty"` - OrderBy *string `url:"order_by,omitempty" json:"order_by,omitempty"` - Sort *string `url:"sort,omitempty" json:"sort,omitempty"` - Search *string `url:"search,omitempty" json:"search,omitempty"` - Simple *bool `url:"simple,omitempty" json:"simple,omitempty"` - Owned *bool `url:"owned,omitempty" json:"owned,omitempty"` - Membership *bool `url:"membership,omitempty" json:"membership,omitempty"` - Starred *bool `url:"starred,omitempty" json:"starred,omitempty"` - Statistics *bool `url:"statistics,omitempty" json:"statistics,omitempty"` - Visibility *VisibilityValue `url:"visibility,omitempty" json:"visibility,omitempty"` - WithIssuesEnabled *bool `url:"with_issues_enabled,omitempty" json:"with_issues_enabled,omitempty"` - WithMergeRequestsEnabled *bool `url:"with_merge_requests_enabled,omitempty" json:"with_merge_requests_enabled,omitempty"` + Archived *bool `url:"archived,omitempty" json:"archived,omitempty"` + OrderBy *string `url:"order_by,omitempty" json:"order_by,omitempty"` + Sort *string `url:"sort,omitempty" json:"sort,omitempty"` + Search *string `url:"search,omitempty" json:"search,omitempty"` + Simple *bool `url:"simple,omitempty" json:"simple,omitempty"` + Owned *bool `url:"owned,omitempty" json:"owned,omitempty"` + Membership *bool `url:"membership,omitempty" json:"membership,omitempty"` + Starred *bool `url:"starred,omitempty" json:"starred,omitempty"` + Statistics *bool `url:"statistics,omitempty" json:"statistics,omitempty"` + Visibility *VisibilityValue `url:"visibility,omitempty" json:"visibility,omitempty"` + WithIssuesEnabled *bool `url:"with_issues_enabled,omitempty" json:"with_issues_enabled,omitempty"` + WithMergeRequestsEnabled *bool `url:"with_merge_requests_enabled,omitempty" json:"with_merge_requests_enabled,omitempty"` + MinAccessLevel *AccessLevelValue `url:"min_access_level,omitempty" json:"min_access_level,omitempty"` } // ListProjects gets a list of projects accessible by the authenticated user. @@ -282,6 +283,35 @@ func (s *ProjectsService) ListProjectsUsers(pid interface{}, opt *ListProjectUse return p, resp, err } +// ProjectLanguages is a map of strings because the response is arbitrary +// +// Gitlab API docs: https://docs.gitlab.com/ce/api/projects.html#languages +type ProjectLanguages map[string]float32 + +// GetProjectLanguages gets a list of languages used by the project +// +// GitLab API docs: https://docs.gitlab.com/ce/api/projects.html#languages +func (s *ProjectsService) GetProjectLanguages(pid interface{}, options ...OptionFunc) (*ProjectLanguages, *Response, error) { + project, err := parseID(pid) + if err != nil { + return nil, nil, err + } + u := fmt.Sprintf("projects/%s/languages", url.QueryEscape(project)) + + req, err := s.client.NewRequest("GET", u, nil, options) + if err != nil { + return nil, nil, err + } + + p := new(ProjectLanguages) + resp, err := s.client.Do(req, p) + if err != nil { + return nil, resp, err + } + + return p, resp, err +} + // GetProject gets a specific project, identified by project ID or // NAMESPACE/PROJECT_NAME, which is owned by the authenticated user. // @@ -371,7 +401,7 @@ func (s *ProjectsService) GetProjectEvents(pid interface{}, opt *GetProjectEvent // CreateProjectOptions represents the available CreateProjects() options. // -// GitLab API docs: https://docs.gitlab.com/ce/api/projects.html#create-project +// GitLab API docs: https://docs.gitlab.com/ee/api/projects.html#create-project type CreateProjectOptions struct { Name *string `url:"name,omitempty" json:"name,omitempty"` Path *string `url:"path,omitempty" json:"path,omitempty"` @@ -397,6 +427,7 @@ type CreateProjectOptions struct { TagList *[]string `url:"tag_list,omitempty" json:"tag_list,omitempty"` PrintingMergeRequestLinkEnabled *bool `url:"printing_merge_request_link_enabled,omitempty" json:"printing_merge_request_link_enabled,omitempty"` CIConfigPath *string `url:"ci_config_path,omitempty" json:"ci_config_path,omitempty"` + ApprovalsBeforeMerge *int `url:"approvals_before_merge" json:"approvals_before_merge"` } // CreateProject creates a new project owned by the authenticated user. diff --git a/vendor/github.com/xanzy/go-gitlab/repository_files.go b/vendor/github.com/xanzy/go-gitlab/repository_files.go index 473128a3..cbfd4249 100644 --- a/vendor/github.com/xanzy/go-gitlab/repository_files.go +++ b/vendor/github.com/xanzy/go-gitlab/repository_files.go @@ -66,7 +66,7 @@ func (s *RepositoryFilesService) GetFile(pid interface{}, fileName string, opt * if err != nil { return nil, nil, err } - u := fmt.Sprintf("projects/%s/repository/files/%s", url.QueryEscape(project), url.QueryEscape(fileName)) + u := fmt.Sprintf("projects/%s/repository/files/%s", url.QueryEscape(project), url.PathEscape(fileName)) req, err := s.client.NewRequest("GET", u, opt, options) if err != nil { @@ -99,7 +99,7 @@ func (s *RepositoryFilesService) GetRawFile(pid interface{}, fileName string, op if err != nil { return nil, nil, err } - u := fmt.Sprintf("projects/%s/repository/files/%s/raw", url.QueryEscape(project), url.QueryEscape(fileName)) + u := fmt.Sprintf("projects/%s/repository/files/%s/raw", url.QueryEscape(project), url.PathEscape(fileName)) req, err := s.client.NewRequest("GET", u, opt, options) if err != nil { @@ -149,7 +149,7 @@ func (s *RepositoryFilesService) CreateFile(pid interface{}, fileName string, op if err != nil { return nil, nil, err } - u := fmt.Sprintf("projects/%s/repository/files/%s", url.QueryEscape(project), url.QueryEscape(fileName)) + u := fmt.Sprintf("projects/%s/repository/files/%s", url.QueryEscape(project), url.PathEscape(fileName)) req, err := s.client.NewRequest("POST", u, opt, options) if err != nil { @@ -188,7 +188,7 @@ func (s *RepositoryFilesService) UpdateFile(pid interface{}, fileName string, op if err != nil { return nil, nil, err } - u := fmt.Sprintf("projects/%s/repository/files/%s", url.QueryEscape(project), url.QueryEscape(fileName)) + u := fmt.Sprintf("projects/%s/repository/files/%s", url.QueryEscape(project), url.PathEscape(fileName)) req, err := s.client.NewRequest("PUT", u, opt, options) if err != nil { @@ -224,7 +224,7 @@ func (s *RepositoryFilesService) DeleteFile(pid interface{}, fileName string, op if err != nil { return nil, err } - u := fmt.Sprintf("projects/%s/repository/files/%s", url.QueryEscape(project), url.QueryEscape(fileName)) + u := fmt.Sprintf("projects/%s/repository/files/%s", url.QueryEscape(project), url.PathEscape(fileName)) req, err := s.client.NewRequest("DELETE", u, opt, options) if err != nil { diff --git a/vendor/github.com/xanzy/go-gitlab/runners.go b/vendor/github.com/xanzy/go-gitlab/runners.go index 4ffef038..960656c9 100644 --- a/vendor/github.com/xanzy/go-gitlab/runners.go +++ b/vendor/github.com/xanzy/go-gitlab/runners.go @@ -18,6 +18,7 @@ package gitlab import ( "fmt" + "net" "net/url" "time" ) @@ -34,13 +35,15 @@ type RunnersService struct { // // GitLab API docs: https://docs.gitlab.com/ce/api/runners.html type Runner struct { - ID int `json:"id"` - Description string `json:"description"` - Active bool `json:"active"` - IsShared bool `json:"is_shared"` - Name string `json:"name"` - Online bool `json:"online"` - Status string `json:"status"` + ID int `json:"id"` + Description string `json:"description"` + Active bool `json:"active"` + IsShared bool `json:"is_shared"` + IPAddress *net.IP `json:"ip_address"` + Name string `json:"name"` + Online bool `json:"online"` + Status string `json:"status"` + Token string `json:"token"` } // RunnerDetails represents the GitLab CI runner details. @@ -52,11 +55,11 @@ type RunnerDetails struct { Description string `json:"description"` ID int `json:"id"` IsShared bool `json:"is_shared"` - ContactedAt *time.Time `json:"contacted_at,omitempty"` + ContactedAt *time.Time `json:"contacted_at"` Name string `json:"name"` Online bool `json:"online"` Status string `json:"status"` - Platform string `json:"platform,omitempty"` + Platform string `json:"platform"` Projects []struct { ID int `json:"id"` Name string `json:"name"` @@ -64,11 +67,12 @@ type RunnerDetails struct { Path string `json:"path"` PathWithNamespace string `json:"path_with_namespace"` } `json:"projects"` - Token string `json:"Token"` - Revision string `json:"revision,omitempty"` - TagList []string `json:"tag_list"` - Version string `json:"version,omitempty"` - AccessLevel string `json:"access_level"` + Token string `json:"token"` + Revision string `json:"revision"` + TagList []string `json:"tag_list"` + Version string `json:"version"` + AccessLevel string `json:"access_level"` + MaximumTimeout int `json:"maximum_timeout"` } // ListRunnersOptions represents the available ListRunners() options. @@ -149,12 +153,13 @@ func (s *RunnersService) GetRunnerDetails(rid interface{}, options ...OptionFunc // GitLab API docs: // https://docs.gitlab.com/ce/api/runners.html#update-runner-39-s-details type UpdateRunnerDetailsOptions struct { - Description *string `url:"description,omitempty" json:"description,omitempty"` - Active *bool `url:"active,omitempty" json:"active,omitempty"` - TagList []string `url:"tag_list[],omitempty" json:"tag_list,omitempty"` - RunUntagged *bool `url:"run_untagged,omitempty" json:"run_untagged,omitempty"` - Locked *bool `url:"locked,omitempty" json:"locked,omitempty"` - AccessLevel *string `url:"access_level,omitempty" json:"access_level,omitempty"` + Description *string `url:"description,omitempty" json:"description,omitempty"` + Active *bool `url:"active,omitempty" json:"active,omitempty"` + TagList []string `url:"tag_list[],omitempty" json:"tag_list,omitempty"` + RunUntagged *bool `url:"run_untagged,omitempty" json:"run_untagged,omitempty"` + Locked *bool `url:"locked,omitempty" json:"locked,omitempty"` + AccessLevel *string `url:"access_level,omitempty" json:"access_level,omitempty"` + MaximumTimeout *int `url:"maximum_timeout,omitempty" json:"maximum_timeout,omitempty"` } // UpdateRunnerDetails updates details for a given runner. @@ -324,3 +329,82 @@ func (s *RunnersService) DisableProjectRunner(pid interface{}, rid interface{}, return s.client.Do(req, nil) } + +// RegisterNewRunnerOptions represents the available RegisterNewRunner() +// options. +// +// GitLab API docs: +// https://docs.gitlab.com/ce/api/runners.html#register-a-new-runner +type RegisterNewRunnerOptions struct { + Token *string `url:"token" json:"token"` + Description *string `url:"description,omitempty" json:"description,omitempty"` + Info *string `url:"info,omitempty" json:"info,omitempty"` + Active *bool `url:"active,omitempty" json:"active,omitempty"` + Locked *bool `url:"locked,omitempty" json:"locked,omitempty"` + RunUntagged *bool `url:"run_untagged,omitempty" json:"run_untagged,omitempty"` + TagList []string `url:"tag_list[],omitempty" json:"tag_list,omitempty"` + MaximumTimeout *int `url:"maximum_timeout,omitempty" json:"maximum_timeout,omitempty"` +} + +// RegisterNewRunner registers a new Runner for the instance. +// +// GitLab API docs: +// https://docs.gitlab.com/ce/api/runners.html#register-a-new-runner +func (s *RunnersService) RegisterNewRunner(opt *RegisterNewRunnerOptions, options ...OptionFunc) (*Runner, *Response, error) { + req, err := s.client.NewRequest("POST", "runners", opt, options) + if err != nil { + return nil, nil, err + } + + var r *Runner + resp, err := s.client.Do(req, &r) + if err != nil { + return nil, resp, err + } + + return r, resp, err +} + +// DeleteRegisteredRunnerOptions represents the available +// DeleteRegisteredRunner() options. +// +// GitLab API docs: +// https://docs.gitlab.com/ce/api/runners.html#delete-a-registered-runner +type DeleteRegisteredRunnerOptions struct { + Token *string `url:"token" json:"token"` +} + +// DeleteRegisteredRunner registers a new Runner for the instance. +// +// GitLab API docs: +// https://docs.gitlab.com/ce/api/runners.html#delete-a-registered-runner +func (s *RunnersService) DeleteRegisteredRunner(opt *DeleteRegisteredRunnerOptions, options ...OptionFunc) (*Response, error) { + req, err := s.client.NewRequest("DELETE", "runners", opt, options) + if err != nil { + return nil, err + } + + return s.client.Do(req, nil) +} + +// VerifyRegisteredRunnerOptions represents the available +// VerifyRegisteredRunner() options. +// +// GitLab API docs: +// https://docs.gitlab.com/ce/api/runners.html#verify-authentication-for-a-registered-runner +type VerifyRegisteredRunnerOptions struct { + Token *string `url:"token" json:"token"` +} + +// VerifyRegisteredRunner registers a new Runner for the instance. +// +// GitLab API docs: +// https://docs.gitlab.com/ce/api/runners.html#verify-authentication-for-a-registered-runner +func (s *RunnersService) VerifyRegisteredRunner(opt *VerifyRegisteredRunnerOptions, options ...OptionFunc) (*Response, error) { + req, err := s.client.NewRequest("POST", "runners/verify", opt, options) + if err != nil { + return nil, err + } + + return s.client.Do(req, nil) +} diff --git a/vendor/github.com/xanzy/go-gitlab/services.go b/vendor/github.com/xanzy/go-gitlab/services.go index e93ae600..890e5a3f 100644 --- a/vendor/github.com/xanzy/go-gitlab/services.go +++ b/vendor/github.com/xanzy/go-gitlab/services.go @@ -45,8 +45,10 @@ type Service struct { MergeRequestsEvents bool `json:"merge_requests_events"` TagPushEvents bool `json:"tag_push_events"` NoteEvents bool `json:"note_events"` + ConfidentialNoteEvents bool `json:"confidential_note_events"` PipelineEvents bool `json:"pipeline_events"` JobEvents bool `json:"job_events"` + WikiPageEvents bool `json:"wiki_page_events"` } // SetGitLabCIServiceOptions represents the available SetGitLabCIService() @@ -252,7 +254,28 @@ type SlackService struct { // GitLab API docs: // https://docs.gitlab.com/ce/api/services.html#slack type SlackServiceProperties struct { - NotifyOnlyBrokenPipelines bool `json:"notify_only_broken_pipelines"` + // Note: NotifyOnlyBrokenPipelines and NotifyOnlyDefaultBranch are not + // just "bool" because in some cases gitlab returns + // "notify_only_broken_pipelines": true, and in other cases + // "notify_only_broken_pipelines": "1". The same is for + // "notify_only_default_branch" field. + // We need to handle this, until the bug will be fixed. + // Ref: https://gitlab.com/gitlab-org/gitlab-ce/issues/50122 + + NotifyOnlyBrokenPipelines BoolValue `url:"notify_only_broken_pipelines,omitempty" json:"notify_only_broken_pipelines,omitempty"` + NotifyOnlyDefaultBranch BoolValue `url:"notify_only_default_branch,omitempty" json:"notify_only_default_branch,omitempty"` + WebHook string `url:"webhook,omitempty" json:"webhook,omitempty"` + Username string `url:"username,omitempty" json:"username,omitempty"` + Channel string `url:"channel,omitempty" json:"channel,omitempty"` + PushChannel string `url:"push_channel,omitempty" json:"push_channel,omitempty"` + IssueChannel string `url:"issue_channel,omitempty" json:"issue_channel,omitempty"` + ConfidentialIssueChannel string `url:"confidential_issue_channel,omitempty" json:"confidential_issue_channel,omitempty"` + MergeRequestChannel string `url:"merge_request_channel,omitempty" json:"merge_request_channel,omitempty"` + NoteChannel string `url:"note_channel,omitempty" json:"note_channel,omitempty"` + ConfidentialNoteChannel string `url:"confidential_note_channel,omitempty" json:"confidential_note_channel,omitempty"` + TagPushChannel string `url:"tag_push_channel,omitempty" json:"tag_push_channel,omitempty"` + PipelineChannel string `url:"pipeline_channel,omitempty" json:"pipeline_channel,omitempty"` + WikiPageChannel string `url:"wiki_page_channel,omitempty" json:"wiki_page_channel,omitempty"` } // GetSlackService gets Slack service settings for a project. @@ -286,9 +309,32 @@ func (s *ServicesService) GetSlackService(pid interface{}, options ...OptionFunc // GitLab API docs: // https://docs.gitlab.com/ce/api/services.html#edit-slack-service type SetSlackServiceOptions struct { - WebHook *string `url:"webhook,omitempty" json:"webhook,omitempty" ` - Username *string `url:"username,omitempty" json:"username,omitempty" ` - Channel *string `url:"channel,omitempty" json:"channel,omitempty"` + WebHook *string `url:"webhook,omitempty" json:"webhook,omitempty"` + Username *string `url:"username,omitempty" json:"username,omitempty"` + Channel *string `url:"channel,omitempty" json:"channel,omitempty"` + NotifyOnlyBrokenPipelines *bool `url:"notify_only_broken_pipelines,omitempty" json:"notify_only_broken_pipelines,omitempty"` + NotifyOnlyDefaultBranch *bool `url:"notify_only_default_branch,omitempty" json:"notify_only_default_branch,omitempty"` + PushEvents *bool `url:"push_events,omitempty" json:"push_events,omitempty"` + PushChannel *string `url:"push_channel,omitempty" json:"push_channel,omitempty"` + IssuesEvents *bool `url:"issues_events,omitempty" json:"issues_events,omitempty"` + IssueChannel *string `url:"issue_channel,omitempty" json:"issue_channel,omitempty"` + ConfidentialIssuesEvents *bool `url:"confidential_issues_events,omitempty" json:"confidential_issues_events,omitempty"` + ConfidentialIssueChannel *string `url:"confidential_issue_channel,omitempty" json:"confidential_issue_channel,omitempty"` + MergeRequestsEvents *bool `url:"merge_requests_events,omitempty" json:"merge_requests_events,omitempty"` + MergeRequestChannel *string `url:"merge_request_channel,omitempty" json:"merge_request_channel,omitempty"` + TagPushEvents *bool `url:"tag_push_events,omitempty" json:"tag_push_events,omitempty"` + TagPushChannel *string `url:"tag_push_channel,omitempty" json:"tag_push_channel,omitempty"` + NoteEvents *bool `url:"note_events,omitempty" json:"note_events,omitempty"` + NoteChannel *string `url:"note_channel,omitempty" json:"note_channel,omitempty"` + ConfidentialNoteEvents *bool `url:"confidential_note_events" json:"confidential_note_events"` + // TODO: Currently, GitLab ignores this option (not implemented yet?), so + // there is no way to set it. Uncomment when this is fixed. + // See: https://gitlab.com/gitlab-org/gitlab-ce/issues/49730 + //ConfidentialNoteChannel *string `json:"confidential_note_channel,omitempty"` + PipelineEvents *bool `url:"pipeline_events,omitempty" json:"pipeline_events,omitempty"` + PipelineChannel *string `url:"pipeline_channel,omitempty" json:"pipeline_channel,omitempty"` + WikiPageChannel *string `url:"wiki_page_channel,omitempty" json:"wiki_page_channel,omitempty"` + WikiPageEvents *bool `url:"wiki_page_events" json:"wiki_page_events"` } // SetSlackService sets Slack service for a project @@ -513,3 +559,91 @@ func (s *ServicesService) DeleteJenkinsCIService(pid interface{}, options ...Opt return s.client.Do(req, nil) } + +// MicrosoftTeamsService represents Microsoft Teams service settings. +// +// GitLab API docs: +// https://docs.gitlab.com/ce/api/services.html#microsoft-teams +type MicrosoftTeamsService struct { + Service + Properties *MicrosoftTeamsServiceProperties `json:"properties"` +} + +// MicrosoftTeamsServiceProperties represents Microsoft Teams specific properties. +// +// GitLab API docs: +// https://docs.gitlab.com/ce/api/services.html#microsoft-teams +type MicrosoftTeamsServiceProperties struct { + WebHook string `json:"webhook"` +} + +// GetMicrosoftTeamsService gets MicrosoftTeams service settings for a project. +// +// GitLab API docs: +// https://docs.gitlab.com/ce/api/services.html#get-microsoft-teams-service-settings +func (s *ServicesService) GetMicrosoftTeamsService(pid interface{}, options ...OptionFunc) (*MicrosoftTeamsService, *Response, error) { + project, err := parseID(pid) + if err != nil { + return nil, nil, err + } + u := fmt.Sprintf("projects/%s/services/microsoft-teams", url.QueryEscape(project)) + + req, err := s.client.NewRequest("GET", u, nil, options) + if err != nil { + return nil, nil, err + } + + svc := new(MicrosoftTeamsService) + resp, err := s.client.Do(req, svc) + if err != nil { + return nil, resp, err + } + + return svc, resp, err +} + +// SetMicrosoftTeamsServiceOptions represents the available SetMicrosoftTeamsService() +// options. +// +// GitLab API docs: +// https://docs.gitlab.com/ce/api/services.html#create-edit-microsoft-teams-service +type SetMicrosoftTeamsServiceOptions struct { + WebHook *string `url:"webhook,omitempty" json:"webhook,omitempty"` +} + +// SetMicrosoftTeamsService sets Microsoft Teams service for a project +// +// GitLab API docs: +// https://docs.gitlab.com/ce/api/services.html#create-edit-microsoft-teams-service +func (s *ServicesService) SetMicrosoftTeamsService(pid interface{}, opt *SetMicrosoftTeamsServiceOptions, options ...OptionFunc) (*Response, error) { + project, err := parseID(pid) + if err != nil { + return nil, err + } + u := fmt.Sprintf("projects/%s/services/microsoft-teams", url.QueryEscape(project)) + + req, err := s.client.NewRequest("PUT", u, opt, options) + if err != nil { + return nil, err + } + return s.client.Do(req, nil) +} + +// DeleteMicrosoftTeamsService deletes Microsoft Teams service for project. +// +// GitLab API docs: +// https://docs.gitlab.com/ce/api/services.html#delete-microsoft-teams-service +func (s *ServicesService) DeleteMicrosoftTeamsService(pid interface{}, options ...OptionFunc) (*Response, error) { + project, err := parseID(pid) + if err != nil { + return nil, err + } + u := fmt.Sprintf("projects/%s/services/microsoft-teams", url.QueryEscape(project)) + + req, err := s.client.NewRequest("DELETE", u, nil, options) + if err != nil { + return nil, err + } + + return s.client.Do(req, nil) +} diff --git a/vendor/github.com/xanzy/go-gitlab/session.go b/vendor/github.com/xanzy/go-gitlab/session.go deleted file mode 100644 index f89fdbe5..00000000 --- a/vendor/github.com/xanzy/go-gitlab/session.go +++ /dev/null @@ -1,78 +0,0 @@ -// -// Copyright 2017, Sander van Harmelen -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -package gitlab - -import "time" - -// SessionService handles communication with the session related methods of -// the GitLab API. -// -// GitLab API docs: https://docs.gitlab.com/ce/api/session.html -type SessionService struct { - client *Client -} - -// Session represents a GitLab session. -// -// GitLab API docs: https://docs.gitlab.com/ce/api/session.html#session -type Session struct { - ID int `json:"id"` - Username string `json:"username"` - Email string `json:"email"` - Name string `json:"name"` - PrivateToken string `json:"private_token"` - Blocked bool `json:"blocked"` - CreatedAt *time.Time `json:"created_at"` - Bio interface{} `json:"bio"` - Skype string `json:"skype"` - Linkedin string `json:"linkedin"` - Twitter string `json:"twitter"` - WebsiteURL string `json:"website_url"` - DarkScheme bool `json:"dark_scheme"` - ThemeID int `json:"theme_id"` - IsAdmin bool `json:"is_admin"` - CanCreateGroup bool `json:"can_create_group"` - CanCreateTeam bool `json:"can_create_team"` - CanCreateProject bool `json:"can_create_project"` -} - -// GetSessionOptions represents the available Session() options. -// -// GitLab API docs: https://docs.gitlab.com/ce/api/session.html#session -type GetSessionOptions struct { - Login *string `url:"login,omitempty" json:"login,omitempty"` - Email *string `url:"email,omitempty" json:"email,omitempty"` - Password *string `url:"password,omitempty" json:"password,omitempty"` -} - -// GetSession logs in to get private token. -// -// GitLab API docs: https://docs.gitlab.com/ce/api/session.html#session -func (s *SessionService) GetSession(opt *GetSessionOptions, options ...OptionFunc) (*Session, *Response, error) { - req, err := s.client.NewRequest("POST", "session", opt, options) - if err != nil { - return nil, nil, err - } - - session := new(Session) - resp, err := s.client.Do(req, session) - if err != nil { - return nil, resp, err - } - - return session, resp, err -} diff --git a/vendor/github.com/xanzy/go-gitlab/users.go b/vendor/github.com/xanzy/go-gitlab/users.go index a619ab03..1fed18c6 100644 --- a/vendor/github.com/xanzy/go-gitlab/users.go +++ b/vendor/github.com/xanzy/go-gitlab/users.go @@ -32,36 +32,40 @@ type UsersService struct { // User represents a GitLab user. // -// GitLab API docs: https://docs.gitlab.com/ce/api/users.html +// GitLab API docs: https://docs.gitlab.com/ee/api/users.html type User struct { - ID int `json:"id"` - Username string `json:"username"` - Email string `json:"email"` - Name string `json:"name"` - State string `json:"state"` - CreatedAt *time.Time `json:"created_at"` - Bio string `json:"bio"` - Location string `json:"location"` - Skype string `json:"skype"` - Linkedin string `json:"linkedin"` - Twitter string `json:"twitter"` - WebsiteURL string `json:"website_url"` - Organization string `json:"organization"` - ExternUID string `json:"extern_uid"` - Provider string `json:"provider"` - ThemeID int `json:"theme_id"` - LastActivityOn *ISOTime `json:"last_activity_on"` - ColorSchemeID int `json:"color_scheme_id"` - IsAdmin bool `json:"is_admin"` - AvatarURL string `json:"avatar_url"` - CanCreateGroup bool `json:"can_create_group"` - CanCreateProject bool `json:"can_create_project"` - ProjectsLimit int `json:"projects_limit"` - CurrentSignInAt *time.Time `json:"current_sign_in_at"` - LastSignInAt *time.Time `json:"last_sign_in_at"` - TwoFactorEnabled bool `json:"two_factor_enabled"` - Identities []*UserIdentity `json:"identities"` - External bool `json:"external"` + ID int `json:"id"` + Username string `json:"username"` + Email string `json:"email"` + Name string `json:"name"` + State string `json:"state"` + CreatedAt *time.Time `json:"created_at"` + Bio string `json:"bio"` + Location string `json:"location"` + PublicEmail string `json:"public_email"` + Skype string `json:"skype"` + Linkedin string `json:"linkedin"` + Twitter string `json:"twitter"` + WebsiteURL string `json:"website_url"` + Organization string `json:"organization"` + ExternUID string `json:"extern_uid"` + Provider string `json:"provider"` + ThemeID int `json:"theme_id"` + LastActivityOn *ISOTime `json:"last_activity_on"` + ColorSchemeID int `json:"color_scheme_id"` + IsAdmin bool `json:"is_admin"` + AvatarURL string `json:"avatar_url"` + CanCreateGroup bool `json:"can_create_group"` + CanCreateProject bool `json:"can_create_project"` + ProjectsLimit int `json:"projects_limit"` + CurrentSignInAt *time.Time `json:"current_sign_in_at"` + LastSignInAt *time.Time `json:"last_sign_in_at"` + ConfirmedAt *time.Time `json:"confirmed_at"` + TwoFactorEnabled bool `json:"two_factor_enabled"` + Identities []*UserIdentity `json:"identities"` + External bool `json:"external"` + PrivateProfile bool `json:"private_profile"` + SharedRunnersMinutesLimit int `json:"shared_runners_minutes_limit"` } // UserIdentity represents a user identity. diff --git a/vendor/github.com/zmb3/spotify/.travis.yml b/vendor/github.com/zmb3/spotify/.travis.yml new file mode 100644 index 00000000..3f50850c --- /dev/null +++ b/vendor/github.com/zmb3/spotify/.travis.yml @@ -0,0 +1,5 @@ +language: go + +go: + - 1.8 + - 1.9 diff --git a/vendor/github.com/zmb3/spotify/LICENSE b/vendor/github.com/zmb3/spotify/LICENSE new file mode 100644 index 00000000..5c304d1a --- /dev/null +++ b/vendor/github.com/zmb3/spotify/LICENSE @@ -0,0 +1,201 @@ +Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright {yyyy} {name of copyright owner} + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/vendor/github.com/zmb3/spotify/README.md b/vendor/github.com/zmb3/spotify/README.md new file mode 100644 index 00000000..6eb7478c --- /dev/null +++ b/vendor/github.com/zmb3/spotify/README.md @@ -0,0 +1,106 @@ + +Spotify +======= + +[![GoDoc](https://godoc.org/github.com/zmb3/spotify?status.svg)](http://godoc.org/github.com/zmb3/spotify) +[![Build status](https://ci.appveyor.com/api/projects/status/1nr9vv0jqq438nj2?svg=true)](https://ci.appveyor.com/project/zmb3/spotify) +[![Build Status](https://travis-ci.org/zmb3/spotify.svg)](https://travis-ci.org/zmb3/spotify) + +This is a Go wrapper for working with Spotify's +[Web API](https://developer.spotify.com/web-api/). + +It aims to support every task listed in the Web API Endpoint Reference, +located [here](https://developer.spotify.com/web-api/endpoint-reference/). + +By using this library you agree to Spotify's +[Developer Terms of Use](https://developer.spotify.com/developer-terms-of-use/). + +## Installation + +To install the library, simply + +`go get github.com/zmb3/spotify` + +## Authentication + +Spotify uses OAuth2 for authentication and authorization. +As of May 29, 2017 _all_ Web API endpoints require an access token. + +You can authenticate using a client credentials flow, but this does not provide +any authorization to access a user's private data. For most use cases, you'll +want to use the authorization code flow. This package includes an `Authenticator` +type to handle the details for you. + +Start by registering your application at the following page: + +https://developer.spotify.com/my-applications/. + +You'll get a __client ID__ and __secret key__ for your application. An easy way to +provide this data to your application is to set the SPOTIFY_ID and SPOTIFY_SECRET +environment variables. If you choose not to use environment variables, you can +provide this data manually. + + +````Go +// the redirect URL must be an exact match of a URL you've registered for your application +// scopes determine which permissions the user is prompted to authorize +auth := spotify.NewAuthenticator(redirectURL, spotify.ScopeUserReadPrivate) + +// if you didn't store your ID and secret key in the specified environment variables, +// you can set them manually here +auth.SetAuthInfo(clientID, secretKey) + +// get the user to this URL - how you do that is up to you +// you should specify a unique state string to identify the session +url := auth.AuthURL(state) + +// the user will eventually be redirected back to your redirect URL +// typically you'll have a handler set up like the following: +func redirectHandler(w http.ResponseWriter, r *http.Request) { + // use the same state string here that you used to generate the URL + token, err := auth.Token(state, r) + if err != nil { + http.Error(w, "Couldn't get token", http.StatusNotFound) + return + } + // create a client using the specified token + client := auth.NewClient(token) + + // the client can now be used to make authenticated requests +} +```` + +You may find the following resources useful: + +1. Spotify's Web API Authorization Guide: +https://developer.spotify.com/web-api/authorization-guide/ + +2. Go's OAuth2 package: +https://godoc.org/golang.org/x/oauth2/google + + +## Helpful Hints + + +### Optional Parameters + +Many of the functions in this package come in two forms - a simple version that +omits optional parameters and uses reasonable defaults, and a more sophisticated +version that accepts additional parameters. The latter is suffixed with `Opt` +to indicate that it accepts some optional parameters. + +### Automatic Retries + +The API will throttle your requests if you are sending them too rapidly. +The client can be configured to wait and re-attempt the request. +To enable this, set the `AutoRetry` field on the `Client` struct to `true`. + +For more information, see Spotify [rate-limits](https://developer.spotify.com/web-api/user-guide/#rate-limiting). + +## API Examples + +Examples of the API can be found in the [examples](examples) directory. + +You may find tools such as [Spotify's Web API Console](https://developer.spotify.com/web-api/console/) +or [Rapid API](https://rapidapi.com/package/SpotifyPublicAPI/functions?utm_source=SpotifyGitHub&utm_medium=button&utm_content=Vendor_GitHub) +valuable for experimenting with the API. diff --git a/vendor/github.com/zmb3/spotify/album.go b/vendor/github.com/zmb3/spotify/album.go new file mode 100644 index 00000000..64e9a34a --- /dev/null +++ b/vendor/github.com/zmb3/spotify/album.go @@ -0,0 +1,220 @@ +package spotify + +import ( + "errors" + "fmt" + "net/url" + "strconv" + "strings" + "time" +) + +// SimpleAlbum contains basic data about an album. +type SimpleAlbum struct { + // The name of the album. + Name string `json:"name"` + // A slice of SimpleArtists + Artists []SimpleArtist `json:"artists"` + // The field is present when getting an artist’s + // albums. Possible values are “album”, “single”, + // “compilation”, “appears_on”. Compare to album_type + // this field represents relationship between the artist + // and the album. + AlbumGroup string `json:"album_group"` + // The type of the album: one of "album", + // "single", or "compilation". + AlbumType string `json:"album_type"` + // The SpotifyID for the album. + ID ID `json:"id"` + // The SpotifyURI for the album. + URI URI `json:"uri"` + // The markets in which the album is available, + // identified using ISO 3166-1 alpha-2 country + // codes. Note that al album is considered + // available in a market when at least 1 of its + // tracks is available in that market. + AvailableMarkets []string `json:"available_markets"` + // A link to the Web API enpoint providing full + // details of the album. + Endpoint string `json:"href"` + // The cover art for the album in various sizes, + // widest first. + Images []Image `json:"images"` + // Known external URLs for this album. + ExternalURLs map[string]string `json:"external_urls"` + // The date the album was first released. For example, "1981-12-15". + // Depending on the ReleaseDatePrecision, it might be shown as + // "1981" or "1981-12". You can use ReleaseDateTime to convert this + // to a time.Time value. + ReleaseDate string `json:"release_date"` + // The precision with which ReleaseDate value is known: "year", "month", or "day" + ReleaseDatePrecision string `json:"release_date_precision"` +} + +// Copyright contains the copyright statement associated with an album. +type Copyright struct { + // The copyright text for the album. + Text string `json:"text"` + // The type of copyright. + Type string `json:"type"` +} + +// FullAlbum provides extra album data in addition to the data provided by SimpleAlbum. +type FullAlbum struct { + SimpleAlbum + Artists []SimpleArtist `json:"artists"` + Copyrights []Copyright `json:"copyrights"` + Genres []string `json:"genres"` + // The popularity of the album, represented as an integer between 0 and 100, + // with 100 being the most popular. Popularity of an album is calculated + // from the popularify of the album's individual tracks. + Popularity int `json:"popularity"` + // The date the album was first released. For example, "1981-12-15". + // Depending on the ReleaseDatePrecision, it might be shown as + // "1981" or "1981-12". You can use ReleaseDateTime to convert this + // to a time.Time value. + ReleaseDate string `json:"release_date"` + // The precision with which ReleaseDate value is known: "year", "month", or "day" + ReleaseDatePrecision string `json:"release_date_precision"` + Tracks SimpleTrackPage `json:"tracks"` + ExternalIDs map[string]string `json:"external_ids"` +} + +// SavedAlbum provides info about an album saved to an user's account. +type SavedAlbum struct { + // The date and time the track was saved, represented as an ISO + // 8601 UTC timestamp with a zero offset (YYYY-MM-DDTHH:MM:SSZ). + // You can use the TimestampLayout constant to convert this to + // a time.Time value. + AddedAt string `json:"added_at"` + FullAlbum `json:"album"` +} + +// ReleaseDateTime converts the album's ReleaseDate to a time.TimeValue. +// All of the fields in the result may not be valid. For example, if +// f.ReleaseDatePrecision is "month", then only the month and year +// (but not the day) of the result are valid. +func (f *FullAlbum) ReleaseDateTime() time.Time { + if f.ReleaseDatePrecision == "day" { + result, _ := time.Parse(DateLayout, f.ReleaseDate) + return result + } + if f.ReleaseDatePrecision == "month" { + ym := strings.Split(f.ReleaseDate, "-") + year, _ := strconv.Atoi(ym[0]) + month, _ := strconv.Atoi(ym[1]) + return time.Date(year, time.Month(month), 1, 0, 0, 0, 0, time.UTC) + } + year, _ := strconv.Atoi(f.ReleaseDate) + return time.Date(year, 1, 1, 0, 0, 0, 0, time.UTC) +} + +// GetAlbum gets Spotify catalog information for a single album, given its Spotify ID. +func (c *Client) GetAlbum(id ID) (*FullAlbum, error) { + spotifyURL := fmt.Sprintf("%salbums/%s", c.baseURL, id) + + var a FullAlbum + + err := c.get(spotifyURL, &a) + if err != nil { + return nil, err + } + + return &a, nil +} + +func toStringSlice(ids []ID) []string { + result := make([]string, len(ids)) + for i, str := range ids { + result[i] = str.String() + } + return result +} + +// GetAlbums gets Spotify Catalog information for multiple albums, given their +// Spotify IDs. It supports up to 20 IDs in a single call. Albums are returned +// in the order requested. If an album is not found, that position in the +// result slice will be nil. +func (c *Client) GetAlbums(ids ...ID) ([]*FullAlbum, error) { + if len(ids) > 20 { + return nil, errors.New("spotify: exceeded maximum number of albums") + } + spotifyURL := fmt.Sprintf("%salbums?ids=%s", c.baseURL, strings.Join(toStringSlice(ids), ",")) + + var a struct { + Albums []*FullAlbum `json:"albums"` + } + + err := c.get(spotifyURL, &a) + if err != nil { + return nil, err + } + + return a.Albums, nil +} + +// AlbumType represents the type of an album. It can be used to filter +// results when searching for albums. +type AlbumType int + +// AlbumType values that can be used to filter which types of albums are +// searched for. These are flags that can be bitwise OR'd together +// to search for multiple types of albums simultaneously. +const ( + AlbumTypeAlbum AlbumType = 1 << iota + AlbumTypeSingle = 1 << iota + AlbummTypeAppearsOn = 1 << iota + AlbumTypeCompilation = 1 << iota +) + +func (at AlbumType) encode() string { + types := []string{} + if at&AlbumTypeAlbum != 0 { + types = append(types, "album") + } + if at&AlbumTypeSingle != 0 { + types = append(types, "single") + } + if at&AlbummTypeAppearsOn != 0 { + types = append(types, "appears_on") + } + if at&AlbumTypeCompilation != 0 { + types = append(types, "compilation") + } + return strings.Join(types, ",") +} + +// GetAlbumTracks gets the tracks for a particular album. +// If you only care about the tracks, this call is more efficient +// than GetAlbum. +func (c *Client) GetAlbumTracks(id ID) (*SimpleTrackPage, error) { + return c.GetAlbumTracksOpt(id, -1, -1) +} + +// GetAlbumTracksOpt behaves like GetAlbumTracks, with the exception that it +// allows you to specify extra parameters that limit the number of results returned. +// The maximum number of results to return is specified by limit. +// The offset argument can be used to specify the index of the first track to return. +// It can be used along with limit to reqeust the next set of results. +func (c *Client) GetAlbumTracksOpt(id ID, limit, offset int) (*SimpleTrackPage, error) { + spotifyURL := fmt.Sprintf("%salbums/%s/tracks", c.baseURL, id) + v := url.Values{} + if limit != -1 { + v.Set("limit", strconv.Itoa(limit)) + } + if offset != -1 { + v.Set("offset", strconv.Itoa(offset)) + } + optional := v.Encode() + if optional != "" { + spotifyURL = spotifyURL + "?" + optional + } + + var result SimpleTrackPage + err := c.get(spotifyURL, &result) + if err != nil { + return nil, err + } + + return &result, nil +} diff --git a/vendor/github.com/zmb3/spotify/artist.go b/vendor/github.com/zmb3/spotify/artist.go new file mode 100644 index 00000000..e2366fc1 --- /dev/null +++ b/vendor/github.com/zmb3/spotify/artist.go @@ -0,0 +1,152 @@ +package spotify + +import ( + "fmt" + "net/url" + "strconv" + "strings" +) + +// SimpleArtist contains basic info about an artist. +type SimpleArtist struct { + Name string `json:"name"` + ID ID `json:"id"` + // The Spotify URI for the artist. + URI URI `json:"uri"` + // A link to the Web API enpoint providing full details of the artist. + Endpoint string `json:"href"` + ExternalURLs map[string]string `json:"external_urls"` +} + +// FullArtist provides extra artist data in addition to what is provided by SimpleArtist. +type FullArtist struct { + SimpleArtist + // The popularity of the artist, expressed as an integer between 0 and 100. + // The artist's popularity is calculated from the popularity of the artist's tracks. + Popularity int `json:"popularity"` + // A list of genres the artist is associated with. For example, "Prog Rock" + // or "Post-Grunge". If not yet classified, the slice is empty. + Genres []string `json:"genres"` + Followers Followers + // Images of the artist in various sizes, widest first. + Images []Image `json:"images"` +} + +// GetArtist gets Spotify catalog information for a single artist, given its Spotify ID. +func (c *Client) GetArtist(id ID) (*FullArtist, error) { + spotifyURL := fmt.Sprintf("%sartists/%s", c.baseURL, id) + + var a FullArtist + err := c.get(spotifyURL, &a) + if err != nil { + return nil, err + } + + return &a, nil +} + +// GetArtists gets spotify catalog information for several artists based on their +// Spotify IDs. It supports up to 50 artists in a single call. Artists are +// returned in the order requested. If an artist is not found, that position +// in the result will be nil. Duplicate IDs will result in duplicate artists +// in the result. +func (c *Client) GetArtists(ids ...ID) ([]*FullArtist, error) { + spotifyURL := fmt.Sprintf("%sartists?ids=%s", c.baseURL, strings.Join(toStringSlice(ids), ",")) + + var a struct { + Artists []*FullArtist + } + + err := c.get(spotifyURL, &a) + if err != nil { + return nil, err + } + + return a.Artists, nil +} + +// GetArtistsTopTracks gets Spotify catalog information about an artist's top +// tracks in a particular country. It returns a maximum of 10 tracks. The +// country is specified as an ISO 3166-1 alpha-2 country code. +func (c *Client) GetArtistsTopTracks(artistID ID, country string) ([]FullTrack, error) { + spotifyURL := fmt.Sprintf("%sartists/%s/top-tracks?country=%s", c.baseURL, artistID, country) + + var t struct { + Tracks []FullTrack `json:"tracks"` + } + + err := c.get(spotifyURL, &t) + if err != nil { + return nil, err + } + + return t.Tracks, nil +} + +// GetRelatedArtists gets Spotify catalog information about artists similar to a +// given artist. Similarity is based on analysis of the Spotify community's +// listening history. This function returns up to 20 artists that are considered +// related to the specified artist. +func (c *Client) GetRelatedArtists(id ID) ([]FullArtist, error) { + spotifyURL := fmt.Sprintf("%sartists/%s/related-artists", c.baseURL, id) + + var a struct { + Artists []FullArtist `json:"artists"` + } + + err := c.get(spotifyURL, &a) + if err != nil { + return nil, err + } + + return a.Artists, nil +} + +// GetArtistAlbums gets Spotify catalog information about an artist's albums. +// It is equivalent to GetArtistAlbumsOpt(artistID, nil). +func (c *Client) GetArtistAlbums(artistID ID) (*SimpleAlbumPage, error) { + return c.GetArtistAlbumsOpt(artistID, nil, nil) +} + +// GetArtistAlbumsOpt is just like GetArtistAlbums, but it accepts optional +// parameters used to filter and sort the result. +// +// The AlbumType argument can be used to find a particular type of album. Search +// for multiple types by OR-ing the types together. +func (c *Client) GetArtistAlbumsOpt(artistID ID, options *Options, t *AlbumType) (*SimpleAlbumPage, error) { + spotifyURL := fmt.Sprintf("%sartists/%s/albums", c.baseURL, artistID) + // add optional query string if options were specified + values := url.Values{} + if t != nil { + values.Set("album_type", t.encode()) + } + if options != nil { + if options.Country != nil { + values.Set("market", *options.Country) + } else { + // if the market is not specified, Spotify will likely return a lot + // of duplicates (one for each market in which the album is available) + // - prevent this behavior by falling back to the US by default + // TODO: would this ever be the desired behavior? + values.Set("market", CountryUSA) + } + if options.Limit != nil { + values.Set("limit", strconv.Itoa(*options.Limit)) + } + if options.Offset != nil { + values.Set("offset", strconv.Itoa(*options.Offset)) + } + } + if query := values.Encode(); query != "" { + spotifyURL += "?" + query + } + + var p SimpleAlbumPage + + err := c.get(spotifyURL, &p) + if err != nil { + return nil, err + } + + return &p, nil +} diff --git a/vendor/github.com/zmb3/spotify/audio_analysis.go b/vendor/github.com/zmb3/spotify/audio_analysis.go new file mode 100644 index 00000000..14c68950 --- /dev/null +++ b/vendor/github.com/zmb3/spotify/audio_analysis.go @@ -0,0 +1,110 @@ +package spotify + +import ( + "fmt" +) + +// AudioAnalysis contains a detailed audio analysis for a single track +// identified by its unique Spotify ID. See: +// https://developer.spotify.com/web-api/get-audio-analysis/ +type AudioAnalysis struct { + Bars []Marker `json:"bars"` + Beats []Marker `json:"beats"` + Meta AnalysisMeta `json:"meta"` + Sections []Section `json:"sections"` + Segments []Segment `json:"segments"` + Tatums []Marker `json:"tatums"` + Track AnalysisTrack `json:"track"` +} + +// Marker represents beats, bars, tatums and are used in segment and section +// descriptions. +type Marker struct { + Start float64 `json:"start"` + Duration float64 `json:"duration"` + Confidence float64 `json:"confidence"` +} + +// AnalysisMeta describes details about Spotify's audio analysis of the track +type AnalysisMeta struct { + AnalyzerVersion string `json:"analyzer_version"` + Platform string `json:"platform"` + DetailedStatus string `json:"detailed_status"` + StatusCode int `json:"status"` + Timestamp int64 `json:"timestamp"` + AnalysisTime float64 `json:"analysis_time"` + InputProcess string `json:"input_process"` +} + +// Section represents a large variation in rhythm or timbre, e.g. chorus, verse, +// bridge, guitar solo, etc. Each section contains its own descriptions of +// tempo, key, mode, time_signature, and loudness. +type Section struct { + Marker + Loudness float64 `json:"loudness"` + Tempo float64 `json:"tempo"` + TempoConfidence float64 `json:"tempo_confidence"` + Key Key `json:"key"` + KeyConfidence float64 `json:"key_confidence"` + Mode Mode `json:"mode"` + ModeConfidence float64 `json:"mode_confidence"` + TimeSignature int `json:"time_signature"` + TimeSignatureConfidence float64 `json:"time_signature_confidence"` +} + +// Segment is characterized by it's perceptual onset and duration in seconds, +// loudness (dB), pitch and timbral content. +type Segment struct { + Marker + LoudnessStart float64 `json:"loudness_start"` + LoudnessMaxTime float64 `json:"loudness_max_time"` + LoudnessMax float64 `json:"loudness_max"` + LoudnessEnd float64 `json:"loudness_end"` + Pitches []float64 `json:"pitches"` + Timbre []float64 `json:"timbre"` +} + +// AnalysisTrack contains audio analysis data about the track as a whole +type AnalysisTrack struct { + NumSamples int64 `json:"num_samples"` + Duration float64 `json:"duration"` + SampleMD5 string `json:"sample_md5"` + OffsetSeconds int `json:"offset_seconds"` + WindowSeconds int `json:"window_seconds"` + AnalysisSampleRate int64 `json:"analysis_sample_rate"` + AnalysisChannels int `json:"analysis_channels"` + EndOfFadeIn float64 `json:"end_of_fade_in"` + StartOfFadeOut float64 `json:"start_of_fade_out"` + Loudness float64 `json:"loudness"` + Tempo float64 `json:"tempo"` + TempoConfidence float64 `json:"tempo_confidence"` + TimeSignature int `json:"time_signature"` + TimeSignatureConfidence float64 `json:"time_signature_confidence"` + Key Key `json:"key"` + KeyConfidence float64 `json:"key_confidence"` + Mode Mode `json:"mode"` + ModeConfidence float64 `json:"mode_confidence"` + CodeString string `json:"codestring"` + CodeVersion float64 `json:"code_version"` + EchoprintString string `json:"echoprintstring"` + EchoprintVersion float64 `json:"echoprint_version"` + SynchString string `json:"synchstring"` + SynchVersion float64 `json:"synch_version"` + RhythmString string `json:"rhythmstring"` + RhythmVersion float64 `json:"rhythm_version"` +} + +// GetAudioAnalysis queries the Spotify web API for an audio analysis of a +// single track. +func (c *Client) GetAudioAnalysis(id ID) (*AudioAnalysis, error) { + url := fmt.Sprintf("%saudio-analysis/%s", c.baseURL, id) + + temp := AudioAnalysis{} + + err := c.get(url, &temp) + if err != nil { + return nil, err + } + + return &temp, nil +} diff --git a/vendor/github.com/zmb3/spotify/audio_features.go b/vendor/github.com/zmb3/spotify/audio_features.go new file mode 100644 index 00000000..bb9004ad --- /dev/null +++ b/vendor/github.com/zmb3/spotify/audio_features.go @@ -0,0 +1,123 @@ +package spotify + +import ( + "fmt" + "strings" +) + +// AudioFeatures contains various high-level acoustic attributes +// for a particular track. +type AudioFeatures struct { + //Acousticness is a confidence measure from 0.0 to 1.0 of whether + // the track is acoustic. A value of 1.0 represents high confidence + // that the track is acoustic. + Acousticness float32 `json:"acousticness"` + // An HTTP URL to access the full audio analysis of the track. + // The URL is cryptographically signed and configured to expire + // after roughly 10 minutes. Do not store these URLs for later use. + AnalysisURL string `json:"analysis_url"` + // Danceability describes how suitable a track is for dancing based + // on a combination of musical elements including tempo, rhythm stability, + // beat strength, and overall regularity. A value of 0.0 is least danceable + // and 1.0 is most danceable. + Danceability float32 `json:"danceability"` + // The length of the track in milliseconds. + Duration int `json:"duration_ms"` + // Energy is a measure from 0.0 to 1.0 and represents a perceptual mesaure + // of intensity and activity. Typically, energetic tracks feel fast, loud, + // and noisy. + Energy float32 `json:"energy"` + // The Spotify ID for the track. + ID ID `json:"id"` + // Predicts whether a track contains no vocals. "Ooh" and "aah" sounds are + // treated as instrumental in this context. Rap or spoken words are clearly + // "vocal". The closer the Instrumentalness value is to 1.0, the greater + // likelihood the track contains no vocal content. Values above 0.5 are + // intended to represent instrumental tracks, but confidence is higher as the + // value approaches 1.0. + Instrumentalness float32 `json:"instrumentalness"` + // The key the track is in. Integers map to pitches using standard Pitch Class notation + // (https://en.wikipedia.org/wiki/Pitch_class). + Key int `json:"key"` + // Detects the presence of an audience in the recording. Higher liveness + // values represent an increased probability that the track was performed live. + // A value above 0.8 provides strong likelihook that the track is live. + Liveness float32 `json:"liveness"` + // The overall loudness of a track in decibels (dB). Loudness values are + // averaged across the entire track and are useful for comparing the relative + // loudness of tracks. Typical values range between -60 and 0 dB. + Loudness float32 `json:"loudness"` + // Mode indicates the modality (major or minor) of a track. + Mode int `json:"mode"` + // Detects the presence of spoken words in a track. The more exclusively + // speech-like the recording, the closer to 1.0 the speechiness will be. + // Values above 0.66 describe tracks that are probably made entirely of + // spoken words. Values between 0.33 and 0.66 describe tracks that may + // contain both music and speech, including such cases as rap music. + // Values below 0.33 most likely represent music and other non-speech-like tracks. + Speechiness float32 `json:"speechiness"` + // The overall estimated tempo of the track in beats per minute (BPM). + Tempo float32 `json:"tempo"` + // An estimated overall time signature of a track. The time signature (meter) + // is a notational convention to specify how many beats are in each bar (or measure). + TimeSignature int `json:"time_signature"` + // A link to the Web API endpoint providing full details of the track. + TrackURL string `json:"track_href"` + // The Spotify URI for the track. + URI URI `json:"uri"` + // A measure from 0.0 to 1.0 describing the musical positiveness conveyed + // by a track. Tracks with high valence sound more positive (e.g. happy, + // cheerful, euphoric), while tracks with low valence sound more negative + // (e.g. sad, depressed, angry). + Valence float32 `json:"valence"` +} + +// Key represents a pitch using Pitch Class notation. +type Key int + +const ( + C Key = iota + CSharp + D + DSharp + E + F + FSharp + G + GSharp + A + ASharp + B + DFlat = CSharp + EFlat = DSharp + GFlat = FSharp + AFlat = GSharp + BFlat = ASharp +) + +// Mode indicates the modality (major or minor) of a track. +type Mode int + +const ( + Minor Mode = iota + Major +) + +// GetAudioFeatures queries the Spotify Web API for various +// high-level acoustic attributes of audio tracks. +// Objects are returned in the order requested. If an object +// is not found, a nil value is returned in the appropriate position. +func (c *Client) GetAudioFeatures(ids ...ID) ([]*AudioFeatures, error) { + url := fmt.Sprintf("%saudio-features?ids=%s", c.baseURL, strings.Join(toStringSlice(ids), ",")) + + temp := struct { + F []*AudioFeatures `json:"audio_features"` + }{} + + err := c.get(url, &temp) + if err != nil { + return nil, err + } + + return temp.F, nil +} diff --git a/vendor/github.com/zmb3/spotify/auth.go b/vendor/github.com/zmb3/spotify/auth.go new file mode 100644 index 00000000..d9b069d7 --- /dev/null +++ b/vendor/github.com/zmb3/spotify/auth.go @@ -0,0 +1,180 @@ +package spotify + +import ( + "context" + "crypto/tls" + "errors" + "net/http" + "os" + + "golang.org/x/oauth2" +) + +const ( + // AuthURL is the URL to Spotify Accounts Service's OAuth2 endpoint. + AuthURL = "https://accounts.spotify.com/authorize" + // TokenURL is the URL to the Spotify Accounts Service's OAuth2 + // token endpoint. + TokenURL = "https://accounts.spotify.com/api/token" +) + +// Scopes let you specify exactly which types of data your application wants to access. +// The set of scopes you pass in your authentication request determines what access the +// permissions the user is asked to grant. +const ( + // ScopeImageUpload seeks permission to upload images to Spotify on your behalf. + ScopeImageUpload = "ugc-image-upload" + // ScopePlaylistReadPrivate seeks permission to read + // a user's private playlists. + ScopePlaylistReadPrivate = "playlist-read-private" + // ScopePlaylistModifyPublic seeks write access + // to a user's public playlists. + ScopePlaylistModifyPublic = "playlist-modify-public" + // ScopePlaylistModifyPrivate seeks write access to + // a user's private playlists. + ScopePlaylistModifyPrivate = "playlist-modify-private" + // ScopePlaylistReadCollaborative seeks permission to + // access a user's collaborative playlists. + ScopePlaylistReadCollaborative = "playlist-read-collaborative" + // ScopeUserFollowModify seeks write/delete access to + // the list of artists and other users that a user follows. + ScopeUserFollowModify = "user-follow-modify" + // ScopeUserFollowRead seeks read access to the list of + // artists and other users that a user follows. + ScopeUserFollowRead = "user-follow-read" + // ScopeUserLibraryModify seeks write/delete access to a + // user's "Your Music" library. + ScopeUserLibraryModify = "user-library-modify" + // ScopeUserLibraryRead seeks read access to a user's "Your Music" library. + ScopeUserLibraryRead = "user-library-read" + // ScopeUserReadPrivate seeks read access to a user's + // subsription details (type of user account). + ScopeUserReadPrivate = "user-read-private" + // ScopeUserReadEmail seeks read access to a user's email address. + ScopeUserReadEmail = "user-read-email" + // ScopeUserReadBirthdate seeks read access to a user's birthdate. + ScopeUserReadBirthdate = "user-read-birthdate" + // ScopeUserReadCurrentlyPlaying seeks read access to a user's currently playing track + ScopeUserReadCurrentlyPlaying = "user-read-currently-playing" + // ScopeUserReadPlaybackState seeks read access to the user's current playback state + ScopeUserReadPlaybackState = "user-read-playback-state" + // ScopeUserModifyPlaybackState seeks write access to the user's current playback state + ScopeUserModifyPlaybackState = "user-modify-playback-state" + // ScopeUserReadRecentlyPlayed allows access to a user's recently-played songs + ScopeUserReadRecentlyPlayed = "user-read-recently-played" + // ScopeUserTopRead seeks read access to a user's top tracks and artists + ScopeUserTopRead = "user-top-read" +) + +// Authenticator provides convenience functions for implementing the OAuth2 flow. +// You should always use `NewAuthenticator` to make them. +// +// Example: +// +// a := spotify.NewAuthenticator(redirectURL, spotify.ScopeUserLibaryRead, spotify.ScopeUserFollowRead) +// // direct user to Spotify to log in +// http.Redirect(w, r, a.AuthURL("state-string"), http.StatusFound) +// +// // then, in redirect handler: +// token, err := a.Token(state, r) +// client := a.NewClient(token) +// +type Authenticator struct { + config *oauth2.Config + context context.Context +} + +// NewAuthenticator creates an authenticator which is used to implement the +// OAuth2 authorization flow. The redirectURL must exactly match one of the +// URLs specified in your Spotify developer account. +// +// By default, NewAuthenticator pulls your client ID and secret key from the +// SPOTIFY_ID and SPOTIFY_SECRET environment variables. If you'd like to provide +// them from some other source, you can call `SetAuthInfo(id, key)` on the +// returned authenticator. +func NewAuthenticator(redirectURL string, scopes ...string) Authenticator { + cfg := &oauth2.Config{ + ClientID: os.Getenv("SPOTIFY_ID"), + ClientSecret: os.Getenv("SPOTIFY_SECRET"), + RedirectURL: redirectURL, + Scopes: scopes, + Endpoint: oauth2.Endpoint{ + AuthURL: AuthURL, + TokenURL: TokenURL, + }, + } + + // disable HTTP/2 for DefaultClient, see: https://github.com/zmb3/spotify/issues/20 + tr := &http.Transport{ + TLSNextProto: map[string]func(authority string, c *tls.Conn) http.RoundTripper{}, + } + ctx := context.WithValue(context.Background(), oauth2.HTTPClient, &http.Client{Transport: tr}) + return Authenticator{ + config: cfg, + context: ctx, + } +} + +// SetAuthInfo overwrites the client ID and secret key used by the authenticator. +// You can use this if you don't want to store this information in environment variables. +func (a *Authenticator) SetAuthInfo(clientID, secretKey string) { + a.config.ClientID = clientID + a.config.ClientSecret = secretKey +} + +// AuthURL returns a URL to the the Spotify Accounts Service's OAuth2 endpoint. +// +// State is a token to protect the user from CSRF attacks. You should pass the +// same state to `Token`, where it will be validated. For more info, refer to +// http://tools.ietf.org/html/rfc6749#section-10.12. +func (a Authenticator) AuthURL(state string) string { + return a.config.AuthCodeURL(state) +} + +// Token pulls an authorization code from an HTTP request and attempts to exchange +// it for an access token. The standard use case is to call Token from the handler +// that handles requests to your application's redirect URL. +func (a Authenticator) Token(state string, r *http.Request) (*oauth2.Token, error) { + values := r.URL.Query() + if e := values.Get("error"); e != "" { + return nil, errors.New("spotify: auth failed - " + e) + } + code := values.Get("code") + if code == "" { + return nil, errors.New("spotify: didn't get access code") + } + actualState := values.Get("state") + if actualState != state { + return nil, errors.New("spotify: redirect state parameter doesn't match") + } + return a.config.Exchange(a.context, code) +} + +// Exchange is like Token, except it allows you to manually specify the access +// code instead of pulling it out of an HTTP request. +func (a Authenticator) Exchange(code string) (*oauth2.Token, error) { + return a.config.Exchange(a.context, code) +} + +// NewClient creates a Client that will use the specified access token for its API requests. +func (a Authenticator) NewClient(token *oauth2.Token) Client { + client := a.config.Client(a.context, token) + return Client{ + http: client, + baseURL: baseAddress, + } +} + +// Token gets the client's current token. +func (c *Client) Token() (*oauth2.Token, error) { + transport, ok := c.http.Transport.(*oauth2.Transport) + if !ok { + return nil, errors.New("spotify: oauth2 transport type not correct") + } + t, err := transport.Source.Token() + if err != nil { + return nil, err + } + + return t, nil +} diff --git a/vendor/github.com/zmb3/spotify/category.go b/vendor/github.com/zmb3/spotify/category.go new file mode 100644 index 00000000..5a042c33 --- /dev/null +++ b/vendor/github.com/zmb3/spotify/category.go @@ -0,0 +1,140 @@ +package spotify + +import ( + "fmt" + "net/url" + "strconv" +) + +// Category is used by Spotify to tag items in. For example, on the Spotify +// player's "Browse" tab. +type Category struct { + // A link to the Web API endpoint returning full details of the category + Endpoint string `json:"href"` + // The category icon, in various sizes + Icons []Image `json:"icons"` + // The Spotify category ID. This isn't a base-62 Spotify ID, its just + // a short string that describes and identifies the category (ie "party"). + ID string `json:"id"` + // The name of the category + Name string `json:"name"` +} + +// GetCategoryOpt is like GetCategory, but it accepts optional arguments. +// The country parameter is an ISO 3166-1 alpha-2 country code. It can be +// used to ensure that the category exists for a particular country. The +// locale argument is an ISO 639 language code and an ISO 3166-1 alpha-2 +// country code, separated by an underscore. It can be used to get the +// category strings in a particular language (for example: "es_MX" means +// get categories in Mexico, returned in Spanish). +// +// This call requries authorization. +func (c *Client) GetCategoryOpt(id, country, locale string) (Category, error) { + cat := Category{} + spotifyURL := fmt.Sprintf("%sbrowse/categories/%s", c.baseURL, id) + values := url.Values{} + if country != "" { + values.Set("country", country) + } + if locale != "" { + values.Set("locale", locale) + } + if query := values.Encode(); query != "" { + spotifyURL += "?" + query + } + + err := c.get(spotifyURL, &cat) + if err != nil { + return cat, err + } + + return cat, err +} + +// GetCategory gets a single category used to tag items in Spotify +// (on, for example, the Spotify player's Browse tab). +func (c *Client) GetCategory(id string) (Category, error) { + return c.GetCategoryOpt(id, "", "") +} + +// GetCategoryPlaylists gets a list of Spotify playlists tagged with a paricular category. +func (c *Client) GetCategoryPlaylists(catID string) (*SimplePlaylistPage, error) { + return c.GetCategoryPlaylistsOpt(catID, nil) +} + +// GetCategoryPlaylistsOpt is like GetCategoryPlaylists, but it accepts optional +// arguments. +func (c *Client) GetCategoryPlaylistsOpt(catID string, opt *Options) (*SimplePlaylistPage, error) { + spotifyURL := fmt.Sprintf("%sbrowse/categories/%s/playlists", c.baseURL, catID) + if opt != nil { + values := url.Values{} + if opt.Country != nil { + values.Set("country", *opt.Country) + } + if opt.Limit != nil { + values.Set("limit", strconv.Itoa(*opt.Limit)) + } + if opt.Offset != nil { + values.Set("offset", strconv.Itoa(*opt.Offset)) + } + if query := values.Encode(); query != "" { + spotifyURL += "?" + query + } + } + + wrapper := struct { + Playlists SimplePlaylistPage `json:"playlists"` + }{} + + err := c.get(spotifyURL, &wrapper) + if err != nil { + return nil, err + } + + return &wrapper.Playlists, nil +} + +// GetCategories gets a list of categories used to tag items in Spotify +// (on, for example, the Spotify player's "Browse" tab). +func (c *Client) GetCategories() (*CategoryPage, error) { + return c.GetCategoriesOpt(nil, "") +} + +// GetCategoriesOpt is like GetCategories, but it accepts optional parameters. +// +// The locale option can be used to get the results in a particular language. +// It consists of an ISO 639 language code and an ISO 3166-1 alpha-2 country +// code, separated by an underscore. Specify the empty string to have results +// returned in the Spotify default language (American English). +func (c *Client) GetCategoriesOpt(opt *Options, locale string) (*CategoryPage, error) { + spotifyURL := c.baseURL + "browse/categories" + values := url.Values{} + if locale != "" { + values.Set("locale", locale) + } + if opt != nil { + if opt.Country != nil { + values.Set("country", *opt.Country) + } + if opt.Limit != nil { + values.Set("limit", strconv.Itoa(*opt.Limit)) + } + if opt.Offset != nil { + values.Set("offset", strconv.Itoa(*opt.Offset)) + } + } + if query := values.Encode(); query != "" { + spotifyURL += "?" + query + } + + wrapper := struct { + Categories CategoryPage `json:"categories"` + }{} + + err := c.get(spotifyURL, &wrapper) + if err != nil { + return nil, err + } + + return &wrapper.Categories, nil +} diff --git a/vendor/github.com/zmb3/spotify/countries.go b/vendor/github.com/zmb3/spotify/countries.go new file mode 100644 index 00000000..a8f3f4c8 --- /dev/null +++ b/vendor/github.com/zmb3/spotify/countries.go @@ -0,0 +1,32 @@ +package spotify + +// ISO 3166-1 alpha 2 country codes. +// +// see: https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2 +const ( + CountryArgentina = "AR" + CountryAustralia = "AU" + CountryAustria = "AT" + CountryBelarus = "BY" + CountryBelgium = "BE" + CountryBrazil = "BR" + CountryCanada = "CA" + CountryChile = "CL" + CountryChina = "CN" + CountryGermany = "DE" + CountryHongKong = "HK" + CountryIreland = "IE" + CountryIndia = "IN" + CountryItaly = "IT" + CountryJapan = "JP" + CountrySpain = "ES" + CountryFinland = "FI" + CountryFrance = "FR" + CountryMexico = "MX" + CountryNewZealand = "NZ" + CountryRussia = "RU" + CountrySwitzerland = "CH" + CountryUnitedArabEmirates = "AE" + CountryUnitedKingdom = "GB" + CountryUSA = "US" +) diff --git a/vendor/github.com/zmb3/spotify/cursor.go b/vendor/github.com/zmb3/spotify/cursor.go new file mode 100644 index 00000000..200f3ceb --- /dev/null +++ b/vendor/github.com/zmb3/spotify/cursor.go @@ -0,0 +1,37 @@ +package spotify + +// This file contains the types that implement Spotify's cursor-based +// paging object. Like the standard paging object, this object is a +// container for a set of items. Unlike the standard paging object, a +// cursor-based paging object does not provide random access to the results. + +// Cursor contains a key that can be used to find the next set +// of items. +type Cursor struct { + After string `json:"after"` +} + +// cursorPage contains all of the fields in a Spotify cursor-based +// paging object, except for the actual items. This type is meant +// to be embedded in other types that add the Items field. +type cursorPage struct { + // A link to the Web API endpoint returning the full + // result of this request. + Endpoint string `json:"href"` + // The maximum number of items returned, as set in the query + // (or default value if unset). + Limit int `json:"limit"` + // The URL to the next set of items. + Next string `json:"next"` + // The total number of items available to return. + Total int `json:"total"` + // The cursor used to find the next set of items. + Cursor Cursor `json:"cursors"` +} + +// FullArtistCursorPage is a cursor-based paging object containing +// a set of FullArtist objects. +type FullArtistCursorPage struct { + cursorPage + Artists []FullArtist `json:"items"` +} diff --git a/vendor/github.com/zmb3/spotify/full_tests.bat b/vendor/github.com/zmb3/spotify/full_tests.bat new file mode 100644 index 00000000..2c781c34 --- /dev/null +++ b/vendor/github.com/zmb3/spotify/full_tests.bat @@ -0,0 +1,5 @@ +@echo off +REM - The tests that actually hit the Spotify Web API don't run by default. +REM - Use this script to run them in addition to the standard unit tests. + +cmd /C "set FULLTEST=y && go test %*" diff --git a/vendor/github.com/zmb3/spotify/library.go b/vendor/github.com/zmb3/spotify/library.go new file mode 100644 index 00000000..92425969 --- /dev/null +++ b/vendor/github.com/zmb3/spotify/library.go @@ -0,0 +1,61 @@ +package spotify + +import ( + "errors" + "fmt" + "net/http" + "strings" +) + +// UserHasTracks checks if one or more tracks are saved to the current user's +// "Your Music" library. +func (c *Client) UserHasTracks(ids ...ID) ([]bool, error) { + if l := len(ids); l == 0 || l > 50 { + return nil, errors.New("spotify: UserHasTracks supports 1 to 50 IDs per call") + } + spotifyURL := fmt.Sprintf("%sme/tracks/contains?ids=%s", c.baseURL, strings.Join(toStringSlice(ids), ",")) + + var result []bool + + err := c.get(spotifyURL, &result) + if err != nil { + return nil, err + } + + return result, err +} + +// AddTracksToLibrary saves one or more tracks to the current user's +// "Your Music" library. This call requires the ScopeUserLibraryModify scope. +// A track can only be saved once; duplicate IDs are ignored. +func (c *Client) AddTracksToLibrary(ids ...ID) error { + return c.modifyLibraryTracks(true, ids...) +} + +// RemoveTracksFromLibrary removes one or more tracks from the current user's +// "Your Music" library. This call requires the ScopeUserModifyLibrary scope. +// Trying to remove a track when you do not have the user's authorization +// results in a `spotify.Error` with the status code set to http.StatusUnauthorized. +func (c *Client) RemoveTracksFromLibrary(ids ...ID) error { + return c.modifyLibraryTracks(false, ids...) +} + +func (c *Client) modifyLibraryTracks(add bool, ids ...ID) error { + if l := len(ids); l == 0 || l > 50 { + return errors.New("spotify: this call supports 1 to 50 IDs per call") + } + spotifyURL := fmt.Sprintf("%sme/tracks?ids=%s", c.baseURL, strings.Join(toStringSlice(ids), ",")) + method := "DELETE" + if add { + method = "PUT" + } + req, err := http.NewRequest(method, spotifyURL, nil) + if err != nil { + return err + } + err = c.execute(req, nil) + if err != nil { + return err + } + return nil +} diff --git a/vendor/github.com/zmb3/spotify/page.go b/vendor/github.com/zmb3/spotify/page.go new file mode 100644 index 00000000..7cfb3195 --- /dev/null +++ b/vendor/github.com/zmb3/spotify/page.go @@ -0,0 +1,87 @@ +package spotify + +import ( + "errors" +) + +// ErrNoMorePages is the error returned when you attempt to get the next +// (or previous) set of data but you've reached the end of the data set. +var ErrNoMorePages = errors.New("spotify: no more pages") + +// This file contains the types that implement Spotify's paging object. +// See: https://developer.spotify.com/web-api/object-model/#paging-object + +// basePage contains all of the fields in a Spotify paging object, except +// for the actual items. This type is meant to be embedded in other types +// that add the Items field. +type basePage struct { + // A link to the Web API Endpoint returning the full + // result of this request. + Endpoint string `json:"href"` + // The maximum number of items in the response, as set + // in the query (or default value if unset). + Limit int `json:"limit"` + // The offset of the items returned, as set in the query + // (or default value if unset). + Offset int `json:"offset"` + // The total number of items available to return. + Total int `json:"total"` + // The URL to the next page of items (if available). + Next string `json:"next"` + // The URL to the previous page of items (if available). + Previous string `json:"previous"` +} + +// FullArtistPage contains FullArtists returned by the Web API. +type FullArtistPage struct { + basePage + Artists []FullArtist `json:"items"` +} + +// SimpleAlbumPage contains SimpleAlbums returned by the Web API. +type SimpleAlbumPage struct { + basePage + Albums []SimpleAlbum `json:"items"` +} + +// SavedAlbumPage contains SavedAlbums returned by the Web API. +type SavedAlbumPage struct { + basePage + Albums []SavedAlbum `json:"items"` +} + +// SimplePlaylistPage contains SimplePlaylists returned by the Web API. +type SimplePlaylistPage struct { + basePage + Playlists []SimplePlaylist `json:"items"` +} + +// SimpleTrackPage contains SimpleTracks returned by the Web API. +type SimpleTrackPage struct { + basePage + Tracks []SimpleTrack `json:"items"` +} + +// FullTrackPage contains FullTracks returned by the Web API. +type FullTrackPage struct { + basePage + Tracks []FullTrack `json:"items"` +} + +// SavedTrackPage contains SavedTracks return by the Web API. +type SavedTrackPage struct { + basePage + Tracks []SavedTrack `json:"items"` +} + +// PlaylistTrackPage contains information about tracks in a playlist. +type PlaylistTrackPage struct { + basePage + Tracks []PlaylistTrack `json:"items"` +} + +// CategoryPage contains Category objects returned by the Web API. +type CategoryPage struct { + basePage + Categories []Category `json:"items"` +} diff --git a/vendor/github.com/zmb3/spotify/player.go b/vendor/github.com/zmb3/spotify/player.go new file mode 100755 index 00000000..7dc55892 --- /dev/null +++ b/vendor/github.com/zmb3/spotify/player.go @@ -0,0 +1,528 @@ +package spotify + +import ( + "bytes" + "encoding/json" + "net/http" + "net/url" + "strconv" + "time" +) + +// PlayerDevice contains information about a device that a user can play music on +type PlayerDevice struct { + // ID of the device. This may be empty. + ID ID `json:"id"` + // Active If this device is the currently active device. + Active bool `json:"is_active"` + // Restricted Whether controlling this device is restricted. At present if + // this is "true" then no Web API commands will be accepted by this device. + Restricted bool `json:"is_restricted"` + // Name The name of the device. + Name string `json:"name"` + // Type of device, such as "Computer", "Smartphone" or "Speaker". + Type string `json:"type"` + // Volume The current volume in percent. + Volume int `json:"volume_percent"` +} + +// PlayerState contains information about the current playback. +type PlayerState struct { + CurrentlyPlaying + // Device The device that is currently active + Device PlayerDevice `json:"device"` + // ShuffleState Shuffle is on or off + ShuffleState bool `json:"shuffle_state"` + // RepeatState off, track, context + RepeatState string `json:"repeat_state"` +} + +// PlaybackContext is the playback context +type PlaybackContext struct { + // ExternalURLs of the context, or null if not available. + ExternalURLs map[string]string `json:"external_urls"` + // Endpoint of the context, or null if not available. + Endpoint string `json:"href"` + // Type of the item's context. Can be one of album, artist or playlist. + Type string `json:"type"` + // URI is the Spotify URI for the context. + URI URI `json:"uri"` +} + +// CurrentlyPlaying contains the information about currently playing items +type CurrentlyPlaying struct { + // Timestamp when data was fetched + Timestamp int64 `json:"timestamp"` + // PlaybackContext current context + PlaybackContext PlaybackContext `json:"context"` + // Progress into the currently playing track. + Progress int `json:"progress_ms"` + // Playing If something is currently playing. + Playing bool `json:"is_playing"` + // The currently playing track. Can be null. + Item *FullTrack `json:"Item"` +} + +type RecentlyPlayedItem struct { + // Track is the track information + Track SimpleTrack `json:"track"` + + // PlayedAt is the time that this song was played + PlayedAt time.Time `json:"played_at"` + + // PlaybackContext is the current playback context + PlaybackContext PlaybackContext `json:"context"` +} + +type RecentlyPlayedResult struct { + Items []RecentlyPlayedItem `json:"items"` +} + +// PlaybackOffset can be specified either by track URI OR Position. If both are present the +// request will return 400 BAD REQUEST. If incorrect values are provided for position or uri, +// the request may be accepted but with an unpredictable resulting action on playback. +type PlaybackOffset struct { + // Position is zero based and can’t be negative. + Position int `json:"position,omitempty"` + // URI is a string representing the uri of the item to start at. + URI URI `json:"uri,omitempty"` +} + +type PlayOptions struct { + // DeviceID The id of the device this command is targeting. If not + // supplied, the user's currently active device is the target. + DeviceID *ID `json:"-"` + // PlaybackContext Spotify URI of the context to play. + // Valid contexts are albums, artists & playlists. + PlaybackContext *URI `json:"context_uri,omitempty"` + // URIs Array of the Spotify track URIs to play + URIs []URI `json:"uris,omitempty"` + // PlaybackOffset Indicates from where in the context playback should start. + // Only available when context corresponds to an album or playlist + // object, or when the URIs parameter is used. + PlaybackOffset *PlaybackOffset `json:"offset,omitempty"` + // PositionMs Indicates from what position to start playback. + // Must be a positive number. Passing in a position that is greater + // than the length of the track will cause the player to start playing the next song. + // Defaults to 0, starting a track from the beginning. + PositionMs int `json:"position_ms,omitempty"` +} + +// RecentlyPlayedOptions describes options for the recently-played request. All +// fields are optional. Only one of `AfterEpochMs` and `BeforeEpochMs` may be +// given. Note that it seems as if Spotify only remembers the fifty most-recent +// tracks as of right now. +type RecentlyPlayedOptions struct { + // Limit is the maximum number of items to return. Must be no greater than + // fifty. + Limit int + + // AfterEpochMs is a Unix epoch in milliseconds that describes a time after + // which to return songs. + AfterEpochMs int64 + + // BeforeEpochMs is a Unix epoch in milliseconds that describes a time + // before which to return songs. + BeforeEpochMs int64 +} + +// PlayerDevices information about available devices for the current user. +// +// Requires the ScopeUserReadPlaybackState scope in order to read information +func (c *Client) PlayerDevices() ([]PlayerDevice, error) { + var result struct { + PlayerDevices []PlayerDevice `json:"devices"` + } + + err := c.get(c.baseURL+"me/player/devices", &result) + if err != nil { + return nil, err + } + + return result.PlayerDevices, nil +} + +// PlayerState gets information about the playing state for the current user +// +// Requires the ScopeUserReadPlaybackState scope in order to read information +func (c *Client) PlayerState() (*PlayerState, error) { + return c.PlayerStateOpt(nil) +} + +// PlayerStateOpt is like PlayerState, but it accepts additional +// options for sorting and filtering the results. +func (c *Client) PlayerStateOpt(opt *Options) (*PlayerState, error) { + spotifyURL := c.baseURL + "me/player" + if opt != nil { + v := url.Values{} + if opt.Country != nil { + v.Set("market", *opt.Country) + } + if params := v.Encode(); params != "" { + spotifyURL += "?" + params + } + } + + var result PlayerState + + err := c.get(spotifyURL, &result) + if err != nil { + return nil, err + } + + return &result, nil +} + +// PlayerCurrentlyPlaying gets information about the currently playing status +// for the current user. +// +// Requires the ScopeUserReadCurrentlyPlaying scope or the ScopeUserReadPlaybackState +// scope in order to read information +func (c *Client) PlayerCurrentlyPlaying() (*CurrentlyPlaying, error) { + return c.PlayerCurrentlyPlayingOpt(nil) +} + +// PlayerCurrentlyPlayingOpt is like PlayerCurrentlyPlaying, but it accepts +// additional options for sorting and filtering the results. +func (c *Client) PlayerCurrentlyPlayingOpt(opt *Options) (*CurrentlyPlaying, error) { + spotifyURL := c.baseURL + "me/player/currently-playing" + if opt != nil { + v := url.Values{} + if opt.Country != nil { + v.Set("market", *opt.Country) + } + if params := v.Encode(); params != "" { + spotifyURL += "?" + params + } + } + + req, err := http.NewRequest("GET", spotifyURL, nil) + if err != nil { + return nil, err + } + + var result CurrentlyPlaying + err = c.execute(req, &result, http.StatusNoContent) + if err != nil { + return nil, err + } + + return &result, nil +} + +// PlayerRecentlyPlayed gets a list of recently-played tracks for the current +// user. This call requires ScopeUserReadRecentlyPlayed. +func (c *Client) PlayerRecentlyPlayed() ([]RecentlyPlayedItem, error) { + return c.PlayerRecentlyPlayedOpt(nil) +} + +// PlayerRecentlyPlayedOpt is like PlayerRecentlyPlayed, but it accepts +// additional options for sorting and filtering the results. +func (c *Client) PlayerRecentlyPlayedOpt(opt *RecentlyPlayedOptions) ([]RecentlyPlayedItem, error) { + spotifyURL := c.baseURL + "me/player/recently-played" + if opt != nil { + v := url.Values{} + if opt.Limit != 0 { + v.Set("limit", strconv.FormatInt(int64(opt.Limit), 10)) + } + if opt.BeforeEpochMs != 0 { + v.Set("before", strconv.FormatInt(int64(opt.BeforeEpochMs), 10)) + } + if opt.AfterEpochMs != 0 { + v.Set("after", strconv.FormatInt(int64(opt.AfterEpochMs), 10)) + } + if params := v.Encode(); params != "" { + spotifyURL += "?" + params + } + } + + result := RecentlyPlayedResult{} + err := c.get(spotifyURL, &result) + if err != nil { + return nil, err + } + + return result.Items, nil +} + +// TransferPlayback transfers playback to a new device and determine if +// it should start playing. +// +// Note that a value of false for the play parameter when also transferring +// to another device_id will not pause playback. To ensure that playback is +// paused on the new device you should send a pause command to the currently +// active device before transferring to the new device_id. +// +// Requires the ScopeUserModifyPlaybackState in order to modify the player state +func (c *Client) TransferPlayback(deviceID ID, play bool) error { + reqData := struct { + DeviceID []ID `json:"device_ids"` + Play bool `json:"play"` + }{ + DeviceID: []ID{deviceID}, + Play: play, + } + + buf := new(bytes.Buffer) + err := json.NewEncoder(buf).Encode(reqData) + if err != nil { + return err + } + req, err := http.NewRequest(http.MethodPut, c.baseURL+"me/player", buf) + if err != nil { + return err + } + err = c.execute(req, nil, http.StatusNoContent) + if err != nil { + return err + } + + return nil +} + +// Play Start a new context or resume current playback on the user's active +// device. This call requires ScopeUserModifyPlaybackState in order to modify the player state. +func (c *Client) Play() error { + return c.PlayOpt(nil) +} + +// PlayOpt is like Play but with more options +func (c *Client) PlayOpt(opt *PlayOptions) error { + spotifyURL := c.baseURL + "me/player/play" + buf := new(bytes.Buffer) + + if opt != nil { + v := url.Values{} + if opt.DeviceID != nil { + v.Set("device_id", opt.DeviceID.String()) + } + if params := v.Encode(); params != "" { + spotifyURL += "?" + params + } + + err := json.NewEncoder(buf).Encode(opt) + if err != nil { + return err + } + } + req, err := http.NewRequest(http.MethodPut, spotifyURL, buf) + if err != nil { + return err + } + err = c.execute(req, nil, http.StatusNoContent) + if err != nil { + return err + } + return nil +} + +// Pause Playback on the user's currently active device. +// +// Requires the ScopeUserModifyPlaybackState in order to modify the player state +func (c *Client) Pause() error { + return c.PauseOpt(nil) +} + +// PauseOpt is like Pause but with more options +// +// Only expects PlayOptions.DeviceID, all other options will be ignored +func (c *Client) PauseOpt(opt *PlayOptions) error { + spotifyURL := c.baseURL + "me/player/pause" + + if opt != nil { + v := url.Values{} + if opt.DeviceID != nil { + v.Set("device_id", opt.DeviceID.String()) + } + if params := v.Encode(); params != "" { + spotifyURL += "?" + params + } + } + req, err := http.NewRequest(http.MethodPut, spotifyURL, nil) + if err != nil { + return err + } + err = c.execute(req, nil, http.StatusNoContent) + if err != nil { + return err + } + return nil +} + +// Next skips to the next track in the user's queue in the user's +// currently active device. This call requires ScopeUserModifyPlaybackState +// in order to modify the player state +func (c *Client) Next() error { + return c.NextOpt(nil) +} + +// NextOpt is like Next but with more options +// +// Only expects PlayOptions.DeviceID, all other options will be ignored +func (c *Client) NextOpt(opt *PlayOptions) error { + spotifyURL := c.baseURL + "me/player/next" + + if opt != nil { + v := url.Values{} + if opt.DeviceID != nil { + v.Set("device_id", opt.DeviceID.String()) + } + if params := v.Encode(); params != "" { + spotifyURL += "?" + params + } + } + req, err := http.NewRequest(http.MethodPost, spotifyURL, nil) + if err != nil { + return err + } + err = c.execute(req, nil, http.StatusNoContent) + if err != nil { + return err + } + return nil +} + +// Previous skips to the Previous track in the user's queue in the user's +// currently active device. This call requires ScopeUserModifyPlaybackState +// in order to modify the player state +func (c *Client) Previous() error { + return c.PreviousOpt(nil) +} + +// PreviousOpt is like Previous but with more options +// +// Only expects PlayOptions.DeviceID, all other options will be ignored +func (c *Client) PreviousOpt(opt *PlayOptions) error { + spotifyURL := c.baseURL + "me/player/previous" + + if opt != nil { + v := url.Values{} + if opt.DeviceID != nil { + v.Set("device_id", opt.DeviceID.String()) + } + if params := v.Encode(); params != "" { + spotifyURL += "?" + params + } + } + req, err := http.NewRequest(http.MethodPost, spotifyURL, nil) + if err != nil { + return err + } + err = c.execute(req, nil, http.StatusNoContent) + if err != nil { + return err + } + return nil +} + +// Seek to the given position in the user’s currently playing track. +// +// The position in milliseconds to seek to. Must be a positive number. +// Passing in a position that is greater than the length of the track +// will cause the player to start playing the next song. +// +// Requires the ScopeUserModifyPlaybackState in order to modify the player state +func (c *Client) Seek(position int) error { + return c.SeekOpt(position, nil) +} + +// SeekOpt is like Seek but with more options +// +// Only expects PlayOptions.DeviceID, all other options will be ignored +func (c *Client) SeekOpt(position int, opt *PlayOptions) error { + return c.playerFuncWithOpt( + "me/player/seek", + url.Values{ + "position_ms": []string{strconv.FormatInt(int64(position), 10)}, + }, + opt, + ) +} + +// Repeat Set the repeat mode for the user's playback. +// +// Options are repeat-track, repeat-context, and off. +// +// Requires the ScopeUserModifyPlaybackState in order to modify the player state. +func (c *Client) Repeat(state string) error { + return c.RepeatOpt(state, nil) +} + +// RepeatOpt is like Repeat but with more options +// +// Only expects PlayOptions.DeviceID, all other options will be ignored. +func (c *Client) RepeatOpt(state string, opt *PlayOptions) error { + return c.playerFuncWithOpt( + "me/player/repeat", + url.Values{ + "state": []string{state}, + }, + opt, + ) +} + +// Volume set the volume for the user's current playback device. +// +// Percent is must be a value from 0 to 100 inclusive. +// +// Requires the ScopeUserModifyPlaybackState in order to modify the player state +func (c *Client) Volume(percent int) error { + return c.VolumeOpt(percent, nil) +} + +// VolumeOpt is like Volume but with more options +// +// Only expects PlayOptions.DeviceID, all other options will be ignored +func (c *Client) VolumeOpt(percent int, opt *PlayOptions) error { + return c.playerFuncWithOpt( + "me/player/volume", + url.Values{ + "volume_percent": []string{strconv.FormatInt(int64(percent), 10)}, + }, + opt, + ) +} + +// Shuffle switches shuffle on or off for user's playback. +// +// Requires the ScopeUserModifyPlaybackState in order to modify the player state +func (c *Client) Shuffle(shuffle bool) error { + return c.ShuffleOpt(shuffle, nil) +} + +// ShuffleOpt is like Shuffle but with more options +// +// Only expects PlayOptions.DeviceID, all other options will be ignored +func (c *Client) ShuffleOpt(shuffle bool, opt *PlayOptions) error { + return c.playerFuncWithOpt( + "me/player/shuffle", + url.Values{ + "state": []string{strconv.FormatBool(shuffle)}, + }, + opt, + ) +} + +func (c *Client) playerFuncWithOpt(urlSuffix string, values url.Values, opt *PlayOptions) error { + spotifyURL := c.baseURL + urlSuffix + + if opt != nil { + if opt.DeviceID != nil { + values.Set("device_id", opt.DeviceID.String()) + } + } + + if params := values.Encode(); params != "" { + spotifyURL += "?" + params + } + + req, err := http.NewRequest(http.MethodPut, spotifyURL, nil) + if err != nil { + return err + } + err = c.execute(req, nil, http.StatusNoContent) + if err != nil { + return err + } + return nil +} diff --git a/vendor/github.com/zmb3/spotify/playlist.go b/vendor/github.com/zmb3/spotify/playlist.go new file mode 100644 index 00000000..0bff4ec1 --- /dev/null +++ b/vendor/github.com/zmb3/spotify/playlist.go @@ -0,0 +1,662 @@ +package spotify + +import ( + "bytes" + "encoding/base64" + "encoding/json" + "fmt" + "io" + "net/http" + "net/url" + "strconv" + "strings" +) + +// PlaylistTracks contains details about the tracks in a playlist. +type PlaylistTracks struct { + // A link to the Web API endpoint where full details of + // the playlist's tracks can be retrieved. + Endpoint string `json:"href"` + // The total number of tracks in the playlist. + Total uint `json:"total"` +} + +// SimplePlaylist contains basic info about a Spotify playlist. +type SimplePlaylist struct { + // Indicates whether the playlist owner allows others to modify the playlist. + // Note: only non-collaborative playlists are currently returned by Spotify's Web API. + Collaborative bool `json:"collaborative"` + ExternalURLs map[string]string `json:"external_urls"` + // A link to the Web API endpoint providing full details of the playlist. + Endpoint string `json:"href"` + ID ID `json:"id"` + // The playlist image. Note: this field is only returned for modified, + // verified playlists. Otherwise the slice is empty. If returned, the source + // URL for the image is temporary and will expire in less than a day. + Images []Image `json:"images"` + Name string `json:"name"` + Owner User `json:"owner"` + IsPublic bool `json:"public"` + // The version identifier for the current playlist. Can be supplied in other + // requests to target a specific playlist version. + SnapshotID string `json:"snapshot_id"` + // A collection to the Web API endpoint where full details of the playlist's + // tracks can be retrieved, along with the total number of tracks in the playlist. + Tracks PlaylistTracks `json:"tracks"` + URI URI `json:"uri"` +} + +// FullPlaylist provides extra playlist data in addition to the data provided by SimplePlaylist. +type FullPlaylist struct { + SimplePlaylist + // The playlist description. Only returned for modified, verified playlists. + Description string `json:"description"` + // Information about the followers of this playlist. + Followers Followers `json:"followers"` + Tracks PlaylistTrackPage `json:"tracks"` +} + +// PlaylistOptions contains optional parameters that can be used when querying +// for featured playlists. Only the non-nil fields are used in the request. +type PlaylistOptions struct { + Options + // The desired language, consisting of a lowercase IO 639 + // language code and an uppercase ISO 3166-1 alpha-2 + // country code, joined by an underscore. Provide this + // parameter if you want the results returned in a particular + // language. If not specified, the result will be returned + // in the Spotify default language (American English). + Locale *string + // A timestamp in ISO 8601 format (yyyy-MM-ddTHH:mm:ss). + // use this paramter to specify the user's local time to + // get results tailored for that specific date and time + // in the day. If not provided, the response defaults to + // the current UTC time. + Timestamp *string +} + +// FeaturedPlaylistsOpt gets a list of playlists featured by Spotify. +// It accepts a number of optional parameters via the opt argument. +func (c *Client) FeaturedPlaylistsOpt(opt *PlaylistOptions) (message string, playlists *SimplePlaylistPage, e error) { + spotifyURL := c.baseURL + "browse/featured-playlists" + if opt != nil { + v := url.Values{} + if opt.Locale != nil { + v.Set("locale", *opt.Locale) + } + if opt.Country != nil { + v.Set("country", *opt.Country) + } + if opt.Timestamp != nil { + v.Set("timestamp", *opt.Timestamp) + } + if opt.Limit != nil { + v.Set("limit", strconv.Itoa(*opt.Limit)) + } + if opt.Offset != nil { + v.Set("offset", strconv.Itoa(*opt.Offset)) + } + if params := v.Encode(); params != "" { + spotifyURL += "?" + params + } + } + + var result struct { + Playlists SimplePlaylistPage `json:"playlists"` + Message string `json:"message"` + } + + err := c.get(spotifyURL, &result) + if err != nil { + return "", nil, err + } + + return result.Message, &result.Playlists, nil +} + +// FeaturedPlaylists gets a list of playlists featured by Spotify. +// It is equivalent to c.FeaturedPlaylistsOpt(nil). +func (c *Client) FeaturedPlaylists() (message string, playlists *SimplePlaylistPage, e error) { + return c.FeaturedPlaylistsOpt(nil) +} + +// FollowPlaylist adds the current user as a follower of the specified +// playlist. Any playlist can be followed, regardless of its private/public +// status, as long as you know the owner and playlist ID. +// +// If the public argument is true, then the playlist will be included in the +// user's public playlists. To be able to follow playlists privately, the user +// must have granted the ScopePlaylistModifyPrivate scope. The +// ScopePlaylistModifyPublic scope is required to follow playlists publicly. +func (c *Client) FollowPlaylist(owner ID, playlist ID, public bool) error { + spotifyURL := buildFollowURI(c.baseURL, owner, playlist) + body := strings.NewReader(strconv.FormatBool(public)) + req, err := http.NewRequest("PUT", spotifyURL, body) + if err != nil { + return err + } + req.Header.Set("Content-Type", "application/json") + err = c.execute(req, nil) + if err != nil { + return err + } + return nil +} + +// UnfollowPlaylist removes the current user as a follower of a playlist. +// Unfollowing a publicly followed playlist requires ScopePlaylistModifyPublic. +// Unfolowing a privately followed playlist requies ScopePlaylistModifyPrivate. +func (c *Client) UnfollowPlaylist(owner, playlist ID) error { + spotifyURL := buildFollowURI(c.baseURL, owner, playlist) + req, err := http.NewRequest("DELETE", spotifyURL, nil) + if err != nil { + return err + } + err = c.execute(req, nil) + if err != nil { + return err + } + return nil +} + +func buildFollowURI(url string, owner, playlist ID) string { + return fmt.Sprintf("%susers/%s/playlists/%s/followers", + url, string(owner), string(playlist)) +} + +// GetPlaylistsForUser gets a list of the playlists owned or followed by a +// particular Spotify user. +// +// Private playlists and collaborative playlists are only retrievable for the +// current user. In order to read private playlists, the user must have granted +// the ScopePlaylistReadPrivate scope. Note that this scope alone will not +// return collaborative playlists, even though they are always private. In +// order to read collaborative playlists, the user must have granted the +// ScopePlaylistReadCollaborative scope. +func (c *Client) GetPlaylistsForUser(userID string) (*SimplePlaylistPage, error) { + return c.GetPlaylistsForUserOpt(userID, nil) +} + +// GetPlaylistsForUserOpt is like PlaylistsForUser, but it accepts optional paramters +// for filtering the results. +func (c *Client) GetPlaylistsForUserOpt(userID string, opt *Options) (*SimplePlaylistPage, error) { + spotifyURL := c.baseURL + "users/" + userID + "/playlists" + if opt != nil { + v := url.Values{} + if opt.Limit != nil { + v.Set("limit", strconv.Itoa(*opt.Limit)) + } + if opt.Offset != nil { + v.Set("offset", strconv.Itoa(*opt.Offset)) + } + if params := v.Encode(); params != "" { + spotifyURL += "?" + params + } + } + + var result SimplePlaylistPage + + err := c.get(spotifyURL, &result) + if err != nil { + return nil, err + } + + return &result, err +} + +// GetPlaylist gets a playlist +func (c *Client) GetPlaylist(playlistID ID) (*FullPlaylist, error) { + return c.GetPlaylistOpt(playlistID, "") +} + +// GetPlaylistOpt is like GetPlaylist, but it accepts an optional fields parameter +// that can be used to filter the query. +// +// fields is a comma-separated list of the fields to return. +// See the JSON tags on the FullPlaylist struct for valid field options. +// For example, to get just the playlist's description and URI: +// fields = "description,uri" +// +// A dot separator can be used to specify non-reoccurring fields, while +// parentheses can be used to specify reoccurring fields within objects. +// For example, to get just the added date and the user ID of the adder: +// fields = "tracks.items(added_at,added_by.id)" +// +// Use multiple parentheses to drill down into nested objects, for example: +// fields = "tracks.items(track(name,href,album(name,href)))" +// +// Fields can be excluded by prefixing them with an exclamation mark, for example; +// fields = "tracks.items(track(name,href,album(!name,href)))" +func (c *Client) GetPlaylistOpt(playlistID ID, fields string) (*FullPlaylist, error) { + spotifyURL := fmt.Sprintf("%splaylists/%s", c.baseURL, playlistID) + if fields != "" { + spotifyURL += "?fields=" + url.QueryEscape(fields) + } + + var playlist FullPlaylist + + err := c.get(spotifyURL, &playlist) + if err != nil { + return nil, err + } + + return &playlist, err +} + +// GetPlaylistTracks gets full details of the tracks in a playlist, given the +// playlist's Spotify ID. +func (c *Client) GetPlaylistTracks(playlistID ID) (*PlaylistTrackPage, error) { + return c.GetPlaylistTracksOpt(playlistID, nil, "") +} + +// GetPlaylistTracksOpt is like GetPlaylistTracks, but it accepts optional parameters +// for sorting and filtering the results. +// +// The field parameter is a comma-separated list of the fields to return. See the +// JSON struct tags for the PlaylistTrackPage type for valid field names. +// For example, to get just the total number of tracks and the request limit: +// fields = "total,limit" +// +// A dot separator can be used to specify non-reoccurring fields, while parentheses +// can be used to specify reoccurring fields within objects. For example, to get +// just the added date and user ID of the adder: +// fields = "items(added_at,added_by.id +// +// Use multiple parentheses to drill down into nested objects. For example: +// fields = "items(track(name,href,album(name,href)))" +// +// Fields can be excluded by prefixing them with an exclamation mark. For example: +// fields = "items.track.album(!external_urls,images)" +func (c *Client) GetPlaylistTracksOpt(playlistID ID, + opt *Options, fields string) (*PlaylistTrackPage, error) { + + spotifyURL := fmt.Sprintf("%splaylists/%s/tracks", c.baseURL, playlistID) + v := url.Values{} + if fields != "" { + v.Set("fields", fields) + } + if opt != nil { + if opt.Limit != nil { + v.Set("limit", strconv.Itoa(*opt.Limit)) + } + if opt.Offset != nil { + v.Set("offset", strconv.Itoa(*opt.Offset)) + } + } + if params := v.Encode(); params != "" { + spotifyURL += "?" + params + } + + var result PlaylistTrackPage + + err := c.get(spotifyURL, &result) + if err != nil { + return nil, err + } + + return &result, err +} + +// CreatePlaylistForUser creates a playlist for a Spotify user. +// The playlist will be empty until you add tracks to it. +// The playlistName does not need to be unique - a user can have +// several playlists with the same name. +// +// Creating a public playlist for a user requires ScopePlaylistModifyPublic; +// creating a private playlist requires ScopePlaylistModifyPrivate. +// +// On success, the newly created playlist is returned. +func (c *Client) CreatePlaylistForUser(userID, playlistName, description string, public bool) (*FullPlaylist, error) { + spotifyURL := fmt.Sprintf("%susers/%s/playlists", c.baseURL, userID) + body := struct { + Name string `json:"name"` + Public bool `json:"public"` + Description string `json:"description"` + }{ + playlistName, + public, + description, + } + bodyJSON, err := json.Marshal(body) + if err != nil { + return nil, err + } + req, err := http.NewRequest("POST", spotifyURL, bytes.NewReader(bodyJSON)) + if err != nil { + return nil, err + } + req.Header.Set("Content-Type", "application/json") + + var p FullPlaylist + err = c.execute(req, &p, http.StatusCreated) + if err != nil { + return nil, err + } + + return &p, err +} + +// ChangePlaylistName changes the name of a playlist. This call requires that the +// user has authorized the ScopePlaylistModifyPublic or ScopePlaylistModifyPrivate +// scopes (depending on whether the playlist is public or private). +// The current user must own the playlist in order to modify it. +func (c *Client) ChangePlaylistName(playlistID ID, newName string) error { + return c.modifyPlaylist(playlistID, newName, "", nil) +} + +// ChangePlaylistAccess modifies the public/private status of a playlist. This call +// requires that the user has authorized the ScopePlaylistModifyPublic or +// ScopePlaylistModifyPrivate scopes (depending on whether the playlist is +// currently public or private). The current user must own the playlist in order to modify it. +func (c *Client) ChangePlaylistAccess(playlistID ID, public bool) error { + return c.modifyPlaylist(playlistID, "", "", &public) +} + +// ChangePlaylistDescription modifies the description of a playlist. This call +// requires that the user has authorized the ScopePlaylistModifyPublic or +// ScopePlaylistModifyPrivate scopes (depending on whether the playlist is +// currently public or private). The current user must own the playlist in order to modify it. +func (c *Client) ChangePlaylistDescription(playlistID ID, newDescription string) error { + return c.modifyPlaylist(playlistID, "", newDescription, nil) +} + +// ChangePlaylistNameAndAccess combines ChangePlaylistName and ChangePlaylistAccess into +// a single Web API call. It requires that the user has authorized the ScopePlaylistModifyPublic +// or ScopePlaylistModifyPrivate scopes (depending on whether the playlist is currently +// public or private). The current user must own the playlist in order to modify it. +func (c *Client) ChangePlaylistNameAndAccess(playlistID ID, newName string, public bool) error { + return c.modifyPlaylist(playlistID, newName, "", &public) +} + +// ChangePlaylistNameAccessAndDescription combines ChangePlaylistName, ChangePlaylistAccess, and +// ChangePlaylistDescription into a single Web API call. It requires that the user has authorized +// the ScopePlaylistModifyPublic or ScopePlaylistModifyPrivate scopes (depending on whether the +// playlist is currently public or private). The current user must own the playlist in order to modify it. +func (c *Client) ChangePlaylistNameAccessAndDescription(playlistID ID, newName, newDescription string, public bool) error { + return c.modifyPlaylist(playlistID, newName, newDescription, &public) +} + +func (c *Client) modifyPlaylist(playlistID ID, newName, newDescription string, public *bool) error { + body := struct { + Name string `json:"name,omitempty"` + Public *bool `json:"public,omitempty"` + Description string `json:"description,omitempty"` + }{ + newName, + public, + newDescription, + } + bodyJSON, err := json.Marshal(body) + if err != nil { + return err + } + spotifyURL := fmt.Sprintf("%splaylists/%s", c.baseURL, string(playlistID)) + req, err := http.NewRequest("PUT", spotifyURL, bytes.NewReader(bodyJSON)) + if err != nil { + return err + } + req.Header.Set("Content-Type", "application/json") + err = c.execute(req, nil, http.StatusCreated) + if err != nil { + return err + } + return nil +} + +// AddTracksToPlaylist adds one or more tracks to a user's playlist. +// This call requires ScopePlaylistModifyPublic or ScopePlaylistModifyPrivate. +// A maximum of 100 tracks can be added per call. It returns a snapshot ID that +// can be used to identify this version (the new version) of the playlist in +// future requests. +func (c *Client) AddTracksToPlaylist(playlistID ID, trackIDs ...ID) (snapshotID string, err error) { + + uris := make([]string, len(trackIDs)) + for i, id := range trackIDs { + uris[i] = fmt.Sprintf("spotify:track:%s", id) + } + m := make(map[string]interface{}) + m["uris"] = uris + + spotifyURL := fmt.Sprintf("%splaylists/%s/tracks", + c.baseURL, string(playlistID)) + body, err := json.Marshal(m) + if err != nil { + return "", err + } + req, err := http.NewRequest("POST", spotifyURL, bytes.NewReader(body)) + if err != nil { + return "", err + } + req.Header.Set("Content-Type", "application/json") + + result := struct { + SnapshotID string `json:"snapshot_id"` + }{} + + err = c.execute(req, &result, http.StatusCreated) + if err != nil { + return "", err + } + + return result.SnapshotID, nil +} + +// RemoveTracksFromPlaylist removes one or more tracks from a user's playlist. +// This call requrles that the user has authorized the ScopePlaylistModifyPublic +// or ScopePlaylistModifyPrivate scopes. +// +// If the track(s) occur multiple times in the specified playlist, then all occurrences +// of the track will be removed. If successful, the snapshot ID returned can be used to +// identify the playlist version in future requests. +func (c *Client) RemoveTracksFromPlaylist(playlistID ID, trackIDs ...ID) (newSnapshotID string, err error) { + + tracks := make([]struct { + URI string `json:"uri"` + }, len(trackIDs)) + + for i, u := range trackIDs { + tracks[i].URI = fmt.Sprintf("spotify:track:%s", u) + } + return c.removeTracksFromPlaylist(playlistID, tracks, "") +} + +// TrackToRemove specifies a track to be removed from a playlist. +// Positions is a slice of 0-based track indices. +// TrackToRemove is used with RemoveTracksFromPlaylistOpt. +type TrackToRemove struct { + URI string `json:"uri"` + Positions []int `json:"positions"` +} + +// NewTrackToRemove creates a new TrackToRemove object with the specified +// track ID and playlist locations. +func NewTrackToRemove(trackID string, positions []int) TrackToRemove { + return TrackToRemove{ + URI: fmt.Sprintf("spotify:track:%s", trackID), + Positions: positions, + } +} + +// RemoveTracksFromPlaylistOpt is like RemoveTracksFromPlaylist, but it supports +// optional parameters that offer more fine-grained control. Instead of deleting +// all occurrences of a track, this function takes an index with each track URI +// that indicates the position of the track in the playlist. +// +// In addition, the snapshotID parameter allows you to specify the snapshot ID +// against which you want to make the changes. Spotify will validate that the +// specified tracks exist in the specified positions and make the changes, even +// if more recent changes have been made to the playlist. If a track in the +// specified position is not found, the entire request will fail and no edits +// will take place. (Note: the snapshot is optional, pass the empty string if +// you don't care about it.) +func (c *Client) RemoveTracksFromPlaylistOpt(playlistID ID, + tracks []TrackToRemove, snapshotID string) (newSnapshotID string, err error) { + + return c.removeTracksFromPlaylist(playlistID, tracks, snapshotID) +} + +func (c *Client) removeTracksFromPlaylist(playlistID ID, + tracks interface{}, snapshotID string) (newSnapshotID string, err error) { + + m := make(map[string]interface{}) + m["tracks"] = tracks + if snapshotID != "" { + m["snapshot_id"] = snapshotID + } + + spotifyURL := fmt.Sprintf("%splaylists/%s/tracks", + c.baseURL, string(playlistID)) + body, err := json.Marshal(m) + if err != nil { + return "", err + } + req, err := http.NewRequest("DELETE", spotifyURL, bytes.NewReader(body)) + if err != nil { + return "", nil + } + req.Header.Set("Content-Type", "application/json") + + result := struct { + SnapshotID string `json:"snapshot_id"` + }{} + + err = c.execute(req, &result) + if err != nil { + return "", nil + } + + return result.SnapshotID, err +} + +// ReplacePlaylistTracks replaces all of the tracks in a playlist, overwriting its +// exising tracks This can be useful for replacing or reordering tracks, or for +// clearing a playlist. +// +// Modifying a public playlist requires that the user has authorized the +// ScopePlaylistModifyPublic scope. Modifying a private playlist requires the +// ScopePlaylistModifyPrivate scope. +// +// A maximum of 100 tracks is permited in this call. Additional tracks must be +// added via AddTracksToPlaylist. +func (c *Client) ReplacePlaylistTracks(playlistID ID, trackIDs ...ID) error { + trackURIs := make([]string, len(trackIDs)) + for i, u := range trackIDs { + trackURIs[i] = fmt.Sprintf("spotify:track:%s", u) + } + spotifyURL := fmt.Sprintf("%splaylists/%s/tracks?uris=%s", + c.baseURL, playlistID, strings.Join(trackURIs, ",")) + req, err := http.NewRequest("PUT", spotifyURL, nil) + if err != nil { + return err + } + err = c.execute(req, nil, http.StatusCreated) + if err != nil { + return err + } + + return nil +} + +// UserFollowsPlaylist checks if one or more (up to 5) Spotify users are following +// a Spotify playlist, given the playlist's owner and ID. +// +// Checking if a user follows a playlist publicly doesn't require any scopes. +// Checking if the user is privately following a playlist is only possible for the +// current user when that user has granted access to the ScopePlaylistReadPrivate scope. +func (c *Client) UserFollowsPlaylist(playlistID ID, userIDs ...string) ([]bool, error) { + spotifyURL := fmt.Sprintf("%splaylists/%s/followers/contains?ids=%s", + c.baseURL, playlistID, strings.Join(userIDs, ",")) + + follows := make([]bool, len(userIDs)) + + err := c.get(spotifyURL, &follows) + if err != nil { + return nil, err + } + + return follows, err +} + +// PlaylistReorderOptions is used with ReorderPlaylistTracks to reorder +// a track or group of tracks in a playlist. +// +// For example, in a playlist with 10 tracks, you can: +// +// - move the first track to the end of the playlist by setting +// RangeStart to 0 and InsertBefore to 10 +// - move the last track to the beginning of the playlist by setting +// RangeStart to 9 and InsertBefore to 0 +// - Move the last 2 tracks to the beginning of the playlist by setting +// RangeStart to 8 and RangeLength to 2. +type PlaylistReorderOptions struct { + // The position of the first track to be reordered. + // This field is required. + RangeStart int `json:"range_start"` + // The amount of tracks to be reordered. This field is optional. If + // you don't set it, the value 1 will be used. + RangeLength int `json:"range_length,omitempty"` + // The position where the tracks should be inserted. To reorder the + // tracks to the end of the playlist, simply set this to the position + // after the last track. This field is required. + InsertBefore int `json:"insert_before"` + // The playlist's snapshot ID against which you wish to make the changes. + // This field is optional. + SnapshotID string `json:"snapshot_id,omitempty"` +} + +// ReorderPlaylistTracks reorders a track or group of tracks in a playlist. It +// returns a snapshot ID that can be used to identify the [newly modified] playlist +// version in future requests. +// +// See the docs for PlaylistReorderOptions for information on how the reordering +// works. +// +// Reordering tracks in the current user's public playlist requires ScopePlaylistModifyPublic. +// Reordering tracks in the user's private playlists (including collaborative playlists) requires +// ScopePlaylistModifyPrivate. +func (c *Client) ReorderPlaylistTracks(playlistID ID, opt PlaylistReorderOptions) (snapshotID string, err error) { + spotifyURL := fmt.Sprintf("%splaylists/%s/tracks", c.baseURL, playlistID) + j, err := json.Marshal(opt) + if err != nil { + return "", err + } + req, err := http.NewRequest("PUT", spotifyURL, bytes.NewReader(j)) + if err != nil { + return "", err + } + req.Header.Set("Content-Type", "application/json") + + result := struct { + SnapshotID string `json:"snapshot_id"` + }{} + err = c.execute(req, &result) + if err != nil { + return "", err + } + + return result.SnapshotID, err +} + +// SetPlaylistImage replaces the image used to represent a playlist. +// This action can only be performed by the owner of the playlist, +// and requires ScopeImageUpload as well as ScopeModifyPlaylist{Public|Private}.. +func (c *Client) SetPlaylistImage(playlistID ID, img io.Reader) error { + spotifyURL := fmt.Sprintf("%splaylists/%s/images", c.baseURL, playlistID) + // data flow: + // img (reader) -> copy into base64 encoder (writer) -> pipe (write end) + // pipe (read end) -> request body + r, w := io.Pipe() + go func() { + enc := base64.NewEncoder(base64.StdEncoding, w) + _, err := io.Copy(enc, img) + enc.Close() + w.CloseWithError(err) + }() + + req, err := http.NewRequest("PUT", spotifyURL, r) + if err != nil { + return err + } + req.Header.Set("Content-Type", "image/jpeg") + return c.execute(req, nil, http.StatusAccepted) +} diff --git a/vendor/github.com/zmb3/spotify/recommendation.go b/vendor/github.com/zmb3/spotify/recommendation.go new file mode 100644 index 00000000..2d9fa7bf --- /dev/null +++ b/vendor/github.com/zmb3/spotify/recommendation.go @@ -0,0 +1,121 @@ +package spotify + +import ( + "fmt" + "net/url" + "strconv" + "strings" +) + +// Seeds contains IDs of artists, genres and/or tracks +// to be used as seeds for recommendations +type Seeds struct { + Artists []ID + Tracks []ID + Genres []string +} + +// count returns the total number of seeds contained in s +func (s Seeds) count() int { + return len(s.Artists) + len(s.Tracks) + len(s.Genres) +} + +// Recommendations contains a list of recommended tracks based on seeds +type Recommendations struct { + Seeds []RecommendationSeed `json:"seeds"` + Tracks []SimpleTrack `json:"tracks"` +} + +// RecommendationSeed represents a recommendation seed after +// being processed by the Spotify API +type RecommendationSeed struct { + AfterFilteringSize int `json:"afterFilteringSize"` + AfterRelinkingSize int `json:"afterRelinkingSize"` + Endpoint string `json:"href"` + ID ID `json:"id"` + InitialPoolSize int `json:"initialPoolSize"` + Type string `json:"type"` +} + +// MaxNumberOfSeeds allowed by Spotify for a recommendation request +const MaxNumberOfSeeds = 5 + +// setSeedValues sets url values into v for each seed in seeds +func setSeedValues(seeds Seeds, v url.Values) { + if len(seeds.Artists) != 0 { + v.Set("seed_artists", strings.Join(toStringSlice(seeds.Artists), ",")) + } + if len(seeds.Tracks) != 0 { + v.Set("seed_tracks", strings.Join(toStringSlice(seeds.Tracks), ",")) + } + if len(seeds.Genres) != 0 { + v.Set("seed_genres", strings.Join(seeds.Genres, ",")) + } +} + +// setTrackAttributesValues sets track attributes values to the given url values +func setTrackAttributesValues(trackAttributes *TrackAttributes, values url.Values) { + if trackAttributes == nil { + return + } + for attr, val := range trackAttributes.intAttributes { + values.Set(attr, strconv.Itoa(val)) + } + for attr, val := range trackAttributes.floatAttributes { + values.Set(attr, strconv.FormatFloat(val, 'f', -1, 64)) + } +} + +// GetRecommendations returns a list of recommended tracks based on the given seeds. +// Recommendations are generated based on the available information for a given seed entity +// and matched against similar artists and tracks. If there is sufficient information +// about the provided seeds, a list of tracks will be returned together with pool size details. +// For artists and tracks that are very new or obscure +// there might not be enough data to generate a list of tracks. +func (c *Client) GetRecommendations(seeds Seeds, trackAttributes *TrackAttributes, opt *Options) (*Recommendations, error) { + v := url.Values{} + + if seeds.count() == 0 { + return nil, fmt.Errorf("spotify: at least one seed is required") + } + if seeds.count() > MaxNumberOfSeeds { + return nil, fmt.Errorf("spotify: exceeded maximum of %d seeds", MaxNumberOfSeeds) + } + + setSeedValues(seeds, v) + setTrackAttributesValues(trackAttributes, v) + + if opt != nil { + if opt.Limit != nil { + v.Set("limit", strconv.Itoa(*opt.Limit)) + } + if opt.Country != nil { + v.Set("market", *opt.Country) + } + } + + spotifyURL := c.baseURL + "recommendations?" + v.Encode() + + var recommendations Recommendations + err := c.get(spotifyURL, &recommendations) + if err != nil { + return nil, err + } + + return &recommendations, err +} + +// GetAvailableGenreSeeds retrieves a list of available genres seed parameter values for +// recommendations. +func (c *Client) GetAvailableGenreSeeds() ([]string, error) { + spotifyURL := c.baseURL + "recommendations/available-genre-seeds" + + genreSeeds := make(map[string][]string) + + err := c.get(spotifyURL, &genreSeeds) + if err != nil { + return nil, err + } + + return genreSeeds["genres"], nil +} diff --git a/vendor/github.com/zmb3/spotify/search.go b/vendor/github.com/zmb3/spotify/search.go new file mode 100644 index 00000000..ab75ef41 --- /dev/null +++ b/vendor/github.com/zmb3/spotify/search.go @@ -0,0 +1,208 @@ +package spotify + +import ( + "net/url" + "strconv" + "strings" +) + +const ( + // MarketFromToken can be used in place of the Market parameter + // if the Client has a valid access token. In this case, the + // results will be limited to content that is playable in the + // country associated with the user's account. The user must have + // granted access to the user-read-private scope when the access + // token was issued. + MarketFromToken = "from_token" +) + +// SearchType represents the type of a query used in the Search function. +type SearchType int + +// Search type values that can be passed to the Search function. These are flags +// that can be bitwise OR'd together to search for multiple types of content simultaneously. +const ( + SearchTypeAlbum SearchType = 1 << iota + SearchTypeArtist = 1 << iota + SearchTypePlaylist = 1 << iota + SearchTypeTrack = 1 << iota +) + +func (st SearchType) encode() string { + types := []string{} + if st&SearchTypeAlbum != 0 { + types = append(types, "album") + } + if st&SearchTypeArtist != 0 { + types = append(types, "artist") + } + if st&SearchTypePlaylist != 0 { + types = append(types, "playlist") + } + if st&SearchTypeTrack != 0 { + types = append(types, "track") + } + return strings.Join(types, ",") +} + +// SearchResult contains the results of a call to Search. +// Fields that weren't searched for will be nil pointers. +type SearchResult struct { + Artists *FullArtistPage `json:"artists"` + Albums *SimpleAlbumPage `json:"albums"` + Playlists *SimplePlaylistPage `json:"playlists"` + Tracks *FullTrackPage `json:"tracks"` +} + +// Search gets Spotify catalog information about artists, albums, tracks, +// or playlists that match a keyword string. t is a mask containing one or more +// search types. For example, `Search(query, SearchTypeArtist|SearchTypeAlbum)` +// will search for artists or albums matching the specified keywords. +// +// Matching +// +// Matching of search keywords is NOT case sensitive. Keywords are matched in +// any order unless surrounded by double quotes. Searching for playlists will +// return results where the query keyword(s) match any part of the playlist's +// name or description. Only popular public playlists are returned. +// +// Operators +// +// The operator NOT can be used to exclude results. For example, +// query = "roadhouse NOT blues" returns items that match "roadhouse" but exludes +// those that also contain the keyword "blues". Similarly, the OR operator can +// be used to broaden the search. query = "roadhouse OR blues" returns all results +// that include either of the terms. Only one OR operator can be used in a query. +// +// Operators should be specified in uppercase. +// +// Wildcards +// +// The asterisk (*) character can, with some limitations, be used as a wildcard +// (maximum of 2 per query). It will match a variable number of non-white-space +// characters. It cannot be used in a quoted phrase, in a field filter, or as +// the first character of a keyword string. +// +// Field filters +// +// By default, results are returned when a match is found in any field of the +// target object type. Searches can be made more specific by specifying an album, +// artist, or track field filter. For example, "album:gold artist:abba type:album" +// will only return results with the text "gold" in the album name and the text +// "abba" in the artist's name. +// +// The field filter "year" can be used with album, artist, and track searches to +// limit the results to a particular year. For example "bob year:2014" or +// "bob year:1980-2020". +// +// The field filter "tag:new" can be used in album searches to retrieve only +// albums released in the last two weeks. The field filter "tag:hipster" can be +// used in album searches to retrieve only albums with the lowest 10% popularity. +// +// Other possible field filters, depending on object types being searched, +// include "genre", "upc", and "isrc". For example "damian genre:reggae-pop". +func (c *Client) Search(query string, t SearchType) (*SearchResult, error) { + return c.SearchOpt(query, t, nil) +} + +// SearchOpt works just like Search, but it accepts additional +// parameters for filtering the output. See the documentation for Search more +// more information. +// +// If the Country field is specified in the options, then the results will only +// contain artists, albums, and tracks playable in the specified country +// (playlist results are not affected by the Country option). Additionally, +// the constant MarketFromToken can be used with authenticated clients. +// If the client has a valid access token, then the results will only include +// content playable in the user's country. +func (c *Client) SearchOpt(query string, t SearchType, opt *Options) (*SearchResult, error) { + v := url.Values{} + v.Set("q", query) + v.Set("type", t.encode()) + if opt != nil { + if opt.Limit != nil { + v.Set("limit", strconv.Itoa(*opt.Limit)) + } + if opt.Country != nil { + v.Set("market", *opt.Country) + } + if opt.Offset != nil { + v.Set("offset", strconv.Itoa(*opt.Offset)) + } + } + + spotifyURL := c.baseURL + "search?" + v.Encode() + + var result SearchResult + + err := c.get(spotifyURL, &result) + if err != nil { + return nil, err + } + + return &result, err +} + +// NextArtistResults loads the next page of artists into the specified search result. +func (c *Client) NextArtistResults(s *SearchResult) error { + if s.Artists == nil || s.Artists.Next == "" { + return ErrNoMorePages + } + return c.get(s.Artists.Next, s) +} + +// PreviousArtistResults loads the previous page of artists into the specified search result. +func (c *Client) PreviousArtistResults(s *SearchResult) error { + if s.Artists == nil || s.Artists.Previous == "" { + return ErrNoMorePages + } + return c.get(s.Artists.Previous, s) +} + +// NextAlbumResults loads the next page of albums into the specified search result. +func (c *Client) NextAlbumResults(s *SearchResult) error { + if s.Albums == nil || s.Albums.Next == "" { + return ErrNoMorePages + } + return c.get(s.Albums.Next, s) +} + +// PreviousAlbumResults loads the previous page of albums into the specified search result. +func (c *Client) PreviousAlbumResults(s *SearchResult) error { + if s.Albums == nil || s.Albums.Previous == "" { + return ErrNoMorePages + } + return c.get(s.Albums.Previous, s) +} + +// NextPlaylistResults loads the next page of playlists into the specified search result. +func (c *Client) NextPlaylistResults(s *SearchResult) error { + if s.Playlists == nil || s.Playlists.Next == "" { + return ErrNoMorePages + } + return c.get(s.Playlists.Next, s) +} + +// PreviousPlaylistResults loads the previous page of playlists into the specified search result. +func (c *Client) PreviousPlaylistResults(s *SearchResult) error { + if s.Playlists == nil || s.Playlists.Previous == "" { + return ErrNoMorePages + } + return c.get(s.Playlists.Previous, s) +} + +// PreviousTrackResults loads the previous page of tracks into the specified search result. +func (c *Client) PreviousTrackResults(s *SearchResult) error { + if s.Tracks == nil || s.Tracks.Previous == "" { + return ErrNoMorePages + } + return c.get(s.Tracks.Previous, s) +} + +// NextTrackResults loads the next page of tracks into the specified search result. +func (c *Client) NextTrackResults(s *SearchResult) error { + if s.Tracks == nil || s.Tracks.Next == "" { + return ErrNoMorePages + } + return c.get(s.Tracks.Next, s) +} diff --git a/vendor/github.com/zmb3/spotify/spotify.go b/vendor/github.com/zmb3/spotify/spotify.go new file mode 100644 index 00000000..58d550df --- /dev/null +++ b/vendor/github.com/zmb3/spotify/spotify.go @@ -0,0 +1,291 @@ +// Package spotify provides utilties for interfacing +// with Spotify's Web API. +package spotify + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "io/ioutil" + "net/http" + "net/url" + "strconv" + "time" +) + +// Version is the version of this library. +const Version = "1.0.0" + +const ( + // DateLayout can be used with time.Parse to create time.Time values + // from Spotify date strings. For example, PrivateUser.Birthdate + // uses this format. + DateLayout = "2006-01-02" + // TimestampLayout can be used with time.Parse to create time.Time + // values from SpotifyTimestamp strings. It is an ISO 8601 UTC timestamp + // with a zero offset. For example, PlaylistTrack's AddedAt field uses + // this format. + TimestampLayout = "2006-01-02T15:04:05Z" + + // defaultRetryDurationS helps us fix an apparent server bug whereby we will + // be told to retry but not be given a wait-interval. + defaultRetryDuration = time.Second * 5 + + // rateLimitExceededStatusCode is the code that the server returns when our + // request frequency is too high. + rateLimitExceededStatusCode = 429 +) + +const baseAddress = "https://api.spotify.com/v1/" + +// Client is a client for working with the Spotify Web API. +// To create an authenticated client, use the `Authenticator.NewClient` method. +type Client struct { + http *http.Client + baseURL string + + AutoRetry bool +} + +// URI identifies an artist, album, track, or category. For example, +// spotify:track:6rqhFgbbKwnb9MLmUQDhG6 +type URI string + +// ID is a base-62 identifier for an artist, track, album, etc. +// It can be found at the end of a spotify.URI. +type ID string + +func (id *ID) String() string { + return string(*id) +} + +// Followers contains information about the number of people following a +// particular artist or playlist. +type Followers struct { + // The total number of followers. + Count uint `json:"total"` + // A link to the Web API endpoint providing full details of the followers, + // or the empty string if this data is not available. + Endpoint string `json:"href"` +} + +// Image identifies an image associated with an item. +type Image struct { + // The image height, in pixels. + Height int `json:"height"` + // The image width, in pixels. + Width int `json:"width"` + // The source URL of the image. + URL string `json:"url"` +} + +// Download downloads the image and writes its data to the specified io.Writer. +func (i Image) Download(dst io.Writer) error { + resp, err := http.Get(i.URL) + if err != nil { + return err + } + defer resp.Body.Close() + // TODO: get Content-Type from header? + if resp.StatusCode != http.StatusOK { + return errors.New("Couldn't download image - HTTP" + strconv.Itoa(resp.StatusCode)) + } + _, err = io.Copy(dst, resp.Body) + return err +} + +// Error represents an error returned by the Spotify Web API. +type Error struct { + // A short description of the error. + Message string `json:"message"` + // The HTTP status code. + Status int `json:"status"` +} + +func (e Error) Error() string { + return e.Message +} + +// decodeError decodes an Error from an io.Reader. +func (c *Client) decodeError(resp *http.Response) error { + responseBody, err := ioutil.ReadAll(resp.Body) + if err != nil { + return err + } + + if len(responseBody) == 0 { + return fmt.Errorf("spotify: HTTP %d: %s (body empty)", resp.StatusCode, http.StatusText(resp.StatusCode)) + } + + buf := bytes.NewBuffer(responseBody) + + var e struct { + E Error `json:"error"` + } + err = json.NewDecoder(buf).Decode(&e) + if err != nil { + return fmt.Errorf("spotify: couldn't decode error: (%d) [%s]", len(responseBody), responseBody) + } + + if e.E.Message == "" { + // Some errors will result in there being a useful status-code but an + // empty message, which will confuse the user (who only has access to + // the message and not the code). An example of this is when we send + // some of the arguments directly in the HTTP query and the URL ends-up + // being too long. + + e.E.Message = fmt.Sprintf("spotify: unexpected HTTP %d: %s (empty error)", + resp.StatusCode, http.StatusText(resp.StatusCode)) + } + + return e.E +} + +// shouldRetry determines whether the status code indicates that the +// previous operation should be retried at a later time +func shouldRetry(status int) bool { + return status == http.StatusAccepted || status == http.StatusTooManyRequests +} + +// isFailure determines whether the code indicates failure +func isFailure(code int, validCodes []int) bool { + for _, item := range validCodes { + if item == code { + return false + } + } + return true +} + +// execute executes a non-GET request. `needsStatus` describes other HTTP status codes +// that can represent success. Note that in all current usages of this function, +// we need to still allow a 200 even if we'd also like to check for additional +// success codes. +func (c *Client) execute(req *http.Request, result interface{}, needsStatus ...int) error { + for { + resp, err := c.http.Do(req) + if err != nil { + return err + } + defer resp.Body.Close() + + if c.AutoRetry && shouldRetry(resp.StatusCode) { + time.Sleep(retryDuration(resp)) + continue + } + if resp.StatusCode != http.StatusOK && isFailure(resp.StatusCode, needsStatus) { + return c.decodeError(resp) + } + + if result != nil { + if err := json.NewDecoder(resp.Body).Decode(result); err != nil { + return err + } + } + break + } + return nil +} + +func retryDuration(resp *http.Response) time.Duration { + raw := resp.Header.Get("Retry-After") + if raw == "" { + return defaultRetryDuration + } + seconds, err := strconv.ParseInt(raw, 10, 32) + if err != nil { + return defaultRetryDuration + } + return time.Duration(seconds) * time.Second +} + +func (c *Client) get(url string, result interface{}) error { + for { + resp, err := c.http.Get(url) + if err != nil { + return err + } + + defer resp.Body.Close() + + if resp.StatusCode == rateLimitExceededStatusCode && c.AutoRetry { + time.Sleep(retryDuration(resp)) + continue + } + if resp.StatusCode != http.StatusOK { + return c.decodeError(resp) + } + + err = json.NewDecoder(resp.Body).Decode(result) + if err != nil { + return err + } + + break + } + + return nil +} + +// Options contains optional parameters that can be provided +// to various API calls. Only the non-nil fields are used +// in queries. +type Options struct { + // Country is an ISO 3166-1 alpha-2 country code. Provide + // this parameter if you want the list of returned items to + // be relevant to a particular country. If omitted, the + // results will be relevant to all countries. + Country *string + // Limit is the maximum number of items to return. + Limit *int + // Offset is the index of the first item to return. Use it + // with Limit to get the next set of items. + Offset *int + // Timerange is the period of time from which to return results + // in certain API calls. The three options are the following string + // literals: "short", "medium", and "long" + Timerange *string +} + +// NewReleasesOpt is like NewReleases, but it accepts optional parameters +// for filtering the results. +func (c *Client) NewReleasesOpt(opt *Options) (albums *SimpleAlbumPage, err error) { + spotifyURL := c.baseURL + "browse/new-releases" + if opt != nil { + v := url.Values{} + if opt.Country != nil { + v.Set("country", *opt.Country) + } + if opt.Limit != nil { + v.Set("limit", strconv.Itoa(*opt.Limit)) + } + if opt.Offset != nil { + v.Set("offset", strconv.Itoa(*opt.Offset)) + } + if params := v.Encode(); params != "" { + spotifyURL += "?" + params + } + } + + var objmap map[string]*json.RawMessage + err = c.get(spotifyURL, &objmap) + if err != nil { + return nil, err + } + + var result SimpleAlbumPage + err = json.Unmarshal(*objmap["albums"], &result) + if err != nil { + return nil, err + } + + return &result, nil +} + +// NewReleases gets a list of new album releases featured in Spotify. +// This call requires bearer authorization. +func (c *Client) NewReleases() (albums *SimpleAlbumPage, err error) { + return c.NewReleasesOpt(nil) +} diff --git a/vendor/github.com/zmb3/spotify/track.go b/vendor/github.com/zmb3/spotify/track.go new file mode 100644 index 00000000..3e341ce3 --- /dev/null +++ b/vendor/github.com/zmb3/spotify/track.go @@ -0,0 +1,120 @@ +package spotify + +import ( + "errors" + "fmt" + "strings" + "time" +) + +// SimpleTrack contains basic info about a track. +type SimpleTrack struct { + Artists []SimpleArtist `json:"artists"` + // A list of the countries in which the track can be played, + // identified by their ISO 3166-1 alpha-2 codes. + AvailableMarkets []string `json:"available_markets"` + // The disc number (usually 1 unless the album consists of more than one disc). + DiscNumber int `json:"disc_number"` + // The length of the track, in milliseconds. + Duration int `json:"duration_ms"` + // Whether or not the track has explicit lyrics. + // true => yes, it does; false => no, it does not. + Explicit bool `json:"explicit"` + // External URLs for this track. + ExternalURLs map[string]string `json:"external_urls"` + // A link to the Web API endpoint providing full details for this track. + Endpoint string `json:"href"` + ID ID `json:"id"` + Name string `json:"name"` + // A URL to a 30 second preview (MP3) of the track. + PreviewURL string `json:"preview_url"` + // The number of the track. If an album has several + // discs, the track number is the number on the specified + // DiscNumber. + TrackNumber int `json:"track_number"` + URI URI `json:"uri"` +} + +func (st SimpleTrack) String() string { + return fmt.Sprintf("TRACK<[%s] [%s]>", st.ID, st.Name) +} + +// FullTrack provides extra track data in addition to what is provided by SimpleTrack. +type FullTrack struct { + SimpleTrack + // The album on which the track appears. The album object includes a link in href to full information about the album. + Album SimpleAlbum `json:"album"` + // Known external IDs for the track. + ExternalIDs map[string]string `json:"external_ids"` + // Popularity of the track. The value will be between 0 and 100, + // with 100 being the most popular. The popularity is calculated from + // both total plays and most recent plays. + Popularity int `json:"popularity"` +} + +// PlaylistTrack contains info about a track in a playlist. +type PlaylistTrack struct { + // The date and time the track was added to the playlist. + // You can use the TimestampLayout constant to convert + // this field to a time.Time value. + // Warning: very old playlists may not populate this value. + AddedAt string `json:"added_at"` + // The Spotify user who added the track to the playlist. + // Warning: vary old playlists may not populate this value. + AddedBy User `json:"added_by"` + // Information about the track. + Track FullTrack `json:"track"` +} + +// SavedTrack provides info about a track saved to a user's account. +type SavedTrack struct { + // The date and time the track was saved, represented as an ISO + // 8601 UTC timestamp with a zero offset (YYYY-MM-DDTHH:MM:SSZ). + // You can use the TimestampLayout constant to convert this to + // a time.Time value. + AddedAt string `json:"added_at"` + FullTrack `json:"track"` +} + +// TimeDuration returns the track's duration as a time.Duration value. +func (t *SimpleTrack) TimeDuration() time.Duration { + return time.Duration(t.Duration) * time.Millisecond +} + +// GetTrack gets Spotify catalog information for +// a single track identified by its unique Spotify ID. +func (c *Client) GetTrack(id ID) (*FullTrack, error) { + spotifyURL := c.baseURL + "tracks/" + string(id) + + var t FullTrack + + err := c.get(spotifyURL, &t) + if err != nil { + return nil, err + } + + return &t, nil +} + +// GetTracks gets Spotify catalog information for multiple tracks based on their +// Spotify IDs. It supports up to 50 tracks in a single call. Tracks are +// returned in the order requested. If a track is not found, that position in the +// result will be nil. Duplicate ids in the query will result in duplicate +// tracks in the result. +func (c *Client) GetTracks(ids ...ID) ([]*FullTrack, error) { + if len(ids) > 50 { + return nil, errors.New("spotify: FindTracks supports up to 50 tracks") + } + spotifyURL := c.baseURL + "tracks?ids=" + strings.Join(toStringSlice(ids), ",") + + var t struct { + Tracks []*FullTrack `json:"tracks"` + } + + err := c.get(spotifyURL, &t) + if err != nil { + return nil, err + } + + return t.Tracks, nil +} diff --git a/vendor/github.com/zmb3/spotify/track_attributes.go b/vendor/github.com/zmb3/spotify/track_attributes.go new file mode 100644 index 00000000..2a7b9782 --- /dev/null +++ b/vendor/github.com/zmb3/spotify/track_attributes.go @@ -0,0 +1,431 @@ +package spotify + +// TrackAttributes contains various tuneable parameters that can be used for recommendations. +// For each of the tuneable track attributes, target, min and max values may be provided. +// Target: +// Tracks with the attribute values nearest to the target values will be preferred. +// For example, you might request TargetEnergy=0.6 and TargetDanceability=0.8. +// All target values will be weighed equally in ranking results. +// Max: +// A hard ceiling on the selected track attribute’s value can be provided. +// For example, MaxInstrumentalness=0.35 would filter out most tracks +// that are likely to be instrumental. +// Min: +// A hard floor on the selected track attribute’s value can be provided. +// For example, min_tempo=140 would restrict results to only those tracks +// with a tempo of greater than 140 beats per minute. +type TrackAttributes struct { + intAttributes map[string]int + floatAttributes map[string]float64 +} + +// NewTrackAttributes returns a new TrackAttributes instance with no attributes set. +// Attributes can then be chained following a builder pattern: +// ta := NewTrackAttributes(). +// MaxAcousticness(0.15). +// TargetPopularity(90) +func NewTrackAttributes() *TrackAttributes { + return &TrackAttributes{ + intAttributes: map[string]int{}, + floatAttributes: map[string]float64{}, + } +} + +// MaxAcousticness sets the maximum acousticness +// Acousticness is a confidence measure from 0.0 to 1.0 of whether +// the track is acoustic. A value of 1.0 represents high confidence +// that the track is acoustic. +func (ta *TrackAttributes) MaxAcousticness(acousticness float64) *TrackAttributes { + ta.floatAttributes["max_acousticness"] = acousticness + return ta +} + +// MinAcousticness sets the minimum acousticness +// Acousticness is a confidence measure from 0.0 to 1.0 of whether +// the track is acoustic. A value of 1.0 represents high confidence +// that the track is acoustic. +func (ta *TrackAttributes) MinAcousticness(acousticness float64) *TrackAttributes { + ta.floatAttributes["min_acousticness"] = acousticness + return ta +} + +// TargetAcousticness sets the target acousticness +// Acousticness is a confidence measure from 0.0 to 1.0 of whether +// the track is acoustic. A value of 1.0 represents high confidence +// that the track is acoustic. +func (ta *TrackAttributes) TargetAcousticness(acousticness float64) *TrackAttributes { + ta.floatAttributes["target_acousticness"] = acousticness + return ta +} + +// MaxDanceability sets the maximum danceability +// Danceability describes how suitable a track is for dancing based on +// a combination of musical elements including tempo, rhythm stability, +// beat strength, and overall regularity. +// A value of 0.0 is least danceable and 1.0 is most danceable. +func (ta *TrackAttributes) MaxDanceability(danceability float64) *TrackAttributes { + ta.floatAttributes["max_danceability"] = danceability + return ta +} + +// MinDanceability sets the minimum danceability +// Danceability describes how suitable a track is for dancing based on +// a combination of musical elements including tempo, rhythm stability, +// beat strength, and overall regularity. +// A value of 0.0 is least danceable and 1.0 is most danceable. +func (ta *TrackAttributes) MinDanceability(danceability float64) *TrackAttributes { + ta.floatAttributes["min_danceability"] = danceability + return ta +} + +// TargetDanceability sets the target danceability +// Danceability describes how suitable a track is for dancing based on +// a combination of musical elements including tempo, rhythm stability, +// beat strength, and overall regularity. +// A value of 0.0 is least danceable and 1.0 is most danceable. +func (ta *TrackAttributes) TargetDanceability(danceability float64) *TrackAttributes { + ta.floatAttributes["target_danceability"] = danceability + return ta +} + +// MaxDuration sets the maximum length of the track in milliseconds +func (ta *TrackAttributes) MaxDuration(duration int) *TrackAttributes { + ta.intAttributes["max_duration_ms"] = duration + return ta +} + +// MinDuration sets the minimum length of the track in milliseconds +func (ta *TrackAttributes) MinDuration(duration int) *TrackAttributes { + ta.intAttributes["min_duration_ms"] = duration + return ta +} + +// TargetDuration sets the target length of the track in milliseconds +func (ta *TrackAttributes) TargetDuration(duration int) *TrackAttributes { + ta.intAttributes["target_duration_ms"] = duration + return ta +} + +// MaxEnergy sets the maximum energy +// Energy is a measure from 0.0 to 1.0 and represents a perceptual mesaure +// of intensity and activity. Typically, energetic tracks feel fast, loud, +// and noisy. +func (ta *TrackAttributes) MaxEnergy(energy float64) *TrackAttributes { + ta.floatAttributes["max_energy"] = energy + return ta +} + +// MinEnergy sets the minimum energy +// Energy is a measure from 0.0 to 1.0 and represents a perceptual mesaure +// of intensity and activity. Typically, energetic tracks feel fast, loud, +// and noisy. +func (ta *TrackAttributes) MinEnergy(energy float64) *TrackAttributes { + ta.floatAttributes["min_energy"] = energy + return ta +} + +// TargetEnergy sets the target energy +// Energy is a measure from 0.0 to 1.0 and represents a perceptual mesaure +// of intensity and activity. Typically, energetic tracks feel fast, loud, +// and noisy. +func (ta *TrackAttributes) TargetEnergy(energy float64) *TrackAttributes { + ta.floatAttributes["target_energy"] = energy + return ta +} + +// MaxInstrumentalness sets the maximum instrumentalness +// Instrumentalness predicts whether a track contains no vocals. +// "Ooh" and "aah" sounds are treated as instrumental in this context. +// Rap or spoken word tracks are clearly "vocal". +// The closer the instrumentalness value is to 1.0, +// the greater likelihood the track contains no vocal content. +// Values above 0.5 are intended to represent instrumental tracks, +// but confidence is higher as the value approaches 1.0. +func (ta *TrackAttributes) MaxInstrumentalness(instrumentalness float64) *TrackAttributes { + ta.floatAttributes["max_instrumentalness"] = instrumentalness + return ta + +} + +// MinInstrumentalness sets the minimum instrumentalness +// Instrumentalness predicts whether a track contains no vocals. +// "Ooh" and "aah" sounds are treated as instrumental in this context. +// Rap or spoken word tracks are clearly "vocal". +// The closer the instrumentalness value is to 1.0, +// the greater likelihood the track contains no vocal content. +// Values above 0.5 are intended to represent instrumental tracks, +// but confidence is higher as the value approaches 1.0. +func (ta *TrackAttributes) MinInstrumentalness(instrumentalness float64) *TrackAttributes { + ta.floatAttributes["min_instrumentalness"] = instrumentalness + return ta + +} + +// TargetInstrumentalness sets the target instrumentalness +// Instrumentalness predicts whether a track contains no vocals. +// "Ooh" and "aah" sounds are treated as instrumental in this context. +// Rap or spoken word tracks are clearly "vocal". +// The closer the instrumentalness value is to 1.0, +// the greater likelihood the track contains no vocal content. +// Values above 0.5 are intended to represent instrumental tracks, +// but confidence is higher as the value approaches 1.0. +func (ta *TrackAttributes) TargetInstrumentalness(instrumentalness float64) *TrackAttributes { + ta.floatAttributes["target_instrumentalness"] = instrumentalness + return ta + +} + +// MaxKey sets the maximum key +// Integers map to pitches using standard Pitch Class notation +// (https://en.wikipedia.org/wiki/Pitch_class). +func (ta *TrackAttributes) MaxKey(key int) *TrackAttributes { + ta.intAttributes["max_key"] = key + return ta +} + +// MinKey sets the minimum key +// Integers map to pitches using standard Pitch Class notation +// (https://en.wikipedia.org/wiki/Pitch_class). +func (ta *TrackAttributes) MinKey(key int) *TrackAttributes { + ta.intAttributes["min_key"] = key + return ta +} + +// TargetKey sets the target key +// Integers map to pitches using standard Pitch Class notation +// (https://en.wikipedia.org/wiki/Pitch_class). +func (ta *TrackAttributes) TargetKey(key int) *TrackAttributes { + ta.intAttributes["target_key"] = key + return ta +} + +// MaxLiveness sets the maximum liveness +// Detects the presence of an audience in the recording. Higher liveness +// values represent an increased probability that the track was performed live. +// A value above 0.8 provides strong likelihook that the track is live. +func (ta *TrackAttributes) MaxLiveness(liveness float64) *TrackAttributes { + ta.floatAttributes["max_liveness"] = liveness + return ta +} + +// MinLiveness sets the minimum liveness +// Detects the presence of an audience in the recording. Higher liveness +// values represent an increased probability that the track was performed live. +// A value above 0.8 provides strong likelihook that the track is live. +func (ta *TrackAttributes) MinLiveness(liveness float64) *TrackAttributes { + ta.floatAttributes["min_liveness"] = liveness + return ta +} + +// TargetLiveness sets the target liveness +// Detects the presence of an audience in the recording. Higher liveness +// values represent an increased probability that the track was performed live. +// A value above 0.8 provides strong likelihook that the track is live. +func (ta *TrackAttributes) TargetLiveness(liveness float64) *TrackAttributes { + ta.floatAttributes["target_liveness"] = liveness + return ta +} + +// MaxLoudness sets the maximum loudness in decibels (dB) +// Loudness values are averaged across the entire track and are +// useful for comparing the relative loudness of tracks. +// Typical values range between -60 and 0 dB. +func (ta *TrackAttributes) MaxLoudness(loudness float64) *TrackAttributes { + ta.floatAttributes["max_loudness"] = loudness + return ta +} + +// MinLoudness sets the minimum loudness in decibels (dB) +// Loudness values are averaged across the entire track and are +// useful for comparing the relative loudness of tracks. +// Typical values range between -60 and 0 dB. +func (ta *TrackAttributes) MinLoudness(loudness float64) *TrackAttributes { + ta.floatAttributes["min_loudness"] = loudness + return ta +} + +// TargetLoudness sets the target loudness in decibels (dB) +// Loudness values are averaged across the entire track and are +// useful for comparing the relative loudness of tracks. +// Typical values range between -60 and 0 dB. +func (ta *TrackAttributes) TargetLoudness(loudness float64) *TrackAttributes { + ta.floatAttributes["target_loudness"] = loudness + return ta +} + +// MaxMode sets the maximum mode +// Mode indicates the modality (major or minor) of a track. +func (ta *TrackAttributes) MaxMode(mode int) *TrackAttributes { + ta.intAttributes["max_mode"] = mode + return ta +} + +// MinMode sets the minimum mode +// Mode indicates the modality (major or minor) of a track. +func (ta *TrackAttributes) MinMode(mode int) *TrackAttributes { + ta.intAttributes["min_mode"] = mode + return ta +} + +// TargetMode sets the target mode +// Mode indicates the modality (major or minor) of a track. +func (ta *TrackAttributes) TargetMode(mode int) *TrackAttributes { + ta.intAttributes["target_mode"] = mode + return ta +} + +// MaxPopularity sets the maximum popularity. +// The value will be between 0 and 100, with 100 being the most popular. +// The popularity is calculated by algorithm and is based, in the most part, +// on the total number of plays the track has had and how recent those plays are. +// Note: When applying track relinking via the market parameter, it is expected to find +// relinked tracks with popularities that do not match min_*, max_* and target_* popularities. +// These relinked tracks are accurate replacements for unplayable tracks +// with the expected popularity scores. Original, non-relinked tracks are +// available via the linked_from attribute of the relinked track response. +func (ta *TrackAttributes) MaxPopularity(popularity int) *TrackAttributes { + ta.intAttributes["max_popularity"] = popularity + return ta +} + +// MinPopularity sets the minimum popularity. +// The value will be between 0 and 100, with 100 being the most popular. +// The popularity is calculated by algorithm and is based, in the most part, +// on the total number of plays the track has had and how recent those plays are. +// Note: When applying track relinking via the market parameter, it is expected to find +// relinked tracks with popularities that do not match min_*, max_* and target_* popularities. +// These relinked tracks are accurate replacements for unplayable tracks +// with the expected popularity scores. Original, non-relinked tracks are +// available via the linked_from attribute of the relinked track response. +func (ta *TrackAttributes) MinPopularity(popularity int) *TrackAttributes { + ta.intAttributes["min_popularity"] = popularity + return ta +} + +// TargetPopularity sets the target popularity. +// The value will be between 0 and 100, with 100 being the most popular. +// The popularity is calculated by algorithm and is based, in the most part, +// on the total number of plays the track has had and how recent those plays are. +// Note: When applying track relinking via the market parameter, it is expected to find +// relinked tracks with popularities that do not match min_*, max_* and target_* popularities. +// These relinked tracks are accurate replacements for unplayable tracks +// with the expected popularity scores. Original, non-relinked tracks are +// available via the linked_from attribute of the relinked track response. +func (ta *TrackAttributes) TargetPopularity(popularity int) *TrackAttributes { + ta.intAttributes["target_popularity"] = popularity + return ta +} + +// MaxSpeechiness sets the maximum speechiness. +// Speechiness detects the presence of spoken words in a track. +// The more exclusively speech-like the recording, the closer to 1.0 +// the speechiness will be. +// Values above 0.66 describe tracks that are probably made entirely of +// spoken words. Values between 0.33 and 0.66 describe tracks that may +// contain both music and speech, including such cases as rap music. +// Values below 0.33 most likely represent music and other non-speech-like tracks. +func (ta *TrackAttributes) MaxSpeechiness(speechiness float64) *TrackAttributes { + ta.floatAttributes["max_speechiness"] = speechiness + return ta + +} + +// MinSpeechiness sets the minimum speechiness. +// Speechiness detects the presence of spoken words in a track. +// The more exclusively speech-like the recording, the closer to 1.0 +// the speechiness will be. +// Values above 0.66 describe tracks that are probably made entirely of +// spoken words. Values between 0.33 and 0.66 describe tracks that may +// contain both music and speech, including such cases as rap music. +// Values below 0.33 most likely represent music and other non-speech-like tracks. +func (ta *TrackAttributes) MinSpeechiness(speechiness float64) *TrackAttributes { + ta.floatAttributes["min_speechiness"] = speechiness + return ta + +} + +// TargetSpeechiness sets the target speechiness. +// Speechiness detects the presence of spoken words in a track. +// The more exclusively speech-like the recording, the closer to 1.0 +// the speechiness will be. +// Values above 0.66 describe tracks that are probably made entirely of +// spoken words. Values between 0.33 and 0.66 describe tracks that may +// contain both music and speech, including such cases as rap music. +// Values below 0.33 most likely represent music and other non-speech-like tracks. +func (ta *TrackAttributes) TargetSpeechiness(speechiness float64) *TrackAttributes { + ta.floatAttributes["target_speechiness"] = speechiness + return ta +} + +// MaxTempo sets the maximum tempo in beats per minute (BPM). +func (ta *TrackAttributes) MaxTempo(tempo float64) *TrackAttributes { + ta.floatAttributes["max_tempo"] = tempo + return ta +} + +// MinTempo sets the minimum tempo in beats per minute (BPM). +func (ta *TrackAttributes) MinTempo(tempo float64) *TrackAttributes { + ta.floatAttributes["min_tempo"] = tempo + return ta +} + +// TargetTempo sets the target tempo in beats per minute (BPM). +func (ta *TrackAttributes) TargetTempo(tempo float64) *TrackAttributes { + ta.floatAttributes["target_tempo"] = tempo + return ta + +} + +// MaxTimeSignature sets the maximum time signature +// The time signature (meter) is a notational convention to +// specify how many beats are in each bar (or measure). +func (ta *TrackAttributes) MaxTimeSignature(timeSignature int) *TrackAttributes { + ta.intAttributes["max_time_signature"] = timeSignature + return ta +} + +// MinTimeSignature sets the minimum time signature +// The time signature (meter) is a notational convention to +// specify how many beats are in each bar (or measure). +func (ta *TrackAttributes) MinTimeSignature(timeSignature int) *TrackAttributes { + ta.intAttributes["min_time_signature"] = timeSignature + return ta +} + +// TargetTimeSignature sets the target time signature +// The time signature (meter) is a notational convention to +// specify how many beats are in each bar (or measure). +func (ta *TrackAttributes) TargetTimeSignature(timeSignature int) *TrackAttributes { + ta.intAttributes["target_time_signature"] = timeSignature + return ta +} + +// MaxValence sets the maximum valence. +// Valence is a measure from 0.0 to 1.0 describing the musical positiveness +/// conveyed by a track. +// Tracks with high valence sound more positive (e.g. happy, cheerful, euphoric), +// while tracks with low valence sound more negative (e.g. sad, depressed, angry). +func (ta *TrackAttributes) MaxValence(valence float64) *TrackAttributes { + ta.floatAttributes["max_valence"] = valence + return ta +} + +// MinValence sets the minimum valence. +// Valence is a measure from 0.0 to 1.0 describing the musical positiveness +/// conveyed by a track. +// Tracks with high valence sound more positive (e.g. happy, cheerful, euphoric), +// while tracks with low valence sound more negative (e.g. sad, depressed, angry). +func (ta *TrackAttributes) MinValence(valence float64) *TrackAttributes { + ta.floatAttributes["min_valence"] = valence + return ta +} + +// TargetValence sets the target valence. +// Valence is a measure from 0.0 to 1.0 describing the musical positiveness +/// conveyed by a track. +// Tracks with high valence sound more positive (e.g. happy, cheerful, euphoric), +// while tracks with low valence sound more negative (e.g. sad, depressed, angry). +func (ta *TrackAttributes) TargetValence(valence float64) *TrackAttributes { + ta.floatAttributes["target_valence"] = valence + return ta +} diff --git a/vendor/github.com/zmb3/spotify/user.go b/vendor/github.com/zmb3/spotify/user.go new file mode 100644 index 00000000..41d45b57 --- /dev/null +++ b/vendor/github.com/zmb3/spotify/user.go @@ -0,0 +1,402 @@ +package spotify + +import ( + "errors" + "fmt" + "net/http" + "net/url" + "strconv" + "strings" +) + +// User contains the basic, publicly available information about a Spotify user. +type User struct { + // The name displayed on the user's profile. + // Note: Spotify currently fails to populate + // this field when querying for a playlist. + DisplayName string `json:"display_name"` + // Known public external URLs for the user. + ExternalURLs map[string]string `json:"external_urls"` + // Information about followers of the user. + Followers Followers `json:"followers"` + // A link to the Web API endpoint for this user. + Endpoint string `json:"href"` + // The Spotify user ID for the user. + ID string `json:"id"` + // The user's profile image. + Images []Image `json:"images"` + // The Spotify URI for the user. + URI URI `json:"uri"` +} + +// PrivateUser contains additional information about a user. +// This data is private and requires user authentication. +type PrivateUser struct { + User + // The country of the user, as set in the user's account profile. + // An ISO 3166-1 alpha-2 country code. This field is only available when the + // current user has granted acess to the ScopeUserReadPrivate scope. + Country string `json:"country"` + // The user's email address, as entered by the user when creating their account. + // Note: this email is UNVERIFIED - there is no proof that it actually + // belongs to the user. This field is only available when the current user + // has granted access to the ScopeUserReadEmail scope. + Email string `json:"email"` + // The user's Spotify subscription level: "premium", "free", etc. + // The subscription level "open" can be considered the same as "free". + // This field is only available when the current user has granted access to + // the ScopeUserReadPrivate scope. + Product string `json:"product"` + // The user's date of birth, in the format 'YYYY-MM-DD'. You can use + // the DateLayout constant to convert this to a time.Time value. + // This field is only available when the current user has granted + // access to the ScopeUserReadBirthdate scope. + Birthdate string `json:"birthdate"` +} + +// GetUsersPublicProfile gets public profile information about a +// Spotify User. It does not require authentication. +func (c *Client) GetUsersPublicProfile(userID ID) (*User, error) { + spotifyURL := c.baseURL + "users/" + string(userID) + + var user User + + err := c.get(spotifyURL, &user) + if err != nil { + return nil, err + } + + return &user, nil +} + +// CurrentUser gets detailed profile information about the +// current user. +// +// Reading the user's email address requires that the application +// has the ScopeUserReadEmail scope. Reading the country, display +// name, profile images, and product subscription level requires +// that the application has the ScopeUserReadPrivate scope. +// +// Warning: The email address in the response will be the address +// that was entered when the user created their spotify account. +// This email address is unverified - do not assume that Spotify has +// checked that the email address actually belongs to the user. +func (c *Client) CurrentUser() (*PrivateUser, error) { + var result PrivateUser + + err := c.get(c.baseURL+"me", &result) + if err != nil { + return nil, err + } + + return &result, nil +} + +// CurrentUsersTracks gets a list of songs saved in the current +// Spotify user's "Your Music" library. +func (c *Client) CurrentUsersTracks() (*SavedTrackPage, error) { + return c.CurrentUsersTracksOpt(nil) +} + +// CurrentUsersTracksOpt is like CurrentUsersTracks, but it accepts additional +// options for sorting and filtering the results. +func (c *Client) CurrentUsersTracksOpt(opt *Options) (*SavedTrackPage, error) { + spotifyURL := c.baseURL + "me/tracks" + if opt != nil { + v := url.Values{} + if opt.Country != nil { + v.Set("country", *opt.Country) + } + if opt.Limit != nil { + v.Set("limit", strconv.Itoa(*opt.Limit)) + } + if opt.Offset != nil { + v.Set("offset", strconv.Itoa(*opt.Offset)) + } + if params := v.Encode(); params != "" { + spotifyURL += "?" + params + } + } + + var result SavedTrackPage + + err := c.get(spotifyURL, &result) + if err != nil { + return nil, err + } + + return &result, nil +} + +// FollowUser adds the current user as a follower of one or more +// spotify users, identified by their Spotify IDs. +// +// Modifying the lists of artists or users the current user follows +// requires that the application has the ScopeUserFollowModify scope. +func (c *Client) FollowUser(ids ...ID) error { + return c.modifyFollowers("user", true, ids...) +} + +// FollowArtist adds the current user as a follower of one or more +// spotify artists, identified by their Spotify IDs. +// +// Modifying the lists of artists or users the current user follows +// requires that the application has the ScopeUserFollowModify scope. +func (c *Client) FollowArtist(ids ...ID) error { + return c.modifyFollowers("artist", true, ids...) +} + +// UnfollowUser removes the current user as a follower of one or more +// Spotify users. +// +// Modifying the lists of artists or users the current user follows +// requires that the application has the ScopeUserFollowModify scope. +func (c *Client) UnfollowUser(ids ...ID) error { + return c.modifyFollowers("user", false, ids...) +} + +// UnfollowArtist removes the current user as a follower of one or more +// Spotify artists. +// +// Modifying the lists of artists or users the current user follows +// requires that the application has the ScopeUserFollowModify scope. +func (c *Client) UnfollowArtist(ids ...ID) error { + return c.modifyFollowers("artist", false, ids...) +} + +// CurrentUserFollows checks to see if the current user is following +// one or more artists or other Spotify Users. This call requires +// ScopeUserFollowRead. +// +// The t argument indicates the type of the IDs, and must be either +// "user" or "artist". +// +// The result is returned as a slice of bool values in the same order +// in which the IDs were specified. +func (c *Client) CurrentUserFollows(t string, ids ...ID) ([]bool, error) { + if l := len(ids); l == 0 || l > 50 { + return nil, errors.New("spotify: UserFollows supports 1 to 50 IDs") + } + if t != "artist" && t != "user" { + return nil, errors.New("spotify: t must be 'artist' or 'user'") + } + spotifyURL := fmt.Sprintf("%sme/following/contains?type=%s&ids=%s", + c.baseURL, t, strings.Join(toStringSlice(ids), ",")) + + var result []bool + + err := c.get(spotifyURL, &result) + if err != nil { + return nil, err + } + + return result, nil +} + +func (c *Client) modifyFollowers(usertype string, follow bool, ids ...ID) error { + if l := len(ids); l == 0 || l > 50 { + return errors.New("spotify: Follow/Unfollow supports 1 to 50 IDs") + } + v := url.Values{} + v.Add("type", usertype) + v.Add("ids", strings.Join(toStringSlice(ids), ",")) + spotifyURL := c.baseURL + "me/following?" + v.Encode() + method := "PUT" + if !follow { + method = "DELETE" + } + req, err := http.NewRequest(method, spotifyURL, nil) + if err != nil { + return err + } + err = c.execute(req, nil, http.StatusNoContent) + if err != nil { + return err + } + return nil +} + +// CurrentUsersFollowedArtists gets the current user's followed artists. +// This call requires that the user has granted the ScopeUserFollowRead scope. +func (c *Client) CurrentUsersFollowedArtists() (*FullArtistCursorPage, error) { + return c.CurrentUsersFollowedArtistsOpt(-1, "") +} + +// CurrentUsersFollowedArtistsOpt is like CurrentUsersFollowedArtists, +// but it accept the optional arguments limit and after. Limit is the +// maximum number of items to return (1 <= limit <= 50), and after is +// the last artist ID retrieved from the previous request. If you don't +// wish to specify either of the parameters, use -1 for limit and the empty +// string for after. +func (c *Client) CurrentUsersFollowedArtistsOpt(limit int, after string) (*FullArtistCursorPage, error) { + spotifyURL := c.baseURL + "me/following" + v := url.Values{} + v.Set("type", "artist") + if limit != -1 { + v.Set("limit", strconv.Itoa(limit)) + } + if after != "" { + v.Set("after", after) + } + if params := v.Encode(); params != "" { + spotifyURL += "?" + params + } + + var result struct { + A FullArtistCursorPage `json:"artists"` + } + + err := c.get(spotifyURL, &result) + if err != nil { + return nil, err + } + + return &result.A, nil +} + +// CurrentUsersAlbums gets a list of albums saved in the current +// Spotify user's "Your Music" library. +func (c *Client) CurrentUsersAlbums() (*SavedAlbumPage, error) { + return c.CurrentUsersAlbumsOpt(nil) +} + +// CurrentUsersAlbumsOpt is like CurrentUsersAlbums, but it accepts additional +// options for sorting and filtering the results. +func (c *Client) CurrentUsersAlbumsOpt(opt *Options) (*SavedAlbumPage, error) { + spotifyURL := c.baseURL + "me/albums" + if opt != nil { + v := url.Values{} + if opt.Country != nil { + v.Set("market", *opt.Country) + } + if opt.Limit != nil { + v.Set("limit", strconv.Itoa(*opt.Limit)) + } + if opt.Offset != nil { + v.Set("offset", strconv.Itoa(*opt.Offset)) + } + if params := v.Encode(); params != "" { + spotifyURL += "?" + params + } + } + + var result SavedAlbumPage + + err := c.get(spotifyURL, &result) + if err != nil { + return nil, err + } + + return &result, nil +} + +// CurrentUsersPlaylists gets a list of the playlists owned or followed by +// the current spotify user. +// +// Private playlists require the ScopePlaylistReadPrivate scope. Note that +// this scope alone will not return collaborative playlists, even though +// they are always private. In order to retrieve collaborative playlists +// the user must authorize the ScopePlaylistReadCollaborative scope. +func (c *Client) CurrentUsersPlaylists() (*SimplePlaylistPage, error) { + return c.CurrentUsersPlaylistsOpt(nil) +} + +// CurrentUsersPlaylistsOpt is like CurrentUsersPlaylists, but it accepts +// additional options for sorting and filtering the results. +func (c *Client) CurrentUsersPlaylistsOpt(opt *Options) (*SimplePlaylistPage, error) { + spotifyURL := c.baseURL + "me/playlists" + if opt != nil { + v := url.Values{} + if opt.Limit != nil { + v.Set("limit", strconv.Itoa(*opt.Limit)) + } + if opt.Offset != nil { + v.Set("offset", strconv.Itoa(*opt.Offset)) + } + if params := v.Encode(); params != "" { + spotifyURL += "?" + params + } + } + + var result SimplePlaylistPage + + err := c.get(spotifyURL, &result) + if err != nil { + return nil, err + } + + return &result, nil +} + +// CurrentUsersTopArtistsOpt gets a list of the top played artists in a given time +// range of the current Spotify user. It supports up to 50 artists in a single +// call. This call requires ScopeUserTopRead. +func (c *Client) CurrentUsersTopArtistsOpt(opt *Options) (*FullArtistPage, error) { + spotifyURL := c.baseURL + "me/top/artists" + if opt != nil { + v := url.Values{} + if opt.Limit != nil { + v.Set("limit", strconv.Itoa(*opt.Limit)) + } + if opt.Timerange != nil { + v.Set("time_range", *opt.Timerange+"_term") + } + if params := v.Encode(); params != "" { + spotifyURL += "?" + params + } + } + + var result FullArtistPage + + err := c.get(spotifyURL, &result) + if err != nil { + return nil, err + } + + return &result, nil +} + +// CurrentUsersTopArtists is like CurrentUsersTopArtistsOpt but with +// sensible defaults. The default limit is 20 and the default timerange +// is medium_term. +func (c *Client) CurrentUsersTopArtists() (*FullArtistPage, error) { + return c.CurrentUsersTopArtistsOpt(nil) +} + +// CurrentUsersTopTracksOpt gets a list of the top played tracks in a given time +// range of the current Spotify user. It supports up to 50 tracks in a single +// call. This call requires ScopeUserTopRead. +func (c *Client) CurrentUsersTopTracksOpt(opt *Options) (*FullTrackPage, error) { + spotifyURL := c.baseURL + "me/top/tracks" + if opt != nil { + v := url.Values{} + if opt.Limit != nil { + v.Set("limit", strconv.Itoa(*opt.Limit)) + } + if opt.Timerange != nil { + v.Set("time_range", *opt.Timerange+"_term") + } + if opt.Offset != nil { + v.Set("offset", strconv.Itoa(*opt.Offset)) + } + if params := v.Encode(); params != "" { + spotifyURL += "?" + params + } + } + + var result FullTrackPage + + err := c.get(spotifyURL, &result) + if err != nil { + return nil, err + } + + return &result, nil +} + +// CurrentUsersTopTracks is like CurrentUsersTopTracksOpt but with +// sensible defaults. The default limit is 20 and the default timerange +// is medium_term. +func (c *Client) CurrentUsersTopTracks() (*FullTrackPage, error) { + return c.CurrentUsersTopTracksOpt(nil) +} \ No newline at end of file diff --git a/vendor/github.com/zorkian/go-datadog-api/.travis.yml b/vendor/github.com/zorkian/go-datadog-api/.travis.yml index 9be7add3..e29d0fff 100644 --- a/vendor/github.com/zorkian/go-datadog-api/.travis.yml +++ b/vendor/github.com/zorkian/go-datadog-api/.travis.yml @@ -14,7 +14,8 @@ install: - go get -v -t . script: - - go get -u github.com/golang/lint/golint + - scripts/check-fmt.sh + - go get -u golang.org/x/lint/golint - golint ./... | grep -v vendor/ - make - scripts/check-code-generation-ran.sh diff --git a/vendor/github.com/zorkian/go-datadog-api/dashboards.go b/vendor/github.com/zorkian/go-datadog-api/dashboards.go index 552b85d0..9cbab642 100644 --- a/vendor/github.com/zorkian/go-datadog-api/dashboards.go +++ b/vendor/github.com/zorkian/go-datadog-api/dashboards.go @@ -52,14 +52,63 @@ type GraphEvent struct { } type Yaxis struct { - Min *float64 `json:"min,omitempty"` - Max *float64 `json:"max,omitempty"` - Scale *string `json:"scale,omitempty"` + Min *float64 `json:"min,omitempty"` + AutoMin bool `json:"-"` + Max *float64 `json:"max,omitempty"` + AutoMax bool `json:"-"` + Scale *string `json:"scale,omitempty"` +} + +// UnmarshalJSON is a Custom Unmarshal for Yaxis.Min/Yaxis.Max. If the datadog API +// returns "auto" for min or max, then we should set Yaxis.min or Yaxis.max to nil, +// respectively. +func (y *Yaxis) UnmarshalJSON(data []byte) error { + type Alias Yaxis + wrapper := &struct { + Min *json.Number `json:"min,omitempty"` + Max *json.Number `json:"max,omitempty"` + *Alias + }{ + Alias: (*Alias)(y), + } + + if err := json.Unmarshal(data, &wrapper); err != nil { + return err + } + + if wrapper.Min != nil { + if *wrapper.Min == "auto" { + y.AutoMin = true + y.Min = nil + } else { + f, err := wrapper.Min.Float64() + if err != nil { + return err + } + y.Min = &f + } + } + + if wrapper.Max != nil { + if *wrapper.Max == "auto" { + y.AutoMax = true + y.Max = nil + } else { + f, err := wrapper.Max.Float64() + if err != nil { + return err + } + y.Max = &f + } + } + return nil } type Style struct { - Palette *string `json:"palette,omitempty"` - PaletteFlip *bool `json:"paletteFlip,omitempty"` + Palette *string `json:"palette,omitempty"` + PaletteFlip *bool `json:"paletteFlip,omitempty"` + FillMin *json.Number `json:"fillMin,omitempty"` + FillMax *json.Number `json:"fillMax,omitempty"` } type GraphDefinition struct { @@ -72,18 +121,18 @@ type GraphDefinition struct { Yaxis Yaxis `json:"yaxis,omitempty"` // For query value type graphs - Autoscale *bool `json:"autoscale,omitempty"` - TextAlign *string `json:"text_align,omitempty"` - Precision *string `json:"precision,omitempty"` - CustomUnit *string `json:"custom_unit,omitempty"` - - // For hostname type graphs - Style *Style `json:"Style,omitempty"` + Autoscale *bool `json:"autoscale,omitempty"` + TextAlign *string `json:"text_align,omitempty"` + Precision *json.Number `json:"precision,omitempty"` + CustomUnit *string `json:"custom_unit,omitempty"` + // For hostmaps + Style *Style `json:"style,omitempty"` Groups []string `json:"group,omitempty"` IncludeNoMetricHosts *bool `json:"noMetricHosts,omitempty"` Scopes []string `json:"scope,omitempty"` IncludeUngroupedHosts *bool `json:"noGroupHosts,omitempty"` + NodeType *string `json:"nodeType,omitempty"` } // Graph represents a graph that might exist on a dashboard. @@ -113,10 +162,27 @@ type Dashboard struct { // DashboardLite represents a user created dashboard. This is the mini // struct when we load the summaries. type DashboardLite struct { - Id *int `json:"id,string,omitempty"` // TODO: Remove ',string'. - Resource *string `json:"resource,omitempty"` - Description *string `json:"description,omitempty"` - Title *string `json:"title,omitempty"` + Id *int `json:"id,string,omitempty"` // TODO: Remove ',string'. + Resource *string `json:"resource,omitempty"` + Description *string `json:"description,omitempty"` + Title *string `json:"title,omitempty"` + ReadOnly *bool `json:"read_only,omitempty"` + Created *string `json:"created,omitempty"` + Modified *string `json:"modified,omitempty"` + CreatedBy *CreatedBy `json:"created_by,omitempty"` +} + +// CreatedBy represents a field from DashboardLite. +type CreatedBy struct { + Disabled *bool `json:"disabled,omitempty"` + Handle *string `json:"handle,omitempty"` + Name *string `json:"name,omitempty"` + IsAdmin *bool `json:"is_admin,omitempty"` + Role *string `json:"role,omitempty"` + AccessRole *string `json:"access_role,omitempty"` + Verified *bool `json:"verified,omitempty"` + Email *string `json:"email,omitempty"` + Icon *string `json:"icon,omitempty"` } // reqGetDashboards from /api/v1/dash diff --git a/vendor/github.com/zorkian/go-datadog-api/datadog-accessors.go b/vendor/github.com/zorkian/go-datadog-api/datadog-accessors.go index 1f2691db..415b3537 100644 --- a/vendor/github.com/zorkian/go-datadog-api/datadog-accessors.go +++ b/vendor/github.com/zorkian/go-datadog-api/datadog-accessors.go @@ -21,7 +21,7 @@ func (a *Alert) GetCreator() int { return *a.Creator } -// GetOkCreator returns a tuple with the Creator field if it's non-nil, zero value otherwise +// GetCreatorOk returns a tuple with the Creator field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (a *Alert) GetCreatorOk() (int, bool) { if a == nil || a.Creator == nil { @@ -52,7 +52,7 @@ func (a *Alert) GetId() int { return *a.Id } -// GetOkId returns a tuple with the Id field if it's non-nil, zero value otherwise +// GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (a *Alert) GetIdOk() (int, bool) { if a == nil || a.Id == nil { @@ -83,7 +83,7 @@ func (a *Alert) GetMessage() string { return *a.Message } -// GetOkMessage returns a tuple with the Message field if it's non-nil, zero value otherwise +// GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (a *Alert) GetMessageOk() (string, bool) { if a == nil || a.Message == nil { @@ -114,7 +114,7 @@ func (a *Alert) GetName() string { return *a.Name } -// GetOkName returns a tuple with the Name field if it's non-nil, zero value otherwise +// GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (a *Alert) GetNameOk() (string, bool) { if a == nil || a.Name == nil { @@ -145,7 +145,7 @@ func (a *Alert) GetNotifyNoData() bool { return *a.NotifyNoData } -// GetOkNotifyNoData returns a tuple with the NotifyNoData field if it's non-nil, zero value otherwise +// GetNotifyNoDataOk returns a tuple with the NotifyNoData field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (a *Alert) GetNotifyNoDataOk() (bool, bool) { if a == nil || a.NotifyNoData == nil { @@ -176,7 +176,7 @@ func (a *Alert) GetQuery() string { return *a.Query } -// GetOkQuery returns a tuple with the Query field if it's non-nil, zero value otherwise +// GetQueryOk returns a tuple with the Query field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (a *Alert) GetQueryOk() (string, bool) { if a == nil || a.Query == nil { @@ -207,7 +207,7 @@ func (a *Alert) GetSilenced() bool { return *a.Silenced } -// GetOkSilenced returns a tuple with the Silenced field if it's non-nil, zero value otherwise +// GetSilencedOk returns a tuple with the Silenced field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (a *Alert) GetSilencedOk() (bool, bool) { if a == nil || a.Silenced == nil { @@ -238,7 +238,7 @@ func (a *Alert) GetState() string { return *a.State } -// GetOkState returns a tuple with the State field if it's non-nil, zero value otherwise +// GetStateOk returns a tuple with the State field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (a *Alert) GetStateOk() (string, bool) { if a == nil || a.State == nil { @@ -261,1215 +261,6 @@ func (a *Alert) SetState(v string) { a.State = &v } -// GetAddTimeframe returns the AddTimeframe field if non-nil, zero value otherwise. -func (a *AlertGraphWidget) GetAddTimeframe() bool { - if a == nil || a.AddTimeframe == nil { - return false - } - return *a.AddTimeframe -} - -// GetOkAddTimeframe returns a tuple with the AddTimeframe field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (a *AlertGraphWidget) GetAddTimeframeOk() (bool, bool) { - if a == nil || a.AddTimeframe == nil { - return false, false - } - return *a.AddTimeframe, true -} - -// HasAddTimeframe returns a boolean if a field has been set. -func (a *AlertGraphWidget) HasAddTimeframe() bool { - if a != nil && a.AddTimeframe != nil { - return true - } - - return false -} - -// SetAddTimeframe allocates a new a.AddTimeframe and returns the pointer to it. -func (a *AlertGraphWidget) SetAddTimeframe(v bool) { - a.AddTimeframe = &v -} - -// GetAlertId returns the AlertId field if non-nil, zero value otherwise. -func (a *AlertGraphWidget) GetAlertId() int { - if a == nil || a.AlertId == nil { - return 0 - } - return *a.AlertId -} - -// GetOkAlertId returns a tuple with the AlertId field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (a *AlertGraphWidget) GetAlertIdOk() (int, bool) { - if a == nil || a.AlertId == nil { - return 0, false - } - return *a.AlertId, true -} - -// HasAlertId returns a boolean if a field has been set. -func (a *AlertGraphWidget) HasAlertId() bool { - if a != nil && a.AlertId != nil { - return true - } - - return false -} - -// SetAlertId allocates a new a.AlertId and returns the pointer to it. -func (a *AlertGraphWidget) SetAlertId(v int) { - a.AlertId = &v -} - -// GetHeight returns the Height field if non-nil, zero value otherwise. -func (a *AlertGraphWidget) GetHeight() int { - if a == nil || a.Height == nil { - return 0 - } - return *a.Height -} - -// GetOkHeight returns a tuple with the Height field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (a *AlertGraphWidget) GetHeightOk() (int, bool) { - if a == nil || a.Height == nil { - return 0, false - } - return *a.Height, true -} - -// HasHeight returns a boolean if a field has been set. -func (a *AlertGraphWidget) HasHeight() bool { - if a != nil && a.Height != nil { - return true - } - - return false -} - -// SetHeight allocates a new a.Height and returns the pointer to it. -func (a *AlertGraphWidget) SetHeight(v int) { - a.Height = &v -} - -// GetTimeframe returns the Timeframe field if non-nil, zero value otherwise. -func (a *AlertGraphWidget) GetTimeframe() string { - if a == nil || a.Timeframe == nil { - return "" - } - return *a.Timeframe -} - -// GetOkTimeframe returns a tuple with the Timeframe field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (a *AlertGraphWidget) GetTimeframeOk() (string, bool) { - if a == nil || a.Timeframe == nil { - return "", false - } - return *a.Timeframe, true -} - -// HasTimeframe returns a boolean if a field has been set. -func (a *AlertGraphWidget) HasTimeframe() bool { - if a != nil && a.Timeframe != nil { - return true - } - - return false -} - -// SetTimeframe allocates a new a.Timeframe and returns the pointer to it. -func (a *AlertGraphWidget) SetTimeframe(v string) { - a.Timeframe = &v -} - -// GetTitle returns the Title field if non-nil, zero value otherwise. -func (a *AlertGraphWidget) GetTitle() bool { - if a == nil || a.Title == nil { - return false - } - return *a.Title -} - -// GetOkTitle returns a tuple with the Title field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (a *AlertGraphWidget) GetTitleOk() (bool, bool) { - if a == nil || a.Title == nil { - return false, false - } - return *a.Title, true -} - -// HasTitle returns a boolean if a field has been set. -func (a *AlertGraphWidget) HasTitle() bool { - if a != nil && a.Title != nil { - return true - } - - return false -} - -// SetTitle allocates a new a.Title and returns the pointer to it. -func (a *AlertGraphWidget) SetTitle(v bool) { - a.Title = &v -} - -// GetTitleAlign returns the TitleAlign field if non-nil, zero value otherwise. -func (a *AlertGraphWidget) GetTitleAlign() string { - if a == nil || a.TitleAlign == nil { - return "" - } - return *a.TitleAlign -} - -// GetOkTitleAlign returns a tuple with the TitleAlign field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (a *AlertGraphWidget) GetTitleAlignOk() (string, bool) { - if a == nil || a.TitleAlign == nil { - return "", false - } - return *a.TitleAlign, true -} - -// HasTitleAlign returns a boolean if a field has been set. -func (a *AlertGraphWidget) HasTitleAlign() bool { - if a != nil && a.TitleAlign != nil { - return true - } - - return false -} - -// SetTitleAlign allocates a new a.TitleAlign and returns the pointer to it. -func (a *AlertGraphWidget) SetTitleAlign(v string) { - a.TitleAlign = &v -} - -// GetTitleSize returns the TitleSize field if non-nil, zero value otherwise. -func (a *AlertGraphWidget) GetTitleSize() int { - if a == nil || a.TitleSize == nil { - return 0 - } - return *a.TitleSize -} - -// GetOkTitleSize returns a tuple with the TitleSize field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (a *AlertGraphWidget) GetTitleSizeOk() (int, bool) { - if a == nil || a.TitleSize == nil { - return 0, false - } - return *a.TitleSize, true -} - -// HasTitleSize returns a boolean if a field has been set. -func (a *AlertGraphWidget) HasTitleSize() bool { - if a != nil && a.TitleSize != nil { - return true - } - - return false -} - -// SetTitleSize allocates a new a.TitleSize and returns the pointer to it. -func (a *AlertGraphWidget) SetTitleSize(v int) { - a.TitleSize = &v -} - -// GetTitleText returns the TitleText field if non-nil, zero value otherwise. -func (a *AlertGraphWidget) GetTitleText() string { - if a == nil || a.TitleText == nil { - return "" - } - return *a.TitleText -} - -// GetOkTitleText returns a tuple with the TitleText field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (a *AlertGraphWidget) GetTitleTextOk() (string, bool) { - if a == nil || a.TitleText == nil { - return "", false - } - return *a.TitleText, true -} - -// HasTitleText returns a boolean if a field has been set. -func (a *AlertGraphWidget) HasTitleText() bool { - if a != nil && a.TitleText != nil { - return true - } - - return false -} - -// SetTitleText allocates a new a.TitleText and returns the pointer to it. -func (a *AlertGraphWidget) SetTitleText(v string) { - a.TitleText = &v -} - -// GetType returns the Type field if non-nil, zero value otherwise. -func (a *AlertGraphWidget) GetType() string { - if a == nil || a.Type == nil { - return "" - } - return *a.Type -} - -// GetOkType returns a tuple with the Type field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (a *AlertGraphWidget) GetTypeOk() (string, bool) { - if a == nil || a.Type == nil { - return "", false - } - return *a.Type, true -} - -// HasType returns a boolean if a field has been set. -func (a *AlertGraphWidget) HasType() bool { - if a != nil && a.Type != nil { - return true - } - - return false -} - -// SetType allocates a new a.Type and returns the pointer to it. -func (a *AlertGraphWidget) SetType(v string) { - a.Type = &v -} - -// GetVizType returns the VizType field if non-nil, zero value otherwise. -func (a *AlertGraphWidget) GetVizType() string { - if a == nil || a.VizType == nil { - return "" - } - return *a.VizType -} - -// GetOkVizType returns a tuple with the VizType field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (a *AlertGraphWidget) GetVizTypeOk() (string, bool) { - if a == nil || a.VizType == nil { - return "", false - } - return *a.VizType, true -} - -// HasVizType returns a boolean if a field has been set. -func (a *AlertGraphWidget) HasVizType() bool { - if a != nil && a.VizType != nil { - return true - } - - return false -} - -// SetVizType allocates a new a.VizType and returns the pointer to it. -func (a *AlertGraphWidget) SetVizType(v string) { - a.VizType = &v -} - -// GetWidth returns the Width field if non-nil, zero value otherwise. -func (a *AlertGraphWidget) GetWidth() int { - if a == nil || a.Width == nil { - return 0 - } - return *a.Width -} - -// GetOkWidth returns a tuple with the Width field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (a *AlertGraphWidget) GetWidthOk() (int, bool) { - if a == nil || a.Width == nil { - return 0, false - } - return *a.Width, true -} - -// HasWidth returns a boolean if a field has been set. -func (a *AlertGraphWidget) HasWidth() bool { - if a != nil && a.Width != nil { - return true - } - - return false -} - -// SetWidth allocates a new a.Width and returns the pointer to it. -func (a *AlertGraphWidget) SetWidth(v int) { - a.Width = &v -} - -// GetX returns the X field if non-nil, zero value otherwise. -func (a *AlertGraphWidget) GetX() int { - if a == nil || a.X == nil { - return 0 - } - return *a.X -} - -// GetOkX returns a tuple with the X field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (a *AlertGraphWidget) GetXOk() (int, bool) { - if a == nil || a.X == nil { - return 0, false - } - return *a.X, true -} - -// HasX returns a boolean if a field has been set. -func (a *AlertGraphWidget) HasX() bool { - if a != nil && a.X != nil { - return true - } - - return false -} - -// SetX allocates a new a.X and returns the pointer to it. -func (a *AlertGraphWidget) SetX(v int) { - a.X = &v -} - -// GetY returns the Y field if non-nil, zero value otherwise. -func (a *AlertGraphWidget) GetY() int { - if a == nil || a.Y == nil { - return 0 - } - return *a.Y -} - -// GetOkY returns a tuple with the Y field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (a *AlertGraphWidget) GetYOk() (int, bool) { - if a == nil || a.Y == nil { - return 0, false - } - return *a.Y, true -} - -// HasY returns a boolean if a field has been set. -func (a *AlertGraphWidget) HasY() bool { - if a != nil && a.Y != nil { - return true - } - - return false -} - -// SetY allocates a new a.Y and returns the pointer to it. -func (a *AlertGraphWidget) SetY(v int) { - a.Y = &v -} - -// GetAddTimeframe returns the AddTimeframe field if non-nil, zero value otherwise. -func (a *AlertValueWidget) GetAddTimeframe() bool { - if a == nil || a.AddTimeframe == nil { - return false - } - return *a.AddTimeframe -} - -// GetOkAddTimeframe returns a tuple with the AddTimeframe field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (a *AlertValueWidget) GetAddTimeframeOk() (bool, bool) { - if a == nil || a.AddTimeframe == nil { - return false, false - } - return *a.AddTimeframe, true -} - -// HasAddTimeframe returns a boolean if a field has been set. -func (a *AlertValueWidget) HasAddTimeframe() bool { - if a != nil && a.AddTimeframe != nil { - return true - } - - return false -} - -// SetAddTimeframe allocates a new a.AddTimeframe and returns the pointer to it. -func (a *AlertValueWidget) SetAddTimeframe(v bool) { - a.AddTimeframe = &v -} - -// GetAlertId returns the AlertId field if non-nil, zero value otherwise. -func (a *AlertValueWidget) GetAlertId() int { - if a == nil || a.AlertId == nil { - return 0 - } - return *a.AlertId -} - -// GetOkAlertId returns a tuple with the AlertId field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (a *AlertValueWidget) GetAlertIdOk() (int, bool) { - if a == nil || a.AlertId == nil { - return 0, false - } - return *a.AlertId, true -} - -// HasAlertId returns a boolean if a field has been set. -func (a *AlertValueWidget) HasAlertId() bool { - if a != nil && a.AlertId != nil { - return true - } - - return false -} - -// SetAlertId allocates a new a.AlertId and returns the pointer to it. -func (a *AlertValueWidget) SetAlertId(v int) { - a.AlertId = &v -} - -// GetHeight returns the Height field if non-nil, zero value otherwise. -func (a *AlertValueWidget) GetHeight() int { - if a == nil || a.Height == nil { - return 0 - } - return *a.Height -} - -// GetOkHeight returns a tuple with the Height field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (a *AlertValueWidget) GetHeightOk() (int, bool) { - if a == nil || a.Height == nil { - return 0, false - } - return *a.Height, true -} - -// HasHeight returns a boolean if a field has been set. -func (a *AlertValueWidget) HasHeight() bool { - if a != nil && a.Height != nil { - return true - } - - return false -} - -// SetHeight allocates a new a.Height and returns the pointer to it. -func (a *AlertValueWidget) SetHeight(v int) { - a.Height = &v -} - -// GetPrecision returns the Precision field if non-nil, zero value otherwise. -func (a *AlertValueWidget) GetPrecision() int { - if a == nil || a.Precision == nil { - return 0 - } - return *a.Precision -} - -// GetOkPrecision returns a tuple with the Precision field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (a *AlertValueWidget) GetPrecisionOk() (int, bool) { - if a == nil || a.Precision == nil { - return 0, false - } - return *a.Precision, true -} - -// HasPrecision returns a boolean if a field has been set. -func (a *AlertValueWidget) HasPrecision() bool { - if a != nil && a.Precision != nil { - return true - } - - return false -} - -// SetPrecision allocates a new a.Precision and returns the pointer to it. -func (a *AlertValueWidget) SetPrecision(v int) { - a.Precision = &v -} - -// GetTextAlign returns the TextAlign field if non-nil, zero value otherwise. -func (a *AlertValueWidget) GetTextAlign() string { - if a == nil || a.TextAlign == nil { - return "" - } - return *a.TextAlign -} - -// GetOkTextAlign returns a tuple with the TextAlign field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (a *AlertValueWidget) GetTextAlignOk() (string, bool) { - if a == nil || a.TextAlign == nil { - return "", false - } - return *a.TextAlign, true -} - -// HasTextAlign returns a boolean if a field has been set. -func (a *AlertValueWidget) HasTextAlign() bool { - if a != nil && a.TextAlign != nil { - return true - } - - return false -} - -// SetTextAlign allocates a new a.TextAlign and returns the pointer to it. -func (a *AlertValueWidget) SetTextAlign(v string) { - a.TextAlign = &v -} - -// GetTextSize returns the TextSize field if non-nil, zero value otherwise. -func (a *AlertValueWidget) GetTextSize() string { - if a == nil || a.TextSize == nil { - return "" - } - return *a.TextSize -} - -// GetOkTextSize returns a tuple with the TextSize field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (a *AlertValueWidget) GetTextSizeOk() (string, bool) { - if a == nil || a.TextSize == nil { - return "", false - } - return *a.TextSize, true -} - -// HasTextSize returns a boolean if a field has been set. -func (a *AlertValueWidget) HasTextSize() bool { - if a != nil && a.TextSize != nil { - return true - } - - return false -} - -// SetTextSize allocates a new a.TextSize and returns the pointer to it. -func (a *AlertValueWidget) SetTextSize(v string) { - a.TextSize = &v -} - -// GetTimeframe returns the Timeframe field if non-nil, zero value otherwise. -func (a *AlertValueWidget) GetTimeframe() string { - if a == nil || a.Timeframe == nil { - return "" - } - return *a.Timeframe -} - -// GetOkTimeframe returns a tuple with the Timeframe field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (a *AlertValueWidget) GetTimeframeOk() (string, bool) { - if a == nil || a.Timeframe == nil { - return "", false - } - return *a.Timeframe, true -} - -// HasTimeframe returns a boolean if a field has been set. -func (a *AlertValueWidget) HasTimeframe() bool { - if a != nil && a.Timeframe != nil { - return true - } - - return false -} - -// SetTimeframe allocates a new a.Timeframe and returns the pointer to it. -func (a *AlertValueWidget) SetTimeframe(v string) { - a.Timeframe = &v -} - -// GetTitle returns the Title field if non-nil, zero value otherwise. -func (a *AlertValueWidget) GetTitle() bool { - if a == nil || a.Title == nil { - return false - } - return *a.Title -} - -// GetOkTitle returns a tuple with the Title field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (a *AlertValueWidget) GetTitleOk() (bool, bool) { - if a == nil || a.Title == nil { - return false, false - } - return *a.Title, true -} - -// HasTitle returns a boolean if a field has been set. -func (a *AlertValueWidget) HasTitle() bool { - if a != nil && a.Title != nil { - return true - } - - return false -} - -// SetTitle allocates a new a.Title and returns the pointer to it. -func (a *AlertValueWidget) SetTitle(v bool) { - a.Title = &v -} - -// GetTitleAlign returns the TitleAlign field if non-nil, zero value otherwise. -func (a *AlertValueWidget) GetTitleAlign() string { - if a == nil || a.TitleAlign == nil { - return "" - } - return *a.TitleAlign -} - -// GetOkTitleAlign returns a tuple with the TitleAlign field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (a *AlertValueWidget) GetTitleAlignOk() (string, bool) { - if a == nil || a.TitleAlign == nil { - return "", false - } - return *a.TitleAlign, true -} - -// HasTitleAlign returns a boolean if a field has been set. -func (a *AlertValueWidget) HasTitleAlign() bool { - if a != nil && a.TitleAlign != nil { - return true - } - - return false -} - -// SetTitleAlign allocates a new a.TitleAlign and returns the pointer to it. -func (a *AlertValueWidget) SetTitleAlign(v string) { - a.TitleAlign = &v -} - -// GetTitleSize returns the TitleSize field if non-nil, zero value otherwise. -func (a *AlertValueWidget) GetTitleSize() int { - if a == nil || a.TitleSize == nil { - return 0 - } - return *a.TitleSize -} - -// GetOkTitleSize returns a tuple with the TitleSize field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (a *AlertValueWidget) GetTitleSizeOk() (int, bool) { - if a == nil || a.TitleSize == nil { - return 0, false - } - return *a.TitleSize, true -} - -// HasTitleSize returns a boolean if a field has been set. -func (a *AlertValueWidget) HasTitleSize() bool { - if a != nil && a.TitleSize != nil { - return true - } - - return false -} - -// SetTitleSize allocates a new a.TitleSize and returns the pointer to it. -func (a *AlertValueWidget) SetTitleSize(v int) { - a.TitleSize = &v -} - -// GetTitleText returns the TitleText field if non-nil, zero value otherwise. -func (a *AlertValueWidget) GetTitleText() string { - if a == nil || a.TitleText == nil { - return "" - } - return *a.TitleText -} - -// GetOkTitleText returns a tuple with the TitleText field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (a *AlertValueWidget) GetTitleTextOk() (string, bool) { - if a == nil || a.TitleText == nil { - return "", false - } - return *a.TitleText, true -} - -// HasTitleText returns a boolean if a field has been set. -func (a *AlertValueWidget) HasTitleText() bool { - if a != nil && a.TitleText != nil { - return true - } - - return false -} - -// SetTitleText allocates a new a.TitleText and returns the pointer to it. -func (a *AlertValueWidget) SetTitleText(v string) { - a.TitleText = &v -} - -// GetType returns the Type field if non-nil, zero value otherwise. -func (a *AlertValueWidget) GetType() string { - if a == nil || a.Type == nil { - return "" - } - return *a.Type -} - -// GetOkType returns a tuple with the Type field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (a *AlertValueWidget) GetTypeOk() (string, bool) { - if a == nil || a.Type == nil { - return "", false - } - return *a.Type, true -} - -// HasType returns a boolean if a field has been set. -func (a *AlertValueWidget) HasType() bool { - if a != nil && a.Type != nil { - return true - } - - return false -} - -// SetType allocates a new a.Type and returns the pointer to it. -func (a *AlertValueWidget) SetType(v string) { - a.Type = &v -} - -// GetUnit returns the Unit field if non-nil, zero value otherwise. -func (a *AlertValueWidget) GetUnit() string { - if a == nil || a.Unit == nil { - return "" - } - return *a.Unit -} - -// GetOkUnit returns a tuple with the Unit field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (a *AlertValueWidget) GetUnitOk() (string, bool) { - if a == nil || a.Unit == nil { - return "", false - } - return *a.Unit, true -} - -// HasUnit returns a boolean if a field has been set. -func (a *AlertValueWidget) HasUnit() bool { - if a != nil && a.Unit != nil { - return true - } - - return false -} - -// SetUnit allocates a new a.Unit and returns the pointer to it. -func (a *AlertValueWidget) SetUnit(v string) { - a.Unit = &v -} - -// GetWidth returns the Width field if non-nil, zero value otherwise. -func (a *AlertValueWidget) GetWidth() int { - if a == nil || a.Width == nil { - return 0 - } - return *a.Width -} - -// GetOkWidth returns a tuple with the Width field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (a *AlertValueWidget) GetWidthOk() (int, bool) { - if a == nil || a.Width == nil { - return 0, false - } - return *a.Width, true -} - -// HasWidth returns a boolean if a field has been set. -func (a *AlertValueWidget) HasWidth() bool { - if a != nil && a.Width != nil { - return true - } - - return false -} - -// SetWidth allocates a new a.Width and returns the pointer to it. -func (a *AlertValueWidget) SetWidth(v int) { - a.Width = &v -} - -// GetX returns the X field if non-nil, zero value otherwise. -func (a *AlertValueWidget) GetX() int { - if a == nil || a.X == nil { - return 0 - } - return *a.X -} - -// GetOkX returns a tuple with the X field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (a *AlertValueWidget) GetXOk() (int, bool) { - if a == nil || a.X == nil { - return 0, false - } - return *a.X, true -} - -// HasX returns a boolean if a field has been set. -func (a *AlertValueWidget) HasX() bool { - if a != nil && a.X != nil { - return true - } - - return false -} - -// SetX allocates a new a.X and returns the pointer to it. -func (a *AlertValueWidget) SetX(v int) { - a.X = &v -} - -// GetY returns the Y field if non-nil, zero value otherwise. -func (a *AlertValueWidget) GetY() int { - if a == nil || a.Y == nil { - return 0 - } - return *a.Y -} - -// GetOkY returns a tuple with the Y field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (a *AlertValueWidget) GetYOk() (int, bool) { - if a == nil || a.Y == nil { - return 0, false - } - return *a.Y, true -} - -// HasY returns a boolean if a field has been set. -func (a *AlertValueWidget) HasY() bool { - if a != nil && a.Y != nil { - return true - } - - return false -} - -// SetY allocates a new a.Y and returns the pointer to it. -func (a *AlertValueWidget) SetY(v int) { - a.Y = &v -} - -// GetAggregator returns the Aggregator field if non-nil, zero value otherwise. -func (c *ChangeWidget) GetAggregator() string { - if c == nil || c.Aggregator == nil { - return "" - } - return *c.Aggregator -} - -// GetOkAggregator returns a tuple with the Aggregator field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (c *ChangeWidget) GetAggregatorOk() (string, bool) { - if c == nil || c.Aggregator == nil { - return "", false - } - return *c.Aggregator, true -} - -// HasAggregator returns a boolean if a field has been set. -func (c *ChangeWidget) HasAggregator() bool { - if c != nil && c.Aggregator != nil { - return true - } - - return false -} - -// SetAggregator allocates a new c.Aggregator and returns the pointer to it. -func (c *ChangeWidget) SetAggregator(v string) { - c.Aggregator = &v -} - -// GetHeight returns the Height field if non-nil, zero value otherwise. -func (c *ChangeWidget) GetHeight() int { - if c == nil || c.Height == nil { - return 0 - } - return *c.Height -} - -// GetOkHeight returns a tuple with the Height field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (c *ChangeWidget) GetHeightOk() (int, bool) { - if c == nil || c.Height == nil { - return 0, false - } - return *c.Height, true -} - -// HasHeight returns a boolean if a field has been set. -func (c *ChangeWidget) HasHeight() bool { - if c != nil && c.Height != nil { - return true - } - - return false -} - -// SetHeight allocates a new c.Height and returns the pointer to it. -func (c *ChangeWidget) SetHeight(v int) { - c.Height = &v -} - -// GetTileDef returns the TileDef field if non-nil, zero value otherwise. -func (c *ChangeWidget) GetTileDef() TileDef { - if c == nil || c.TileDef == nil { - return TileDef{} - } - return *c.TileDef -} - -// GetOkTileDef returns a tuple with the TileDef field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (c *ChangeWidget) GetTileDefOk() (TileDef, bool) { - if c == nil || c.TileDef == nil { - return TileDef{}, false - } - return *c.TileDef, true -} - -// HasTileDef returns a boolean if a field has been set. -func (c *ChangeWidget) HasTileDef() bool { - if c != nil && c.TileDef != nil { - return true - } - - return false -} - -// SetTileDef allocates a new c.TileDef and returns the pointer to it. -func (c *ChangeWidget) SetTileDef(v TileDef) { - c.TileDef = &v -} - -// GetTitle returns the Title field if non-nil, zero value otherwise. -func (c *ChangeWidget) GetTitle() bool { - if c == nil || c.Title == nil { - return false - } - return *c.Title -} - -// GetOkTitle returns a tuple with the Title field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (c *ChangeWidget) GetTitleOk() (bool, bool) { - if c == nil || c.Title == nil { - return false, false - } - return *c.Title, true -} - -// HasTitle returns a boolean if a field has been set. -func (c *ChangeWidget) HasTitle() bool { - if c != nil && c.Title != nil { - return true - } - - return false -} - -// SetTitle allocates a new c.Title and returns the pointer to it. -func (c *ChangeWidget) SetTitle(v bool) { - c.Title = &v -} - -// GetTitleAlign returns the TitleAlign field if non-nil, zero value otherwise. -func (c *ChangeWidget) GetTitleAlign() string { - if c == nil || c.TitleAlign == nil { - return "" - } - return *c.TitleAlign -} - -// GetOkTitleAlign returns a tuple with the TitleAlign field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (c *ChangeWidget) GetTitleAlignOk() (string, bool) { - if c == nil || c.TitleAlign == nil { - return "", false - } - return *c.TitleAlign, true -} - -// HasTitleAlign returns a boolean if a field has been set. -func (c *ChangeWidget) HasTitleAlign() bool { - if c != nil && c.TitleAlign != nil { - return true - } - - return false -} - -// SetTitleAlign allocates a new c.TitleAlign and returns the pointer to it. -func (c *ChangeWidget) SetTitleAlign(v string) { - c.TitleAlign = &v -} - -// GetTitleSize returns the TitleSize field if non-nil, zero value otherwise. -func (c *ChangeWidget) GetTitleSize() int { - if c == nil || c.TitleSize == nil { - return 0 - } - return *c.TitleSize -} - -// GetOkTitleSize returns a tuple with the TitleSize field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (c *ChangeWidget) GetTitleSizeOk() (int, bool) { - if c == nil || c.TitleSize == nil { - return 0, false - } - return *c.TitleSize, true -} - -// HasTitleSize returns a boolean if a field has been set. -func (c *ChangeWidget) HasTitleSize() bool { - if c != nil && c.TitleSize != nil { - return true - } - - return false -} - -// SetTitleSize allocates a new c.TitleSize and returns the pointer to it. -func (c *ChangeWidget) SetTitleSize(v int) { - c.TitleSize = &v -} - -// GetTitleText returns the TitleText field if non-nil, zero value otherwise. -func (c *ChangeWidget) GetTitleText() string { - if c == nil || c.TitleText == nil { - return "" - } - return *c.TitleText -} - -// GetOkTitleText returns a tuple with the TitleText field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (c *ChangeWidget) GetTitleTextOk() (string, bool) { - if c == nil || c.TitleText == nil { - return "", false - } - return *c.TitleText, true -} - -// HasTitleText returns a boolean if a field has been set. -func (c *ChangeWidget) HasTitleText() bool { - if c != nil && c.TitleText != nil { - return true - } - - return false -} - -// SetTitleText allocates a new c.TitleText and returns the pointer to it. -func (c *ChangeWidget) SetTitleText(v string) { - c.TitleText = &v -} - -// GetWidth returns the Width field if non-nil, zero value otherwise. -func (c *ChangeWidget) GetWidth() int { - if c == nil || c.Width == nil { - return 0 - } - return *c.Width -} - -// GetOkWidth returns a tuple with the Width field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (c *ChangeWidget) GetWidthOk() (int, bool) { - if c == nil || c.Width == nil { - return 0, false - } - return *c.Width, true -} - -// HasWidth returns a boolean if a field has been set. -func (c *ChangeWidget) HasWidth() bool { - if c != nil && c.Width != nil { - return true - } - - return false -} - -// SetWidth allocates a new c.Width and returns the pointer to it. -func (c *ChangeWidget) SetWidth(v int) { - c.Width = &v -} - -// GetX returns the X field if non-nil, zero value otherwise. -func (c *ChangeWidget) GetX() int { - if c == nil || c.X == nil { - return 0 - } - return *c.X -} - -// GetOkX returns a tuple with the X field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (c *ChangeWidget) GetXOk() (int, bool) { - if c == nil || c.X == nil { - return 0, false - } - return *c.X, true -} - -// HasX returns a boolean if a field has been set. -func (c *ChangeWidget) HasX() bool { - if c != nil && c.X != nil { - return true - } - - return false -} - -// SetX allocates a new c.X and returns the pointer to it. -func (c *ChangeWidget) SetX(v int) { - c.X = &v -} - -// GetY returns the Y field if non-nil, zero value otherwise. -func (c *ChangeWidget) GetY() int { - if c == nil || c.Y == nil { - return 0 - } - return *c.Y -} - -// GetOkY returns a tuple with the Y field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (c *ChangeWidget) GetYOk() (int, bool) { - if c == nil || c.Y == nil { - return 0, false - } - return *c.Y, true -} - -// HasY returns a boolean if a field has been set. -func (c *ChangeWidget) HasY() bool { - if c != nil && c.Y != nil { - return true - } - - return false -} - -// SetY allocates a new c.Y and returns the pointer to it. -func (c *ChangeWidget) SetY(v int) { - c.Y = &v -} - // GetAccount returns the Account field if non-nil, zero value otherwise. func (c *ChannelSlackRequest) GetAccount() string { if c == nil || c.Account == nil { @@ -1478,7 +269,7 @@ func (c *ChannelSlackRequest) GetAccount() string { return *c.Account } -// GetOkAccount returns a tuple with the Account field if it's non-nil, zero value otherwise +// GetAccountOk returns a tuple with the Account field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (c *ChannelSlackRequest) GetAccountOk() (string, bool) { if c == nil || c.Account == nil { @@ -1509,7 +300,7 @@ func (c *ChannelSlackRequest) GetChannelName() string { return *c.ChannelName } -// GetOkChannelName returns a tuple with the ChannelName field if it's non-nil, zero value otherwise +// GetChannelNameOk returns a tuple with the ChannelName field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (c *ChannelSlackRequest) GetChannelNameOk() (string, bool) { if c == nil || c.ChannelName == nil { @@ -1540,7 +331,7 @@ func (c *ChannelSlackRequest) GetTransferAllUserComments() bool { return *c.TransferAllUserComments } -// GetOkTransferAllUserComments returns a tuple with the TransferAllUserComments field if it's non-nil, zero value otherwise +// GetTransferAllUserCommentsOk returns a tuple with the TransferAllUserComments field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (c *ChannelSlackRequest) GetTransferAllUserCommentsOk() (bool, bool) { if c == nil || c.TransferAllUserComments == nil { @@ -1571,7 +362,7 @@ func (c *Check) GetCheck() string { return *c.Check } -// GetOkCheck returns a tuple with the Check field if it's non-nil, zero value otherwise +// GetCheckOk returns a tuple with the Check field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (c *Check) GetCheckOk() (string, bool) { if c == nil || c.Check == nil { @@ -1602,7 +393,7 @@ func (c *Check) GetHostName() string { return *c.HostName } -// GetOkHostName returns a tuple with the HostName field if it's non-nil, zero value otherwise +// GetHostNameOk returns a tuple with the HostName field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (c *Check) GetHostNameOk() (string, bool) { if c == nil || c.HostName == nil { @@ -1633,7 +424,7 @@ func (c *Check) GetMessage() string { return *c.Message } -// GetOkMessage returns a tuple with the Message field if it's non-nil, zero value otherwise +// GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (c *Check) GetMessageOk() (string, bool) { if c == nil || c.Message == nil { @@ -1664,7 +455,7 @@ func (c *Check) GetStatus() Status { return *c.Status } -// GetOkStatus returns a tuple with the Status field if it's non-nil, zero value otherwise +// GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (c *Check) GetStatusOk() (Status, bool) { if c == nil || c.Status == nil { @@ -1695,7 +486,7 @@ func (c *Check) GetTimestamp() string { return *c.Timestamp } -// GetOkTimestamp returns a tuple with the Timestamp field if it's non-nil, zero value otherwise +// GetTimestampOk returns a tuple with the Timestamp field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (c *Check) GetTimestampOk() (string, bool) { if c == nil || c.Timestamp == nil { @@ -1718,502 +509,6 @@ func (c *Check) SetTimestamp(v string) { c.Timestamp = &v } -// GetCheck returns the Check field if non-nil, zero value otherwise. -func (c *CheckStatusWidget) GetCheck() string { - if c == nil || c.Check == nil { - return "" - } - return *c.Check -} - -// GetOkCheck returns a tuple with the Check field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (c *CheckStatusWidget) GetCheckOk() (string, bool) { - if c == nil || c.Check == nil { - return "", false - } - return *c.Check, true -} - -// HasCheck returns a boolean if a field has been set. -func (c *CheckStatusWidget) HasCheck() bool { - if c != nil && c.Check != nil { - return true - } - - return false -} - -// SetCheck allocates a new c.Check and returns the pointer to it. -func (c *CheckStatusWidget) SetCheck(v string) { - c.Check = &v -} - -// GetGroup returns the Group field if non-nil, zero value otherwise. -func (c *CheckStatusWidget) GetGroup() string { - if c == nil || c.Group == nil { - return "" - } - return *c.Group -} - -// GetOkGroup returns a tuple with the Group field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (c *CheckStatusWidget) GetGroupOk() (string, bool) { - if c == nil || c.Group == nil { - return "", false - } - return *c.Group, true -} - -// HasGroup returns a boolean if a field has been set. -func (c *CheckStatusWidget) HasGroup() bool { - if c != nil && c.Group != nil { - return true - } - - return false -} - -// SetGroup allocates a new c.Group and returns the pointer to it. -func (c *CheckStatusWidget) SetGroup(v string) { - c.Group = &v -} - -// GetGrouping returns the Grouping field if non-nil, zero value otherwise. -func (c *CheckStatusWidget) GetGrouping() string { - if c == nil || c.Grouping == nil { - return "" - } - return *c.Grouping -} - -// GetOkGrouping returns a tuple with the Grouping field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (c *CheckStatusWidget) GetGroupingOk() (string, bool) { - if c == nil || c.Grouping == nil { - return "", false - } - return *c.Grouping, true -} - -// HasGrouping returns a boolean if a field has been set. -func (c *CheckStatusWidget) HasGrouping() bool { - if c != nil && c.Grouping != nil { - return true - } - - return false -} - -// SetGrouping allocates a new c.Grouping and returns the pointer to it. -func (c *CheckStatusWidget) SetGrouping(v string) { - c.Grouping = &v -} - -// GetHeight returns the Height field if non-nil, zero value otherwise. -func (c *CheckStatusWidget) GetHeight() int { - if c == nil || c.Height == nil { - return 0 - } - return *c.Height -} - -// GetOkHeight returns a tuple with the Height field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (c *CheckStatusWidget) GetHeightOk() (int, bool) { - if c == nil || c.Height == nil { - return 0, false - } - return *c.Height, true -} - -// HasHeight returns a boolean if a field has been set. -func (c *CheckStatusWidget) HasHeight() bool { - if c != nil && c.Height != nil { - return true - } - - return false -} - -// SetHeight allocates a new c.Height and returns the pointer to it. -func (c *CheckStatusWidget) SetHeight(v int) { - c.Height = &v -} - -// GetTags returns the Tags field if non-nil, zero value otherwise. -func (c *CheckStatusWidget) GetTags() string { - if c == nil || c.Tags == nil { - return "" - } - return *c.Tags -} - -// GetOkTags returns a tuple with the Tags field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (c *CheckStatusWidget) GetTagsOk() (string, bool) { - if c == nil || c.Tags == nil { - return "", false - } - return *c.Tags, true -} - -// HasTags returns a boolean if a field has been set. -func (c *CheckStatusWidget) HasTags() bool { - if c != nil && c.Tags != nil { - return true - } - - return false -} - -// SetTags allocates a new c.Tags and returns the pointer to it. -func (c *CheckStatusWidget) SetTags(v string) { - c.Tags = &v -} - -// GetTextAlign returns the TextAlign field if non-nil, zero value otherwise. -func (c *CheckStatusWidget) GetTextAlign() string { - if c == nil || c.TextAlign == nil { - return "" - } - return *c.TextAlign -} - -// GetOkTextAlign returns a tuple with the TextAlign field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (c *CheckStatusWidget) GetTextAlignOk() (string, bool) { - if c == nil || c.TextAlign == nil { - return "", false - } - return *c.TextAlign, true -} - -// HasTextAlign returns a boolean if a field has been set. -func (c *CheckStatusWidget) HasTextAlign() bool { - if c != nil && c.TextAlign != nil { - return true - } - - return false -} - -// SetTextAlign allocates a new c.TextAlign and returns the pointer to it. -func (c *CheckStatusWidget) SetTextAlign(v string) { - c.TextAlign = &v -} - -// GetTextSize returns the TextSize field if non-nil, zero value otherwise. -func (c *CheckStatusWidget) GetTextSize() string { - if c == nil || c.TextSize == nil { - return "" - } - return *c.TextSize -} - -// GetOkTextSize returns a tuple with the TextSize field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (c *CheckStatusWidget) GetTextSizeOk() (string, bool) { - if c == nil || c.TextSize == nil { - return "", false - } - return *c.TextSize, true -} - -// HasTextSize returns a boolean if a field has been set. -func (c *CheckStatusWidget) HasTextSize() bool { - if c != nil && c.TextSize != nil { - return true - } - - return false -} - -// SetTextSize allocates a new c.TextSize and returns the pointer to it. -func (c *CheckStatusWidget) SetTextSize(v string) { - c.TextSize = &v -} - -// GetTimeframe returns the Timeframe field if non-nil, zero value otherwise. -func (c *CheckStatusWidget) GetTimeframe() string { - if c == nil || c.Timeframe == nil { - return "" - } - return *c.Timeframe -} - -// GetOkTimeframe returns a tuple with the Timeframe field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (c *CheckStatusWidget) GetTimeframeOk() (string, bool) { - if c == nil || c.Timeframe == nil { - return "", false - } - return *c.Timeframe, true -} - -// HasTimeframe returns a boolean if a field has been set. -func (c *CheckStatusWidget) HasTimeframe() bool { - if c != nil && c.Timeframe != nil { - return true - } - - return false -} - -// SetTimeframe allocates a new c.Timeframe and returns the pointer to it. -func (c *CheckStatusWidget) SetTimeframe(v string) { - c.Timeframe = &v -} - -// GetTitle returns the Title field if non-nil, zero value otherwise. -func (c *CheckStatusWidget) GetTitle() bool { - if c == nil || c.Title == nil { - return false - } - return *c.Title -} - -// GetOkTitle returns a tuple with the Title field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (c *CheckStatusWidget) GetTitleOk() (bool, bool) { - if c == nil || c.Title == nil { - return false, false - } - return *c.Title, true -} - -// HasTitle returns a boolean if a field has been set. -func (c *CheckStatusWidget) HasTitle() bool { - if c != nil && c.Title != nil { - return true - } - - return false -} - -// SetTitle allocates a new c.Title and returns the pointer to it. -func (c *CheckStatusWidget) SetTitle(v bool) { - c.Title = &v -} - -// GetTitleAlign returns the TitleAlign field if non-nil, zero value otherwise. -func (c *CheckStatusWidget) GetTitleAlign() string { - if c == nil || c.TitleAlign == nil { - return "" - } - return *c.TitleAlign -} - -// GetOkTitleAlign returns a tuple with the TitleAlign field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (c *CheckStatusWidget) GetTitleAlignOk() (string, bool) { - if c == nil || c.TitleAlign == nil { - return "", false - } - return *c.TitleAlign, true -} - -// HasTitleAlign returns a boolean if a field has been set. -func (c *CheckStatusWidget) HasTitleAlign() bool { - if c != nil && c.TitleAlign != nil { - return true - } - - return false -} - -// SetTitleAlign allocates a new c.TitleAlign and returns the pointer to it. -func (c *CheckStatusWidget) SetTitleAlign(v string) { - c.TitleAlign = &v -} - -// GetTitleSize returns the TitleSize field if non-nil, zero value otherwise. -func (c *CheckStatusWidget) GetTitleSize() int { - if c == nil || c.TitleSize == nil { - return 0 - } - return *c.TitleSize -} - -// GetOkTitleSize returns a tuple with the TitleSize field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (c *CheckStatusWidget) GetTitleSizeOk() (int, bool) { - if c == nil || c.TitleSize == nil { - return 0, false - } - return *c.TitleSize, true -} - -// HasTitleSize returns a boolean if a field has been set. -func (c *CheckStatusWidget) HasTitleSize() bool { - if c != nil && c.TitleSize != nil { - return true - } - - return false -} - -// SetTitleSize allocates a new c.TitleSize and returns the pointer to it. -func (c *CheckStatusWidget) SetTitleSize(v int) { - c.TitleSize = &v -} - -// GetTitleText returns the TitleText field if non-nil, zero value otherwise. -func (c *CheckStatusWidget) GetTitleText() string { - if c == nil || c.TitleText == nil { - return "" - } - return *c.TitleText -} - -// GetOkTitleText returns a tuple with the TitleText field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (c *CheckStatusWidget) GetTitleTextOk() (string, bool) { - if c == nil || c.TitleText == nil { - return "", false - } - return *c.TitleText, true -} - -// HasTitleText returns a boolean if a field has been set. -func (c *CheckStatusWidget) HasTitleText() bool { - if c != nil && c.TitleText != nil { - return true - } - - return false -} - -// SetTitleText allocates a new c.TitleText and returns the pointer to it. -func (c *CheckStatusWidget) SetTitleText(v string) { - c.TitleText = &v -} - -// GetType returns the Type field if non-nil, zero value otherwise. -func (c *CheckStatusWidget) GetType() string { - if c == nil || c.Type == nil { - return "" - } - return *c.Type -} - -// GetOkType returns a tuple with the Type field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (c *CheckStatusWidget) GetTypeOk() (string, bool) { - if c == nil || c.Type == nil { - return "", false - } - return *c.Type, true -} - -// HasType returns a boolean if a field has been set. -func (c *CheckStatusWidget) HasType() bool { - if c != nil && c.Type != nil { - return true - } - - return false -} - -// SetType allocates a new c.Type and returns the pointer to it. -func (c *CheckStatusWidget) SetType(v string) { - c.Type = &v -} - -// GetWidth returns the Width field if non-nil, zero value otherwise. -func (c *CheckStatusWidget) GetWidth() int { - if c == nil || c.Width == nil { - return 0 - } - return *c.Width -} - -// GetOkWidth returns a tuple with the Width field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (c *CheckStatusWidget) GetWidthOk() (int, bool) { - if c == nil || c.Width == nil { - return 0, false - } - return *c.Width, true -} - -// HasWidth returns a boolean if a field has been set. -func (c *CheckStatusWidget) HasWidth() bool { - if c != nil && c.Width != nil { - return true - } - - return false -} - -// SetWidth allocates a new c.Width and returns the pointer to it. -func (c *CheckStatusWidget) SetWidth(v int) { - c.Width = &v -} - -// GetX returns the X field if non-nil, zero value otherwise. -func (c *CheckStatusWidget) GetX() int { - if c == nil || c.X == nil { - return 0 - } - return *c.X -} - -// GetOkX returns a tuple with the X field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (c *CheckStatusWidget) GetXOk() (int, bool) { - if c == nil || c.X == nil { - return 0, false - } - return *c.X, true -} - -// HasX returns a boolean if a field has been set. -func (c *CheckStatusWidget) HasX() bool { - if c != nil && c.X != nil { - return true - } - - return false -} - -// SetX allocates a new c.X and returns the pointer to it. -func (c *CheckStatusWidget) SetX(v int) { - c.X = &v -} - -// GetY returns the Y field if non-nil, zero value otherwise. -func (c *CheckStatusWidget) GetY() int { - if c == nil || c.Y == nil { - return 0 - } - return *c.Y -} - -// GetOkY returns a tuple with the Y field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (c *CheckStatusWidget) GetYOk() (int, bool) { - if c == nil || c.Y == nil { - return 0, false - } - return *c.Y, true -} - -// HasY returns a boolean if a field has been set. -func (c *CheckStatusWidget) HasY() bool { - if c != nil && c.Y != nil { - return true - } - - return false -} - -// SetY allocates a new c.Y and returns the pointer to it. -func (c *CheckStatusWidget) SetY(v int) { - c.Y = &v -} - // GetHandle returns the Handle field if non-nil, zero value otherwise. func (c *Comment) GetHandle() string { if c == nil || c.Handle == nil { @@ -2222,7 +517,7 @@ func (c *Comment) GetHandle() string { return *c.Handle } -// GetOkHandle returns a tuple with the Handle field if it's non-nil, zero value otherwise +// GetHandleOk returns a tuple with the Handle field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (c *Comment) GetHandleOk() (string, bool) { if c == nil || c.Handle == nil { @@ -2253,7 +548,7 @@ func (c *Comment) GetId() int { return *c.Id } -// GetOkId returns a tuple with the Id field if it's non-nil, zero value otherwise +// GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (c *Comment) GetIdOk() (int, bool) { if c == nil || c.Id == nil { @@ -2284,7 +579,7 @@ func (c *Comment) GetMessage() string { return *c.Message } -// GetOkMessage returns a tuple with the Message field if it's non-nil, zero value otherwise +// GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (c *Comment) GetMessageOk() (string, bool) { if c == nil || c.Message == nil { @@ -2315,7 +610,7 @@ func (c *Comment) GetRelatedId() int { return *c.RelatedId } -// GetOkRelatedId returns a tuple with the RelatedId field if it's non-nil, zero value otherwise +// GetRelatedIdOk returns a tuple with the RelatedId field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (c *Comment) GetRelatedIdOk() (int, bool) { if c == nil || c.RelatedId == nil { @@ -2346,7 +641,7 @@ func (c *Comment) GetResource() string { return *c.Resource } -// GetOkResource returns a tuple with the Resource field if it's non-nil, zero value otherwise +// GetResourceOk returns a tuple with the Resource field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (c *Comment) GetResourceOk() (string, bool) { if c == nil || c.Resource == nil { @@ -2377,7 +672,7 @@ func (c *Comment) GetUrl() string { return *c.Url } -// GetOkUrl returns a tuple with the Url field if it's non-nil, zero value otherwise +// GetUrlOk returns a tuple with the Url field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (c *Comment) GetUrlOk() (string, bool) { if c == nil || c.Url == nil { @@ -2408,7 +703,7 @@ func (c *ConditionalFormat) GetColor() string { return *c.Color } -// GetOkColor returns a tuple with the Color field if it's non-nil, zero value otherwise +// GetColorOk returns a tuple with the Color field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (c *ConditionalFormat) GetColorOk() (string, bool) { if c == nil || c.Color == nil { @@ -2439,7 +734,7 @@ func (c *ConditionalFormat) GetComparator() string { return *c.Comparator } -// GetOkComparator returns a tuple with the Comparator field if it's non-nil, zero value otherwise +// GetComparatorOk returns a tuple with the Comparator field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (c *ConditionalFormat) GetComparatorOk() (string, bool) { if c == nil || c.Comparator == nil { @@ -2462,50 +757,112 @@ func (c *ConditionalFormat) SetComparator(v string) { c.Comparator = &v } -// GetInverted returns the Inverted field if non-nil, zero value otherwise. -func (c *ConditionalFormat) GetInverted() bool { - if c == nil || c.Inverted == nil { - return false +// GetImageURL returns the ImageURL field if non-nil, zero value otherwise. +func (c *ConditionalFormat) GetImageURL() string { + if c == nil || c.ImageURL == nil { + return "" } - return *c.Inverted + return *c.ImageURL } -// GetOkInverted returns a tuple with the Inverted field if it's non-nil, zero value otherwise +// GetImageURLOk returns a tuple with the ImageURL field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. -func (c *ConditionalFormat) GetInvertedOk() (bool, bool) { - if c == nil || c.Inverted == nil { - return false, false +func (c *ConditionalFormat) GetImageURLOk() (string, bool) { + if c == nil || c.ImageURL == nil { + return "", false } - return *c.Inverted, true + return *c.ImageURL, true } -// HasInverted returns a boolean if a field has been set. -func (c *ConditionalFormat) HasInverted() bool { - if c != nil && c.Inverted != nil { +// HasImageURL returns a boolean if a field has been set. +func (c *ConditionalFormat) HasImageURL() bool { + if c != nil && c.ImageURL != nil { return true } return false } -// SetInverted allocates a new c.Inverted and returns the pointer to it. -func (c *ConditionalFormat) SetInverted(v bool) { - c.Inverted = &v +// SetImageURL allocates a new c.ImageURL and returns the pointer to it. +func (c *ConditionalFormat) SetImageURL(v string) { + c.ImageURL = &v +} + +// GetInvert returns the Invert field if non-nil, zero value otherwise. +func (c *ConditionalFormat) GetInvert() bool { + if c == nil || c.Invert == nil { + return false + } + return *c.Invert +} + +// GetInvertOk returns a tuple with the Invert field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (c *ConditionalFormat) GetInvertOk() (bool, bool) { + if c == nil || c.Invert == nil { + return false, false + } + return *c.Invert, true +} + +// HasInvert returns a boolean if a field has been set. +func (c *ConditionalFormat) HasInvert() bool { + if c != nil && c.Invert != nil { + return true + } + + return false +} + +// SetInvert allocates a new c.Invert and returns the pointer to it. +func (c *ConditionalFormat) SetInvert(v bool) { + c.Invert = &v +} + +// GetPalette returns the Palette field if non-nil, zero value otherwise. +func (c *ConditionalFormat) GetPalette() string { + if c == nil || c.Palette == nil { + return "" + } + return *c.Palette +} + +// GetPaletteOk returns a tuple with the Palette field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (c *ConditionalFormat) GetPaletteOk() (string, bool) { + if c == nil || c.Palette == nil { + return "", false + } + return *c.Palette, true +} + +// HasPalette returns a boolean if a field has been set. +func (c *ConditionalFormat) HasPalette() bool { + if c != nil && c.Palette != nil { + return true + } + + return false +} + +// SetPalette allocates a new c.Palette and returns the pointer to it. +func (c *ConditionalFormat) SetPalette(v string) { + c.Palette = &v } // GetValue returns the Value field if non-nil, zero value otherwise. -func (c *ConditionalFormat) GetValue() int { +func (c *ConditionalFormat) GetValue() string { if c == nil || c.Value == nil { - return 0 + return "" } return *c.Value } -// GetOkValue returns a tuple with the Value field if it's non-nil, zero value otherwise +// GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. -func (c *ConditionalFormat) GetValueOk() (int, bool) { +func (c *ConditionalFormat) GetValueOk() (string, bool) { if c == nil || c.Value == nil { - return 0, false + return "", false } return *c.Value, true } @@ -2520,10 +877,289 @@ func (c *ConditionalFormat) HasValue() bool { } // SetValue allocates a new c.Value and returns the pointer to it. -func (c *ConditionalFormat) SetValue(v int) { +func (c *ConditionalFormat) SetValue(v string) { c.Value = &v } +// GetAccessRole returns the AccessRole field if non-nil, zero value otherwise. +func (c *CreatedBy) GetAccessRole() string { + if c == nil || c.AccessRole == nil { + return "" + } + return *c.AccessRole +} + +// GetAccessRoleOk returns a tuple with the AccessRole field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (c *CreatedBy) GetAccessRoleOk() (string, bool) { + if c == nil || c.AccessRole == nil { + return "", false + } + return *c.AccessRole, true +} + +// HasAccessRole returns a boolean if a field has been set. +func (c *CreatedBy) HasAccessRole() bool { + if c != nil && c.AccessRole != nil { + return true + } + + return false +} + +// SetAccessRole allocates a new c.AccessRole and returns the pointer to it. +func (c *CreatedBy) SetAccessRole(v string) { + c.AccessRole = &v +} + +// GetDisabled returns the Disabled field if non-nil, zero value otherwise. +func (c *CreatedBy) GetDisabled() bool { + if c == nil || c.Disabled == nil { + return false + } + return *c.Disabled +} + +// GetDisabledOk returns a tuple with the Disabled field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (c *CreatedBy) GetDisabledOk() (bool, bool) { + if c == nil || c.Disabled == nil { + return false, false + } + return *c.Disabled, true +} + +// HasDisabled returns a boolean if a field has been set. +func (c *CreatedBy) HasDisabled() bool { + if c != nil && c.Disabled != nil { + return true + } + + return false +} + +// SetDisabled allocates a new c.Disabled and returns the pointer to it. +func (c *CreatedBy) SetDisabled(v bool) { + c.Disabled = &v +} + +// GetEmail returns the Email field if non-nil, zero value otherwise. +func (c *CreatedBy) GetEmail() string { + if c == nil || c.Email == nil { + return "" + } + return *c.Email +} + +// GetEmailOk returns a tuple with the Email field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (c *CreatedBy) GetEmailOk() (string, bool) { + if c == nil || c.Email == nil { + return "", false + } + return *c.Email, true +} + +// HasEmail returns a boolean if a field has been set. +func (c *CreatedBy) HasEmail() bool { + if c != nil && c.Email != nil { + return true + } + + return false +} + +// SetEmail allocates a new c.Email and returns the pointer to it. +func (c *CreatedBy) SetEmail(v string) { + c.Email = &v +} + +// GetHandle returns the Handle field if non-nil, zero value otherwise. +func (c *CreatedBy) GetHandle() string { + if c == nil || c.Handle == nil { + return "" + } + return *c.Handle +} + +// GetHandleOk returns a tuple with the Handle field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (c *CreatedBy) GetHandleOk() (string, bool) { + if c == nil || c.Handle == nil { + return "", false + } + return *c.Handle, true +} + +// HasHandle returns a boolean if a field has been set. +func (c *CreatedBy) HasHandle() bool { + if c != nil && c.Handle != nil { + return true + } + + return false +} + +// SetHandle allocates a new c.Handle and returns the pointer to it. +func (c *CreatedBy) SetHandle(v string) { + c.Handle = &v +} + +// GetIcon returns the Icon field if non-nil, zero value otherwise. +func (c *CreatedBy) GetIcon() string { + if c == nil || c.Icon == nil { + return "" + } + return *c.Icon +} + +// GetIconOk returns a tuple with the Icon field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (c *CreatedBy) GetIconOk() (string, bool) { + if c == nil || c.Icon == nil { + return "", false + } + return *c.Icon, true +} + +// HasIcon returns a boolean if a field has been set. +func (c *CreatedBy) HasIcon() bool { + if c != nil && c.Icon != nil { + return true + } + + return false +} + +// SetIcon allocates a new c.Icon and returns the pointer to it. +func (c *CreatedBy) SetIcon(v string) { + c.Icon = &v +} + +// GetIsAdmin returns the IsAdmin field if non-nil, zero value otherwise. +func (c *CreatedBy) GetIsAdmin() bool { + if c == nil || c.IsAdmin == nil { + return false + } + return *c.IsAdmin +} + +// GetIsAdminOk returns a tuple with the IsAdmin field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (c *CreatedBy) GetIsAdminOk() (bool, bool) { + if c == nil || c.IsAdmin == nil { + return false, false + } + return *c.IsAdmin, true +} + +// HasIsAdmin returns a boolean if a field has been set. +func (c *CreatedBy) HasIsAdmin() bool { + if c != nil && c.IsAdmin != nil { + return true + } + + return false +} + +// SetIsAdmin allocates a new c.IsAdmin and returns the pointer to it. +func (c *CreatedBy) SetIsAdmin(v bool) { + c.IsAdmin = &v +} + +// GetName returns the Name field if non-nil, zero value otherwise. +func (c *CreatedBy) GetName() string { + if c == nil || c.Name == nil { + return "" + } + return *c.Name +} + +// GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (c *CreatedBy) GetNameOk() (string, bool) { + if c == nil || c.Name == nil { + return "", false + } + return *c.Name, true +} + +// HasName returns a boolean if a field has been set. +func (c *CreatedBy) HasName() bool { + if c != nil && c.Name != nil { + return true + } + + return false +} + +// SetName allocates a new c.Name and returns the pointer to it. +func (c *CreatedBy) SetName(v string) { + c.Name = &v +} + +// GetRole returns the Role field if non-nil, zero value otherwise. +func (c *CreatedBy) GetRole() string { + if c == nil || c.Role == nil { + return "" + } + return *c.Role +} + +// GetRoleOk returns a tuple with the Role field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (c *CreatedBy) GetRoleOk() (string, bool) { + if c == nil || c.Role == nil { + return "", false + } + return *c.Role, true +} + +// HasRole returns a boolean if a field has been set. +func (c *CreatedBy) HasRole() bool { + if c != nil && c.Role != nil { + return true + } + + return false +} + +// SetRole allocates a new c.Role and returns the pointer to it. +func (c *CreatedBy) SetRole(v string) { + c.Role = &v +} + +// GetVerified returns the Verified field if non-nil, zero value otherwise. +func (c *CreatedBy) GetVerified() bool { + if c == nil || c.Verified == nil { + return false + } + return *c.Verified +} + +// GetVerifiedOk returns a tuple with the Verified field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (c *CreatedBy) GetVerifiedOk() (bool, bool) { + if c == nil || c.Verified == nil { + return false, false + } + return *c.Verified, true +} + +// HasVerified returns a boolean if a field has been set. +func (c *CreatedBy) HasVerified() bool { + if c != nil && c.Verified != nil { + return true + } + + return false +} + +// SetVerified allocates a new c.Verified and returns the pointer to it. +func (c *CreatedBy) SetVerified(v bool) { + c.Verified = &v +} + // GetEmail returns the Email field if non-nil, zero value otherwise. func (c *Creator) GetEmail() string { if c == nil || c.Email == nil { @@ -2532,7 +1168,7 @@ func (c *Creator) GetEmail() string { return *c.Email } -// GetOkEmail returns a tuple with the Email field if it's non-nil, zero value otherwise +// GetEmailOk returns a tuple with the Email field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (c *Creator) GetEmailOk() (string, bool) { if c == nil || c.Email == nil { @@ -2563,7 +1199,7 @@ func (c *Creator) GetHandle() string { return *c.Handle } -// GetOkHandle returns a tuple with the Handle field if it's non-nil, zero value otherwise +// GetHandleOk returns a tuple with the Handle field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (c *Creator) GetHandleOk() (string, bool) { if c == nil || c.Handle == nil { @@ -2594,7 +1230,7 @@ func (c *Creator) GetId() int { return *c.Id } -// GetOkId returns a tuple with the Id field if it's non-nil, zero value otherwise +// GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (c *Creator) GetIdOk() (int, bool) { if c == nil || c.Id == nil { @@ -2625,7 +1261,7 @@ func (c *Creator) GetName() string { return *c.Name } -// GetOkName returns a tuple with the Name field if it's non-nil, zero value otherwise +// GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (c *Creator) GetNameOk() (string, bool) { if c == nil || c.Name == nil { @@ -2656,7 +1292,7 @@ func (d *Dashboard) GetDescription() string { return *d.Description } -// GetOkDescription returns a tuple with the Description field if it's non-nil, zero value otherwise +// GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (d *Dashboard) GetDescriptionOk() (string, bool) { if d == nil || d.Description == nil { @@ -2687,7 +1323,7 @@ func (d *Dashboard) GetId() int { return *d.Id } -// GetOkId returns a tuple with the Id field if it's non-nil, zero value otherwise +// GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (d *Dashboard) GetIdOk() (int, bool) { if d == nil || d.Id == nil { @@ -2718,7 +1354,7 @@ func (d *Dashboard) GetReadOnly() bool { return *d.ReadOnly } -// GetOkReadOnly returns a tuple with the ReadOnly field if it's non-nil, zero value otherwise +// GetReadOnlyOk returns a tuple with the ReadOnly field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (d *Dashboard) GetReadOnlyOk() (bool, bool) { if d == nil || d.ReadOnly == nil { @@ -2749,7 +1385,7 @@ func (d *Dashboard) GetTitle() string { return *d.Title } -// GetOkTitle returns a tuple with the Title field if it's non-nil, zero value otherwise +// GetTitleOk returns a tuple with the Title field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (d *Dashboard) GetTitleOk() (string, bool) { if d == nil || d.Title == nil { @@ -2780,7 +1416,7 @@ func (d *DashboardConditionalFormat) GetComparator() string { return *d.Comparator } -// GetOkComparator returns a tuple with the Comparator field if it's non-nil, zero value otherwise +// GetComparatorOk returns a tuple with the Comparator field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (d *DashboardConditionalFormat) GetComparatorOk() (string, bool) { if d == nil || d.Comparator == nil { @@ -2811,7 +1447,7 @@ func (d *DashboardConditionalFormat) GetCustomBgColor() string { return *d.CustomBgColor } -// GetOkCustomBgColor returns a tuple with the CustomBgColor field if it's non-nil, zero value otherwise +// GetCustomBgColorOk returns a tuple with the CustomBgColor field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (d *DashboardConditionalFormat) GetCustomBgColorOk() (string, bool) { if d == nil || d.CustomBgColor == nil { @@ -2842,7 +1478,7 @@ func (d *DashboardConditionalFormat) GetCustomFgColor() string { return *d.CustomFgColor } -// GetOkCustomFgColor returns a tuple with the CustomFgColor field if it's non-nil, zero value otherwise +// GetCustomFgColorOk returns a tuple with the CustomFgColor field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (d *DashboardConditionalFormat) GetCustomFgColorOk() (string, bool) { if d == nil || d.CustomFgColor == nil { @@ -2873,7 +1509,7 @@ func (d *DashboardConditionalFormat) GetCustomImageUrl() string { return *d.CustomImageUrl } -// GetOkCustomImageUrl returns a tuple with the CustomImageUrl field if it's non-nil, zero value otherwise +// GetCustomImageUrlOk returns a tuple with the CustomImageUrl field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (d *DashboardConditionalFormat) GetCustomImageUrlOk() (string, bool) { if d == nil || d.CustomImageUrl == nil { @@ -2904,7 +1540,7 @@ func (d *DashboardConditionalFormat) GetInverted() bool { return *d.Inverted } -// GetOkInverted returns a tuple with the Inverted field if it's non-nil, zero value otherwise +// GetInvertedOk returns a tuple with the Inverted field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (d *DashboardConditionalFormat) GetInvertedOk() (bool, bool) { if d == nil || d.Inverted == nil { @@ -2935,7 +1571,7 @@ func (d *DashboardConditionalFormat) GetPalette() string { return *d.Palette } -// GetOkPalette returns a tuple with the Palette field if it's non-nil, zero value otherwise +// GetPaletteOk returns a tuple with the Palette field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (d *DashboardConditionalFormat) GetPaletteOk() (string, bool) { if d == nil || d.Palette == nil { @@ -2966,7 +1602,7 @@ func (d *DashboardConditionalFormat) GetValue() json.Number { return *d.Value } -// GetOkValue returns a tuple with the Value field if it's non-nil, zero value otherwise +// GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (d *DashboardConditionalFormat) GetValueOk() (json.Number, bool) { if d == nil || d.Value == nil { @@ -2997,7 +1633,7 @@ func (d *DashboardList) GetDashboardCount() int { return *d.DashboardCount } -// GetOkDashboardCount returns a tuple with the DashboardCount field if it's non-nil, zero value otherwise +// GetDashboardCountOk returns a tuple with the DashboardCount field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (d *DashboardList) GetDashboardCountOk() (int, bool) { if d == nil || d.DashboardCount == nil { @@ -3028,7 +1664,7 @@ func (d *DashboardList) GetId() int { return *d.Id } -// GetOkId returns a tuple with the Id field if it's non-nil, zero value otherwise +// GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (d *DashboardList) GetIdOk() (int, bool) { if d == nil || d.Id == nil { @@ -3059,7 +1695,7 @@ func (d *DashboardList) GetName() string { return *d.Name } -// GetOkName returns a tuple with the Name field if it's non-nil, zero value otherwise +// GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (d *DashboardList) GetNameOk() (string, bool) { if d == nil || d.Name == nil { @@ -3090,7 +1726,7 @@ func (d *DashboardListItem) GetId() int { return *d.Id } -// GetOkId returns a tuple with the Id field if it's non-nil, zero value otherwise +// GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (d *DashboardListItem) GetIdOk() (int, bool) { if d == nil || d.Id == nil { @@ -3121,7 +1757,7 @@ func (d *DashboardListItem) GetType() string { return *d.Type } -// GetOkType returns a tuple with the Type field if it's non-nil, zero value otherwise +// GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (d *DashboardListItem) GetTypeOk() (string, bool) { if d == nil || d.Type == nil { @@ -3144,6 +1780,68 @@ func (d *DashboardListItem) SetType(v string) { d.Type = &v } +// GetCreated returns the Created field if non-nil, zero value otherwise. +func (d *DashboardLite) GetCreated() string { + if d == nil || d.Created == nil { + return "" + } + return *d.Created +} + +// GetCreatedOk returns a tuple with the Created field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (d *DashboardLite) GetCreatedOk() (string, bool) { + if d == nil || d.Created == nil { + return "", false + } + return *d.Created, true +} + +// HasCreated returns a boolean if a field has been set. +func (d *DashboardLite) HasCreated() bool { + if d != nil && d.Created != nil { + return true + } + + return false +} + +// SetCreated allocates a new d.Created and returns the pointer to it. +func (d *DashboardLite) SetCreated(v string) { + d.Created = &v +} + +// GetCreatedBy returns the CreatedBy field if non-nil, zero value otherwise. +func (d *DashboardLite) GetCreatedBy() CreatedBy { + if d == nil || d.CreatedBy == nil { + return CreatedBy{} + } + return *d.CreatedBy +} + +// GetCreatedByOk returns a tuple with the CreatedBy field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (d *DashboardLite) GetCreatedByOk() (CreatedBy, bool) { + if d == nil || d.CreatedBy == nil { + return CreatedBy{}, false + } + return *d.CreatedBy, true +} + +// HasCreatedBy returns a boolean if a field has been set. +func (d *DashboardLite) HasCreatedBy() bool { + if d != nil && d.CreatedBy != nil { + return true + } + + return false +} + +// SetCreatedBy allocates a new d.CreatedBy and returns the pointer to it. +func (d *DashboardLite) SetCreatedBy(v CreatedBy) { + d.CreatedBy = &v +} + // GetDescription returns the Description field if non-nil, zero value otherwise. func (d *DashboardLite) GetDescription() string { if d == nil || d.Description == nil { @@ -3152,7 +1850,7 @@ func (d *DashboardLite) GetDescription() string { return *d.Description } -// GetOkDescription returns a tuple with the Description field if it's non-nil, zero value otherwise +// GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (d *DashboardLite) GetDescriptionOk() (string, bool) { if d == nil || d.Description == nil { @@ -3183,7 +1881,7 @@ func (d *DashboardLite) GetId() int { return *d.Id } -// GetOkId returns a tuple with the Id field if it's non-nil, zero value otherwise +// GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (d *DashboardLite) GetIdOk() (int, bool) { if d == nil || d.Id == nil { @@ -3206,6 +1904,68 @@ func (d *DashboardLite) SetId(v int) { d.Id = &v } +// GetModified returns the Modified field if non-nil, zero value otherwise. +func (d *DashboardLite) GetModified() string { + if d == nil || d.Modified == nil { + return "" + } + return *d.Modified +} + +// GetModifiedOk returns a tuple with the Modified field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (d *DashboardLite) GetModifiedOk() (string, bool) { + if d == nil || d.Modified == nil { + return "", false + } + return *d.Modified, true +} + +// HasModified returns a boolean if a field has been set. +func (d *DashboardLite) HasModified() bool { + if d != nil && d.Modified != nil { + return true + } + + return false +} + +// SetModified allocates a new d.Modified and returns the pointer to it. +func (d *DashboardLite) SetModified(v string) { + d.Modified = &v +} + +// GetReadOnly returns the ReadOnly field if non-nil, zero value otherwise. +func (d *DashboardLite) GetReadOnly() bool { + if d == nil || d.ReadOnly == nil { + return false + } + return *d.ReadOnly +} + +// GetReadOnlyOk returns a tuple with the ReadOnly field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (d *DashboardLite) GetReadOnlyOk() (bool, bool) { + if d == nil || d.ReadOnly == nil { + return false, false + } + return *d.ReadOnly, true +} + +// HasReadOnly returns a boolean if a field has been set. +func (d *DashboardLite) HasReadOnly() bool { + if d != nil && d.ReadOnly != nil { + return true + } + + return false +} + +// SetReadOnly allocates a new d.ReadOnly and returns the pointer to it. +func (d *DashboardLite) SetReadOnly(v bool) { + d.ReadOnly = &v +} + // GetResource returns the Resource field if non-nil, zero value otherwise. func (d *DashboardLite) GetResource() string { if d == nil || d.Resource == nil { @@ -3214,7 +1974,7 @@ func (d *DashboardLite) GetResource() string { return *d.Resource } -// GetOkResource returns a tuple with the Resource field if it's non-nil, zero value otherwise +// GetResourceOk returns a tuple with the Resource field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (d *DashboardLite) GetResourceOk() (string, bool) { if d == nil || d.Resource == nil { @@ -3245,7 +2005,7 @@ func (d *DashboardLite) GetTitle() string { return *d.Title } -// GetOkTitle returns a tuple with the Title field if it's non-nil, zero value otherwise +// GetTitleOk returns a tuple with the Title field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (d *DashboardLite) GetTitleOk() (string, bool) { if d == nil || d.Title == nil { @@ -3276,7 +2036,7 @@ func (d *Downtime) GetActive() bool { return *d.Active } -// GetOkActive returns a tuple with the Active field if it's non-nil, zero value otherwise +// GetActiveOk returns a tuple with the Active field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (d *Downtime) GetActiveOk() (bool, bool) { if d == nil || d.Active == nil { @@ -3307,7 +2067,7 @@ func (d *Downtime) GetCanceled() int { return *d.Canceled } -// GetOkCanceled returns a tuple with the Canceled field if it's non-nil, zero value otherwise +// GetCanceledOk returns a tuple with the Canceled field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (d *Downtime) GetCanceledOk() (int, bool) { if d == nil || d.Canceled == nil { @@ -3338,7 +2098,7 @@ func (d *Downtime) GetDisabled() bool { return *d.Disabled } -// GetOkDisabled returns a tuple with the Disabled field if it's non-nil, zero value otherwise +// GetDisabledOk returns a tuple with the Disabled field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (d *Downtime) GetDisabledOk() (bool, bool) { if d == nil || d.Disabled == nil { @@ -3369,7 +2129,7 @@ func (d *Downtime) GetEnd() int { return *d.End } -// GetOkEnd returns a tuple with the End field if it's non-nil, zero value otherwise +// GetEndOk returns a tuple with the End field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (d *Downtime) GetEndOk() (int, bool) { if d == nil || d.End == nil { @@ -3400,7 +2160,7 @@ func (d *Downtime) GetId() int { return *d.Id } -// GetOkId returns a tuple with the Id field if it's non-nil, zero value otherwise +// GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (d *Downtime) GetIdOk() (int, bool) { if d == nil || d.Id == nil { @@ -3431,7 +2191,7 @@ func (d *Downtime) GetMessage() string { return *d.Message } -// GetOkMessage returns a tuple with the Message field if it's non-nil, zero value otherwise +// GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (d *Downtime) GetMessageOk() (string, bool) { if d == nil || d.Message == nil { @@ -3462,7 +2222,7 @@ func (d *Downtime) GetMonitorId() int { return *d.MonitorId } -// GetOkMonitorId returns a tuple with the MonitorId field if it's non-nil, zero value otherwise +// GetMonitorIdOk returns a tuple with the MonitorId field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (d *Downtime) GetMonitorIdOk() (int, bool) { if d == nil || d.MonitorId == nil { @@ -3493,7 +2253,7 @@ func (d *Downtime) GetRecurrence() Recurrence { return *d.Recurrence } -// GetOkRecurrence returns a tuple with the Recurrence field if it's non-nil, zero value otherwise +// GetRecurrenceOk returns a tuple with the Recurrence field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (d *Downtime) GetRecurrenceOk() (Recurrence, bool) { if d == nil || d.Recurrence == nil { @@ -3524,7 +2284,7 @@ func (d *Downtime) GetStart() int { return *d.Start } -// GetOkStart returns a tuple with the Start field if it's non-nil, zero value otherwise +// GetStartOk returns a tuple with the Start field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (d *Downtime) GetStartOk() (int, bool) { if d == nil || d.Start == nil { @@ -3555,7 +2315,7 @@ func (e *Event) GetAggregation() string { return *e.Aggregation } -// GetOkAggregation returns a tuple with the Aggregation field if it's non-nil, zero value otherwise +// GetAggregationOk returns a tuple with the Aggregation field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (e *Event) GetAggregationOk() (string, bool) { if e == nil || e.Aggregation == nil { @@ -3586,7 +2346,7 @@ func (e *Event) GetAlertType() string { return *e.AlertType } -// GetOkAlertType returns a tuple with the AlertType field if it's non-nil, zero value otherwise +// GetAlertTypeOk returns a tuple with the AlertType field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (e *Event) GetAlertTypeOk() (string, bool) { if e == nil || e.AlertType == nil { @@ -3617,7 +2377,7 @@ func (e *Event) GetEventType() string { return *e.EventType } -// GetOkEventType returns a tuple with the EventType field if it's non-nil, zero value otherwise +// GetEventTypeOk returns a tuple with the EventType field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (e *Event) GetEventTypeOk() (string, bool) { if e == nil || e.EventType == nil { @@ -3648,7 +2408,7 @@ func (e *Event) GetHost() string { return *e.Host } -// GetOkHost returns a tuple with the Host field if it's non-nil, zero value otherwise +// GetHostOk returns a tuple with the Host field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (e *Event) GetHostOk() (string, bool) { if e == nil || e.Host == nil { @@ -3679,7 +2439,7 @@ func (e *Event) GetId() int { return *e.Id } -// GetOkId returns a tuple with the Id field if it's non-nil, zero value otherwise +// GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (e *Event) GetIdOk() (int, bool) { if e == nil || e.Id == nil { @@ -3710,7 +2470,7 @@ func (e *Event) GetPriority() string { return *e.Priority } -// GetOkPriority returns a tuple with the Priority field if it's non-nil, zero value otherwise +// GetPriorityOk returns a tuple with the Priority field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (e *Event) GetPriorityOk() (string, bool) { if e == nil || e.Priority == nil { @@ -3741,7 +2501,7 @@ func (e *Event) GetResource() string { return *e.Resource } -// GetOkResource returns a tuple with the Resource field if it's non-nil, zero value otherwise +// GetResourceOk returns a tuple with the Resource field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (e *Event) GetResourceOk() (string, bool) { if e == nil || e.Resource == nil { @@ -3772,7 +2532,7 @@ func (e *Event) GetSourceType() string { return *e.SourceType } -// GetOkSourceType returns a tuple with the SourceType field if it's non-nil, zero value otherwise +// GetSourceTypeOk returns a tuple with the SourceType field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (e *Event) GetSourceTypeOk() (string, bool) { if e == nil || e.SourceType == nil { @@ -3803,7 +2563,7 @@ func (e *Event) GetText() string { return *e.Text } -// GetOkText returns a tuple with the Text field if it's non-nil, zero value otherwise +// GetTextOk returns a tuple with the Text field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (e *Event) GetTextOk() (string, bool) { if e == nil || e.Text == nil { @@ -3834,7 +2594,7 @@ func (e *Event) GetTime() int { return *e.Time } -// GetOkTime returns a tuple with the Time field if it's non-nil, zero value otherwise +// GetTimeOk returns a tuple with the Time field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (e *Event) GetTimeOk() (int, bool) { if e == nil || e.Time == nil { @@ -3865,7 +2625,7 @@ func (e *Event) GetTitle() string { return *e.Title } -// GetOkTitle returns a tuple with the Title field if it's non-nil, zero value otherwise +// GetTitleOk returns a tuple with the Title field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (e *Event) GetTitleOk() (string, bool) { if e == nil || e.Title == nil { @@ -3896,7 +2656,7 @@ func (e *Event) GetUrl() string { return *e.Url } -// GetOkUrl returns a tuple with the Url field if it's non-nil, zero value otherwise +// GetUrlOk returns a tuple with the Url field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (e *Event) GetUrlOk() (string, bool) { if e == nil || e.Url == nil { @@ -3919,998 +2679,6 @@ func (e *Event) SetUrl(v string) { e.Url = &v } -// GetEventSize returns the EventSize field if non-nil, zero value otherwise. -func (e *EventStreamWidget) GetEventSize() string { - if e == nil || e.EventSize == nil { - return "" - } - return *e.EventSize -} - -// GetOkEventSize returns a tuple with the EventSize field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (e *EventStreamWidget) GetEventSizeOk() (string, bool) { - if e == nil || e.EventSize == nil { - return "", false - } - return *e.EventSize, true -} - -// HasEventSize returns a boolean if a field has been set. -func (e *EventStreamWidget) HasEventSize() bool { - if e != nil && e.EventSize != nil { - return true - } - - return false -} - -// SetEventSize allocates a new e.EventSize and returns the pointer to it. -func (e *EventStreamWidget) SetEventSize(v string) { - e.EventSize = &v -} - -// GetHeight returns the Height field if non-nil, zero value otherwise. -func (e *EventStreamWidget) GetHeight() int { - if e == nil || e.Height == nil { - return 0 - } - return *e.Height -} - -// GetOkHeight returns a tuple with the Height field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (e *EventStreamWidget) GetHeightOk() (int, bool) { - if e == nil || e.Height == nil { - return 0, false - } - return *e.Height, true -} - -// HasHeight returns a boolean if a field has been set. -func (e *EventStreamWidget) HasHeight() bool { - if e != nil && e.Height != nil { - return true - } - - return false -} - -// SetHeight allocates a new e.Height and returns the pointer to it. -func (e *EventStreamWidget) SetHeight(v int) { - e.Height = &v -} - -// GetQuery returns the Query field if non-nil, zero value otherwise. -func (e *EventStreamWidget) GetQuery() string { - if e == nil || e.Query == nil { - return "" - } - return *e.Query -} - -// GetOkQuery returns a tuple with the Query field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (e *EventStreamWidget) GetQueryOk() (string, bool) { - if e == nil || e.Query == nil { - return "", false - } - return *e.Query, true -} - -// HasQuery returns a boolean if a field has been set. -func (e *EventStreamWidget) HasQuery() bool { - if e != nil && e.Query != nil { - return true - } - - return false -} - -// SetQuery allocates a new e.Query and returns the pointer to it. -func (e *EventStreamWidget) SetQuery(v string) { - e.Query = &v -} - -// GetTimeframe returns the Timeframe field if non-nil, zero value otherwise. -func (e *EventStreamWidget) GetTimeframe() string { - if e == nil || e.Timeframe == nil { - return "" - } - return *e.Timeframe -} - -// GetOkTimeframe returns a tuple with the Timeframe field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (e *EventStreamWidget) GetTimeframeOk() (string, bool) { - if e == nil || e.Timeframe == nil { - return "", false - } - return *e.Timeframe, true -} - -// HasTimeframe returns a boolean if a field has been set. -func (e *EventStreamWidget) HasTimeframe() bool { - if e != nil && e.Timeframe != nil { - return true - } - - return false -} - -// SetTimeframe allocates a new e.Timeframe and returns the pointer to it. -func (e *EventStreamWidget) SetTimeframe(v string) { - e.Timeframe = &v -} - -// GetTitle returns the Title field if non-nil, zero value otherwise. -func (e *EventStreamWidget) GetTitle() bool { - if e == nil || e.Title == nil { - return false - } - return *e.Title -} - -// GetOkTitle returns a tuple with the Title field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (e *EventStreamWidget) GetTitleOk() (bool, bool) { - if e == nil || e.Title == nil { - return false, false - } - return *e.Title, true -} - -// HasTitle returns a boolean if a field has been set. -func (e *EventStreamWidget) HasTitle() bool { - if e != nil && e.Title != nil { - return true - } - - return false -} - -// SetTitle allocates a new e.Title and returns the pointer to it. -func (e *EventStreamWidget) SetTitle(v bool) { - e.Title = &v -} - -// GetTitleAlign returns the TitleAlign field if non-nil, zero value otherwise. -func (e *EventStreamWidget) GetTitleAlign() string { - if e == nil || e.TitleAlign == nil { - return "" - } - return *e.TitleAlign -} - -// GetOkTitleAlign returns a tuple with the TitleAlign field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (e *EventStreamWidget) GetTitleAlignOk() (string, bool) { - if e == nil || e.TitleAlign == nil { - return "", false - } - return *e.TitleAlign, true -} - -// HasTitleAlign returns a boolean if a field has been set. -func (e *EventStreamWidget) HasTitleAlign() bool { - if e != nil && e.TitleAlign != nil { - return true - } - - return false -} - -// SetTitleAlign allocates a new e.TitleAlign and returns the pointer to it. -func (e *EventStreamWidget) SetTitleAlign(v string) { - e.TitleAlign = &v -} - -// GetTitleSize returns the TitleSize field if non-nil, zero value otherwise. -func (e *EventStreamWidget) GetTitleSize() TextSize { - if e == nil || e.TitleSize == nil { - return TextSize{} - } - return *e.TitleSize -} - -// GetOkTitleSize returns a tuple with the TitleSize field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (e *EventStreamWidget) GetTitleSizeOk() (TextSize, bool) { - if e == nil || e.TitleSize == nil { - return TextSize{}, false - } - return *e.TitleSize, true -} - -// HasTitleSize returns a boolean if a field has been set. -func (e *EventStreamWidget) HasTitleSize() bool { - if e != nil && e.TitleSize != nil { - return true - } - - return false -} - -// SetTitleSize allocates a new e.TitleSize and returns the pointer to it. -func (e *EventStreamWidget) SetTitleSize(v TextSize) { - e.TitleSize = &v -} - -// GetTitleText returns the TitleText field if non-nil, zero value otherwise. -func (e *EventStreamWidget) GetTitleText() string { - if e == nil || e.TitleText == nil { - return "" - } - return *e.TitleText -} - -// GetOkTitleText returns a tuple with the TitleText field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (e *EventStreamWidget) GetTitleTextOk() (string, bool) { - if e == nil || e.TitleText == nil { - return "", false - } - return *e.TitleText, true -} - -// HasTitleText returns a boolean if a field has been set. -func (e *EventStreamWidget) HasTitleText() bool { - if e != nil && e.TitleText != nil { - return true - } - - return false -} - -// SetTitleText allocates a new e.TitleText and returns the pointer to it. -func (e *EventStreamWidget) SetTitleText(v string) { - e.TitleText = &v -} - -// GetType returns the Type field if non-nil, zero value otherwise. -func (e *EventStreamWidget) GetType() string { - if e == nil || e.Type == nil { - return "" - } - return *e.Type -} - -// GetOkType returns a tuple with the Type field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (e *EventStreamWidget) GetTypeOk() (string, bool) { - if e == nil || e.Type == nil { - return "", false - } - return *e.Type, true -} - -// HasType returns a boolean if a field has been set. -func (e *EventStreamWidget) HasType() bool { - if e != nil && e.Type != nil { - return true - } - - return false -} - -// SetType allocates a new e.Type and returns the pointer to it. -func (e *EventStreamWidget) SetType(v string) { - e.Type = &v -} - -// GetWidth returns the Width field if non-nil, zero value otherwise. -func (e *EventStreamWidget) GetWidth() int { - if e == nil || e.Width == nil { - return 0 - } - return *e.Width -} - -// GetOkWidth returns a tuple with the Width field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (e *EventStreamWidget) GetWidthOk() (int, bool) { - if e == nil || e.Width == nil { - return 0, false - } - return *e.Width, true -} - -// HasWidth returns a boolean if a field has been set. -func (e *EventStreamWidget) HasWidth() bool { - if e != nil && e.Width != nil { - return true - } - - return false -} - -// SetWidth allocates a new e.Width and returns the pointer to it. -func (e *EventStreamWidget) SetWidth(v int) { - e.Width = &v -} - -// GetX returns the X field if non-nil, zero value otherwise. -func (e *EventStreamWidget) GetX() int { - if e == nil || e.X == nil { - return 0 - } - return *e.X -} - -// GetOkX returns a tuple with the X field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (e *EventStreamWidget) GetXOk() (int, bool) { - if e == nil || e.X == nil { - return 0, false - } - return *e.X, true -} - -// HasX returns a boolean if a field has been set. -func (e *EventStreamWidget) HasX() bool { - if e != nil && e.X != nil { - return true - } - - return false -} - -// SetX allocates a new e.X and returns the pointer to it. -func (e *EventStreamWidget) SetX(v int) { - e.X = &v -} - -// GetY returns the Y field if non-nil, zero value otherwise. -func (e *EventStreamWidget) GetY() int { - if e == nil || e.Y == nil { - return 0 - } - return *e.Y -} - -// GetOkY returns a tuple with the Y field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (e *EventStreamWidget) GetYOk() (int, bool) { - if e == nil || e.Y == nil { - return 0, false - } - return *e.Y, true -} - -// HasY returns a boolean if a field has been set. -func (e *EventStreamWidget) HasY() bool { - if e != nil && e.Y != nil { - return true - } - - return false -} - -// SetY allocates a new e.Y and returns the pointer to it. -func (e *EventStreamWidget) SetY(v int) { - e.Y = &v -} - -// GetHeight returns the Height field if non-nil, zero value otherwise. -func (e *EventTimelineWidget) GetHeight() int { - if e == nil || e.Height == nil { - return 0 - } - return *e.Height -} - -// GetOkHeight returns a tuple with the Height field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (e *EventTimelineWidget) GetHeightOk() (int, bool) { - if e == nil || e.Height == nil { - return 0, false - } - return *e.Height, true -} - -// HasHeight returns a boolean if a field has been set. -func (e *EventTimelineWidget) HasHeight() bool { - if e != nil && e.Height != nil { - return true - } - - return false -} - -// SetHeight allocates a new e.Height and returns the pointer to it. -func (e *EventTimelineWidget) SetHeight(v int) { - e.Height = &v -} - -// GetQuery returns the Query field if non-nil, zero value otherwise. -func (e *EventTimelineWidget) GetQuery() string { - if e == nil || e.Query == nil { - return "" - } - return *e.Query -} - -// GetOkQuery returns a tuple with the Query field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (e *EventTimelineWidget) GetQueryOk() (string, bool) { - if e == nil || e.Query == nil { - return "", false - } - return *e.Query, true -} - -// HasQuery returns a boolean if a field has been set. -func (e *EventTimelineWidget) HasQuery() bool { - if e != nil && e.Query != nil { - return true - } - - return false -} - -// SetQuery allocates a new e.Query and returns the pointer to it. -func (e *EventTimelineWidget) SetQuery(v string) { - e.Query = &v -} - -// GetTimeframe returns the Timeframe field if non-nil, zero value otherwise. -func (e *EventTimelineWidget) GetTimeframe() string { - if e == nil || e.Timeframe == nil { - return "" - } - return *e.Timeframe -} - -// GetOkTimeframe returns a tuple with the Timeframe field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (e *EventTimelineWidget) GetTimeframeOk() (string, bool) { - if e == nil || e.Timeframe == nil { - return "", false - } - return *e.Timeframe, true -} - -// HasTimeframe returns a boolean if a field has been set. -func (e *EventTimelineWidget) HasTimeframe() bool { - if e != nil && e.Timeframe != nil { - return true - } - - return false -} - -// SetTimeframe allocates a new e.Timeframe and returns the pointer to it. -func (e *EventTimelineWidget) SetTimeframe(v string) { - e.Timeframe = &v -} - -// GetTitle returns the Title field if non-nil, zero value otherwise. -func (e *EventTimelineWidget) GetTitle() bool { - if e == nil || e.Title == nil { - return false - } - return *e.Title -} - -// GetOkTitle returns a tuple with the Title field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (e *EventTimelineWidget) GetTitleOk() (bool, bool) { - if e == nil || e.Title == nil { - return false, false - } - return *e.Title, true -} - -// HasTitle returns a boolean if a field has been set. -func (e *EventTimelineWidget) HasTitle() bool { - if e != nil && e.Title != nil { - return true - } - - return false -} - -// SetTitle allocates a new e.Title and returns the pointer to it. -func (e *EventTimelineWidget) SetTitle(v bool) { - e.Title = &v -} - -// GetTitleAlign returns the TitleAlign field if non-nil, zero value otherwise. -func (e *EventTimelineWidget) GetTitleAlign() string { - if e == nil || e.TitleAlign == nil { - return "" - } - return *e.TitleAlign -} - -// GetOkTitleAlign returns a tuple with the TitleAlign field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (e *EventTimelineWidget) GetTitleAlignOk() (string, bool) { - if e == nil || e.TitleAlign == nil { - return "", false - } - return *e.TitleAlign, true -} - -// HasTitleAlign returns a boolean if a field has been set. -func (e *EventTimelineWidget) HasTitleAlign() bool { - if e != nil && e.TitleAlign != nil { - return true - } - - return false -} - -// SetTitleAlign allocates a new e.TitleAlign and returns the pointer to it. -func (e *EventTimelineWidget) SetTitleAlign(v string) { - e.TitleAlign = &v -} - -// GetTitleSize returns the TitleSize field if non-nil, zero value otherwise. -func (e *EventTimelineWidget) GetTitleSize() int { - if e == nil || e.TitleSize == nil { - return 0 - } - return *e.TitleSize -} - -// GetOkTitleSize returns a tuple with the TitleSize field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (e *EventTimelineWidget) GetTitleSizeOk() (int, bool) { - if e == nil || e.TitleSize == nil { - return 0, false - } - return *e.TitleSize, true -} - -// HasTitleSize returns a boolean if a field has been set. -func (e *EventTimelineWidget) HasTitleSize() bool { - if e != nil && e.TitleSize != nil { - return true - } - - return false -} - -// SetTitleSize allocates a new e.TitleSize and returns the pointer to it. -func (e *EventTimelineWidget) SetTitleSize(v int) { - e.TitleSize = &v -} - -// GetTitleText returns the TitleText field if non-nil, zero value otherwise. -func (e *EventTimelineWidget) GetTitleText() string { - if e == nil || e.TitleText == nil { - return "" - } - return *e.TitleText -} - -// GetOkTitleText returns a tuple with the TitleText field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (e *EventTimelineWidget) GetTitleTextOk() (string, bool) { - if e == nil || e.TitleText == nil { - return "", false - } - return *e.TitleText, true -} - -// HasTitleText returns a boolean if a field has been set. -func (e *EventTimelineWidget) HasTitleText() bool { - if e != nil && e.TitleText != nil { - return true - } - - return false -} - -// SetTitleText allocates a new e.TitleText and returns the pointer to it. -func (e *EventTimelineWidget) SetTitleText(v string) { - e.TitleText = &v -} - -// GetType returns the Type field if non-nil, zero value otherwise. -func (e *EventTimelineWidget) GetType() string { - if e == nil || e.Type == nil { - return "" - } - return *e.Type -} - -// GetOkType returns a tuple with the Type field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (e *EventTimelineWidget) GetTypeOk() (string, bool) { - if e == nil || e.Type == nil { - return "", false - } - return *e.Type, true -} - -// HasType returns a boolean if a field has been set. -func (e *EventTimelineWidget) HasType() bool { - if e != nil && e.Type != nil { - return true - } - - return false -} - -// SetType allocates a new e.Type and returns the pointer to it. -func (e *EventTimelineWidget) SetType(v string) { - e.Type = &v -} - -// GetWidth returns the Width field if non-nil, zero value otherwise. -func (e *EventTimelineWidget) GetWidth() int { - if e == nil || e.Width == nil { - return 0 - } - return *e.Width -} - -// GetOkWidth returns a tuple with the Width field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (e *EventTimelineWidget) GetWidthOk() (int, bool) { - if e == nil || e.Width == nil { - return 0, false - } - return *e.Width, true -} - -// HasWidth returns a boolean if a field has been set. -func (e *EventTimelineWidget) HasWidth() bool { - if e != nil && e.Width != nil { - return true - } - - return false -} - -// SetWidth allocates a new e.Width and returns the pointer to it. -func (e *EventTimelineWidget) SetWidth(v int) { - e.Width = &v -} - -// GetX returns the X field if non-nil, zero value otherwise. -func (e *EventTimelineWidget) GetX() int { - if e == nil || e.X == nil { - return 0 - } - return *e.X -} - -// GetOkX returns a tuple with the X field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (e *EventTimelineWidget) GetXOk() (int, bool) { - if e == nil || e.X == nil { - return 0, false - } - return *e.X, true -} - -// HasX returns a boolean if a field has been set. -func (e *EventTimelineWidget) HasX() bool { - if e != nil && e.X != nil { - return true - } - - return false -} - -// SetX allocates a new e.X and returns the pointer to it. -func (e *EventTimelineWidget) SetX(v int) { - e.X = &v -} - -// GetY returns the Y field if non-nil, zero value otherwise. -func (e *EventTimelineWidget) GetY() int { - if e == nil || e.Y == nil { - return 0 - } - return *e.Y -} - -// GetOkY returns a tuple with the Y field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (e *EventTimelineWidget) GetYOk() (int, bool) { - if e == nil || e.Y == nil { - return 0, false - } - return *e.Y, true -} - -// HasY returns a boolean if a field has been set. -func (e *EventTimelineWidget) HasY() bool { - if e != nil && e.Y != nil { - return true - } - - return false -} - -// SetY allocates a new e.Y and returns the pointer to it. -func (e *EventTimelineWidget) SetY(v int) { - e.Y = &v -} - -// GetColor returns the Color field if non-nil, zero value otherwise. -func (f *FreeTextWidget) GetColor() string { - if f == nil || f.Color == nil { - return "" - } - return *f.Color -} - -// GetOkColor returns a tuple with the Color field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (f *FreeTextWidget) GetColorOk() (string, bool) { - if f == nil || f.Color == nil { - return "", false - } - return *f.Color, true -} - -// HasColor returns a boolean if a field has been set. -func (f *FreeTextWidget) HasColor() bool { - if f != nil && f.Color != nil { - return true - } - - return false -} - -// SetColor allocates a new f.Color and returns the pointer to it. -func (f *FreeTextWidget) SetColor(v string) { - f.Color = &v -} - -// GetFontSize returns the FontSize field if non-nil, zero value otherwise. -func (f *FreeTextWidget) GetFontSize() string { - if f == nil || f.FontSize == nil { - return "" - } - return *f.FontSize -} - -// GetOkFontSize returns a tuple with the FontSize field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (f *FreeTextWidget) GetFontSizeOk() (string, bool) { - if f == nil || f.FontSize == nil { - return "", false - } - return *f.FontSize, true -} - -// HasFontSize returns a boolean if a field has been set. -func (f *FreeTextWidget) HasFontSize() bool { - if f != nil && f.FontSize != nil { - return true - } - - return false -} - -// SetFontSize allocates a new f.FontSize and returns the pointer to it. -func (f *FreeTextWidget) SetFontSize(v string) { - f.FontSize = &v -} - -// GetHeight returns the Height field if non-nil, zero value otherwise. -func (f *FreeTextWidget) GetHeight() int { - if f == nil || f.Height == nil { - return 0 - } - return *f.Height -} - -// GetOkHeight returns a tuple with the Height field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (f *FreeTextWidget) GetHeightOk() (int, bool) { - if f == nil || f.Height == nil { - return 0, false - } - return *f.Height, true -} - -// HasHeight returns a boolean if a field has been set. -func (f *FreeTextWidget) HasHeight() bool { - if f != nil && f.Height != nil { - return true - } - - return false -} - -// SetHeight allocates a new f.Height and returns the pointer to it. -func (f *FreeTextWidget) SetHeight(v int) { - f.Height = &v -} - -// GetText returns the Text field if non-nil, zero value otherwise. -func (f *FreeTextWidget) GetText() string { - if f == nil || f.Text == nil { - return "" - } - return *f.Text -} - -// GetOkText returns a tuple with the Text field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (f *FreeTextWidget) GetTextOk() (string, bool) { - if f == nil || f.Text == nil { - return "", false - } - return *f.Text, true -} - -// HasText returns a boolean if a field has been set. -func (f *FreeTextWidget) HasText() bool { - if f != nil && f.Text != nil { - return true - } - - return false -} - -// SetText allocates a new f.Text and returns the pointer to it. -func (f *FreeTextWidget) SetText(v string) { - f.Text = &v -} - -// GetTextAlign returns the TextAlign field if non-nil, zero value otherwise. -func (f *FreeTextWidget) GetTextAlign() string { - if f == nil || f.TextAlign == nil { - return "" - } - return *f.TextAlign -} - -// GetOkTextAlign returns a tuple with the TextAlign field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (f *FreeTextWidget) GetTextAlignOk() (string, bool) { - if f == nil || f.TextAlign == nil { - return "", false - } - return *f.TextAlign, true -} - -// HasTextAlign returns a boolean if a field has been set. -func (f *FreeTextWidget) HasTextAlign() bool { - if f != nil && f.TextAlign != nil { - return true - } - - return false -} - -// SetTextAlign allocates a new f.TextAlign and returns the pointer to it. -func (f *FreeTextWidget) SetTextAlign(v string) { - f.TextAlign = &v -} - -// GetType returns the Type field if non-nil, zero value otherwise. -func (f *FreeTextWidget) GetType() string { - if f == nil || f.Type == nil { - return "" - } - return *f.Type -} - -// GetOkType returns a tuple with the Type field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (f *FreeTextWidget) GetTypeOk() (string, bool) { - if f == nil || f.Type == nil { - return "", false - } - return *f.Type, true -} - -// HasType returns a boolean if a field has been set. -func (f *FreeTextWidget) HasType() bool { - if f != nil && f.Type != nil { - return true - } - - return false -} - -// SetType allocates a new f.Type and returns the pointer to it. -func (f *FreeTextWidget) SetType(v string) { - f.Type = &v -} - -// GetWidth returns the Width field if non-nil, zero value otherwise. -func (f *FreeTextWidget) GetWidth() int { - if f == nil || f.Width == nil { - return 0 - } - return *f.Width -} - -// GetOkWidth returns a tuple with the Width field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (f *FreeTextWidget) GetWidthOk() (int, bool) { - if f == nil || f.Width == nil { - return 0, false - } - return *f.Width, true -} - -// HasWidth returns a boolean if a field has been set. -func (f *FreeTextWidget) HasWidth() bool { - if f != nil && f.Width != nil { - return true - } - - return false -} - -// SetWidth allocates a new f.Width and returns the pointer to it. -func (f *FreeTextWidget) SetWidth(v int) { - f.Width = &v -} - -// GetX returns the X field if non-nil, zero value otherwise. -func (f *FreeTextWidget) GetX() int { - if f == nil || f.X == nil { - return 0 - } - return *f.X -} - -// GetOkX returns a tuple with the X field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (f *FreeTextWidget) GetXOk() (int, bool) { - if f == nil || f.X == nil { - return 0, false - } - return *f.X, true -} - -// HasX returns a boolean if a field has been set. -func (f *FreeTextWidget) HasX() bool { - if f != nil && f.X != nil { - return true - } - - return false -} - -// SetX allocates a new f.X and returns the pointer to it. -func (f *FreeTextWidget) SetX(v int) { - f.X = &v -} - -// GetY returns the Y field if non-nil, zero value otherwise. -func (f *FreeTextWidget) GetY() int { - if f == nil || f.Y == nil { - return 0 - } - return *f.Y -} - -// GetOkY returns a tuple with the Y field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (f *FreeTextWidget) GetYOk() (int, bool) { - if f == nil || f.Y == nil { - return 0, false - } - return *f.Y, true -} - -// HasY returns a boolean if a field has been set. -func (f *FreeTextWidget) HasY() bool { - if f != nil && f.Y != nil { - return true - } - - return false -} - -// SetY allocates a new f.Y and returns the pointer to it. -func (f *FreeTextWidget) SetY(v int) { - f.Y = &v -} - // GetDefinition returns the Definition field if non-nil, zero value otherwise. func (g *Graph) GetDefinition() GraphDefinition { if g == nil || g.Definition == nil { @@ -4919,7 +2687,7 @@ func (g *Graph) GetDefinition() GraphDefinition { return *g.Definition } -// GetOkDefinition returns a tuple with the Definition field if it's non-nil, zero value otherwise +// GetDefinitionOk returns a tuple with the Definition field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (g *Graph) GetDefinitionOk() (GraphDefinition, bool) { if g == nil || g.Definition == nil { @@ -4950,7 +2718,7 @@ func (g *Graph) GetTitle() string { return *g.Title } -// GetOkTitle returns a tuple with the Title field if it's non-nil, zero value otherwise +// GetTitleOk returns a tuple with the Title field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (g *Graph) GetTitleOk() (string, bool) { if g == nil || g.Title == nil { @@ -4981,7 +2749,7 @@ func (g *GraphDefinition) GetAutoscale() bool { return *g.Autoscale } -// GetOkAutoscale returns a tuple with the Autoscale field if it's non-nil, zero value otherwise +// GetAutoscaleOk returns a tuple with the Autoscale field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (g *GraphDefinition) GetAutoscaleOk() (bool, bool) { if g == nil || g.Autoscale == nil { @@ -5012,7 +2780,7 @@ func (g *GraphDefinition) GetCustomUnit() string { return *g.CustomUnit } -// GetOkCustomUnit returns a tuple with the CustomUnit field if it's non-nil, zero value otherwise +// GetCustomUnitOk returns a tuple with the CustomUnit field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (g *GraphDefinition) GetCustomUnitOk() (string, bool) { if g == nil || g.CustomUnit == nil { @@ -5043,7 +2811,7 @@ func (g *GraphDefinition) GetIncludeNoMetricHosts() bool { return *g.IncludeNoMetricHosts } -// GetOkIncludeNoMetricHosts returns a tuple with the IncludeNoMetricHosts field if it's non-nil, zero value otherwise +// GetIncludeNoMetricHostsOk returns a tuple with the IncludeNoMetricHosts field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (g *GraphDefinition) GetIncludeNoMetricHostsOk() (bool, bool) { if g == nil || g.IncludeNoMetricHosts == nil { @@ -5074,7 +2842,7 @@ func (g *GraphDefinition) GetIncludeUngroupedHosts() bool { return *g.IncludeUngroupedHosts } -// GetOkIncludeUngroupedHosts returns a tuple with the IncludeUngroupedHosts field if it's non-nil, zero value otherwise +// GetIncludeUngroupedHostsOk returns a tuple with the IncludeUngroupedHosts field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (g *GraphDefinition) GetIncludeUngroupedHostsOk() (bool, bool) { if g == nil || g.IncludeUngroupedHosts == nil { @@ -5097,17 +2865,48 @@ func (g *GraphDefinition) SetIncludeUngroupedHosts(v bool) { g.IncludeUngroupedHosts = &v } +// GetNodeType returns the NodeType field if non-nil, zero value otherwise. +func (g *GraphDefinition) GetNodeType() string { + if g == nil || g.NodeType == nil { + return "" + } + return *g.NodeType +} + +// GetNodeTypeOk returns a tuple with the NodeType field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (g *GraphDefinition) GetNodeTypeOk() (string, bool) { + if g == nil || g.NodeType == nil { + return "", false + } + return *g.NodeType, true +} + +// HasNodeType returns a boolean if a field has been set. +func (g *GraphDefinition) HasNodeType() bool { + if g != nil && g.NodeType != nil { + return true + } + + return false +} + +// SetNodeType allocates a new g.NodeType and returns the pointer to it. +func (g *GraphDefinition) SetNodeType(v string) { + g.NodeType = &v +} + // GetPrecision returns the Precision field if non-nil, zero value otherwise. -func (g *GraphDefinition) GetPrecision() string { +func (g *GraphDefinition) GetPrecision() json.Number { if g == nil || g.Precision == nil { return "" } return *g.Precision } -// GetOkPrecision returns a tuple with the Precision field if it's non-nil, zero value otherwise +// GetPrecisionOk returns a tuple with the Precision field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. -func (g *GraphDefinition) GetPrecisionOk() (string, bool) { +func (g *GraphDefinition) GetPrecisionOk() (json.Number, bool) { if g == nil || g.Precision == nil { return "", false } @@ -5124,7 +2923,7 @@ func (g *GraphDefinition) HasPrecision() bool { } // SetPrecision allocates a new g.Precision and returns the pointer to it. -func (g *GraphDefinition) SetPrecision(v string) { +func (g *GraphDefinition) SetPrecision(v json.Number) { g.Precision = &v } @@ -5136,7 +2935,7 @@ func (g *GraphDefinition) GetStyle() Style { return *g.Style } -// GetOkStyle returns a tuple with the Style field if it's non-nil, zero value otherwise +// GetStyleOk returns a tuple with the Style field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (g *GraphDefinition) GetStyleOk() (Style, bool) { if g == nil || g.Style == nil { @@ -5167,7 +2966,7 @@ func (g *GraphDefinition) GetTextAlign() string { return *g.TextAlign } -// GetOkTextAlign returns a tuple with the TextAlign field if it's non-nil, zero value otherwise +// GetTextAlignOk returns a tuple with the TextAlign field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (g *GraphDefinition) GetTextAlignOk() (string, bool) { if g == nil || g.TextAlign == nil { @@ -5198,7 +2997,7 @@ func (g *GraphDefinition) GetViz() string { return *g.Viz } -// GetOkViz returns a tuple with the Viz field if it's non-nil, zero value otherwise +// GetVizOk returns a tuple with the Viz field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (g *GraphDefinition) GetVizOk() (string, bool) { if g == nil || g.Viz == nil { @@ -5229,7 +3028,7 @@ func (g *GraphDefinitionMarker) GetLabel() string { return *g.Label } -// GetOkLabel returns a tuple with the Label field if it's non-nil, zero value otherwise +// GetLabelOk returns a tuple with the Label field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (g *GraphDefinitionMarker) GetLabelOk() (string, bool) { if g == nil || g.Label == nil { @@ -5260,7 +3059,7 @@ func (g *GraphDefinitionMarker) GetMax() json.Number { return *g.Max } -// GetOkMax returns a tuple with the Max field if it's non-nil, zero value otherwise +// GetMaxOk returns a tuple with the Max field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (g *GraphDefinitionMarker) GetMaxOk() (json.Number, bool) { if g == nil || g.Max == nil { @@ -5291,7 +3090,7 @@ func (g *GraphDefinitionMarker) GetMin() json.Number { return *g.Min } -// GetOkMin returns a tuple with the Min field if it's non-nil, zero value otherwise +// GetMinOk returns a tuple with the Min field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (g *GraphDefinitionMarker) GetMinOk() (json.Number, bool) { if g == nil || g.Min == nil { @@ -5322,7 +3121,7 @@ func (g *GraphDefinitionMarker) GetType() string { return *g.Type } -// GetOkType returns a tuple with the Type field if it's non-nil, zero value otherwise +// GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (g *GraphDefinitionMarker) GetTypeOk() (string, bool) { if g == nil || g.Type == nil { @@ -5353,7 +3152,7 @@ func (g *GraphDefinitionMarker) GetVal() json.Number { return *g.Val } -// GetOkVal returns a tuple with the Val field if it's non-nil, zero value otherwise +// GetValOk returns a tuple with the Val field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (g *GraphDefinitionMarker) GetValOk() (json.Number, bool) { if g == nil || g.Val == nil { @@ -5384,7 +3183,7 @@ func (g *GraphDefinitionMarker) GetValue() string { return *g.Value } -// GetOkValue returns a tuple with the Value field if it's non-nil, zero value otherwise +// GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (g *GraphDefinitionMarker) GetValueOk() (string, bool) { if g == nil || g.Value == nil { @@ -5415,7 +3214,7 @@ func (g *GraphDefinitionRequest) GetAggregator() string { return *g.Aggregator } -// GetOkAggregator returns a tuple with the Aggregator field if it's non-nil, zero value otherwise +// GetAggregatorOk returns a tuple with the Aggregator field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (g *GraphDefinitionRequest) GetAggregatorOk() (string, bool) { if g == nil || g.Aggregator == nil { @@ -5446,7 +3245,7 @@ func (g *GraphDefinitionRequest) GetChangeType() string { return *g.ChangeType } -// GetOkChangeType returns a tuple with the ChangeType field if it's non-nil, zero value otherwise +// GetChangeTypeOk returns a tuple with the ChangeType field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (g *GraphDefinitionRequest) GetChangeTypeOk() (string, bool) { if g == nil || g.ChangeType == nil { @@ -5477,7 +3276,7 @@ func (g *GraphDefinitionRequest) GetCompareTo() string { return *g.CompareTo } -// GetOkCompareTo returns a tuple with the CompareTo field if it's non-nil, zero value otherwise +// GetCompareToOk returns a tuple with the CompareTo field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (g *GraphDefinitionRequest) GetCompareToOk() (string, bool) { if g == nil || g.CompareTo == nil { @@ -5508,7 +3307,7 @@ func (g *GraphDefinitionRequest) GetExtraCol() string { return *g.ExtraCol } -// GetOkExtraCol returns a tuple with the ExtraCol field if it's non-nil, zero value otherwise +// GetExtraColOk returns a tuple with the ExtraCol field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (g *GraphDefinitionRequest) GetExtraColOk() (string, bool) { if g == nil || g.ExtraCol == nil { @@ -5539,7 +3338,7 @@ func (g *GraphDefinitionRequest) GetIncreaseGood() bool { return *g.IncreaseGood } -// GetOkIncreaseGood returns a tuple with the IncreaseGood field if it's non-nil, zero value otherwise +// GetIncreaseGoodOk returns a tuple with the IncreaseGood field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (g *GraphDefinitionRequest) GetIncreaseGoodOk() (bool, bool) { if g == nil || g.IncreaseGood == nil { @@ -5570,7 +3369,7 @@ func (g *GraphDefinitionRequest) GetOrderBy() string { return *g.OrderBy } -// GetOkOrderBy returns a tuple with the OrderBy field if it's non-nil, zero value otherwise +// GetOrderByOk returns a tuple with the OrderBy field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (g *GraphDefinitionRequest) GetOrderByOk() (string, bool) { if g == nil || g.OrderBy == nil { @@ -5601,7 +3400,7 @@ func (g *GraphDefinitionRequest) GetOrderDirection() string { return *g.OrderDirection } -// GetOkOrderDirection returns a tuple with the OrderDirection field if it's non-nil, zero value otherwise +// GetOrderDirectionOk returns a tuple with the OrderDirection field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (g *GraphDefinitionRequest) GetOrderDirectionOk() (string, bool) { if g == nil || g.OrderDirection == nil { @@ -5632,7 +3431,7 @@ func (g *GraphDefinitionRequest) GetQuery() string { return *g.Query } -// GetOkQuery returns a tuple with the Query field if it's non-nil, zero value otherwise +// GetQueryOk returns a tuple with the Query field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (g *GraphDefinitionRequest) GetQueryOk() (string, bool) { if g == nil || g.Query == nil { @@ -5663,7 +3462,7 @@ func (g *GraphDefinitionRequest) GetStacked() bool { return *g.Stacked } -// GetOkStacked returns a tuple with the Stacked field if it's non-nil, zero value otherwise +// GetStackedOk returns a tuple with the Stacked field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (g *GraphDefinitionRequest) GetStackedOk() (bool, bool) { if g == nil || g.Stacked == nil { @@ -5694,7 +3493,7 @@ func (g *GraphDefinitionRequest) GetStyle() GraphDefinitionRequestStyle { return *g.Style } -// GetOkStyle returns a tuple with the Style field if it's non-nil, zero value otherwise +// GetStyleOk returns a tuple with the Style field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (g *GraphDefinitionRequest) GetStyleOk() (GraphDefinitionRequestStyle, bool) { if g == nil || g.Style == nil { @@ -5725,7 +3524,7 @@ func (g *GraphDefinitionRequest) GetType() string { return *g.Type } -// GetOkType returns a tuple with the Type field if it's non-nil, zero value otherwise +// GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (g *GraphDefinitionRequest) GetTypeOk() (string, bool) { if g == nil || g.Type == nil { @@ -5756,7 +3555,7 @@ func (g *GraphDefinitionRequestStyle) GetPalette() string { return *g.Palette } -// GetOkPalette returns a tuple with the Palette field if it's non-nil, zero value otherwise +// GetPaletteOk returns a tuple with the Palette field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (g *GraphDefinitionRequestStyle) GetPaletteOk() (string, bool) { if g == nil || g.Palette == nil { @@ -5787,7 +3586,7 @@ func (g *GraphDefinitionRequestStyle) GetType() string { return *g.Type } -// GetOkType returns a tuple with the Type field if it's non-nil, zero value otherwise +// GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (g *GraphDefinitionRequestStyle) GetTypeOk() (string, bool) { if g == nil || g.Type == nil { @@ -5818,7 +3617,7 @@ func (g *GraphDefinitionRequestStyle) GetWidth() string { return *g.Width } -// GetOkWidth returns a tuple with the Width field if it's non-nil, zero value otherwise +// GetWidthOk returns a tuple with the Width field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (g *GraphDefinitionRequestStyle) GetWidthOk() (string, bool) { if g == nil || g.Width == nil { @@ -5849,7 +3648,7 @@ func (g *GraphEvent) GetQuery() string { return *g.Query } -// GetOkQuery returns a tuple with the Query field if it's non-nil, zero value otherwise +// GetQueryOk returns a tuple with the Query field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (g *GraphEvent) GetQueryOk() (string, bool) { if g == nil || g.Query == nil { @@ -5872,407 +3671,221 @@ func (g *GraphEvent) SetQuery(v string) { g.Query = &v } -// GetHeight returns the Height field if non-nil, zero value otherwise. -func (g *GraphWidget) GetHeight() int { - if g == nil || g.Height == nil { +// GetLastNoDataTs returns the LastNoDataTs field if non-nil, zero value otherwise. +func (g *GroupData) GetLastNoDataTs() int { + if g == nil || g.LastNoDataTs == nil { return 0 } - return *g.Height + return *g.LastNoDataTs } -// GetOkHeight returns a tuple with the Height field if it's non-nil, zero value otherwise +// GetLastNoDataTsOk returns a tuple with the LastNoDataTs field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. -func (g *GraphWidget) GetHeightOk() (int, bool) { - if g == nil || g.Height == nil { +func (g *GroupData) GetLastNoDataTsOk() (int, bool) { + if g == nil || g.LastNoDataTs == nil { return 0, false } - return *g.Height, true + return *g.LastNoDataTs, true } -// HasHeight returns a boolean if a field has been set. -func (g *GraphWidget) HasHeight() bool { - if g != nil && g.Height != nil { +// HasLastNoDataTs returns a boolean if a field has been set. +func (g *GroupData) HasLastNoDataTs() bool { + if g != nil && g.LastNoDataTs != nil { return true } return false } -// SetHeight allocates a new g.Height and returns the pointer to it. -func (g *GraphWidget) SetHeight(v int) { - g.Height = &v +// SetLastNoDataTs allocates a new g.LastNoDataTs and returns the pointer to it. +func (g *GroupData) SetLastNoDataTs(v int) { + g.LastNoDataTs = &v } -// GetLegend returns the Legend field if non-nil, zero value otherwise. -func (g *GraphWidget) GetLegend() bool { - if g == nil || g.Legend == nil { - return false - } - return *g.Legend -} - -// GetOkLegend returns a tuple with the Legend field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (g *GraphWidget) GetLegendOk() (bool, bool) { - if g == nil || g.Legend == nil { - return false, false - } - return *g.Legend, true -} - -// HasLegend returns a boolean if a field has been set. -func (g *GraphWidget) HasLegend() bool { - if g != nil && g.Legend != nil { - return true - } - - return false -} - -// SetLegend allocates a new g.Legend and returns the pointer to it. -func (g *GraphWidget) SetLegend(v bool) { - g.Legend = &v -} - -// GetLegendSize returns the LegendSize field if non-nil, zero value otherwise. -func (g *GraphWidget) GetLegendSize() int { - if g == nil || g.LegendSize == nil { +// GetLastNotifiedTs returns the LastNotifiedTs field if non-nil, zero value otherwise. +func (g *GroupData) GetLastNotifiedTs() int { + if g == nil || g.LastNotifiedTs == nil { return 0 } - return *g.LegendSize + return *g.LastNotifiedTs } -// GetOkLegendSize returns a tuple with the LegendSize field if it's non-nil, zero value otherwise +// GetLastNotifiedTsOk returns a tuple with the LastNotifiedTs field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. -func (g *GraphWidget) GetLegendSizeOk() (int, bool) { - if g == nil || g.LegendSize == nil { +func (g *GroupData) GetLastNotifiedTsOk() (int, bool) { + if g == nil || g.LastNotifiedTs == nil { return 0, false } - return *g.LegendSize, true + return *g.LastNotifiedTs, true } -// HasLegendSize returns a boolean if a field has been set. -func (g *GraphWidget) HasLegendSize() bool { - if g != nil && g.LegendSize != nil { +// HasLastNotifiedTs returns a boolean if a field has been set. +func (g *GroupData) HasLastNotifiedTs() bool { + if g != nil && g.LastNotifiedTs != nil { return true } return false } -// SetLegendSize allocates a new g.LegendSize and returns the pointer to it. -func (g *GraphWidget) SetLegendSize(v int) { - g.LegendSize = &v +// SetLastNotifiedTs allocates a new g.LastNotifiedTs and returns the pointer to it. +func (g *GroupData) SetLastNotifiedTs(v int) { + g.LastNotifiedTs = &v } -// GetTileDef returns the TileDef field if non-nil, zero value otherwise. -func (g *GraphWidget) GetTileDef() TileDef { - if g == nil || g.TileDef == nil { - return TileDef{} +// GetLastResolvedTs returns the LastResolvedTs field if non-nil, zero value otherwise. +func (g *GroupData) GetLastResolvedTs() int { + if g == nil || g.LastResolvedTs == nil { + return 0 } - return *g.TileDef + return *g.LastResolvedTs } -// GetOkTileDef returns a tuple with the TileDef field if it's non-nil, zero value otherwise +// GetLastResolvedTsOk returns a tuple with the LastResolvedTs field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. -func (g *GraphWidget) GetTileDefOk() (TileDef, bool) { - if g == nil || g.TileDef == nil { - return TileDef{}, false +func (g *GroupData) GetLastResolvedTsOk() (int, bool) { + if g == nil || g.LastResolvedTs == nil { + return 0, false } - return *g.TileDef, true + return *g.LastResolvedTs, true } -// HasTileDef returns a boolean if a field has been set. -func (g *GraphWidget) HasTileDef() bool { - if g != nil && g.TileDef != nil { +// HasLastResolvedTs returns a boolean if a field has been set. +func (g *GroupData) HasLastResolvedTs() bool { + if g != nil && g.LastResolvedTs != nil { return true } return false } -// SetTileDef allocates a new g.TileDef and returns the pointer to it. -func (g *GraphWidget) SetTileDef(v TileDef) { - g.TileDef = &v +// SetLastResolvedTs allocates a new g.LastResolvedTs and returns the pointer to it. +func (g *GroupData) SetLastResolvedTs(v int) { + g.LastResolvedTs = &v } -// GetTimeframe returns the Timeframe field if non-nil, zero value otherwise. -func (g *GraphWidget) GetTimeframe() string { - if g == nil || g.Timeframe == nil { +// GetLastTriggeredTs returns the LastTriggeredTs field if non-nil, zero value otherwise. +func (g *GroupData) GetLastTriggeredTs() int { + if g == nil || g.LastTriggeredTs == nil { + return 0 + } + return *g.LastTriggeredTs +} + +// GetLastTriggeredTsOk returns a tuple with the LastTriggeredTs field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (g *GroupData) GetLastTriggeredTsOk() (int, bool) { + if g == nil || g.LastTriggeredTs == nil { + return 0, false + } + return *g.LastTriggeredTs, true +} + +// HasLastTriggeredTs returns a boolean if a field has been set. +func (g *GroupData) HasLastTriggeredTs() bool { + if g != nil && g.LastTriggeredTs != nil { + return true + } + + return false +} + +// SetLastTriggeredTs allocates a new g.LastTriggeredTs and returns the pointer to it. +func (g *GroupData) SetLastTriggeredTs(v int) { + g.LastTriggeredTs = &v +} + +// GetName returns the Name field if non-nil, zero value otherwise. +func (g *GroupData) GetName() string { + if g == nil || g.Name == nil { return "" } - return *g.Timeframe + return *g.Name } -// GetOkTimeframe returns a tuple with the Timeframe field if it's non-nil, zero value otherwise +// GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. -func (g *GraphWidget) GetTimeframeOk() (string, bool) { - if g == nil || g.Timeframe == nil { +func (g *GroupData) GetNameOk() (string, bool) { + if g == nil || g.Name == nil { return "", false } - return *g.Timeframe, true + return *g.Name, true } -// HasTimeframe returns a boolean if a field has been set. -func (g *GraphWidget) HasTimeframe() bool { - if g != nil && g.Timeframe != nil { +// HasName returns a boolean if a field has been set. +func (g *GroupData) HasName() bool { + if g != nil && g.Name != nil { return true } return false } -// SetTimeframe allocates a new g.Timeframe and returns the pointer to it. -func (g *GraphWidget) SetTimeframe(v string) { - g.Timeframe = &v +// SetName allocates a new g.Name and returns the pointer to it. +func (g *GroupData) SetName(v string) { + g.Name = &v } -// GetTitle returns the Title field if non-nil, zero value otherwise. -func (g *GraphWidget) GetTitle() bool { - if g == nil || g.Title == nil { - return false - } - return *g.Title -} - -// GetOkTitle returns a tuple with the Title field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (g *GraphWidget) GetTitleOk() (bool, bool) { - if g == nil || g.Title == nil { - return false, false - } - return *g.Title, true -} - -// HasTitle returns a boolean if a field has been set. -func (g *GraphWidget) HasTitle() bool { - if g != nil && g.Title != nil { - return true - } - - return false -} - -// SetTitle allocates a new g.Title and returns the pointer to it. -func (g *GraphWidget) SetTitle(v bool) { - g.Title = &v -} - -// GetTitleAlign returns the TitleAlign field if non-nil, zero value otherwise. -func (g *GraphWidget) GetTitleAlign() string { - if g == nil || g.TitleAlign == nil { +// GetStatus returns the Status field if non-nil, zero value otherwise. +func (g *GroupData) GetStatus() string { + if g == nil || g.Status == nil { return "" } - return *g.TitleAlign + return *g.Status } -// GetOkTitleAlign returns a tuple with the TitleAlign field if it's non-nil, zero value otherwise +// GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. -func (g *GraphWidget) GetTitleAlignOk() (string, bool) { - if g == nil || g.TitleAlign == nil { +func (g *GroupData) GetStatusOk() (string, bool) { + if g == nil || g.Status == nil { return "", false } - return *g.TitleAlign, true + return *g.Status, true } -// HasTitleAlign returns a boolean if a field has been set. -func (g *GraphWidget) HasTitleAlign() bool { - if g != nil && g.TitleAlign != nil { +// HasStatus returns a boolean if a field has been set. +func (g *GroupData) HasStatus() bool { + if g != nil && g.Status != nil { return true } return false } -// SetTitleAlign allocates a new g.TitleAlign and returns the pointer to it. -func (g *GraphWidget) SetTitleAlign(v string) { - g.TitleAlign = &v +// SetStatus allocates a new g.Status and returns the pointer to it. +func (g *GroupData) SetStatus(v string) { + g.Status = &v } -// GetTitleSize returns the TitleSize field if non-nil, zero value otherwise. -func (g *GraphWidget) GetTitleSize() int { - if g == nil || g.TitleSize == nil { - return 0 +// GetTriggeringValue returns the TriggeringValue field if non-nil, zero value otherwise. +func (g *GroupData) GetTriggeringValue() TriggeringValue { + if g == nil || g.TriggeringValue == nil { + return TriggeringValue{} } - return *g.TitleSize + return *g.TriggeringValue } -// GetOkTitleSize returns a tuple with the TitleSize field if it's non-nil, zero value otherwise +// GetTriggeringValueOk returns a tuple with the TriggeringValue field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. -func (g *GraphWidget) GetTitleSizeOk() (int, bool) { - if g == nil || g.TitleSize == nil { - return 0, false +func (g *GroupData) GetTriggeringValueOk() (TriggeringValue, bool) { + if g == nil || g.TriggeringValue == nil { + return TriggeringValue{}, false } - return *g.TitleSize, true + return *g.TriggeringValue, true } -// HasTitleSize returns a boolean if a field has been set. -func (g *GraphWidget) HasTitleSize() bool { - if g != nil && g.TitleSize != nil { +// HasTriggeringValue returns a boolean if a field has been set. +func (g *GroupData) HasTriggeringValue() bool { + if g != nil && g.TriggeringValue != nil { return true } return false } -// SetTitleSize allocates a new g.TitleSize and returns the pointer to it. -func (g *GraphWidget) SetTitleSize(v int) { - g.TitleSize = &v -} - -// GetTitleText returns the TitleText field if non-nil, zero value otherwise. -func (g *GraphWidget) GetTitleText() string { - if g == nil || g.TitleText == nil { - return "" - } - return *g.TitleText -} - -// GetOkTitleText returns a tuple with the TitleText field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (g *GraphWidget) GetTitleTextOk() (string, bool) { - if g == nil || g.TitleText == nil { - return "", false - } - return *g.TitleText, true -} - -// HasTitleText returns a boolean if a field has been set. -func (g *GraphWidget) HasTitleText() bool { - if g != nil && g.TitleText != nil { - return true - } - - return false -} - -// SetTitleText allocates a new g.TitleText and returns the pointer to it. -func (g *GraphWidget) SetTitleText(v string) { - g.TitleText = &v -} - -// GetType returns the Type field if non-nil, zero value otherwise. -func (g *GraphWidget) GetType() string { - if g == nil || g.Type == nil { - return "" - } - return *g.Type -} - -// GetOkType returns a tuple with the Type field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (g *GraphWidget) GetTypeOk() (string, bool) { - if g == nil || g.Type == nil { - return "", false - } - return *g.Type, true -} - -// HasType returns a boolean if a field has been set. -func (g *GraphWidget) HasType() bool { - if g != nil && g.Type != nil { - return true - } - - return false -} - -// SetType allocates a new g.Type and returns the pointer to it. -func (g *GraphWidget) SetType(v string) { - g.Type = &v -} - -// GetWidth returns the Width field if non-nil, zero value otherwise. -func (g *GraphWidget) GetWidth() int { - if g == nil || g.Width == nil { - return 0 - } - return *g.Width -} - -// GetOkWidth returns a tuple with the Width field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (g *GraphWidget) GetWidthOk() (int, bool) { - if g == nil || g.Width == nil { - return 0, false - } - return *g.Width, true -} - -// HasWidth returns a boolean if a field has been set. -func (g *GraphWidget) HasWidth() bool { - if g != nil && g.Width != nil { - return true - } - - return false -} - -// SetWidth allocates a new g.Width and returns the pointer to it. -func (g *GraphWidget) SetWidth(v int) { - g.Width = &v -} - -// GetX returns the X field if non-nil, zero value otherwise. -func (g *GraphWidget) GetX() int { - if g == nil || g.X == nil { - return 0 - } - return *g.X -} - -// GetOkX returns a tuple with the X field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (g *GraphWidget) GetXOk() (int, bool) { - if g == nil || g.X == nil { - return 0, false - } - return *g.X, true -} - -// HasX returns a boolean if a field has been set. -func (g *GraphWidget) HasX() bool { - if g != nil && g.X != nil { - return true - } - - return false -} - -// SetX allocates a new g.X and returns the pointer to it. -func (g *GraphWidget) SetX(v int) { - g.X = &v -} - -// GetY returns the Y field if non-nil, zero value otherwise. -func (g *GraphWidget) GetY() int { - if g == nil || g.Y == nil { - return 0 - } - return *g.Y -} - -// GetOkY returns a tuple with the Y field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (g *GraphWidget) GetYOk() (int, bool) { - if g == nil || g.Y == nil { - return 0, false - } - return *g.Y, true -} - -// HasY returns a boolean if a field has been set. -func (g *GraphWidget) HasY() bool { - if g != nil && g.Y != nil { - return true - } - - return false -} - -// SetY allocates a new g.Y and returns the pointer to it. -func (g *GraphWidget) SetY(v int) { - g.Y = &v +// SetTriggeringValue allocates a new g.TriggeringValue and returns the pointer to it. +func (g *GroupData) SetTriggeringValue(v TriggeringValue) { + g.TriggeringValue = &v } // GetEndTime returns the EndTime field if non-nil, zero value otherwise. @@ -6283,7 +3896,7 @@ func (h *HostActionMute) GetEndTime() string { return *h.EndTime } -// GetOkEndTime returns a tuple with the EndTime field if it's non-nil, zero value otherwise +// GetEndTimeOk returns a tuple with the EndTime field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (h *HostActionMute) GetEndTimeOk() (string, bool) { if h == nil || h.EndTime == nil { @@ -6314,7 +3927,7 @@ func (h *HostActionMute) GetMessage() string { return *h.Message } -// GetOkMessage returns a tuple with the Message field if it's non-nil, zero value otherwise +// GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (h *HostActionMute) GetMessageOk() (string, bool) { if h == nil || h.Message == nil { @@ -6345,7 +3958,7 @@ func (h *HostActionMute) GetOverride() bool { return *h.Override } -// GetOkOverride returns a tuple with the Override field if it's non-nil, zero value otherwise +// GetOverrideOk returns a tuple with the Override field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (h *HostActionMute) GetOverrideOk() (bool, bool) { if h == nil || h.Override == nil { @@ -6368,1091 +3981,6 @@ func (h *HostActionMute) SetOverride(v bool) { h.Override = &v } -// GetHeight returns the Height field if non-nil, zero value otherwise. -func (h *HostMapWidget) GetHeight() int { - if h == nil || h.Height == nil { - return 0 - } - return *h.Height -} - -// GetOkHeight returns a tuple with the Height field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (h *HostMapWidget) GetHeightOk() (int, bool) { - if h == nil || h.Height == nil { - return 0, false - } - return *h.Height, true -} - -// HasHeight returns a boolean if a field has been set. -func (h *HostMapWidget) HasHeight() bool { - if h != nil && h.Height != nil { - return true - } - - return false -} - -// SetHeight allocates a new h.Height and returns the pointer to it. -func (h *HostMapWidget) SetHeight(v int) { - h.Height = &v -} - -// GetLegend returns the Legend field if non-nil, zero value otherwise. -func (h *HostMapWidget) GetLegend() bool { - if h == nil || h.Legend == nil { - return false - } - return *h.Legend -} - -// GetOkLegend returns a tuple with the Legend field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (h *HostMapWidget) GetLegendOk() (bool, bool) { - if h == nil || h.Legend == nil { - return false, false - } - return *h.Legend, true -} - -// HasLegend returns a boolean if a field has been set. -func (h *HostMapWidget) HasLegend() bool { - if h != nil && h.Legend != nil { - return true - } - - return false -} - -// SetLegend allocates a new h.Legend and returns the pointer to it. -func (h *HostMapWidget) SetLegend(v bool) { - h.Legend = &v -} - -// GetLegendSize returns the LegendSize field if non-nil, zero value otherwise. -func (h *HostMapWidget) GetLegendSize() int { - if h == nil || h.LegendSize == nil { - return 0 - } - return *h.LegendSize -} - -// GetOkLegendSize returns a tuple with the LegendSize field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (h *HostMapWidget) GetLegendSizeOk() (int, bool) { - if h == nil || h.LegendSize == nil { - return 0, false - } - return *h.LegendSize, true -} - -// HasLegendSize returns a boolean if a field has been set. -func (h *HostMapWidget) HasLegendSize() bool { - if h != nil && h.LegendSize != nil { - return true - } - - return false -} - -// SetLegendSize allocates a new h.LegendSize and returns the pointer to it. -func (h *HostMapWidget) SetLegendSize(v int) { - h.LegendSize = &v -} - -// GetQuery returns the Query field if non-nil, zero value otherwise. -func (h *HostMapWidget) GetQuery() string { - if h == nil || h.Query == nil { - return "" - } - return *h.Query -} - -// GetOkQuery returns a tuple with the Query field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (h *HostMapWidget) GetQueryOk() (string, bool) { - if h == nil || h.Query == nil { - return "", false - } - return *h.Query, true -} - -// HasQuery returns a boolean if a field has been set. -func (h *HostMapWidget) HasQuery() bool { - if h != nil && h.Query != nil { - return true - } - - return false -} - -// SetQuery allocates a new h.Query and returns the pointer to it. -func (h *HostMapWidget) SetQuery(v string) { - h.Query = &v -} - -// GetTileDef returns the TileDef field if non-nil, zero value otherwise. -func (h *HostMapWidget) GetTileDef() TileDef { - if h == nil || h.TileDef == nil { - return TileDef{} - } - return *h.TileDef -} - -// GetOkTileDef returns a tuple with the TileDef field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (h *HostMapWidget) GetTileDefOk() (TileDef, bool) { - if h == nil || h.TileDef == nil { - return TileDef{}, false - } - return *h.TileDef, true -} - -// HasTileDef returns a boolean if a field has been set. -func (h *HostMapWidget) HasTileDef() bool { - if h != nil && h.TileDef != nil { - return true - } - - return false -} - -// SetTileDef allocates a new h.TileDef and returns the pointer to it. -func (h *HostMapWidget) SetTileDef(v TileDef) { - h.TileDef = &v -} - -// GetTimeframe returns the Timeframe field if non-nil, zero value otherwise. -func (h *HostMapWidget) GetTimeframe() string { - if h == nil || h.Timeframe == nil { - return "" - } - return *h.Timeframe -} - -// GetOkTimeframe returns a tuple with the Timeframe field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (h *HostMapWidget) GetTimeframeOk() (string, bool) { - if h == nil || h.Timeframe == nil { - return "", false - } - return *h.Timeframe, true -} - -// HasTimeframe returns a boolean if a field has been set. -func (h *HostMapWidget) HasTimeframe() bool { - if h != nil && h.Timeframe != nil { - return true - } - - return false -} - -// SetTimeframe allocates a new h.Timeframe and returns the pointer to it. -func (h *HostMapWidget) SetTimeframe(v string) { - h.Timeframe = &v -} - -// GetTitle returns the Title field if non-nil, zero value otherwise. -func (h *HostMapWidget) GetTitle() bool { - if h == nil || h.Title == nil { - return false - } - return *h.Title -} - -// GetOkTitle returns a tuple with the Title field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (h *HostMapWidget) GetTitleOk() (bool, bool) { - if h == nil || h.Title == nil { - return false, false - } - return *h.Title, true -} - -// HasTitle returns a boolean if a field has been set. -func (h *HostMapWidget) HasTitle() bool { - if h != nil && h.Title != nil { - return true - } - - return false -} - -// SetTitle allocates a new h.Title and returns the pointer to it. -func (h *HostMapWidget) SetTitle(v bool) { - h.Title = &v -} - -// GetTitleAlign returns the TitleAlign field if non-nil, zero value otherwise. -func (h *HostMapWidget) GetTitleAlign() string { - if h == nil || h.TitleAlign == nil { - return "" - } - return *h.TitleAlign -} - -// GetOkTitleAlign returns a tuple with the TitleAlign field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (h *HostMapWidget) GetTitleAlignOk() (string, bool) { - if h == nil || h.TitleAlign == nil { - return "", false - } - return *h.TitleAlign, true -} - -// HasTitleAlign returns a boolean if a field has been set. -func (h *HostMapWidget) HasTitleAlign() bool { - if h != nil && h.TitleAlign != nil { - return true - } - - return false -} - -// SetTitleAlign allocates a new h.TitleAlign and returns the pointer to it. -func (h *HostMapWidget) SetTitleAlign(v string) { - h.TitleAlign = &v -} - -// GetTitleSize returns the TitleSize field if non-nil, zero value otherwise. -func (h *HostMapWidget) GetTitleSize() int { - if h == nil || h.TitleSize == nil { - return 0 - } - return *h.TitleSize -} - -// GetOkTitleSize returns a tuple with the TitleSize field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (h *HostMapWidget) GetTitleSizeOk() (int, bool) { - if h == nil || h.TitleSize == nil { - return 0, false - } - return *h.TitleSize, true -} - -// HasTitleSize returns a boolean if a field has been set. -func (h *HostMapWidget) HasTitleSize() bool { - if h != nil && h.TitleSize != nil { - return true - } - - return false -} - -// SetTitleSize allocates a new h.TitleSize and returns the pointer to it. -func (h *HostMapWidget) SetTitleSize(v int) { - h.TitleSize = &v -} - -// GetTitleText returns the TitleText field if non-nil, zero value otherwise. -func (h *HostMapWidget) GetTitleText() string { - if h == nil || h.TitleText == nil { - return "" - } - return *h.TitleText -} - -// GetOkTitleText returns a tuple with the TitleText field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (h *HostMapWidget) GetTitleTextOk() (string, bool) { - if h == nil || h.TitleText == nil { - return "", false - } - return *h.TitleText, true -} - -// HasTitleText returns a boolean if a field has been set. -func (h *HostMapWidget) HasTitleText() bool { - if h != nil && h.TitleText != nil { - return true - } - - return false -} - -// SetTitleText allocates a new h.TitleText and returns the pointer to it. -func (h *HostMapWidget) SetTitleText(v string) { - h.TitleText = &v -} - -// GetType returns the Type field if non-nil, zero value otherwise. -func (h *HostMapWidget) GetType() string { - if h == nil || h.Type == nil { - return "" - } - return *h.Type -} - -// GetOkType returns a tuple with the Type field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (h *HostMapWidget) GetTypeOk() (string, bool) { - if h == nil || h.Type == nil { - return "", false - } - return *h.Type, true -} - -// HasType returns a boolean if a field has been set. -func (h *HostMapWidget) HasType() bool { - if h != nil && h.Type != nil { - return true - } - - return false -} - -// SetType allocates a new h.Type and returns the pointer to it. -func (h *HostMapWidget) SetType(v string) { - h.Type = &v -} - -// GetWidth returns the Width field if non-nil, zero value otherwise. -func (h *HostMapWidget) GetWidth() int { - if h == nil || h.Width == nil { - return 0 - } - return *h.Width -} - -// GetOkWidth returns a tuple with the Width field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (h *HostMapWidget) GetWidthOk() (int, bool) { - if h == nil || h.Width == nil { - return 0, false - } - return *h.Width, true -} - -// HasWidth returns a boolean if a field has been set. -func (h *HostMapWidget) HasWidth() bool { - if h != nil && h.Width != nil { - return true - } - - return false -} - -// SetWidth allocates a new h.Width and returns the pointer to it. -func (h *HostMapWidget) SetWidth(v int) { - h.Width = &v -} - -// GetX returns the X field if non-nil, zero value otherwise. -func (h *HostMapWidget) GetX() int { - if h == nil || h.X == nil { - return 0 - } - return *h.X -} - -// GetOkX returns a tuple with the X field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (h *HostMapWidget) GetXOk() (int, bool) { - if h == nil || h.X == nil { - return 0, false - } - return *h.X, true -} - -// HasX returns a boolean if a field has been set. -func (h *HostMapWidget) HasX() bool { - if h != nil && h.X != nil { - return true - } - - return false -} - -// SetX allocates a new h.X and returns the pointer to it. -func (h *HostMapWidget) SetX(v int) { - h.X = &v -} - -// GetY returns the Y field if non-nil, zero value otherwise. -func (h *HostMapWidget) GetY() int { - if h == nil || h.Y == nil { - return 0 - } - return *h.Y -} - -// GetOkY returns a tuple with the Y field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (h *HostMapWidget) GetYOk() (int, bool) { - if h == nil || h.Y == nil { - return 0, false - } - return *h.Y, true -} - -// HasY returns a boolean if a field has been set. -func (h *HostMapWidget) HasY() bool { - if h != nil && h.Y != nil { - return true - } - - return false -} - -// SetY allocates a new h.Y and returns the pointer to it. -func (h *HostMapWidget) SetY(v int) { - h.Y = &v -} - -// GetHeight returns the Height field if non-nil, zero value otherwise. -func (i *IFrameWidget) GetHeight() int { - if i == nil || i.Height == nil { - return 0 - } - return *i.Height -} - -// GetOkHeight returns a tuple with the Height field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (i *IFrameWidget) GetHeightOk() (int, bool) { - if i == nil || i.Height == nil { - return 0, false - } - return *i.Height, true -} - -// HasHeight returns a boolean if a field has been set. -func (i *IFrameWidget) HasHeight() bool { - if i != nil && i.Height != nil { - return true - } - - return false -} - -// SetHeight allocates a new i.Height and returns the pointer to it. -func (i *IFrameWidget) SetHeight(v int) { - i.Height = &v -} - -// GetTitle returns the Title field if non-nil, zero value otherwise. -func (i *IFrameWidget) GetTitle() bool { - if i == nil || i.Title == nil { - return false - } - return *i.Title -} - -// GetOkTitle returns a tuple with the Title field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (i *IFrameWidget) GetTitleOk() (bool, bool) { - if i == nil || i.Title == nil { - return false, false - } - return *i.Title, true -} - -// HasTitle returns a boolean if a field has been set. -func (i *IFrameWidget) HasTitle() bool { - if i != nil && i.Title != nil { - return true - } - - return false -} - -// SetTitle allocates a new i.Title and returns the pointer to it. -func (i *IFrameWidget) SetTitle(v bool) { - i.Title = &v -} - -// GetTitleAlign returns the TitleAlign field if non-nil, zero value otherwise. -func (i *IFrameWidget) GetTitleAlign() string { - if i == nil || i.TitleAlign == nil { - return "" - } - return *i.TitleAlign -} - -// GetOkTitleAlign returns a tuple with the TitleAlign field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (i *IFrameWidget) GetTitleAlignOk() (string, bool) { - if i == nil || i.TitleAlign == nil { - return "", false - } - return *i.TitleAlign, true -} - -// HasTitleAlign returns a boolean if a field has been set. -func (i *IFrameWidget) HasTitleAlign() bool { - if i != nil && i.TitleAlign != nil { - return true - } - - return false -} - -// SetTitleAlign allocates a new i.TitleAlign and returns the pointer to it. -func (i *IFrameWidget) SetTitleAlign(v string) { - i.TitleAlign = &v -} - -// GetTitleSize returns the TitleSize field if non-nil, zero value otherwise. -func (i *IFrameWidget) GetTitleSize() int { - if i == nil || i.TitleSize == nil { - return 0 - } - return *i.TitleSize -} - -// GetOkTitleSize returns a tuple with the TitleSize field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (i *IFrameWidget) GetTitleSizeOk() (int, bool) { - if i == nil || i.TitleSize == nil { - return 0, false - } - return *i.TitleSize, true -} - -// HasTitleSize returns a boolean if a field has been set. -func (i *IFrameWidget) HasTitleSize() bool { - if i != nil && i.TitleSize != nil { - return true - } - - return false -} - -// SetTitleSize allocates a new i.TitleSize and returns the pointer to it. -func (i *IFrameWidget) SetTitleSize(v int) { - i.TitleSize = &v -} - -// GetTitleText returns the TitleText field if non-nil, zero value otherwise. -func (i *IFrameWidget) GetTitleText() string { - if i == nil || i.TitleText == nil { - return "" - } - return *i.TitleText -} - -// GetOkTitleText returns a tuple with the TitleText field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (i *IFrameWidget) GetTitleTextOk() (string, bool) { - if i == nil || i.TitleText == nil { - return "", false - } - return *i.TitleText, true -} - -// HasTitleText returns a boolean if a field has been set. -func (i *IFrameWidget) HasTitleText() bool { - if i != nil && i.TitleText != nil { - return true - } - - return false -} - -// SetTitleText allocates a new i.TitleText and returns the pointer to it. -func (i *IFrameWidget) SetTitleText(v string) { - i.TitleText = &v -} - -// GetType returns the Type field if non-nil, zero value otherwise. -func (i *IFrameWidget) GetType() string { - if i == nil || i.Type == nil { - return "" - } - return *i.Type -} - -// GetOkType returns a tuple with the Type field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (i *IFrameWidget) GetTypeOk() (string, bool) { - if i == nil || i.Type == nil { - return "", false - } - return *i.Type, true -} - -// HasType returns a boolean if a field has been set. -func (i *IFrameWidget) HasType() bool { - if i != nil && i.Type != nil { - return true - } - - return false -} - -// SetType allocates a new i.Type and returns the pointer to it. -func (i *IFrameWidget) SetType(v string) { - i.Type = &v -} - -// GetUrl returns the Url field if non-nil, zero value otherwise. -func (i *IFrameWidget) GetUrl() string { - if i == nil || i.Url == nil { - return "" - } - return *i.Url -} - -// GetOkUrl returns a tuple with the Url field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (i *IFrameWidget) GetUrlOk() (string, bool) { - if i == nil || i.Url == nil { - return "", false - } - return *i.Url, true -} - -// HasUrl returns a boolean if a field has been set. -func (i *IFrameWidget) HasUrl() bool { - if i != nil && i.Url != nil { - return true - } - - return false -} - -// SetUrl allocates a new i.Url and returns the pointer to it. -func (i *IFrameWidget) SetUrl(v string) { - i.Url = &v -} - -// GetWidth returns the Width field if non-nil, zero value otherwise. -func (i *IFrameWidget) GetWidth() int { - if i == nil || i.Width == nil { - return 0 - } - return *i.Width -} - -// GetOkWidth returns a tuple with the Width field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (i *IFrameWidget) GetWidthOk() (int, bool) { - if i == nil || i.Width == nil { - return 0, false - } - return *i.Width, true -} - -// HasWidth returns a boolean if a field has been set. -func (i *IFrameWidget) HasWidth() bool { - if i != nil && i.Width != nil { - return true - } - - return false -} - -// SetWidth allocates a new i.Width and returns the pointer to it. -func (i *IFrameWidget) SetWidth(v int) { - i.Width = &v -} - -// GetX returns the X field if non-nil, zero value otherwise. -func (i *IFrameWidget) GetX() int { - if i == nil || i.X == nil { - return 0 - } - return *i.X -} - -// GetOkX returns a tuple with the X field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (i *IFrameWidget) GetXOk() (int, bool) { - if i == nil || i.X == nil { - return 0, false - } - return *i.X, true -} - -// HasX returns a boolean if a field has been set. -func (i *IFrameWidget) HasX() bool { - if i != nil && i.X != nil { - return true - } - - return false -} - -// SetX allocates a new i.X and returns the pointer to it. -func (i *IFrameWidget) SetX(v int) { - i.X = &v -} - -// GetY returns the Y field if non-nil, zero value otherwise. -func (i *IFrameWidget) GetY() int { - if i == nil || i.Y == nil { - return 0 - } - return *i.Y -} - -// GetOkY returns a tuple with the Y field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (i *IFrameWidget) GetYOk() (int, bool) { - if i == nil || i.Y == nil { - return 0, false - } - return *i.Y, true -} - -// HasY returns a boolean if a field has been set. -func (i *IFrameWidget) HasY() bool { - if i != nil && i.Y != nil { - return true - } - - return false -} - -// SetY allocates a new i.Y and returns the pointer to it. -func (i *IFrameWidget) SetY(v int) { - i.Y = &v -} - -// GetHeight returns the Height field if non-nil, zero value otherwise. -func (i *ImageWidget) GetHeight() int { - if i == nil || i.Height == nil { - return 0 - } - return *i.Height -} - -// GetOkHeight returns a tuple with the Height field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (i *ImageWidget) GetHeightOk() (int, bool) { - if i == nil || i.Height == nil { - return 0, false - } - return *i.Height, true -} - -// HasHeight returns a boolean if a field has been set. -func (i *ImageWidget) HasHeight() bool { - if i != nil && i.Height != nil { - return true - } - - return false -} - -// SetHeight allocates a new i.Height and returns the pointer to it. -func (i *ImageWidget) SetHeight(v int) { - i.Height = &v -} - -// GetSizing returns the Sizing field if non-nil, zero value otherwise. -func (i *ImageWidget) GetSizing() string { - if i == nil || i.Sizing == nil { - return "" - } - return *i.Sizing -} - -// GetOkSizing returns a tuple with the Sizing field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (i *ImageWidget) GetSizingOk() (string, bool) { - if i == nil || i.Sizing == nil { - return "", false - } - return *i.Sizing, true -} - -// HasSizing returns a boolean if a field has been set. -func (i *ImageWidget) HasSizing() bool { - if i != nil && i.Sizing != nil { - return true - } - - return false -} - -// SetSizing allocates a new i.Sizing and returns the pointer to it. -func (i *ImageWidget) SetSizing(v string) { - i.Sizing = &v -} - -// GetTitle returns the Title field if non-nil, zero value otherwise. -func (i *ImageWidget) GetTitle() bool { - if i == nil || i.Title == nil { - return false - } - return *i.Title -} - -// GetOkTitle returns a tuple with the Title field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (i *ImageWidget) GetTitleOk() (bool, bool) { - if i == nil || i.Title == nil { - return false, false - } - return *i.Title, true -} - -// HasTitle returns a boolean if a field has been set. -func (i *ImageWidget) HasTitle() bool { - if i != nil && i.Title != nil { - return true - } - - return false -} - -// SetTitle allocates a new i.Title and returns the pointer to it. -func (i *ImageWidget) SetTitle(v bool) { - i.Title = &v -} - -// GetTitleAlign returns the TitleAlign field if non-nil, zero value otherwise. -func (i *ImageWidget) GetTitleAlign() string { - if i == nil || i.TitleAlign == nil { - return "" - } - return *i.TitleAlign -} - -// GetOkTitleAlign returns a tuple with the TitleAlign field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (i *ImageWidget) GetTitleAlignOk() (string, bool) { - if i == nil || i.TitleAlign == nil { - return "", false - } - return *i.TitleAlign, true -} - -// HasTitleAlign returns a boolean if a field has been set. -func (i *ImageWidget) HasTitleAlign() bool { - if i != nil && i.TitleAlign != nil { - return true - } - - return false -} - -// SetTitleAlign allocates a new i.TitleAlign and returns the pointer to it. -func (i *ImageWidget) SetTitleAlign(v string) { - i.TitleAlign = &v -} - -// GetTitleSize returns the TitleSize field if non-nil, zero value otherwise. -func (i *ImageWidget) GetTitleSize() TextSize { - if i == nil || i.TitleSize == nil { - return TextSize{} - } - return *i.TitleSize -} - -// GetOkTitleSize returns a tuple with the TitleSize field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (i *ImageWidget) GetTitleSizeOk() (TextSize, bool) { - if i == nil || i.TitleSize == nil { - return TextSize{}, false - } - return *i.TitleSize, true -} - -// HasTitleSize returns a boolean if a field has been set. -func (i *ImageWidget) HasTitleSize() bool { - if i != nil && i.TitleSize != nil { - return true - } - - return false -} - -// SetTitleSize allocates a new i.TitleSize and returns the pointer to it. -func (i *ImageWidget) SetTitleSize(v TextSize) { - i.TitleSize = &v -} - -// GetTitleText returns the TitleText field if non-nil, zero value otherwise. -func (i *ImageWidget) GetTitleText() string { - if i == nil || i.TitleText == nil { - return "" - } - return *i.TitleText -} - -// GetOkTitleText returns a tuple with the TitleText field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (i *ImageWidget) GetTitleTextOk() (string, bool) { - if i == nil || i.TitleText == nil { - return "", false - } - return *i.TitleText, true -} - -// HasTitleText returns a boolean if a field has been set. -func (i *ImageWidget) HasTitleText() bool { - if i != nil && i.TitleText != nil { - return true - } - - return false -} - -// SetTitleText allocates a new i.TitleText and returns the pointer to it. -func (i *ImageWidget) SetTitleText(v string) { - i.TitleText = &v -} - -// GetType returns the Type field if non-nil, zero value otherwise. -func (i *ImageWidget) GetType() string { - if i == nil || i.Type == nil { - return "" - } - return *i.Type -} - -// GetOkType returns a tuple with the Type field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (i *ImageWidget) GetTypeOk() (string, bool) { - if i == nil || i.Type == nil { - return "", false - } - return *i.Type, true -} - -// HasType returns a boolean if a field has been set. -func (i *ImageWidget) HasType() bool { - if i != nil && i.Type != nil { - return true - } - - return false -} - -// SetType allocates a new i.Type and returns the pointer to it. -func (i *ImageWidget) SetType(v string) { - i.Type = &v -} - -// GetUrl returns the Url field if non-nil, zero value otherwise. -func (i *ImageWidget) GetUrl() string { - if i == nil || i.Url == nil { - return "" - } - return *i.Url -} - -// GetOkUrl returns a tuple with the Url field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (i *ImageWidget) GetUrlOk() (string, bool) { - if i == nil || i.Url == nil { - return "", false - } - return *i.Url, true -} - -// HasUrl returns a boolean if a field has been set. -func (i *ImageWidget) HasUrl() bool { - if i != nil && i.Url != nil { - return true - } - - return false -} - -// SetUrl allocates a new i.Url and returns the pointer to it. -func (i *ImageWidget) SetUrl(v string) { - i.Url = &v -} - -// GetWidth returns the Width field if non-nil, zero value otherwise. -func (i *ImageWidget) GetWidth() int { - if i == nil || i.Width == nil { - return 0 - } - return *i.Width -} - -// GetOkWidth returns a tuple with the Width field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (i *ImageWidget) GetWidthOk() (int, bool) { - if i == nil || i.Width == nil { - return 0, false - } - return *i.Width, true -} - -// HasWidth returns a boolean if a field has been set. -func (i *ImageWidget) HasWidth() bool { - if i != nil && i.Width != nil { - return true - } - - return false -} - -// SetWidth allocates a new i.Width and returns the pointer to it. -func (i *ImageWidget) SetWidth(v int) { - i.Width = &v -} - -// GetX returns the X field if non-nil, zero value otherwise. -func (i *ImageWidget) GetX() int { - if i == nil || i.X == nil { - return 0 - } - return *i.X -} - -// GetOkX returns a tuple with the X field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (i *ImageWidget) GetXOk() (int, bool) { - if i == nil || i.X == nil { - return 0, false - } - return *i.X, true -} - -// HasX returns a boolean if a field has been set. -func (i *ImageWidget) HasX() bool { - if i != nil && i.X != nil { - return true - } - - return false -} - -// SetX allocates a new i.X and returns the pointer to it. -func (i *ImageWidget) SetX(v int) { - i.X = &v -} - -// GetY returns the Y field if non-nil, zero value otherwise. -func (i *ImageWidget) GetY() int { - if i == nil || i.Y == nil { - return 0 - } - return *i.Y -} - -// GetOkY returns a tuple with the Y field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (i *ImageWidget) GetYOk() (int, bool) { - if i == nil || i.Y == nil { - return 0, false - } - return *i.Y, true -} - -// HasY returns a boolean if a field has been set. -func (i *ImageWidget) HasY() bool { - if i != nil && i.Y != nil { - return true - } - - return false -} - -// SetY allocates a new i.Y and returns the pointer to it. -func (i *ImageWidget) SetY(v int) { - i.Y = &v -} - // GetAccountID returns the AccountID field if non-nil, zero value otherwise. func (i *IntegrationAWSAccount) GetAccountID() string { if i == nil || i.AccountID == nil { @@ -7461,7 +3989,7 @@ func (i *IntegrationAWSAccount) GetAccountID() string { return *i.AccountID } -// GetOkAccountID returns a tuple with the AccountID field if it's non-nil, zero value otherwise +// GetAccountIDOk returns a tuple with the AccountID field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (i *IntegrationAWSAccount) GetAccountIDOk() (string, bool) { if i == nil || i.AccountID == nil { @@ -7492,7 +4020,7 @@ func (i *IntegrationAWSAccount) GetRoleName() string { return *i.RoleName } -// GetOkRoleName returns a tuple with the RoleName field if it's non-nil, zero value otherwise +// GetRoleNameOk returns a tuple with the RoleName field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (i *IntegrationAWSAccount) GetRoleNameOk() (string, bool) { if i == nil || i.RoleName == nil { @@ -7523,7 +4051,7 @@ func (i *IntegrationAWSAccountDeleteRequest) GetAccountID() string { return *i.AccountID } -// GetOkAccountID returns a tuple with the AccountID field if it's non-nil, zero value otherwise +// GetAccountIDOk returns a tuple with the AccountID field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (i *IntegrationAWSAccountDeleteRequest) GetAccountIDOk() (string, bool) { if i == nil || i.AccountID == nil { @@ -7554,7 +4082,7 @@ func (i *IntegrationAWSAccountDeleteRequest) GetRoleName() string { return *i.RoleName } -// GetOkRoleName returns a tuple with the RoleName field if it's non-nil, zero value otherwise +// GetRoleNameOk returns a tuple with the RoleName field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (i *IntegrationAWSAccountDeleteRequest) GetRoleNameOk() (string, bool) { if i == nil || i.RoleName == nil { @@ -7577,6 +4105,595 @@ func (i *IntegrationAWSAccountDeleteRequest) SetRoleName(v string) { i.RoleName = &v } +// GetClientEmail returns the ClientEmail field if non-nil, zero value otherwise. +func (i *IntegrationGCP) GetClientEmail() string { + if i == nil || i.ClientEmail == nil { + return "" + } + return *i.ClientEmail +} + +// GetClientEmailOk returns a tuple with the ClientEmail field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (i *IntegrationGCP) GetClientEmailOk() (string, bool) { + if i == nil || i.ClientEmail == nil { + return "", false + } + return *i.ClientEmail, true +} + +// HasClientEmail returns a boolean if a field has been set. +func (i *IntegrationGCP) HasClientEmail() bool { + if i != nil && i.ClientEmail != nil { + return true + } + + return false +} + +// SetClientEmail allocates a new i.ClientEmail and returns the pointer to it. +func (i *IntegrationGCP) SetClientEmail(v string) { + i.ClientEmail = &v +} + +// GetHostFilters returns the HostFilters field if non-nil, zero value otherwise. +func (i *IntegrationGCP) GetHostFilters() string { + if i == nil || i.HostFilters == nil { + return "" + } + return *i.HostFilters +} + +// GetHostFiltersOk returns a tuple with the HostFilters field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (i *IntegrationGCP) GetHostFiltersOk() (string, bool) { + if i == nil || i.HostFilters == nil { + return "", false + } + return *i.HostFilters, true +} + +// HasHostFilters returns a boolean if a field has been set. +func (i *IntegrationGCP) HasHostFilters() bool { + if i != nil && i.HostFilters != nil { + return true + } + + return false +} + +// SetHostFilters allocates a new i.HostFilters and returns the pointer to it. +func (i *IntegrationGCP) SetHostFilters(v string) { + i.HostFilters = &v +} + +// GetProjectID returns the ProjectID field if non-nil, zero value otherwise. +func (i *IntegrationGCP) GetProjectID() string { + if i == nil || i.ProjectID == nil { + return "" + } + return *i.ProjectID +} + +// GetProjectIDOk returns a tuple with the ProjectID field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (i *IntegrationGCP) GetProjectIDOk() (string, bool) { + if i == nil || i.ProjectID == nil { + return "", false + } + return *i.ProjectID, true +} + +// HasProjectID returns a boolean if a field has been set. +func (i *IntegrationGCP) HasProjectID() bool { + if i != nil && i.ProjectID != nil { + return true + } + + return false +} + +// SetProjectID allocates a new i.ProjectID and returns the pointer to it. +func (i *IntegrationGCP) SetProjectID(v string) { + i.ProjectID = &v +} + +// GetAuthProviderX509CertURL returns the AuthProviderX509CertURL field if non-nil, zero value otherwise. +func (i *IntegrationGCPCreateRequest) GetAuthProviderX509CertURL() string { + if i == nil || i.AuthProviderX509CertURL == nil { + return "" + } + return *i.AuthProviderX509CertURL +} + +// GetAuthProviderX509CertURLOk returns a tuple with the AuthProviderX509CertURL field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (i *IntegrationGCPCreateRequest) GetAuthProviderX509CertURLOk() (string, bool) { + if i == nil || i.AuthProviderX509CertURL == nil { + return "", false + } + return *i.AuthProviderX509CertURL, true +} + +// HasAuthProviderX509CertURL returns a boolean if a field has been set. +func (i *IntegrationGCPCreateRequest) HasAuthProviderX509CertURL() bool { + if i != nil && i.AuthProviderX509CertURL != nil { + return true + } + + return false +} + +// SetAuthProviderX509CertURL allocates a new i.AuthProviderX509CertURL and returns the pointer to it. +func (i *IntegrationGCPCreateRequest) SetAuthProviderX509CertURL(v string) { + i.AuthProviderX509CertURL = &v +} + +// GetAuthURI returns the AuthURI field if non-nil, zero value otherwise. +func (i *IntegrationGCPCreateRequest) GetAuthURI() string { + if i == nil || i.AuthURI == nil { + return "" + } + return *i.AuthURI +} + +// GetAuthURIOk returns a tuple with the AuthURI field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (i *IntegrationGCPCreateRequest) GetAuthURIOk() (string, bool) { + if i == nil || i.AuthURI == nil { + return "", false + } + return *i.AuthURI, true +} + +// HasAuthURI returns a boolean if a field has been set. +func (i *IntegrationGCPCreateRequest) HasAuthURI() bool { + if i != nil && i.AuthURI != nil { + return true + } + + return false +} + +// SetAuthURI allocates a new i.AuthURI and returns the pointer to it. +func (i *IntegrationGCPCreateRequest) SetAuthURI(v string) { + i.AuthURI = &v +} + +// GetClientEmail returns the ClientEmail field if non-nil, zero value otherwise. +func (i *IntegrationGCPCreateRequest) GetClientEmail() string { + if i == nil || i.ClientEmail == nil { + return "" + } + return *i.ClientEmail +} + +// GetClientEmailOk returns a tuple with the ClientEmail field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (i *IntegrationGCPCreateRequest) GetClientEmailOk() (string, bool) { + if i == nil || i.ClientEmail == nil { + return "", false + } + return *i.ClientEmail, true +} + +// HasClientEmail returns a boolean if a field has been set. +func (i *IntegrationGCPCreateRequest) HasClientEmail() bool { + if i != nil && i.ClientEmail != nil { + return true + } + + return false +} + +// SetClientEmail allocates a new i.ClientEmail and returns the pointer to it. +func (i *IntegrationGCPCreateRequest) SetClientEmail(v string) { + i.ClientEmail = &v +} + +// GetClientID returns the ClientID field if non-nil, zero value otherwise. +func (i *IntegrationGCPCreateRequest) GetClientID() string { + if i == nil || i.ClientID == nil { + return "" + } + return *i.ClientID +} + +// GetClientIDOk returns a tuple with the ClientID field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (i *IntegrationGCPCreateRequest) GetClientIDOk() (string, bool) { + if i == nil || i.ClientID == nil { + return "", false + } + return *i.ClientID, true +} + +// HasClientID returns a boolean if a field has been set. +func (i *IntegrationGCPCreateRequest) HasClientID() bool { + if i != nil && i.ClientID != nil { + return true + } + + return false +} + +// SetClientID allocates a new i.ClientID and returns the pointer to it. +func (i *IntegrationGCPCreateRequest) SetClientID(v string) { + i.ClientID = &v +} + +// GetClientX509CertURL returns the ClientX509CertURL field if non-nil, zero value otherwise. +func (i *IntegrationGCPCreateRequest) GetClientX509CertURL() string { + if i == nil || i.ClientX509CertURL == nil { + return "" + } + return *i.ClientX509CertURL +} + +// GetClientX509CertURLOk returns a tuple with the ClientX509CertURL field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (i *IntegrationGCPCreateRequest) GetClientX509CertURLOk() (string, bool) { + if i == nil || i.ClientX509CertURL == nil { + return "", false + } + return *i.ClientX509CertURL, true +} + +// HasClientX509CertURL returns a boolean if a field has been set. +func (i *IntegrationGCPCreateRequest) HasClientX509CertURL() bool { + if i != nil && i.ClientX509CertURL != nil { + return true + } + + return false +} + +// SetClientX509CertURL allocates a new i.ClientX509CertURL and returns the pointer to it. +func (i *IntegrationGCPCreateRequest) SetClientX509CertURL(v string) { + i.ClientX509CertURL = &v +} + +// GetHostFilters returns the HostFilters field if non-nil, zero value otherwise. +func (i *IntegrationGCPCreateRequest) GetHostFilters() string { + if i == nil || i.HostFilters == nil { + return "" + } + return *i.HostFilters +} + +// GetHostFiltersOk returns a tuple with the HostFilters field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (i *IntegrationGCPCreateRequest) GetHostFiltersOk() (string, bool) { + if i == nil || i.HostFilters == nil { + return "", false + } + return *i.HostFilters, true +} + +// HasHostFilters returns a boolean if a field has been set. +func (i *IntegrationGCPCreateRequest) HasHostFilters() bool { + if i != nil && i.HostFilters != nil { + return true + } + + return false +} + +// SetHostFilters allocates a new i.HostFilters and returns the pointer to it. +func (i *IntegrationGCPCreateRequest) SetHostFilters(v string) { + i.HostFilters = &v +} + +// GetPrivateKey returns the PrivateKey field if non-nil, zero value otherwise. +func (i *IntegrationGCPCreateRequest) GetPrivateKey() string { + if i == nil || i.PrivateKey == nil { + return "" + } + return *i.PrivateKey +} + +// GetPrivateKeyOk returns a tuple with the PrivateKey field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (i *IntegrationGCPCreateRequest) GetPrivateKeyOk() (string, bool) { + if i == nil || i.PrivateKey == nil { + return "", false + } + return *i.PrivateKey, true +} + +// HasPrivateKey returns a boolean if a field has been set. +func (i *IntegrationGCPCreateRequest) HasPrivateKey() bool { + if i != nil && i.PrivateKey != nil { + return true + } + + return false +} + +// SetPrivateKey allocates a new i.PrivateKey and returns the pointer to it. +func (i *IntegrationGCPCreateRequest) SetPrivateKey(v string) { + i.PrivateKey = &v +} + +// GetPrivateKeyID returns the PrivateKeyID field if non-nil, zero value otherwise. +func (i *IntegrationGCPCreateRequest) GetPrivateKeyID() string { + if i == nil || i.PrivateKeyID == nil { + return "" + } + return *i.PrivateKeyID +} + +// GetPrivateKeyIDOk returns a tuple with the PrivateKeyID field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (i *IntegrationGCPCreateRequest) GetPrivateKeyIDOk() (string, bool) { + if i == nil || i.PrivateKeyID == nil { + return "", false + } + return *i.PrivateKeyID, true +} + +// HasPrivateKeyID returns a boolean if a field has been set. +func (i *IntegrationGCPCreateRequest) HasPrivateKeyID() bool { + if i != nil && i.PrivateKeyID != nil { + return true + } + + return false +} + +// SetPrivateKeyID allocates a new i.PrivateKeyID and returns the pointer to it. +func (i *IntegrationGCPCreateRequest) SetPrivateKeyID(v string) { + i.PrivateKeyID = &v +} + +// GetProjectID returns the ProjectID field if non-nil, zero value otherwise. +func (i *IntegrationGCPCreateRequest) GetProjectID() string { + if i == nil || i.ProjectID == nil { + return "" + } + return *i.ProjectID +} + +// GetProjectIDOk returns a tuple with the ProjectID field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (i *IntegrationGCPCreateRequest) GetProjectIDOk() (string, bool) { + if i == nil || i.ProjectID == nil { + return "", false + } + return *i.ProjectID, true +} + +// HasProjectID returns a boolean if a field has been set. +func (i *IntegrationGCPCreateRequest) HasProjectID() bool { + if i != nil && i.ProjectID != nil { + return true + } + + return false +} + +// SetProjectID allocates a new i.ProjectID and returns the pointer to it. +func (i *IntegrationGCPCreateRequest) SetProjectID(v string) { + i.ProjectID = &v +} + +// GetTokenURI returns the TokenURI field if non-nil, zero value otherwise. +func (i *IntegrationGCPCreateRequest) GetTokenURI() string { + if i == nil || i.TokenURI == nil { + return "" + } + return *i.TokenURI +} + +// GetTokenURIOk returns a tuple with the TokenURI field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (i *IntegrationGCPCreateRequest) GetTokenURIOk() (string, bool) { + if i == nil || i.TokenURI == nil { + return "", false + } + return *i.TokenURI, true +} + +// HasTokenURI returns a boolean if a field has been set. +func (i *IntegrationGCPCreateRequest) HasTokenURI() bool { + if i != nil && i.TokenURI != nil { + return true + } + + return false +} + +// SetTokenURI allocates a new i.TokenURI and returns the pointer to it. +func (i *IntegrationGCPCreateRequest) SetTokenURI(v string) { + i.TokenURI = &v +} + +// GetType returns the Type field if non-nil, zero value otherwise. +func (i *IntegrationGCPCreateRequest) GetType() string { + if i == nil || i.Type == nil { + return "" + } + return *i.Type +} + +// GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (i *IntegrationGCPCreateRequest) GetTypeOk() (string, bool) { + if i == nil || i.Type == nil { + return "", false + } + return *i.Type, true +} + +// HasType returns a boolean if a field has been set. +func (i *IntegrationGCPCreateRequest) HasType() bool { + if i != nil && i.Type != nil { + return true + } + + return false +} + +// SetType allocates a new i.Type and returns the pointer to it. +func (i *IntegrationGCPCreateRequest) SetType(v string) { + i.Type = &v +} + +// GetClientEmail returns the ClientEmail field if non-nil, zero value otherwise. +func (i *IntegrationGCPDeleteRequest) GetClientEmail() string { + if i == nil || i.ClientEmail == nil { + return "" + } + return *i.ClientEmail +} + +// GetClientEmailOk returns a tuple with the ClientEmail field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (i *IntegrationGCPDeleteRequest) GetClientEmailOk() (string, bool) { + if i == nil || i.ClientEmail == nil { + return "", false + } + return *i.ClientEmail, true +} + +// HasClientEmail returns a boolean if a field has been set. +func (i *IntegrationGCPDeleteRequest) HasClientEmail() bool { + if i != nil && i.ClientEmail != nil { + return true + } + + return false +} + +// SetClientEmail allocates a new i.ClientEmail and returns the pointer to it. +func (i *IntegrationGCPDeleteRequest) SetClientEmail(v string) { + i.ClientEmail = &v +} + +// GetProjectID returns the ProjectID field if non-nil, zero value otherwise. +func (i *IntegrationGCPDeleteRequest) GetProjectID() string { + if i == nil || i.ProjectID == nil { + return "" + } + return *i.ProjectID +} + +// GetProjectIDOk returns a tuple with the ProjectID field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (i *IntegrationGCPDeleteRequest) GetProjectIDOk() (string, bool) { + if i == nil || i.ProjectID == nil { + return "", false + } + return *i.ProjectID, true +} + +// HasProjectID returns a boolean if a field has been set. +func (i *IntegrationGCPDeleteRequest) HasProjectID() bool { + if i != nil && i.ProjectID != nil { + return true + } + + return false +} + +// SetProjectID allocates a new i.ProjectID and returns the pointer to it. +func (i *IntegrationGCPDeleteRequest) SetProjectID(v string) { + i.ProjectID = &v +} + +// GetClientEmail returns the ClientEmail field if non-nil, zero value otherwise. +func (i *IntegrationGCPUpdateRequest) GetClientEmail() string { + if i == nil || i.ClientEmail == nil { + return "" + } + return *i.ClientEmail +} + +// GetClientEmailOk returns a tuple with the ClientEmail field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (i *IntegrationGCPUpdateRequest) GetClientEmailOk() (string, bool) { + if i == nil || i.ClientEmail == nil { + return "", false + } + return *i.ClientEmail, true +} + +// HasClientEmail returns a boolean if a field has been set. +func (i *IntegrationGCPUpdateRequest) HasClientEmail() bool { + if i != nil && i.ClientEmail != nil { + return true + } + + return false +} + +// SetClientEmail allocates a new i.ClientEmail and returns the pointer to it. +func (i *IntegrationGCPUpdateRequest) SetClientEmail(v string) { + i.ClientEmail = &v +} + +// GetHostFilters returns the HostFilters field if non-nil, zero value otherwise. +func (i *IntegrationGCPUpdateRequest) GetHostFilters() string { + if i == nil || i.HostFilters == nil { + return "" + } + return *i.HostFilters +} + +// GetHostFiltersOk returns a tuple with the HostFilters field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (i *IntegrationGCPUpdateRequest) GetHostFiltersOk() (string, bool) { + if i == nil || i.HostFilters == nil { + return "", false + } + return *i.HostFilters, true +} + +// HasHostFilters returns a boolean if a field has been set. +func (i *IntegrationGCPUpdateRequest) HasHostFilters() bool { + if i != nil && i.HostFilters != nil { + return true + } + + return false +} + +// SetHostFilters allocates a new i.HostFilters and returns the pointer to it. +func (i *IntegrationGCPUpdateRequest) SetHostFilters(v string) { + i.HostFilters = &v +} + +// GetProjectID returns the ProjectID field if non-nil, zero value otherwise. +func (i *IntegrationGCPUpdateRequest) GetProjectID() string { + if i == nil || i.ProjectID == nil { + return "" + } + return *i.ProjectID +} + +// GetProjectIDOk returns a tuple with the ProjectID field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (i *IntegrationGCPUpdateRequest) GetProjectIDOk() (string, bool) { + if i == nil || i.ProjectID == nil { + return "", false + } + return *i.ProjectID, true +} + +// HasProjectID returns a boolean if a field has been set. +func (i *IntegrationGCPUpdateRequest) HasProjectID() bool { + if i != nil && i.ProjectID != nil { + return true + } + + return false +} + +// SetProjectID allocates a new i.ProjectID and returns the pointer to it. +func (i *IntegrationGCPUpdateRequest) SetProjectID(v string) { + i.ProjectID = &v +} + // GetAPIToken returns the APIToken field if non-nil, zero value otherwise. func (i *integrationPD) GetAPIToken() string { if i == nil || i.APIToken == nil { @@ -7585,7 +4702,7 @@ func (i *integrationPD) GetAPIToken() string { return *i.APIToken } -// GetOkAPIToken returns a tuple with the APIToken field if it's non-nil, zero value otherwise +// GetAPITokenOk returns a tuple with the APIToken field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (i *integrationPD) GetAPITokenOk() (string, bool) { if i == nil || i.APIToken == nil { @@ -7616,7 +4733,7 @@ func (i *integrationPD) GetSubdomain() string { return *i.Subdomain } -// GetOkSubdomain returns a tuple with the Subdomain field if it's non-nil, zero value otherwise +// GetSubdomainOk returns a tuple with the Subdomain field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (i *integrationPD) GetSubdomainOk() (string, bool) { if i == nil || i.Subdomain == nil { @@ -7647,7 +4764,7 @@ func (i *IntegrationPDRequest) GetAPIToken() string { return *i.APIToken } -// GetOkAPIToken returns a tuple with the APIToken field if it's non-nil, zero value otherwise +// GetAPITokenOk returns a tuple with the APIToken field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (i *IntegrationPDRequest) GetAPITokenOk() (string, bool) { if i == nil || i.APIToken == nil { @@ -7678,7 +4795,7 @@ func (i *IntegrationPDRequest) GetRunCheck() bool { return *i.RunCheck } -// GetOkRunCheck returns a tuple with the RunCheck field if it's non-nil, zero value otherwise +// GetRunCheckOk returns a tuple with the RunCheck field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (i *IntegrationPDRequest) GetRunCheckOk() (bool, bool) { if i == nil || i.RunCheck == nil { @@ -7709,7 +4826,7 @@ func (i *IntegrationPDRequest) GetSubdomain() string { return *i.Subdomain } -// GetOkSubdomain returns a tuple with the Subdomain field if it's non-nil, zero value otherwise +// GetSubdomainOk returns a tuple with the Subdomain field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (i *IntegrationPDRequest) GetSubdomainOk() (string, bool) { if i == nil || i.Subdomain == nil { @@ -7740,7 +4857,7 @@ func (i *IntegrationSlackRequest) GetRunCheck() bool { return *i.RunCheck } -// GetOkRunCheck returns a tuple with the RunCheck field if it's non-nil, zero value otherwise +// GetRunCheckOk returns a tuple with the RunCheck field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (i *IntegrationSlackRequest) GetRunCheckOk() (bool, bool) { if i == nil || i.RunCheck == nil { @@ -7771,7 +4888,7 @@ func (m *Metric) GetHost() string { return *m.Host } -// GetOkHost returns a tuple with the Host field if it's non-nil, zero value otherwise +// GetHostOk returns a tuple with the Host field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (m *Metric) GetHostOk() (string, bool) { if m == nil || m.Host == nil { @@ -7802,7 +4919,7 @@ func (m *Metric) GetMetric() string { return *m.Metric } -// GetOkMetric returns a tuple with the Metric field if it's non-nil, zero value otherwise +// GetMetricOk returns a tuple with the Metric field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (m *Metric) GetMetricOk() (string, bool) { if m == nil || m.Metric == nil { @@ -7833,7 +4950,7 @@ func (m *Metric) GetType() string { return *m.Type } -// GetOkType returns a tuple with the Type field if it's non-nil, zero value otherwise +// GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (m *Metric) GetTypeOk() (string, bool) { if m == nil || m.Type == nil { @@ -7864,7 +4981,7 @@ func (m *Metric) GetUnit() string { return *m.Unit } -// GetOkUnit returns a tuple with the Unit field if it's non-nil, zero value otherwise +// GetUnitOk returns a tuple with the Unit field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (m *Metric) GetUnitOk() (string, bool) { if m == nil || m.Unit == nil { @@ -7895,7 +5012,7 @@ func (m *MetricMetadata) GetDescription() string { return *m.Description } -// GetOkDescription returns a tuple with the Description field if it's non-nil, zero value otherwise +// GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (m *MetricMetadata) GetDescriptionOk() (string, bool) { if m == nil || m.Description == nil { @@ -7926,7 +5043,7 @@ func (m *MetricMetadata) GetPerUnit() string { return *m.PerUnit } -// GetOkPerUnit returns a tuple with the PerUnit field if it's non-nil, zero value otherwise +// GetPerUnitOk returns a tuple with the PerUnit field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (m *MetricMetadata) GetPerUnitOk() (string, bool) { if m == nil || m.PerUnit == nil { @@ -7957,7 +5074,7 @@ func (m *MetricMetadata) GetShortName() string { return *m.ShortName } -// GetOkShortName returns a tuple with the ShortName field if it's non-nil, zero value otherwise +// GetShortNameOk returns a tuple with the ShortName field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (m *MetricMetadata) GetShortNameOk() (string, bool) { if m == nil || m.ShortName == nil { @@ -7988,7 +5105,7 @@ func (m *MetricMetadata) GetStatsdInterval() int { return *m.StatsdInterval } -// GetOkStatsdInterval returns a tuple with the StatsdInterval field if it's non-nil, zero value otherwise +// GetStatsdIntervalOk returns a tuple with the StatsdInterval field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (m *MetricMetadata) GetStatsdIntervalOk() (int, bool) { if m == nil || m.StatsdInterval == nil { @@ -8019,7 +5136,7 @@ func (m *MetricMetadata) GetType() string { return *m.Type } -// GetOkType returns a tuple with the Type field if it's non-nil, zero value otherwise +// GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (m *MetricMetadata) GetTypeOk() (string, bool) { if m == nil || m.Type == nil { @@ -8050,7 +5167,7 @@ func (m *MetricMetadata) GetUnit() string { return *m.Unit } -// GetOkUnit returns a tuple with the Unit field if it's non-nil, zero value otherwise +// GetUnitOk returns a tuple with the Unit field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (m *MetricMetadata) GetUnitOk() (string, bool) { if m == nil || m.Unit == nil { @@ -8081,7 +5198,7 @@ func (m *Monitor) GetCreator() Creator { return *m.Creator } -// GetOkCreator returns a tuple with the Creator field if it's non-nil, zero value otherwise +// GetCreatorOk returns a tuple with the Creator field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (m *Monitor) GetCreatorOk() (Creator, bool) { if m == nil || m.Creator == nil { @@ -8112,7 +5229,7 @@ func (m *Monitor) GetId() int { return *m.Id } -// GetOkId returns a tuple with the Id field if it's non-nil, zero value otherwise +// GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (m *Monitor) GetIdOk() (int, bool) { if m == nil || m.Id == nil { @@ -8143,7 +5260,7 @@ func (m *Monitor) GetMessage() string { return *m.Message } -// GetOkMessage returns a tuple with the Message field if it's non-nil, zero value otherwise +// GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (m *Monitor) GetMessageOk() (string, bool) { if m == nil || m.Message == nil { @@ -8174,7 +5291,7 @@ func (m *Monitor) GetName() string { return *m.Name } -// GetOkName returns a tuple with the Name field if it's non-nil, zero value otherwise +// GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (m *Monitor) GetNameOk() (string, bool) { if m == nil || m.Name == nil { @@ -8205,7 +5322,7 @@ func (m *Monitor) GetOptions() Options { return *m.Options } -// GetOkOptions returns a tuple with the Options field if it's non-nil, zero value otherwise +// GetOptionsOk returns a tuple with the Options field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (m *Monitor) GetOptionsOk() (Options, bool) { if m == nil || m.Options == nil { @@ -8236,7 +5353,7 @@ func (m *Monitor) GetOverallState() string { return *m.OverallState } -// GetOkOverallState returns a tuple with the OverallState field if it's non-nil, zero value otherwise +// GetOverallStateOk returns a tuple with the OverallState field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (m *Monitor) GetOverallStateOk() (string, bool) { if m == nil || m.OverallState == nil { @@ -8259,6 +5376,37 @@ func (m *Monitor) SetOverallState(v string) { m.OverallState = &v } +// GetOverallStateModified returns the OverallStateModified field if non-nil, zero value otherwise. +func (m *Monitor) GetOverallStateModified() string { + if m == nil || m.OverallStateModified == nil { + return "" + } + return *m.OverallStateModified +} + +// GetOverallStateModifiedOk returns a tuple with the OverallStateModified field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (m *Monitor) GetOverallStateModifiedOk() (string, bool) { + if m == nil || m.OverallStateModified == nil { + return "", false + } + return *m.OverallStateModified, true +} + +// HasOverallStateModified returns a boolean if a field has been set. +func (m *Monitor) HasOverallStateModified() bool { + if m != nil && m.OverallStateModified != nil { + return true + } + + return false +} + +// SetOverallStateModified allocates a new m.OverallStateModified and returns the pointer to it. +func (m *Monitor) SetOverallStateModified(v string) { + m.OverallStateModified = &v +} + // GetQuery returns the Query field if non-nil, zero value otherwise. func (m *Monitor) GetQuery() string { if m == nil || m.Query == nil { @@ -8267,7 +5415,7 @@ func (m *Monitor) GetQuery() string { return *m.Query } -// GetOkQuery returns a tuple with the Query field if it's non-nil, zero value otherwise +// GetQueryOk returns a tuple with the Query field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (m *Monitor) GetQueryOk() (string, bool) { if m == nil || m.Query == nil { @@ -8298,7 +5446,7 @@ func (m *Monitor) GetType() string { return *m.Type } -// GetOkType returns a tuple with the Type field if it's non-nil, zero value otherwise +// GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (m *Monitor) GetTypeOk() (string, bool) { if m == nil || m.Type == nil { @@ -8321,564 +5469,6 @@ func (m *Monitor) SetType(v string) { m.Type = &v } -// GetAutoRefresh returns the AutoRefresh field if non-nil, zero value otherwise. -func (n *NoteWidget) GetAutoRefresh() bool { - if n == nil || n.AutoRefresh == nil { - return false - } - return *n.AutoRefresh -} - -// GetOkAutoRefresh returns a tuple with the AutoRefresh field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (n *NoteWidget) GetAutoRefreshOk() (bool, bool) { - if n == nil || n.AutoRefresh == nil { - return false, false - } - return *n.AutoRefresh, true -} - -// HasAutoRefresh returns a boolean if a field has been set. -func (n *NoteWidget) HasAutoRefresh() bool { - if n != nil && n.AutoRefresh != nil { - return true - } - - return false -} - -// SetAutoRefresh allocates a new n.AutoRefresh and returns the pointer to it. -func (n *NoteWidget) SetAutoRefresh(v bool) { - n.AutoRefresh = &v -} - -// GetColor returns the Color field if non-nil, zero value otherwise. -func (n *NoteWidget) GetColor() string { - if n == nil || n.Color == nil { - return "" - } - return *n.Color -} - -// GetOkColor returns a tuple with the Color field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (n *NoteWidget) GetColorOk() (string, bool) { - if n == nil || n.Color == nil { - return "", false - } - return *n.Color, true -} - -// HasColor returns a boolean if a field has been set. -func (n *NoteWidget) HasColor() bool { - if n != nil && n.Color != nil { - return true - } - - return false -} - -// SetColor allocates a new n.Color and returns the pointer to it. -func (n *NoteWidget) SetColor(v string) { - n.Color = &v -} - -// GetFontSize returns the FontSize field if non-nil, zero value otherwise. -func (n *NoteWidget) GetFontSize() int { - if n == nil || n.FontSize == nil { - return 0 - } - return *n.FontSize -} - -// GetOkFontSize returns a tuple with the FontSize field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (n *NoteWidget) GetFontSizeOk() (int, bool) { - if n == nil || n.FontSize == nil { - return 0, false - } - return *n.FontSize, true -} - -// HasFontSize returns a boolean if a field has been set. -func (n *NoteWidget) HasFontSize() bool { - if n != nil && n.FontSize != nil { - return true - } - - return false -} - -// SetFontSize allocates a new n.FontSize and returns the pointer to it. -func (n *NoteWidget) SetFontSize(v int) { - n.FontSize = &v -} - -// GetHeight returns the Height field if non-nil, zero value otherwise. -func (n *NoteWidget) GetHeight() int { - if n == nil || n.Height == nil { - return 0 - } - return *n.Height -} - -// GetOkHeight returns a tuple with the Height field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (n *NoteWidget) GetHeightOk() (int, bool) { - if n == nil || n.Height == nil { - return 0, false - } - return *n.Height, true -} - -// HasHeight returns a boolean if a field has been set. -func (n *NoteWidget) HasHeight() bool { - if n != nil && n.Height != nil { - return true - } - - return false -} - -// SetHeight allocates a new n.Height and returns the pointer to it. -func (n *NoteWidget) SetHeight(v int) { - n.Height = &v -} - -// GetHtml returns the Html field if non-nil, zero value otherwise. -func (n *NoteWidget) GetHtml() string { - if n == nil || n.Html == nil { - return "" - } - return *n.Html -} - -// GetOkHtml returns a tuple with the Html field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (n *NoteWidget) GetHtmlOk() (string, bool) { - if n == nil || n.Html == nil { - return "", false - } - return *n.Html, true -} - -// HasHtml returns a boolean if a field has been set. -func (n *NoteWidget) HasHtml() bool { - if n != nil && n.Html != nil { - return true - } - - return false -} - -// SetHtml allocates a new n.Html and returns the pointer to it. -func (n *NoteWidget) SetHtml(v string) { - n.Html = &v -} - -// GetNote returns the Note field if non-nil, zero value otherwise. -func (n *NoteWidget) GetNote() string { - if n == nil || n.Note == nil { - return "" - } - return *n.Note -} - -// GetOkNote returns a tuple with the Note field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (n *NoteWidget) GetNoteOk() (string, bool) { - if n == nil || n.Note == nil { - return "", false - } - return *n.Note, true -} - -// HasNote returns a boolean if a field has been set. -func (n *NoteWidget) HasNote() bool { - if n != nil && n.Note != nil { - return true - } - - return false -} - -// SetNote allocates a new n.Note and returns the pointer to it. -func (n *NoteWidget) SetNote(v string) { - n.Note = &v -} - -// GetRefreshEvery returns the RefreshEvery field if non-nil, zero value otherwise. -func (n *NoteWidget) GetRefreshEvery() int { - if n == nil || n.RefreshEvery == nil { - return 0 - } - return *n.RefreshEvery -} - -// GetOkRefreshEvery returns a tuple with the RefreshEvery field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (n *NoteWidget) GetRefreshEveryOk() (int, bool) { - if n == nil || n.RefreshEvery == nil { - return 0, false - } - return *n.RefreshEvery, true -} - -// HasRefreshEvery returns a boolean if a field has been set. -func (n *NoteWidget) HasRefreshEvery() bool { - if n != nil && n.RefreshEvery != nil { - return true - } - - return false -} - -// SetRefreshEvery allocates a new n.RefreshEvery and returns the pointer to it. -func (n *NoteWidget) SetRefreshEvery(v int) { - n.RefreshEvery = &v -} - -// GetTextAlign returns the TextAlign field if non-nil, zero value otherwise. -func (n *NoteWidget) GetTextAlign() string { - if n == nil || n.TextAlign == nil { - return "" - } - return *n.TextAlign -} - -// GetOkTextAlign returns a tuple with the TextAlign field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (n *NoteWidget) GetTextAlignOk() (string, bool) { - if n == nil || n.TextAlign == nil { - return "", false - } - return *n.TextAlign, true -} - -// HasTextAlign returns a boolean if a field has been set. -func (n *NoteWidget) HasTextAlign() bool { - if n != nil && n.TextAlign != nil { - return true - } - - return false -} - -// SetTextAlign allocates a new n.TextAlign and returns the pointer to it. -func (n *NoteWidget) SetTextAlign(v string) { - n.TextAlign = &v -} - -// GetTick returns the Tick field if non-nil, zero value otherwise. -func (n *NoteWidget) GetTick() bool { - if n == nil || n.Tick == nil { - return false - } - return *n.Tick -} - -// GetOkTick returns a tuple with the Tick field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (n *NoteWidget) GetTickOk() (bool, bool) { - if n == nil || n.Tick == nil { - return false, false - } - return *n.Tick, true -} - -// HasTick returns a boolean if a field has been set. -func (n *NoteWidget) HasTick() bool { - if n != nil && n.Tick != nil { - return true - } - - return false -} - -// SetTick allocates a new n.Tick and returns the pointer to it. -func (n *NoteWidget) SetTick(v bool) { - n.Tick = &v -} - -// GetTickEdge returns the TickEdge field if non-nil, zero value otherwise. -func (n *NoteWidget) GetTickEdge() string { - if n == nil || n.TickEdge == nil { - return "" - } - return *n.TickEdge -} - -// GetOkTickEdge returns a tuple with the TickEdge field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (n *NoteWidget) GetTickEdgeOk() (string, bool) { - if n == nil || n.TickEdge == nil { - return "", false - } - return *n.TickEdge, true -} - -// HasTickEdge returns a boolean if a field has been set. -func (n *NoteWidget) HasTickEdge() bool { - if n != nil && n.TickEdge != nil { - return true - } - - return false -} - -// SetTickEdge allocates a new n.TickEdge and returns the pointer to it. -func (n *NoteWidget) SetTickEdge(v string) { - n.TickEdge = &v -} - -// GetTickPos returns the TickPos field if non-nil, zero value otherwise. -func (n *NoteWidget) GetTickPos() string { - if n == nil || n.TickPos == nil { - return "" - } - return *n.TickPos -} - -// GetOkTickPos returns a tuple with the TickPos field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (n *NoteWidget) GetTickPosOk() (string, bool) { - if n == nil || n.TickPos == nil { - return "", false - } - return *n.TickPos, true -} - -// HasTickPos returns a boolean if a field has been set. -func (n *NoteWidget) HasTickPos() bool { - if n != nil && n.TickPos != nil { - return true - } - - return false -} - -// SetTickPos allocates a new n.TickPos and returns the pointer to it. -func (n *NoteWidget) SetTickPos(v string) { - n.TickPos = &v -} - -// GetTitle returns the Title field if non-nil, zero value otherwise. -func (n *NoteWidget) GetTitle() bool { - if n == nil || n.Title == nil { - return false - } - return *n.Title -} - -// GetOkTitle returns a tuple with the Title field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (n *NoteWidget) GetTitleOk() (bool, bool) { - if n == nil || n.Title == nil { - return false, false - } - return *n.Title, true -} - -// HasTitle returns a boolean if a field has been set. -func (n *NoteWidget) HasTitle() bool { - if n != nil && n.Title != nil { - return true - } - - return false -} - -// SetTitle allocates a new n.Title and returns the pointer to it. -func (n *NoteWidget) SetTitle(v bool) { - n.Title = &v -} - -// GetTitleAlign returns the TitleAlign field if non-nil, zero value otherwise. -func (n *NoteWidget) GetTitleAlign() string { - if n == nil || n.TitleAlign == nil { - return "" - } - return *n.TitleAlign -} - -// GetOkTitleAlign returns a tuple with the TitleAlign field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (n *NoteWidget) GetTitleAlignOk() (string, bool) { - if n == nil || n.TitleAlign == nil { - return "", false - } - return *n.TitleAlign, true -} - -// HasTitleAlign returns a boolean if a field has been set. -func (n *NoteWidget) HasTitleAlign() bool { - if n != nil && n.TitleAlign != nil { - return true - } - - return false -} - -// SetTitleAlign allocates a new n.TitleAlign and returns the pointer to it. -func (n *NoteWidget) SetTitleAlign(v string) { - n.TitleAlign = &v -} - -// GetTitleSize returns the TitleSize field if non-nil, zero value otherwise. -func (n *NoteWidget) GetTitleSize() int { - if n == nil || n.TitleSize == nil { - return 0 - } - return *n.TitleSize -} - -// GetOkTitleSize returns a tuple with the TitleSize field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (n *NoteWidget) GetTitleSizeOk() (int, bool) { - if n == nil || n.TitleSize == nil { - return 0, false - } - return *n.TitleSize, true -} - -// HasTitleSize returns a boolean if a field has been set. -func (n *NoteWidget) HasTitleSize() bool { - if n != nil && n.TitleSize != nil { - return true - } - - return false -} - -// SetTitleSize allocates a new n.TitleSize and returns the pointer to it. -func (n *NoteWidget) SetTitleSize(v int) { - n.TitleSize = &v -} - -// GetTitleText returns the TitleText field if non-nil, zero value otherwise. -func (n *NoteWidget) GetTitleText() string { - if n == nil || n.TitleText == nil { - return "" - } - return *n.TitleText -} - -// GetOkTitleText returns a tuple with the TitleText field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (n *NoteWidget) GetTitleTextOk() (string, bool) { - if n == nil || n.TitleText == nil { - return "", false - } - return *n.TitleText, true -} - -// HasTitleText returns a boolean if a field has been set. -func (n *NoteWidget) HasTitleText() bool { - if n != nil && n.TitleText != nil { - return true - } - - return false -} - -// SetTitleText allocates a new n.TitleText and returns the pointer to it. -func (n *NoteWidget) SetTitleText(v string) { - n.TitleText = &v -} - -// GetWidth returns the Width field if non-nil, zero value otherwise. -func (n *NoteWidget) GetWidth() int { - if n == nil || n.Width == nil { - return 0 - } - return *n.Width -} - -// GetOkWidth returns a tuple with the Width field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (n *NoteWidget) GetWidthOk() (int, bool) { - if n == nil || n.Width == nil { - return 0, false - } - return *n.Width, true -} - -// HasWidth returns a boolean if a field has been set. -func (n *NoteWidget) HasWidth() bool { - if n != nil && n.Width != nil { - return true - } - - return false -} - -// SetWidth allocates a new n.Width and returns the pointer to it. -func (n *NoteWidget) SetWidth(v int) { - n.Width = &v -} - -// GetX returns the X field if non-nil, zero value otherwise. -func (n *NoteWidget) GetX() int { - if n == nil || n.X == nil { - return 0 - } - return *n.X -} - -// GetOkX returns a tuple with the X field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (n *NoteWidget) GetXOk() (int, bool) { - if n == nil || n.X == nil { - return 0, false - } - return *n.X, true -} - -// HasX returns a boolean if a field has been set. -func (n *NoteWidget) HasX() bool { - if n != nil && n.X != nil { - return true - } - - return false -} - -// SetX allocates a new n.X and returns the pointer to it. -func (n *NoteWidget) SetX(v int) { - n.X = &v -} - -// GetY returns the Y field if non-nil, zero value otherwise. -func (n *NoteWidget) GetY() int { - if n == nil || n.Y == nil { - return 0 - } - return *n.Y -} - -// GetOkY returns a tuple with the Y field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (n *NoteWidget) GetYOk() (int, bool) { - if n == nil || n.Y == nil { - return 0, false - } - return *n.Y, true -} - -// HasY returns a boolean if a field has been set. -func (n *NoteWidget) HasY() bool { - if n != nil && n.Y != nil { - return true - } - - return false -} - -// SetY allocates a new n.Y and returns the pointer to it. -func (n *NoteWidget) SetY(v int) { - n.Y = &v -} - // GetEscalationMessage returns the EscalationMessage field if non-nil, zero value otherwise. func (o *Options) GetEscalationMessage() string { if o == nil || o.EscalationMessage == nil { @@ -8887,7 +5477,7 @@ func (o *Options) GetEscalationMessage() string { return *o.EscalationMessage } -// GetOkEscalationMessage returns a tuple with the EscalationMessage field if it's non-nil, zero value otherwise +// GetEscalationMessageOk returns a tuple with the EscalationMessage field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (o *Options) GetEscalationMessageOk() (string, bool) { if o == nil || o.EscalationMessage == nil { @@ -8918,7 +5508,7 @@ func (o *Options) GetEvaluationDelay() int { return *o.EvaluationDelay } -// GetOkEvaluationDelay returns a tuple with the EvaluationDelay field if it's non-nil, zero value otherwise +// GetEvaluationDelayOk returns a tuple with the EvaluationDelay field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (o *Options) GetEvaluationDelayOk() (int, bool) { if o == nil || o.EvaluationDelay == nil { @@ -8949,7 +5539,7 @@ func (o *Options) GetIncludeTags() bool { return *o.IncludeTags } -// GetOkIncludeTags returns a tuple with the IncludeTags field if it's non-nil, zero value otherwise +// GetIncludeTagsOk returns a tuple with the IncludeTags field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (o *Options) GetIncludeTagsOk() (bool, bool) { if o == nil || o.IncludeTags == nil { @@ -8980,7 +5570,7 @@ func (o *Options) GetLocked() bool { return *o.Locked } -// GetOkLocked returns a tuple with the Locked field if it's non-nil, zero value otherwise +// GetLockedOk returns a tuple with the Locked field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (o *Options) GetLockedOk() (bool, bool) { if o == nil || o.Locked == nil { @@ -9011,7 +5601,7 @@ func (o *Options) GetNewHostDelay() int { return *o.NewHostDelay } -// GetOkNewHostDelay returns a tuple with the NewHostDelay field if it's non-nil, zero value otherwise +// GetNewHostDelayOk returns a tuple with the NewHostDelay field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (o *Options) GetNewHostDelayOk() (int, bool) { if o == nil || o.NewHostDelay == nil { @@ -9042,7 +5632,7 @@ func (o *Options) GetNotifyAudit() bool { return *o.NotifyAudit } -// GetOkNotifyAudit returns a tuple with the NotifyAudit field if it's non-nil, zero value otherwise +// GetNotifyAuditOk returns a tuple with the NotifyAudit field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (o *Options) GetNotifyAuditOk() (bool, bool) { if o == nil || o.NotifyAudit == nil { @@ -9073,7 +5663,7 @@ func (o *Options) GetNotifyNoData() bool { return *o.NotifyNoData } -// GetOkNotifyNoData returns a tuple with the NotifyNoData field if it's non-nil, zero value otherwise +// GetNotifyNoDataOk returns a tuple with the NotifyNoData field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (o *Options) GetNotifyNoDataOk() (bool, bool) { if o == nil || o.NotifyNoData == nil { @@ -9104,7 +5694,7 @@ func (o *Options) GetRenotifyInterval() int { return *o.RenotifyInterval } -// GetOkRenotifyInterval returns a tuple with the RenotifyInterval field if it's non-nil, zero value otherwise +// GetRenotifyIntervalOk returns a tuple with the RenotifyInterval field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (o *Options) GetRenotifyIntervalOk() (int, bool) { if o == nil || o.RenotifyInterval == nil { @@ -9135,7 +5725,7 @@ func (o *Options) GetRequireFullWindow() bool { return *o.RequireFullWindow } -// GetOkRequireFullWindow returns a tuple with the RequireFullWindow field if it's non-nil, zero value otherwise +// GetRequireFullWindowOk returns a tuple with the RequireFullWindow field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (o *Options) GetRequireFullWindowOk() (bool, bool) { if o == nil || o.RequireFullWindow == nil { @@ -9166,7 +5756,7 @@ func (o *Options) GetThresholds() ThresholdCount { return *o.Thresholds } -// GetOkThresholds returns a tuple with the Thresholds field if it's non-nil, zero value otherwise +// GetThresholdsOk returns a tuple with the Thresholds field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (o *Options) GetThresholdsOk() (ThresholdCount, bool) { if o == nil || o.Thresholds == nil { @@ -9197,7 +5787,7 @@ func (o *Options) GetTimeoutH() int { return *o.TimeoutH } -// GetOkTimeoutH returns a tuple with the TimeoutH field if it's non-nil, zero value otherwise +// GetTimeoutHOk returns a tuple with the TimeoutH field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (o *Options) GetTimeoutHOk() (int, bool) { if o == nil || o.TimeoutH == nil { @@ -9220,686 +5810,128 @@ func (o *Options) SetTimeoutH(v int) { o.TimeoutH = &v } -// GetAggregator returns the Aggregator field if non-nil, zero value otherwise. -func (q *QueryValueWidget) GetAggregator() string { - if q == nil || q.Aggregator == nil { +// GetCount returns the Count field if non-nil, zero value otherwise. +func (p *Params) GetCount() string { + if p == nil || p.Count == nil { return "" } - return *q.Aggregator + return *p.Count } -// GetOkAggregator returns a tuple with the Aggregator field if it's non-nil, zero value otherwise +// GetCountOk returns a tuple with the Count field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. -func (q *QueryValueWidget) GetAggregatorOk() (string, bool) { - if q == nil || q.Aggregator == nil { +func (p *Params) GetCountOk() (string, bool) { + if p == nil || p.Count == nil { return "", false } - return *q.Aggregator, true + return *p.Count, true } -// HasAggregator returns a boolean if a field has been set. -func (q *QueryValueWidget) HasAggregator() bool { - if q != nil && q.Aggregator != nil { +// HasCount returns a boolean if a field has been set. +func (p *Params) HasCount() bool { + if p != nil && p.Count != nil { return true } return false } -// SetAggregator allocates a new q.Aggregator and returns the pointer to it. -func (q *QueryValueWidget) SetAggregator(v string) { - q.Aggregator = &v +// SetCount allocates a new p.Count and returns the pointer to it. +func (p *Params) SetCount(v string) { + p.Count = &v } -// GetCalcFunc returns the CalcFunc field if non-nil, zero value otherwise. -func (q *QueryValueWidget) GetCalcFunc() string { - if q == nil || q.CalcFunc == nil { +// GetSort returns the Sort field if non-nil, zero value otherwise. +func (p *Params) GetSort() string { + if p == nil || p.Sort == nil { return "" } - return *q.CalcFunc + return *p.Sort } -// GetOkCalcFunc returns a tuple with the CalcFunc field if it's non-nil, zero value otherwise +// GetSortOk returns a tuple with the Sort field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. -func (q *QueryValueWidget) GetCalcFuncOk() (string, bool) { - if q == nil || q.CalcFunc == nil { +func (p *Params) GetSortOk() (string, bool) { + if p == nil || p.Sort == nil { return "", false } - return *q.CalcFunc, true + return *p.Sort, true } -// HasCalcFunc returns a boolean if a field has been set. -func (q *QueryValueWidget) HasCalcFunc() bool { - if q != nil && q.CalcFunc != nil { +// HasSort returns a boolean if a field has been set. +func (p *Params) HasSort() bool { + if p != nil && p.Sort != nil { return true } return false } -// SetCalcFunc allocates a new q.CalcFunc and returns the pointer to it. -func (q *QueryValueWidget) SetCalcFunc(v string) { - q.CalcFunc = &v +// SetSort allocates a new p.Sort and returns the pointer to it. +func (p *Params) SetSort(v string) { + p.Sort = &v } -// GetHeight returns the Height field if non-nil, zero value otherwise. -func (q *QueryValueWidget) GetHeight() int { - if q == nil || q.Height == nil { - return 0 - } - return *q.Height -} - -// GetOkHeight returns a tuple with the Height field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (q *QueryValueWidget) GetHeightOk() (int, bool) { - if q == nil || q.Height == nil { - return 0, false - } - return *q.Height, true -} - -// HasHeight returns a boolean if a field has been set. -func (q *QueryValueWidget) HasHeight() bool { - if q != nil && q.Height != nil { - return true - } - - return false -} - -// SetHeight allocates a new q.Height and returns the pointer to it. -func (q *QueryValueWidget) SetHeight(v int) { - q.Height = &v -} - -// GetIsValidQuery returns the IsValidQuery field if non-nil, zero value otherwise. -func (q *QueryValueWidget) GetIsValidQuery() bool { - if q == nil || q.IsValidQuery == nil { - return false - } - return *q.IsValidQuery -} - -// GetOkIsValidQuery returns a tuple with the IsValidQuery field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (q *QueryValueWidget) GetIsValidQueryOk() (bool, bool) { - if q == nil || q.IsValidQuery == nil { - return false, false - } - return *q.IsValidQuery, true -} - -// HasIsValidQuery returns a boolean if a field has been set. -func (q *QueryValueWidget) HasIsValidQuery() bool { - if q != nil && q.IsValidQuery != nil { - return true - } - - return false -} - -// SetIsValidQuery allocates a new q.IsValidQuery and returns the pointer to it. -func (q *QueryValueWidget) SetIsValidQuery(v bool) { - q.IsValidQuery = &v -} - -// GetMetric returns the Metric field if non-nil, zero value otherwise. -func (q *QueryValueWidget) GetMetric() string { - if q == nil || q.Metric == nil { +// GetStart returns the Start field if non-nil, zero value otherwise. +func (p *Params) GetStart() string { + if p == nil || p.Start == nil { return "" } - return *q.Metric + return *p.Start } -// GetOkMetric returns a tuple with the Metric field if it's non-nil, zero value otherwise +// GetStartOk returns a tuple with the Start field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. -func (q *QueryValueWidget) GetMetricOk() (string, bool) { - if q == nil || q.Metric == nil { +func (p *Params) GetStartOk() (string, bool) { + if p == nil || p.Start == nil { return "", false } - return *q.Metric, true + return *p.Start, true } -// HasMetric returns a boolean if a field has been set. -func (q *QueryValueWidget) HasMetric() bool { - if q != nil && q.Metric != nil { +// HasStart returns a boolean if a field has been set. +func (p *Params) HasStart() bool { + if p != nil && p.Start != nil { return true } return false } -// SetMetric allocates a new q.Metric and returns the pointer to it. -func (q *QueryValueWidget) SetMetric(v string) { - q.Metric = &v +// SetStart allocates a new p.Start and returns the pointer to it. +func (p *Params) SetStart(v string) { + p.Start = &v } -// GetMetricType returns the MetricType field if non-nil, zero value otherwise. -func (q *QueryValueWidget) GetMetricType() string { - if q == nil || q.MetricType == nil { +// GetText returns the Text field if non-nil, zero value otherwise. +func (p *Params) GetText() string { + if p == nil || p.Text == nil { return "" } - return *q.MetricType + return *p.Text } -// GetOkMetricType returns a tuple with the MetricType field if it's non-nil, zero value otherwise +// GetTextOk returns a tuple with the Text field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. -func (q *QueryValueWidget) GetMetricTypeOk() (string, bool) { - if q == nil || q.MetricType == nil { +func (p *Params) GetTextOk() (string, bool) { + if p == nil || p.Text == nil { return "", false } - return *q.MetricType, true + return *p.Text, true } -// HasMetricType returns a boolean if a field has been set. -func (q *QueryValueWidget) HasMetricType() bool { - if q != nil && q.MetricType != nil { +// HasText returns a boolean if a field has been set. +func (p *Params) HasText() bool { + if p != nil && p.Text != nil { return true } return false } -// SetMetricType allocates a new q.MetricType and returns the pointer to it. -func (q *QueryValueWidget) SetMetricType(v string) { - q.MetricType = &v -} - -// GetPrecision returns the Precision field if non-nil, zero value otherwise. -func (q *QueryValueWidget) GetPrecision() int { - if q == nil || q.Precision == nil { - return 0 - } - return *q.Precision -} - -// GetOkPrecision returns a tuple with the Precision field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (q *QueryValueWidget) GetPrecisionOk() (int, bool) { - if q == nil || q.Precision == nil { - return 0, false - } - return *q.Precision, true -} - -// HasPrecision returns a boolean if a field has been set. -func (q *QueryValueWidget) HasPrecision() bool { - if q != nil && q.Precision != nil { - return true - } - - return false -} - -// SetPrecision allocates a new q.Precision and returns the pointer to it. -func (q *QueryValueWidget) SetPrecision(v int) { - q.Precision = &v -} - -// GetQuery returns the Query field if non-nil, zero value otherwise. -func (q *QueryValueWidget) GetQuery() string { - if q == nil || q.Query == nil { - return "" - } - return *q.Query -} - -// GetOkQuery returns a tuple with the Query field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (q *QueryValueWidget) GetQueryOk() (string, bool) { - if q == nil || q.Query == nil { - return "", false - } - return *q.Query, true -} - -// HasQuery returns a boolean if a field has been set. -func (q *QueryValueWidget) HasQuery() bool { - if q != nil && q.Query != nil { - return true - } - - return false -} - -// SetQuery allocates a new q.Query and returns the pointer to it. -func (q *QueryValueWidget) SetQuery(v string) { - q.Query = &v -} - -// GetResultCalcFunc returns the ResultCalcFunc field if non-nil, zero value otherwise. -func (q *QueryValueWidget) GetResultCalcFunc() string { - if q == nil || q.ResultCalcFunc == nil { - return "" - } - return *q.ResultCalcFunc -} - -// GetOkResultCalcFunc returns a tuple with the ResultCalcFunc field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (q *QueryValueWidget) GetResultCalcFuncOk() (string, bool) { - if q == nil || q.ResultCalcFunc == nil { - return "", false - } - return *q.ResultCalcFunc, true -} - -// HasResultCalcFunc returns a boolean if a field has been set. -func (q *QueryValueWidget) HasResultCalcFunc() bool { - if q != nil && q.ResultCalcFunc != nil { - return true - } - - return false -} - -// SetResultCalcFunc allocates a new q.ResultCalcFunc and returns the pointer to it. -func (q *QueryValueWidget) SetResultCalcFunc(v string) { - q.ResultCalcFunc = &v -} - -// GetTextAlign returns the TextAlign field if non-nil, zero value otherwise. -func (q *QueryValueWidget) GetTextAlign() string { - if q == nil || q.TextAlign == nil { - return "" - } - return *q.TextAlign -} - -// GetOkTextAlign returns a tuple with the TextAlign field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (q *QueryValueWidget) GetTextAlignOk() (string, bool) { - if q == nil || q.TextAlign == nil { - return "", false - } - return *q.TextAlign, true -} - -// HasTextAlign returns a boolean if a field has been set. -func (q *QueryValueWidget) HasTextAlign() bool { - if q != nil && q.TextAlign != nil { - return true - } - - return false -} - -// SetTextAlign allocates a new q.TextAlign and returns the pointer to it. -func (q *QueryValueWidget) SetTextAlign(v string) { - q.TextAlign = &v -} - -// GetTextSize returns the TextSize field if non-nil, zero value otherwise. -func (q *QueryValueWidget) GetTextSize() TextSize { - if q == nil || q.TextSize == nil { - return TextSize{} - } - return *q.TextSize -} - -// GetOkTextSize returns a tuple with the TextSize field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (q *QueryValueWidget) GetTextSizeOk() (TextSize, bool) { - if q == nil || q.TextSize == nil { - return TextSize{}, false - } - return *q.TextSize, true -} - -// HasTextSize returns a boolean if a field has been set. -func (q *QueryValueWidget) HasTextSize() bool { - if q != nil && q.TextSize != nil { - return true - } - - return false -} - -// SetTextSize allocates a new q.TextSize and returns the pointer to it. -func (q *QueryValueWidget) SetTextSize(v TextSize) { - q.TextSize = &v -} - -// GetTimeframe returns the Timeframe field if non-nil, zero value otherwise. -func (q *QueryValueWidget) GetTimeframe() string { - if q == nil || q.Timeframe == nil { - return "" - } - return *q.Timeframe -} - -// GetOkTimeframe returns a tuple with the Timeframe field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (q *QueryValueWidget) GetTimeframeOk() (string, bool) { - if q == nil || q.Timeframe == nil { - return "", false - } - return *q.Timeframe, true -} - -// HasTimeframe returns a boolean if a field has been set. -func (q *QueryValueWidget) HasTimeframe() bool { - if q != nil && q.Timeframe != nil { - return true - } - - return false -} - -// SetTimeframe allocates a new q.Timeframe and returns the pointer to it. -func (q *QueryValueWidget) SetTimeframe(v string) { - q.Timeframe = &v -} - -// GetTimeframeAggregator returns the TimeframeAggregator field if non-nil, zero value otherwise. -func (q *QueryValueWidget) GetTimeframeAggregator() string { - if q == nil || q.TimeframeAggregator == nil { - return "" - } - return *q.TimeframeAggregator -} - -// GetOkTimeframeAggregator returns a tuple with the TimeframeAggregator field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (q *QueryValueWidget) GetTimeframeAggregatorOk() (string, bool) { - if q == nil || q.TimeframeAggregator == nil { - return "", false - } - return *q.TimeframeAggregator, true -} - -// HasTimeframeAggregator returns a boolean if a field has been set. -func (q *QueryValueWidget) HasTimeframeAggregator() bool { - if q != nil && q.TimeframeAggregator != nil { - return true - } - - return false -} - -// SetTimeframeAggregator allocates a new q.TimeframeAggregator and returns the pointer to it. -func (q *QueryValueWidget) SetTimeframeAggregator(v string) { - q.TimeframeAggregator = &v -} - -// GetTitle returns the Title field if non-nil, zero value otherwise. -func (q *QueryValueWidget) GetTitle() bool { - if q == nil || q.Title == nil { - return false - } - return *q.Title -} - -// GetOkTitle returns a tuple with the Title field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (q *QueryValueWidget) GetTitleOk() (bool, bool) { - if q == nil || q.Title == nil { - return false, false - } - return *q.Title, true -} - -// HasTitle returns a boolean if a field has been set. -func (q *QueryValueWidget) HasTitle() bool { - if q != nil && q.Title != nil { - return true - } - - return false -} - -// SetTitle allocates a new q.Title and returns the pointer to it. -func (q *QueryValueWidget) SetTitle(v bool) { - q.Title = &v -} - -// GetTitleAlign returns the TitleAlign field if non-nil, zero value otherwise. -func (q *QueryValueWidget) GetTitleAlign() string { - if q == nil || q.TitleAlign == nil { - return "" - } - return *q.TitleAlign -} - -// GetOkTitleAlign returns a tuple with the TitleAlign field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (q *QueryValueWidget) GetTitleAlignOk() (string, bool) { - if q == nil || q.TitleAlign == nil { - return "", false - } - return *q.TitleAlign, true -} - -// HasTitleAlign returns a boolean if a field has been set. -func (q *QueryValueWidget) HasTitleAlign() bool { - if q != nil && q.TitleAlign != nil { - return true - } - - return false -} - -// SetTitleAlign allocates a new q.TitleAlign and returns the pointer to it. -func (q *QueryValueWidget) SetTitleAlign(v string) { - q.TitleAlign = &v -} - -// GetTitleSize returns the TitleSize field if non-nil, zero value otherwise. -func (q *QueryValueWidget) GetTitleSize() TextSize { - if q == nil || q.TitleSize == nil { - return TextSize{} - } - return *q.TitleSize -} - -// GetOkTitleSize returns a tuple with the TitleSize field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (q *QueryValueWidget) GetTitleSizeOk() (TextSize, bool) { - if q == nil || q.TitleSize == nil { - return TextSize{}, false - } - return *q.TitleSize, true -} - -// HasTitleSize returns a boolean if a field has been set. -func (q *QueryValueWidget) HasTitleSize() bool { - if q != nil && q.TitleSize != nil { - return true - } - - return false -} - -// SetTitleSize allocates a new q.TitleSize and returns the pointer to it. -func (q *QueryValueWidget) SetTitleSize(v TextSize) { - q.TitleSize = &v -} - -// GetTitleText returns the TitleText field if non-nil, zero value otherwise. -func (q *QueryValueWidget) GetTitleText() string { - if q == nil || q.TitleText == nil { - return "" - } - return *q.TitleText -} - -// GetOkTitleText returns a tuple with the TitleText field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (q *QueryValueWidget) GetTitleTextOk() (string, bool) { - if q == nil || q.TitleText == nil { - return "", false - } - return *q.TitleText, true -} - -// HasTitleText returns a boolean if a field has been set. -func (q *QueryValueWidget) HasTitleText() bool { - if q != nil && q.TitleText != nil { - return true - } - - return false -} - -// SetTitleText allocates a new q.TitleText and returns the pointer to it. -func (q *QueryValueWidget) SetTitleText(v string) { - q.TitleText = &v -} - -// GetType returns the Type field if non-nil, zero value otherwise. -func (q *QueryValueWidget) GetType() string { - if q == nil || q.Type == nil { - return "" - } - return *q.Type -} - -// GetOkType returns a tuple with the Type field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (q *QueryValueWidget) GetTypeOk() (string, bool) { - if q == nil || q.Type == nil { - return "", false - } - return *q.Type, true -} - -// HasType returns a boolean if a field has been set. -func (q *QueryValueWidget) HasType() bool { - if q != nil && q.Type != nil { - return true - } - - return false -} - -// SetType allocates a new q.Type and returns the pointer to it. -func (q *QueryValueWidget) SetType(v string) { - q.Type = &v -} - -// GetUnit returns the Unit field if non-nil, zero value otherwise. -func (q *QueryValueWidget) GetUnit() string { - if q == nil || q.Unit == nil { - return "" - } - return *q.Unit -} - -// GetOkUnit returns a tuple with the Unit field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (q *QueryValueWidget) GetUnitOk() (string, bool) { - if q == nil || q.Unit == nil { - return "", false - } - return *q.Unit, true -} - -// HasUnit returns a boolean if a field has been set. -func (q *QueryValueWidget) HasUnit() bool { - if q != nil && q.Unit != nil { - return true - } - - return false -} - -// SetUnit allocates a new q.Unit and returns the pointer to it. -func (q *QueryValueWidget) SetUnit(v string) { - q.Unit = &v -} - -// GetWidth returns the Width field if non-nil, zero value otherwise. -func (q *QueryValueWidget) GetWidth() int { - if q == nil || q.Width == nil { - return 0 - } - return *q.Width -} - -// GetOkWidth returns a tuple with the Width field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (q *QueryValueWidget) GetWidthOk() (int, bool) { - if q == nil || q.Width == nil { - return 0, false - } - return *q.Width, true -} - -// HasWidth returns a boolean if a field has been set. -func (q *QueryValueWidget) HasWidth() bool { - if q != nil && q.Width != nil { - return true - } - - return false -} - -// SetWidth allocates a new q.Width and returns the pointer to it. -func (q *QueryValueWidget) SetWidth(v int) { - q.Width = &v -} - -// GetX returns the X field if non-nil, zero value otherwise. -func (q *QueryValueWidget) GetX() int { - if q == nil || q.X == nil { - return 0 - } - return *q.X -} - -// GetOkX returns a tuple with the X field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (q *QueryValueWidget) GetXOk() (int, bool) { - if q == nil || q.X == nil { - return 0, false - } - return *q.X, true -} - -// HasX returns a boolean if a field has been set. -func (q *QueryValueWidget) HasX() bool { - if q != nil && q.X != nil { - return true - } - - return false -} - -// SetX allocates a new q.X and returns the pointer to it. -func (q *QueryValueWidget) SetX(v int) { - q.X = &v -} - -// GetY returns the Y field if non-nil, zero value otherwise. -func (q *QueryValueWidget) GetY() int { - if q == nil || q.Y == nil { - return 0 - } - return *q.Y -} - -// GetOkY returns a tuple with the Y field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (q *QueryValueWidget) GetYOk() (int, bool) { - if q == nil || q.Y == nil { - return 0, false - } - return *q.Y, true -} - -// HasY returns a boolean if a field has been set. -func (q *QueryValueWidget) HasY() bool { - if q != nil && q.Y != nil { - return true - } - - return false -} - -// SetY allocates a new q.Y and returns the pointer to it. -func (q *QueryValueWidget) SetY(v int) { - q.Y = &v +// SetText allocates a new p.Text and returns the pointer to it. +func (p *Params) SetText(v string) { + p.Text = &v } // GetPeriod returns the Period field if non-nil, zero value otherwise. @@ -9910,7 +5942,7 @@ func (r *Recurrence) GetPeriod() int { return *r.Period } -// GetOkPeriod returns a tuple with the Period field if it's non-nil, zero value otherwise +// GetPeriodOk returns a tuple with the Period field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (r *Recurrence) GetPeriodOk() (int, bool) { if r == nil || r.Period == nil { @@ -9941,7 +5973,7 @@ func (r *Recurrence) GetType() string { return *r.Type } -// GetOkType returns a tuple with the Type field if it's non-nil, zero value otherwise +// GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (r *Recurrence) GetTypeOk() (string, bool) { if r == nil || r.Type == nil { @@ -9972,7 +6004,7 @@ func (r *Recurrence) GetUntilDate() int { return *r.UntilDate } -// GetOkUntilDate returns a tuple with the UntilDate field if it's non-nil, zero value otherwise +// GetUntilDateOk returns a tuple with the UntilDate field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (r *Recurrence) GetUntilDateOk() (int, bool) { if r == nil || r.UntilDate == nil { @@ -10003,7 +6035,7 @@ func (r *Recurrence) GetUntilOccurrences() int { return *r.UntilOccurrences } -// GetOkUntilOccurrences returns a tuple with the UntilOccurrences field if it's non-nil, zero value otherwise +// GetUntilOccurrencesOk returns a tuple with the UntilOccurrences field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (r *Recurrence) GetUntilOccurrencesOk() (int, bool) { if r == nil || r.UntilOccurrences == nil { @@ -10034,7 +6066,7 @@ func (r *reqComment) GetComment() Comment { return *r.Comment } -// GetOkComment returns a tuple with the Comment field if it's non-nil, zero value otherwise +// GetCommentOk returns a tuple with the Comment field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (r *reqComment) GetCommentOk() (Comment, bool) { if r == nil || r.Comment == nil { @@ -10065,7 +6097,7 @@ func (r *reqGetDashboard) GetDashboard() Dashboard { return *r.Dashboard } -// GetOkDashboard returns a tuple with the Dashboard field if it's non-nil, zero value otherwise +// GetDashboardOk returns a tuple with the Dashboard field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (r *reqGetDashboard) GetDashboardOk() (Dashboard, bool) { if r == nil || r.Dashboard == nil { @@ -10096,7 +6128,7 @@ func (r *reqGetDashboard) GetResource() string { return *r.Resource } -// GetOkResource returns a tuple with the Resource field if it's non-nil, zero value otherwise +// GetResourceOk returns a tuple with the Resource field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (r *reqGetDashboard) GetResourceOk() (string, bool) { if r == nil || r.Resource == nil { @@ -10127,7 +6159,7 @@ func (r *reqGetDashboard) GetUrl() string { return *r.Url } -// GetOkUrl returns a tuple with the Url field if it's non-nil, zero value otherwise +// GetUrlOk returns a tuple with the Url field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (r *reqGetDashboard) GetUrlOk() (string, bool) { if r == nil || r.Url == nil { @@ -10158,7 +6190,7 @@ func (r *reqGetEvent) GetEvent() Event { return *r.Event } -// GetOkEvent returns a tuple with the Event field if it's non-nil, zero value otherwise +// GetEventOk returns a tuple with the Event field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (r *reqGetEvent) GetEventOk() (Event, bool) { if r == nil || r.Event == nil { @@ -10189,7 +6221,7 @@ func (r *reqGetTags) GetTags() TagMap { return *r.Tags } -// GetOkTags returns a tuple with the Tags field if it's non-nil, zero value otherwise +// GetTagsOk returns a tuple with the Tags field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (r *reqGetTags) GetTagsOk() (TagMap, bool) { if r == nil || r.Tags == nil { @@ -10212,6 +6244,99 @@ func (r *reqGetTags) SetTags(v TagMap) { r.Tags = &v } +// GetColor returns the Color field if non-nil, zero value otherwise. +func (r *Rule) GetColor() string { + if r == nil || r.Color == nil { + return "" + } + return *r.Color +} + +// GetColorOk returns a tuple with the Color field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (r *Rule) GetColorOk() (string, bool) { + if r == nil || r.Color == nil { + return "", false + } + return *r.Color, true +} + +// HasColor returns a boolean if a field has been set. +func (r *Rule) HasColor() bool { + if r != nil && r.Color != nil { + return true + } + + return false +} + +// SetColor allocates a new r.Color and returns the pointer to it. +func (r *Rule) SetColor(v string) { + r.Color = &v +} + +// GetThreshold returns the Threshold field if non-nil, zero value otherwise. +func (r *Rule) GetThreshold() json.Number { + if r == nil || r.Threshold == nil { + return "" + } + return *r.Threshold +} + +// GetThresholdOk returns a tuple with the Threshold field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (r *Rule) GetThresholdOk() (json.Number, bool) { + if r == nil || r.Threshold == nil { + return "", false + } + return *r.Threshold, true +} + +// HasThreshold returns a boolean if a field has been set. +func (r *Rule) HasThreshold() bool { + if r != nil && r.Threshold != nil { + return true + } + + return false +} + +// SetThreshold allocates a new r.Threshold and returns the pointer to it. +func (r *Rule) SetThreshold(v json.Number) { + r.Threshold = &v +} + +// GetTimeframe returns the Timeframe field if non-nil, zero value otherwise. +func (r *Rule) GetTimeframe() string { + if r == nil || r.Timeframe == nil { + return "" + } + return *r.Timeframe +} + +// GetTimeframeOk returns a tuple with the Timeframe field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (r *Rule) GetTimeframeOk() (string, bool) { + if r == nil || r.Timeframe == nil { + return "", false + } + return *r.Timeframe, true +} + +// HasTimeframe returns a boolean if a field has been set. +func (r *Rule) HasTimeframe() bool { + if r != nil && r.Timeframe != nil { + return true + } + + return false +} + +// SetTimeframe allocates a new r.Timeframe and returns the pointer to it. +func (r *Rule) SetTimeframe(v string) { + r.Timeframe = &v +} + // GetHeight returns the Height field if non-nil, zero value otherwise. func (s *Screenboard) GetHeight() string { if s == nil || s.Height == nil { @@ -10220,7 +6345,7 @@ func (s *Screenboard) GetHeight() string { return *s.Height } -// GetOkHeight returns a tuple with the Height field if it's non-nil, zero value otherwise +// GetHeightOk returns a tuple with the Height field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (s *Screenboard) GetHeightOk() (string, bool) { if s == nil || s.Height == nil { @@ -10251,7 +6376,7 @@ func (s *Screenboard) GetId() int { return *s.Id } -// GetOkId returns a tuple with the Id field if it's non-nil, zero value otherwise +// GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (s *Screenboard) GetIdOk() (int, bool) { if s == nil || s.Id == nil { @@ -10282,7 +6407,7 @@ func (s *Screenboard) GetReadOnly() bool { return *s.ReadOnly } -// GetOkReadOnly returns a tuple with the ReadOnly field if it's non-nil, zero value otherwise +// GetReadOnlyOk returns a tuple with the ReadOnly field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (s *Screenboard) GetReadOnlyOk() (bool, bool) { if s == nil || s.ReadOnly == nil { @@ -10313,7 +6438,7 @@ func (s *Screenboard) GetShared() bool { return *s.Shared } -// GetOkShared returns a tuple with the Shared field if it's non-nil, zero value otherwise +// GetSharedOk returns a tuple with the Shared field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (s *Screenboard) GetSharedOk() (bool, bool) { if s == nil || s.Shared == nil { @@ -10336,37 +6461,6 @@ func (s *Screenboard) SetShared(v bool) { s.Shared = &v } -// GetTemplated returns the Templated field if non-nil, zero value otherwise. -func (s *Screenboard) GetTemplated() bool { - if s == nil || s.Templated == nil { - return false - } - return *s.Templated -} - -// GetOkTemplated returns a tuple with the Templated field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (s *Screenboard) GetTemplatedOk() (bool, bool) { - if s == nil || s.Templated == nil { - return false, false - } - return *s.Templated, true -} - -// HasTemplated returns a boolean if a field has been set. -func (s *Screenboard) HasTemplated() bool { - if s != nil && s.Templated != nil { - return true - } - - return false -} - -// SetTemplated allocates a new s.Templated and returns the pointer to it. -func (s *Screenboard) SetTemplated(v bool) { - s.Templated = &v -} - // GetTitle returns the Title field if non-nil, zero value otherwise. func (s *Screenboard) GetTitle() string { if s == nil || s.Title == nil { @@ -10375,7 +6469,7 @@ func (s *Screenboard) GetTitle() string { return *s.Title } -// GetOkTitle returns a tuple with the Title field if it's non-nil, zero value otherwise +// GetTitleOk returns a tuple with the Title field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (s *Screenboard) GetTitleOk() (string, bool) { if s == nil || s.Title == nil { @@ -10406,7 +6500,7 @@ func (s *Screenboard) GetWidth() string { return *s.Width } -// GetOkWidth returns a tuple with the Width field if it's non-nil, zero value otherwise +// GetWidthOk returns a tuple with the Width field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (s *Screenboard) GetWidthOk() (string, bool) { if s == nil || s.Width == nil { @@ -10437,7 +6531,7 @@ func (s *ScreenboardLite) GetId() int { return *s.Id } -// GetOkId returns a tuple with the Id field if it's non-nil, zero value otherwise +// GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (s *ScreenboardLite) GetIdOk() (int, bool) { if s == nil || s.Id == nil { @@ -10468,7 +6562,7 @@ func (s *ScreenboardLite) GetResource() string { return *s.Resource } -// GetOkResource returns a tuple with the Resource field if it's non-nil, zero value otherwise +// GetResourceOk returns a tuple with the Resource field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (s *ScreenboardLite) GetResourceOk() (string, bool) { if s == nil || s.Resource == nil { @@ -10499,7 +6593,7 @@ func (s *ScreenboardLite) GetTitle() string { return *s.Title } -// GetOkTitle returns a tuple with the Title field if it's non-nil, zero value otherwise +// GetTitleOk returns a tuple with the Title field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (s *ScreenboardLite) GetTitleOk() (string, bool) { if s == nil || s.Title == nil { @@ -10522,6 +6616,37 @@ func (s *ScreenboardLite) SetTitle(v string) { s.Title = &v } +// GetId returns the Id field if non-nil, zero value otherwise. +func (s *ScreenboardMonitor) GetId() int { + if s == nil || s.Id == nil { + return 0 + } + return *s.Id +} + +// GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (s *ScreenboardMonitor) GetIdOk() (int, bool) { + if s == nil || s.Id == nil { + return 0, false + } + return *s.Id, true +} + +// HasId returns a boolean if a field has been set. +func (s *ScreenboardMonitor) HasId() bool { + if s != nil && s.Id != nil { + return true + } + + return false +} + +// SetId allocates a new s.Id and returns the pointer to it. +func (s *ScreenboardMonitor) SetId(v int) { + s.Id = &v +} + // GetAggr returns the Aggr field if non-nil, zero value otherwise. func (s *Series) GetAggr() string { if s == nil || s.Aggr == nil { @@ -10530,7 +6655,7 @@ func (s *Series) GetAggr() string { return *s.Aggr } -// GetOkAggr returns a tuple with the Aggr field if it's non-nil, zero value otherwise +// GetAggrOk returns a tuple with the Aggr field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (s *Series) GetAggrOk() (string, bool) { if s == nil || s.Aggr == nil { @@ -10561,7 +6686,7 @@ func (s *Series) GetDisplayName() string { return *s.DisplayName } -// GetOkDisplayName returns a tuple with the DisplayName field if it's non-nil, zero value otherwise +// GetDisplayNameOk returns a tuple with the DisplayName field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (s *Series) GetDisplayNameOk() (string, bool) { if s == nil || s.DisplayName == nil { @@ -10592,7 +6717,7 @@ func (s *Series) GetEnd() float64 { return *s.End } -// GetOkEnd returns a tuple with the End field if it's non-nil, zero value otherwise +// GetEndOk returns a tuple with the End field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (s *Series) GetEndOk() (float64, bool) { if s == nil || s.End == nil { @@ -10623,7 +6748,7 @@ func (s *Series) GetExpression() string { return *s.Expression } -// GetOkExpression returns a tuple with the Expression field if it's non-nil, zero value otherwise +// GetExpressionOk returns a tuple with the Expression field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (s *Series) GetExpressionOk() (string, bool) { if s == nil || s.Expression == nil { @@ -10654,7 +6779,7 @@ func (s *Series) GetInterval() int { return *s.Interval } -// GetOkInterval returns a tuple with the Interval field if it's non-nil, zero value otherwise +// GetIntervalOk returns a tuple with the Interval field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (s *Series) GetIntervalOk() (int, bool) { if s == nil || s.Interval == nil { @@ -10685,7 +6810,7 @@ func (s *Series) GetLength() int { return *s.Length } -// GetOkLength returns a tuple with the Length field if it's non-nil, zero value otherwise +// GetLengthOk returns a tuple with the Length field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (s *Series) GetLengthOk() (int, bool) { if s == nil || s.Length == nil { @@ -10716,7 +6841,7 @@ func (s *Series) GetMetric() string { return *s.Metric } -// GetOkMetric returns a tuple with the Metric field if it's non-nil, zero value otherwise +// GetMetricOk returns a tuple with the Metric field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (s *Series) GetMetricOk() (string, bool) { if s == nil || s.Metric == nil { @@ -10747,7 +6872,7 @@ func (s *Series) GetScope() string { return *s.Scope } -// GetOkScope returns a tuple with the Scope field if it's non-nil, zero value otherwise +// GetScopeOk returns a tuple with the Scope field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (s *Series) GetScopeOk() (string, bool) { if s == nil || s.Scope == nil { @@ -10778,7 +6903,7 @@ func (s *Series) GetStart() float64 { return *s.Start } -// GetOkStart returns a tuple with the Start field if it's non-nil, zero value otherwise +// GetStartOk returns a tuple with the Start field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (s *Series) GetStartOk() (float64, bool) { if s == nil || s.Start == nil { @@ -10809,7 +6934,7 @@ func (s *Series) GetUnits() UnitPair { return *s.Units } -// GetOkUnits returns a tuple with the Units field if it's non-nil, zero value otherwise +// GetUnitsOk returns a tuple with the Units field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (s *Series) GetUnitsOk() (UnitPair, bool) { if s == nil || s.Units == nil { @@ -10840,7 +6965,7 @@ func (s *ServiceHookSlackRequest) GetAccount() string { return *s.Account } -// GetOkAccount returns a tuple with the Account field if it's non-nil, zero value otherwise +// GetAccountOk returns a tuple with the Account field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (s *ServiceHookSlackRequest) GetAccountOk() (string, bool) { if s == nil || s.Account == nil { @@ -10871,7 +6996,7 @@ func (s *ServiceHookSlackRequest) GetUrl() string { return *s.Url } -// GetOkUrl returns a tuple with the Url field if it's non-nil, zero value otherwise +// GetUrlOk returns a tuple with the Url field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (s *ServiceHookSlackRequest) GetUrlOk() (string, bool) { if s == nil || s.Url == nil { @@ -10902,7 +7027,7 @@ func (s *servicePD) GetServiceKey() string { return *s.ServiceKey } -// GetOkServiceKey returns a tuple with the ServiceKey field if it's non-nil, zero value otherwise +// GetServiceKeyOk returns a tuple with the ServiceKey field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (s *servicePD) GetServiceKeyOk() (string, bool) { if s == nil || s.ServiceKey == nil { @@ -10933,7 +7058,7 @@ func (s *servicePD) GetServiceName() string { return *s.ServiceName } -// GetOkServiceName returns a tuple with the ServiceName field if it's non-nil, zero value otherwise +// GetServiceNameOk returns a tuple with the ServiceName field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (s *servicePD) GetServiceNameOk() (string, bool) { if s == nil || s.ServiceName == nil { @@ -10964,7 +7089,7 @@ func (s *ServicePDRequest) GetServiceKey() string { return *s.ServiceKey } -// GetOkServiceKey returns a tuple with the ServiceKey field if it's non-nil, zero value otherwise +// GetServiceKeyOk returns a tuple with the ServiceKey field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (s *ServicePDRequest) GetServiceKeyOk() (string, bool) { if s == nil || s.ServiceKey == nil { @@ -10995,7 +7120,7 @@ func (s *ServicePDRequest) GetServiceName() string { return *s.ServiceName } -// GetOkServiceName returns a tuple with the ServiceName field if it's non-nil, zero value otherwise +// GetServiceNameOk returns a tuple with the ServiceName field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (s *ServicePDRequest) GetServiceNameOk() (string, bool) { if s == nil || s.ServiceName == nil { @@ -11018,6 +7143,68 @@ func (s *ServicePDRequest) SetServiceName(v string) { s.ServiceName = &v } +// GetFillMax returns the FillMax field if non-nil, zero value otherwise. +func (s *Style) GetFillMax() json.Number { + if s == nil || s.FillMax == nil { + return "" + } + return *s.FillMax +} + +// GetFillMaxOk returns a tuple with the FillMax field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (s *Style) GetFillMaxOk() (json.Number, bool) { + if s == nil || s.FillMax == nil { + return "", false + } + return *s.FillMax, true +} + +// HasFillMax returns a boolean if a field has been set. +func (s *Style) HasFillMax() bool { + if s != nil && s.FillMax != nil { + return true + } + + return false +} + +// SetFillMax allocates a new s.FillMax and returns the pointer to it. +func (s *Style) SetFillMax(v json.Number) { + s.FillMax = &v +} + +// GetFillMin returns the FillMin field if non-nil, zero value otherwise. +func (s *Style) GetFillMin() json.Number { + if s == nil || s.FillMin == nil { + return "" + } + return *s.FillMin +} + +// GetFillMinOk returns a tuple with the FillMin field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (s *Style) GetFillMinOk() (json.Number, bool) { + if s == nil || s.FillMin == nil { + return "", false + } + return *s.FillMin, true +} + +// HasFillMin returns a boolean if a field has been set. +func (s *Style) HasFillMin() bool { + if s != nil && s.FillMin != nil { + return true + } + + return false +} + +// SetFillMin allocates a new s.FillMin and returns the pointer to it. +func (s *Style) SetFillMin(v json.Number) { + s.FillMin = &v +} + // GetPalette returns the Palette field if non-nil, zero value otherwise. func (s *Style) GetPalette() string { if s == nil || s.Palette == nil { @@ -11026,7 +7213,7 @@ func (s *Style) GetPalette() string { return *s.Palette } -// GetOkPalette returns a tuple with the Palette field if it's non-nil, zero value otherwise +// GetPaletteOk returns a tuple with the Palette field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (s *Style) GetPaletteOk() (string, bool) { if s == nil || s.Palette == nil { @@ -11057,7 +7244,7 @@ func (s *Style) GetPaletteFlip() bool { return *s.PaletteFlip } -// GetOkPaletteFlip returns a tuple with the PaletteFlip field if it's non-nil, zero value otherwise +// GetPaletteFlipOk returns a tuple with the PaletteFlip field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (s *Style) GetPaletteFlipOk() (bool, bool) { if s == nil || s.PaletteFlip == nil { @@ -11088,7 +7275,7 @@ func (t *TemplateVariable) GetDefault() string { return *t.Default } -// GetOkDefault returns a tuple with the Default field if it's non-nil, zero value otherwise +// GetDefaultOk returns a tuple with the Default field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (t *TemplateVariable) GetDefaultOk() (string, bool) { if t == nil || t.Default == nil { @@ -11119,7 +7306,7 @@ func (t *TemplateVariable) GetName() string { return *t.Name } -// GetOkName returns a tuple with the Name field if it's non-nil, zero value otherwise +// GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (t *TemplateVariable) GetNameOk() (string, bool) { if t == nil || t.Name == nil { @@ -11150,7 +7337,7 @@ func (t *TemplateVariable) GetPrefix() string { return *t.Prefix } -// GetOkPrefix returns a tuple with the Prefix field if it's non-nil, zero value otherwise +// GetPrefixOk returns a tuple with the Prefix field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (t *TemplateVariable) GetPrefixOk() (string, bool) { if t == nil || t.Prefix == nil { @@ -11173,68 +7360,6 @@ func (t *TemplateVariable) SetPrefix(v string) { t.Prefix = &v } -// GetAuto returns the Auto field if non-nil, zero value otherwise. -func (t *TextSize) GetAuto() bool { - if t == nil || t.Auto == nil { - return false - } - return *t.Auto -} - -// GetOkAuto returns a tuple with the Auto field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (t *TextSize) GetAutoOk() (bool, bool) { - if t == nil || t.Auto == nil { - return false, false - } - return *t.Auto, true -} - -// HasAuto returns a boolean if a field has been set. -func (t *TextSize) HasAuto() bool { - if t != nil && t.Auto != nil { - return true - } - - return false -} - -// SetAuto allocates a new t.Auto and returns the pointer to it. -func (t *TextSize) SetAuto(v bool) { - t.Auto = &v -} - -// GetSize returns the Size field if non-nil, zero value otherwise. -func (t *TextSize) GetSize() int { - if t == nil || t.Size == nil { - return 0 - } - return *t.Size -} - -// GetOkSize returns a tuple with the Size field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (t *TextSize) GetSizeOk() (int, bool) { - if t == nil || t.Size == nil { - return 0, false - } - return *t.Size, true -} - -// HasSize returns a boolean if a field has been set. -func (t *TextSize) HasSize() bool { - if t != nil && t.Size != nil { - return true - } - - return false -} - -// SetSize allocates a new t.Size and returns the pointer to it. -func (t *TextSize) SetSize(v int) { - t.Size = &v -} - // GetCritical returns the Critical field if non-nil, zero value otherwise. func (t *ThresholdCount) GetCritical() json.Number { if t == nil || t.Critical == nil { @@ -11243,7 +7368,7 @@ func (t *ThresholdCount) GetCritical() json.Number { return *t.Critical } -// GetOkCritical returns a tuple with the Critical field if it's non-nil, zero value otherwise +// GetCriticalOk returns a tuple with the Critical field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (t *ThresholdCount) GetCriticalOk() (json.Number, bool) { if t == nil || t.Critical == nil { @@ -11274,7 +7399,7 @@ func (t *ThresholdCount) GetCriticalRecovery() json.Number { return *t.CriticalRecovery } -// GetOkCriticalRecovery returns a tuple with the CriticalRecovery field if it's non-nil, zero value otherwise +// GetCriticalRecoveryOk returns a tuple with the CriticalRecovery field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (t *ThresholdCount) GetCriticalRecoveryOk() (json.Number, bool) { if t == nil || t.CriticalRecovery == nil { @@ -11336,7 +7461,7 @@ func (t *ThresholdCount) GetUnknown() json.Number { return *t.Unknown } -// GetOkUnknown returns a tuple with the Unknown field if it's non-nil, zero value otherwise +// GetUnknownOk returns a tuple with the Unknown field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (t *ThresholdCount) GetUnknownOk() (json.Number, bool) { if t == nil || t.Unknown == nil { @@ -11367,7 +7492,7 @@ func (t *ThresholdCount) GetWarning() json.Number { return *t.Warning } -// GetOkWarning returns a tuple with the Warning field if it's non-nil, zero value otherwise +// GetWarningOk returns a tuple with the Warning field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (t *ThresholdCount) GetWarningOk() (json.Number, bool) { if t == nil || t.Warning == nil { @@ -11398,7 +7523,7 @@ func (t *ThresholdCount) GetWarningRecovery() json.Number { return *t.WarningRecovery } -// GetOkWarningRecovery returns a tuple with the WarningRecovery field if it's non-nil, zero value otherwise +// GetWarningRecoveryOk returns a tuple with the WarningRecovery field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (t *ThresholdCount) GetWarningRecoveryOk() (json.Number, bool) { if t == nil || t.WarningRecovery == nil { @@ -11421,6 +7546,254 @@ func (t *ThresholdCount) SetWarningRecovery(v json.Number) { t.WarningRecovery = &v } +// GetAutoscale returns the Autoscale field if non-nil, zero value otherwise. +func (t *TileDef) GetAutoscale() bool { + if t == nil || t.Autoscale == nil { + return false + } + return *t.Autoscale +} + +// GetAutoscaleOk returns a tuple with the Autoscale field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (t *TileDef) GetAutoscaleOk() (bool, bool) { + if t == nil || t.Autoscale == nil { + return false, false + } + return *t.Autoscale, true +} + +// HasAutoscale returns a boolean if a field has been set. +func (t *TileDef) HasAutoscale() bool { + if t != nil && t.Autoscale != nil { + return true + } + + return false +} + +// SetAutoscale allocates a new t.Autoscale and returns the pointer to it. +func (t *TileDef) SetAutoscale(v bool) { + t.Autoscale = &v +} + +// GetCustomUnit returns the CustomUnit field if non-nil, zero value otherwise. +func (t *TileDef) GetCustomUnit() string { + if t == nil || t.CustomUnit == nil { + return "" + } + return *t.CustomUnit +} + +// GetCustomUnitOk returns a tuple with the CustomUnit field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (t *TileDef) GetCustomUnitOk() (string, bool) { + if t == nil || t.CustomUnit == nil { + return "", false + } + return *t.CustomUnit, true +} + +// HasCustomUnit returns a boolean if a field has been set. +func (t *TileDef) HasCustomUnit() bool { + if t != nil && t.CustomUnit != nil { + return true + } + + return false +} + +// SetCustomUnit allocates a new t.CustomUnit and returns the pointer to it. +func (t *TileDef) SetCustomUnit(v string) { + t.CustomUnit = &v +} + +// GetNodeType returns the NodeType field if non-nil, zero value otherwise. +func (t *TileDef) GetNodeType() string { + if t == nil || t.NodeType == nil { + return "" + } + return *t.NodeType +} + +// GetNodeTypeOk returns a tuple with the NodeType field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (t *TileDef) GetNodeTypeOk() (string, bool) { + if t == nil || t.NodeType == nil { + return "", false + } + return *t.NodeType, true +} + +// HasNodeType returns a boolean if a field has been set. +func (t *TileDef) HasNodeType() bool { + if t != nil && t.NodeType != nil { + return true + } + + return false +} + +// SetNodeType allocates a new t.NodeType and returns the pointer to it. +func (t *TileDef) SetNodeType(v string) { + t.NodeType = &v +} + +// GetNoGroupHosts returns the NoGroupHosts field if non-nil, zero value otherwise. +func (t *TileDef) GetNoGroupHosts() bool { + if t == nil || t.NoGroupHosts == nil { + return false + } + return *t.NoGroupHosts +} + +// GetNoGroupHostsOk returns a tuple with the NoGroupHosts field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (t *TileDef) GetNoGroupHostsOk() (bool, bool) { + if t == nil || t.NoGroupHosts == nil { + return false, false + } + return *t.NoGroupHosts, true +} + +// HasNoGroupHosts returns a boolean if a field has been set. +func (t *TileDef) HasNoGroupHosts() bool { + if t != nil && t.NoGroupHosts != nil { + return true + } + + return false +} + +// SetNoGroupHosts allocates a new t.NoGroupHosts and returns the pointer to it. +func (t *TileDef) SetNoGroupHosts(v bool) { + t.NoGroupHosts = &v +} + +// GetNoMetricHosts returns the NoMetricHosts field if non-nil, zero value otherwise. +func (t *TileDef) GetNoMetricHosts() bool { + if t == nil || t.NoMetricHosts == nil { + return false + } + return *t.NoMetricHosts +} + +// GetNoMetricHostsOk returns a tuple with the NoMetricHosts field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (t *TileDef) GetNoMetricHostsOk() (bool, bool) { + if t == nil || t.NoMetricHosts == nil { + return false, false + } + return *t.NoMetricHosts, true +} + +// HasNoMetricHosts returns a boolean if a field has been set. +func (t *TileDef) HasNoMetricHosts() bool { + if t != nil && t.NoMetricHosts != nil { + return true + } + + return false +} + +// SetNoMetricHosts allocates a new t.NoMetricHosts and returns the pointer to it. +func (t *TileDef) SetNoMetricHosts(v bool) { + t.NoMetricHosts = &v +} + +// GetPrecision returns the Precision field if non-nil, zero value otherwise. +func (t *TileDef) GetPrecision() json.Number { + if t == nil || t.Precision == nil { + return "" + } + return *t.Precision +} + +// GetPrecisionOk returns a tuple with the Precision field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (t *TileDef) GetPrecisionOk() (json.Number, bool) { + if t == nil || t.Precision == nil { + return "", false + } + return *t.Precision, true +} + +// HasPrecision returns a boolean if a field has been set. +func (t *TileDef) HasPrecision() bool { + if t != nil && t.Precision != nil { + return true + } + + return false +} + +// SetPrecision allocates a new t.Precision and returns the pointer to it. +func (t *TileDef) SetPrecision(v json.Number) { + t.Precision = &v +} + +// GetStyle returns the Style field if non-nil, zero value otherwise. +func (t *TileDef) GetStyle() TileDefStyle { + if t == nil || t.Style == nil { + return TileDefStyle{} + } + return *t.Style +} + +// GetStyleOk returns a tuple with the Style field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (t *TileDef) GetStyleOk() (TileDefStyle, bool) { + if t == nil || t.Style == nil { + return TileDefStyle{}, false + } + return *t.Style, true +} + +// HasStyle returns a boolean if a field has been set. +func (t *TileDef) HasStyle() bool { + if t != nil && t.Style != nil { + return true + } + + return false +} + +// SetStyle allocates a new t.Style and returns the pointer to it. +func (t *TileDef) SetStyle(v TileDefStyle) { + t.Style = &v +} + +// GetTextAlign returns the TextAlign field if non-nil, zero value otherwise. +func (t *TileDef) GetTextAlign() string { + if t == nil || t.TextAlign == nil { + return "" + } + return *t.TextAlign +} + +// GetTextAlignOk returns a tuple with the TextAlign field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (t *TileDef) GetTextAlignOk() (string, bool) { + if t == nil || t.TextAlign == nil { + return "", false + } + return *t.TextAlign, true +} + +// HasTextAlign returns a boolean if a field has been set. +func (t *TileDef) HasTextAlign() bool { + if t != nil && t.TextAlign != nil { + return true + } + + return false +} + +// SetTextAlign allocates a new t.TextAlign and returns the pointer to it. +func (t *TileDef) SetTextAlign(v string) { + t.TextAlign = &v +} + // GetViz returns the Viz field if non-nil, zero value otherwise. func (t *TileDef) GetViz() string { if t == nil || t.Viz == nil { @@ -11429,7 +7802,7 @@ func (t *TileDef) GetViz() string { return *t.Viz } -// GetOkViz returns a tuple with the Viz field if it's non-nil, zero value otherwise +// GetVizOk returns a tuple with the Viz field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (t *TileDef) GetVizOk() (string, bool) { if t == nil || t.Viz == nil { @@ -11460,7 +7833,7 @@ func (t *TileDefEvent) GetQuery() string { return *t.Query } -// GetOkQuery returns a tuple with the Query field if it's non-nil, zero value otherwise +// GetQueryOk returns a tuple with the Query field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (t *TileDefEvent) GetQueryOk() (string, bool) { if t == nil || t.Query == nil { @@ -11484,16 +7857,16 @@ func (t *TileDefEvent) SetQuery(v string) { } // GetLabel returns the Label field if non-nil, zero value otherwise. -func (t *TimeseriesMarker) GetLabel() string { +func (t *TileDefMarker) GetLabel() string { if t == nil || t.Label == nil { return "" } return *t.Label } -// GetOkLabel returns a tuple with the Label field if it's non-nil, zero value otherwise +// GetLabelOk returns a tuple with the Label field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. -func (t *TimeseriesMarker) GetLabelOk() (string, bool) { +func (t *TileDefMarker) GetLabelOk() (string, bool) { if t == nil || t.Label == nil { return "", false } @@ -11501,7 +7874,7 @@ func (t *TimeseriesMarker) GetLabelOk() (string, bool) { } // HasLabel returns a boolean if a field has been set. -func (t *TimeseriesMarker) HasLabel() bool { +func (t *TileDefMarker) HasLabel() bool { if t != nil && t.Label != nil { return true } @@ -11510,21 +7883,21 @@ func (t *TimeseriesMarker) HasLabel() bool { } // SetLabel allocates a new t.Label and returns the pointer to it. -func (t *TimeseriesMarker) SetLabel(v string) { +func (t *TileDefMarker) SetLabel(v string) { t.Label = &v } // GetType returns the Type field if non-nil, zero value otherwise. -func (t *TimeseriesMarker) GetType() string { +func (t *TileDefMarker) GetType() string { if t == nil || t.Type == nil { return "" } return *t.Type } -// GetOkType returns a tuple with the Type field if it's non-nil, zero value otherwise +// GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. -func (t *TimeseriesMarker) GetTypeOk() (string, bool) { +func (t *TileDefMarker) GetTypeOk() (string, bool) { if t == nil || t.Type == nil { return "", false } @@ -11532,7 +7905,7 @@ func (t *TimeseriesMarker) GetTypeOk() (string, bool) { } // HasType returns a boolean if a field has been set. -func (t *TimeseriesMarker) HasType() bool { +func (t *TileDefMarker) HasType() bool { if t != nil && t.Type != nil { return true } @@ -11541,21 +7914,21 @@ func (t *TimeseriesMarker) HasType() bool { } // SetType allocates a new t.Type and returns the pointer to it. -func (t *TimeseriesMarker) SetType(v string) { +func (t *TileDefMarker) SetType(v string) { t.Type = &v } // GetValue returns the Value field if non-nil, zero value otherwise. -func (t *TimeseriesMarker) GetValue() string { +func (t *TileDefMarker) GetValue() string { if t == nil || t.Value == nil { return "" } return *t.Value } -// GetOkValue returns a tuple with the Value field if it's non-nil, zero value otherwise +// GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. -func (t *TimeseriesMarker) GetValueOk() (string, bool) { +func (t *TileDefMarker) GetValueOk() (string, bool) { if t == nil || t.Value == nil { return "", false } @@ -11563,7 +7936,7 @@ func (t *TimeseriesMarker) GetValueOk() (string, bool) { } // HasValue returns a boolean if a field has been set. -func (t *TimeseriesMarker) HasValue() bool { +func (t *TileDefMarker) HasValue() bool { if t != nil && t.Value != nil { return true } @@ -11572,21 +7945,300 @@ func (t *TimeseriesMarker) HasValue() bool { } // SetValue allocates a new t.Value and returns the pointer to it. -func (t *TimeseriesMarker) SetValue(v string) { +func (t *TileDefMarker) SetValue(v string) { t.Value = &v } +// GetAggregator returns the Aggregator field if non-nil, zero value otherwise. +func (t *TileDefRequest) GetAggregator() string { + if t == nil || t.Aggregator == nil { + return "" + } + return *t.Aggregator +} + +// GetAggregatorOk returns a tuple with the Aggregator field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (t *TileDefRequest) GetAggregatorOk() (string, bool) { + if t == nil || t.Aggregator == nil { + return "", false + } + return *t.Aggregator, true +} + +// HasAggregator returns a boolean if a field has been set. +func (t *TileDefRequest) HasAggregator() bool { + if t != nil && t.Aggregator != nil { + return true + } + + return false +} + +// SetAggregator allocates a new t.Aggregator and returns the pointer to it. +func (t *TileDefRequest) SetAggregator(v string) { + t.Aggregator = &v +} + +// GetChangeType returns the ChangeType field if non-nil, zero value otherwise. +func (t *TileDefRequest) GetChangeType() string { + if t == nil || t.ChangeType == nil { + return "" + } + return *t.ChangeType +} + +// GetChangeTypeOk returns a tuple with the ChangeType field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (t *TileDefRequest) GetChangeTypeOk() (string, bool) { + if t == nil || t.ChangeType == nil { + return "", false + } + return *t.ChangeType, true +} + +// HasChangeType returns a boolean if a field has been set. +func (t *TileDefRequest) HasChangeType() bool { + if t != nil && t.ChangeType != nil { + return true + } + + return false +} + +// SetChangeType allocates a new t.ChangeType and returns the pointer to it. +func (t *TileDefRequest) SetChangeType(v string) { + t.ChangeType = &v +} + +// GetCompareTo returns the CompareTo field if non-nil, zero value otherwise. +func (t *TileDefRequest) GetCompareTo() string { + if t == nil || t.CompareTo == nil { + return "" + } + return *t.CompareTo +} + +// GetCompareToOk returns a tuple with the CompareTo field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (t *TileDefRequest) GetCompareToOk() (string, bool) { + if t == nil || t.CompareTo == nil { + return "", false + } + return *t.CompareTo, true +} + +// HasCompareTo returns a boolean if a field has been set. +func (t *TileDefRequest) HasCompareTo() bool { + if t != nil && t.CompareTo != nil { + return true + } + + return false +} + +// SetCompareTo allocates a new t.CompareTo and returns the pointer to it. +func (t *TileDefRequest) SetCompareTo(v string) { + t.CompareTo = &v +} + +// GetExtraCol returns the ExtraCol field if non-nil, zero value otherwise. +func (t *TileDefRequest) GetExtraCol() string { + if t == nil || t.ExtraCol == nil { + return "" + } + return *t.ExtraCol +} + +// GetExtraColOk returns a tuple with the ExtraCol field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (t *TileDefRequest) GetExtraColOk() (string, bool) { + if t == nil || t.ExtraCol == nil { + return "", false + } + return *t.ExtraCol, true +} + +// HasExtraCol returns a boolean if a field has been set. +func (t *TileDefRequest) HasExtraCol() bool { + if t != nil && t.ExtraCol != nil { + return true + } + + return false +} + +// SetExtraCol allocates a new t.ExtraCol and returns the pointer to it. +func (t *TileDefRequest) SetExtraCol(v string) { + t.ExtraCol = &v +} + +// GetIncreaseGood returns the IncreaseGood field if non-nil, zero value otherwise. +func (t *TileDefRequest) GetIncreaseGood() bool { + if t == nil || t.IncreaseGood == nil { + return false + } + return *t.IncreaseGood +} + +// GetIncreaseGoodOk returns a tuple with the IncreaseGood field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (t *TileDefRequest) GetIncreaseGoodOk() (bool, bool) { + if t == nil || t.IncreaseGood == nil { + return false, false + } + return *t.IncreaseGood, true +} + +// HasIncreaseGood returns a boolean if a field has been set. +func (t *TileDefRequest) HasIncreaseGood() bool { + if t != nil && t.IncreaseGood != nil { + return true + } + + return false +} + +// SetIncreaseGood allocates a new t.IncreaseGood and returns the pointer to it. +func (t *TileDefRequest) SetIncreaseGood(v bool) { + t.IncreaseGood = &v +} + +// GetLimit returns the Limit field if non-nil, zero value otherwise. +func (t *TileDefRequest) GetLimit() int { + if t == nil || t.Limit == nil { + return 0 + } + return *t.Limit +} + +// GetLimitOk returns a tuple with the Limit field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (t *TileDefRequest) GetLimitOk() (int, bool) { + if t == nil || t.Limit == nil { + return 0, false + } + return *t.Limit, true +} + +// HasLimit returns a boolean if a field has been set. +func (t *TileDefRequest) HasLimit() bool { + if t != nil && t.Limit != nil { + return true + } + + return false +} + +// SetLimit allocates a new t.Limit and returns the pointer to it. +func (t *TileDefRequest) SetLimit(v int) { + t.Limit = &v +} + +// GetMetric returns the Metric field if non-nil, zero value otherwise. +func (t *TileDefRequest) GetMetric() string { + if t == nil || t.Metric == nil { + return "" + } + return *t.Metric +} + +// GetMetricOk returns a tuple with the Metric field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (t *TileDefRequest) GetMetricOk() (string, bool) { + if t == nil || t.Metric == nil { + return "", false + } + return *t.Metric, true +} + +// HasMetric returns a boolean if a field has been set. +func (t *TileDefRequest) HasMetric() bool { + if t != nil && t.Metric != nil { + return true + } + + return false +} + +// SetMetric allocates a new t.Metric and returns the pointer to it. +func (t *TileDefRequest) SetMetric(v string) { + t.Metric = &v +} + +// GetOrderBy returns the OrderBy field if non-nil, zero value otherwise. +func (t *TileDefRequest) GetOrderBy() string { + if t == nil || t.OrderBy == nil { + return "" + } + return *t.OrderBy +} + +// GetOrderByOk returns a tuple with the OrderBy field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (t *TileDefRequest) GetOrderByOk() (string, bool) { + if t == nil || t.OrderBy == nil { + return "", false + } + return *t.OrderBy, true +} + +// HasOrderBy returns a boolean if a field has been set. +func (t *TileDefRequest) HasOrderBy() bool { + if t != nil && t.OrderBy != nil { + return true + } + + return false +} + +// SetOrderBy allocates a new t.OrderBy and returns the pointer to it. +func (t *TileDefRequest) SetOrderBy(v string) { + t.OrderBy = &v +} + +// GetOrderDir returns the OrderDir field if non-nil, zero value otherwise. +func (t *TileDefRequest) GetOrderDir() string { + if t == nil || t.OrderDir == nil { + return "" + } + return *t.OrderDir +} + +// GetOrderDirOk returns a tuple with the OrderDir field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (t *TileDefRequest) GetOrderDirOk() (string, bool) { + if t == nil || t.OrderDir == nil { + return "", false + } + return *t.OrderDir, true +} + +// HasOrderDir returns a boolean if a field has been set. +func (t *TileDefRequest) HasOrderDir() bool { + if t != nil && t.OrderDir != nil { + return true + } + + return false +} + +// SetOrderDir allocates a new t.OrderDir and returns the pointer to it. +func (t *TileDefRequest) SetOrderDir(v string) { + t.OrderDir = &v +} + // GetQuery returns the Query field if non-nil, zero value otherwise. -func (t *TimeseriesRequest) GetQuery() string { +func (t *TileDefRequest) GetQuery() string { if t == nil || t.Query == nil { return "" } return *t.Query } -// GetOkQuery returns a tuple with the Query field if it's non-nil, zero value otherwise +// GetQueryOk returns a tuple with the Query field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. -func (t *TimeseriesRequest) GetQueryOk() (string, bool) { +func (t *TileDefRequest) GetQueryOk() (string, bool) { if t == nil || t.Query == nil { return "", false } @@ -11594,7 +8246,7 @@ func (t *TimeseriesRequest) GetQueryOk() (string, bool) { } // HasQuery returns a boolean if a field has been set. -func (t *TimeseriesRequest) HasQuery() bool { +func (t *TileDefRequest) HasQuery() bool { if t != nil && t.Query != nil { return true } @@ -11603,29 +8255,60 @@ func (t *TimeseriesRequest) HasQuery() bool { } // SetQuery allocates a new t.Query and returns the pointer to it. -func (t *TimeseriesRequest) SetQuery(v string) { +func (t *TileDefRequest) SetQuery(v string) { t.Query = &v } +// GetQueryType returns the QueryType field if non-nil, zero value otherwise. +func (t *TileDefRequest) GetQueryType() string { + if t == nil || t.QueryType == nil { + return "" + } + return *t.QueryType +} + +// GetQueryTypeOk returns a tuple with the QueryType field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (t *TileDefRequest) GetQueryTypeOk() (string, bool) { + if t == nil || t.QueryType == nil { + return "", false + } + return *t.QueryType, true +} + +// HasQueryType returns a boolean if a field has been set. +func (t *TileDefRequest) HasQueryType() bool { + if t != nil && t.QueryType != nil { + return true + } + + return false +} + +// SetQueryType allocates a new t.QueryType and returns the pointer to it. +func (t *TileDefRequest) SetQueryType(v string) { + t.QueryType = &v +} + // GetStyle returns the Style field if non-nil, zero value otherwise. -func (t *TimeseriesRequest) GetStyle() TimeseriesRequestStyle { +func (t *TileDefRequest) GetStyle() TileDefRequestStyle { if t == nil || t.Style == nil { - return TimeseriesRequestStyle{} + return TileDefRequestStyle{} } return *t.Style } -// GetOkStyle returns a tuple with the Style field if it's non-nil, zero value otherwise +// GetStyleOk returns a tuple with the Style field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. -func (t *TimeseriesRequest) GetStyleOk() (TimeseriesRequestStyle, bool) { +func (t *TileDefRequest) GetStyleOk() (TileDefRequestStyle, bool) { if t == nil || t.Style == nil { - return TimeseriesRequestStyle{}, false + return TileDefRequestStyle{}, false } return *t.Style, true } // HasStyle returns a boolean if a field has been set. -func (t *TimeseriesRequest) HasStyle() bool { +func (t *TileDefRequest) HasStyle() bool { if t != nil && t.Style != nil { return true } @@ -11634,21 +8317,52 @@ func (t *TimeseriesRequest) HasStyle() bool { } // SetStyle allocates a new t.Style and returns the pointer to it. -func (t *TimeseriesRequest) SetStyle(v TimeseriesRequestStyle) { +func (t *TileDefRequest) SetStyle(v TileDefRequestStyle) { t.Style = &v } +// GetTextFilter returns the TextFilter field if non-nil, zero value otherwise. +func (t *TileDefRequest) GetTextFilter() string { + if t == nil || t.TextFilter == nil { + return "" + } + return *t.TextFilter +} + +// GetTextFilterOk returns a tuple with the TextFilter field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (t *TileDefRequest) GetTextFilterOk() (string, bool) { + if t == nil || t.TextFilter == nil { + return "", false + } + return *t.TextFilter, true +} + +// HasTextFilter returns a boolean if a field has been set. +func (t *TileDefRequest) HasTextFilter() bool { + if t != nil && t.TextFilter != nil { + return true + } + + return false +} + +// SetTextFilter allocates a new t.TextFilter and returns the pointer to it. +func (t *TileDefRequest) SetTextFilter(v string) { + t.TextFilter = &v +} + // GetType returns the Type field if non-nil, zero value otherwise. -func (t *TimeseriesRequest) GetType() string { +func (t *TileDefRequest) GetType() string { if t == nil || t.Type == nil { return "" } return *t.Type } -// GetOkType returns a tuple with the Type field if it's non-nil, zero value otherwise +// GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. -func (t *TimeseriesRequest) GetTypeOk() (string, bool) { +func (t *TileDefRequest) GetTypeOk() (string, bool) { if t == nil || t.Type == nil { return "", false } @@ -11656,7 +8370,7 @@ func (t *TimeseriesRequest) GetTypeOk() (string, bool) { } // HasType returns a boolean if a field has been set. -func (t *TimeseriesRequest) HasType() bool { +func (t *TileDefRequest) HasType() bool { if t != nil && t.Type != nil { return true } @@ -11665,21 +8379,21 @@ func (t *TimeseriesRequest) HasType() bool { } // SetType allocates a new t.Type and returns the pointer to it. -func (t *TimeseriesRequest) SetType(v string) { +func (t *TileDefRequest) SetType(v string) { t.Type = &v } // GetPalette returns the Palette field if non-nil, zero value otherwise. -func (t *TimeseriesRequestStyle) GetPalette() string { +func (t *TileDefRequestStyle) GetPalette() string { if t == nil || t.Palette == nil { return "" } return *t.Palette } -// GetOkPalette returns a tuple with the Palette field if it's non-nil, zero value otherwise +// GetPaletteOk returns a tuple with the Palette field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. -func (t *TimeseriesRequestStyle) GetPaletteOk() (string, bool) { +func (t *TileDefRequestStyle) GetPaletteOk() (string, bool) { if t == nil || t.Palette == nil { return "", false } @@ -11687,7 +8401,7 @@ func (t *TimeseriesRequestStyle) GetPaletteOk() (string, bool) { } // HasPalette returns a boolean if a field has been set. -func (t *TimeseriesRequestStyle) HasPalette() bool { +func (t *TileDefRequestStyle) HasPalette() bool { if t != nil && t.Palette != nil { return true } @@ -11696,269 +8410,21 @@ func (t *TimeseriesRequestStyle) HasPalette() bool { } // SetPalette allocates a new t.Palette and returns the pointer to it. -func (t *TimeseriesRequestStyle) SetPalette(v string) { +func (t *TileDefRequestStyle) SetPalette(v string) { t.Palette = &v } -// GetHeight returns the Height field if non-nil, zero value otherwise. -func (t *TimeseriesWidget) GetHeight() int { - if t == nil || t.Height == nil { - return 0 - } - return *t.Height -} - -// GetOkHeight returns a tuple with the Height field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (t *TimeseriesWidget) GetHeightOk() (int, bool) { - if t == nil || t.Height == nil { - return 0, false - } - return *t.Height, true -} - -// HasHeight returns a boolean if a field has been set. -func (t *TimeseriesWidget) HasHeight() bool { - if t != nil && t.Height != nil { - return true - } - - return false -} - -// SetHeight allocates a new t.Height and returns the pointer to it. -func (t *TimeseriesWidget) SetHeight(v int) { - t.Height = &v -} - -// GetLegend returns the Legend field if non-nil, zero value otherwise. -func (t *TimeseriesWidget) GetLegend() bool { - if t == nil || t.Legend == nil { - return false - } - return *t.Legend -} - -// GetOkLegend returns a tuple with the Legend field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (t *TimeseriesWidget) GetLegendOk() (bool, bool) { - if t == nil || t.Legend == nil { - return false, false - } - return *t.Legend, true -} - -// HasLegend returns a boolean if a field has been set. -func (t *TimeseriesWidget) HasLegend() bool { - if t != nil && t.Legend != nil { - return true - } - - return false -} - -// SetLegend allocates a new t.Legend and returns the pointer to it. -func (t *TimeseriesWidget) SetLegend(v bool) { - t.Legend = &v -} - -// GetTileDef returns the TileDef field if non-nil, zero value otherwise. -func (t *TimeseriesWidget) GetTileDef() TileDef { - if t == nil || t.TileDef == nil { - return TileDef{} - } - return *t.TileDef -} - -// GetOkTileDef returns a tuple with the TileDef field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (t *TimeseriesWidget) GetTileDefOk() (TileDef, bool) { - if t == nil || t.TileDef == nil { - return TileDef{}, false - } - return *t.TileDef, true -} - -// HasTileDef returns a boolean if a field has been set. -func (t *TimeseriesWidget) HasTileDef() bool { - if t != nil && t.TileDef != nil { - return true - } - - return false -} - -// SetTileDef allocates a new t.TileDef and returns the pointer to it. -func (t *TimeseriesWidget) SetTileDef(v TileDef) { - t.TileDef = &v -} - -// GetTimeframe returns the Timeframe field if non-nil, zero value otherwise. -func (t *TimeseriesWidget) GetTimeframe() string { - if t == nil || t.Timeframe == nil { - return "" - } - return *t.Timeframe -} - -// GetOkTimeframe returns a tuple with the Timeframe field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (t *TimeseriesWidget) GetTimeframeOk() (string, bool) { - if t == nil || t.Timeframe == nil { - return "", false - } - return *t.Timeframe, true -} - -// HasTimeframe returns a boolean if a field has been set. -func (t *TimeseriesWidget) HasTimeframe() bool { - if t != nil && t.Timeframe != nil { - return true - } - - return false -} - -// SetTimeframe allocates a new t.Timeframe and returns the pointer to it. -func (t *TimeseriesWidget) SetTimeframe(v string) { - t.Timeframe = &v -} - -// GetTitle returns the Title field if non-nil, zero value otherwise. -func (t *TimeseriesWidget) GetTitle() bool { - if t == nil || t.Title == nil { - return false - } - return *t.Title -} - -// GetOkTitle returns a tuple with the Title field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (t *TimeseriesWidget) GetTitleOk() (bool, bool) { - if t == nil || t.Title == nil { - return false, false - } - return *t.Title, true -} - -// HasTitle returns a boolean if a field has been set. -func (t *TimeseriesWidget) HasTitle() bool { - if t != nil && t.Title != nil { - return true - } - - return false -} - -// SetTitle allocates a new t.Title and returns the pointer to it. -func (t *TimeseriesWidget) SetTitle(v bool) { - t.Title = &v -} - -// GetTitleAlign returns the TitleAlign field if non-nil, zero value otherwise. -func (t *TimeseriesWidget) GetTitleAlign() string { - if t == nil || t.TitleAlign == nil { - return "" - } - return *t.TitleAlign -} - -// GetOkTitleAlign returns a tuple with the TitleAlign field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (t *TimeseriesWidget) GetTitleAlignOk() (string, bool) { - if t == nil || t.TitleAlign == nil { - return "", false - } - return *t.TitleAlign, true -} - -// HasTitleAlign returns a boolean if a field has been set. -func (t *TimeseriesWidget) HasTitleAlign() bool { - if t != nil && t.TitleAlign != nil { - return true - } - - return false -} - -// SetTitleAlign allocates a new t.TitleAlign and returns the pointer to it. -func (t *TimeseriesWidget) SetTitleAlign(v string) { - t.TitleAlign = &v -} - -// GetTitleSize returns the TitleSize field if non-nil, zero value otherwise. -func (t *TimeseriesWidget) GetTitleSize() TextSize { - if t == nil || t.TitleSize == nil { - return TextSize{} - } - return *t.TitleSize -} - -// GetOkTitleSize returns a tuple with the TitleSize field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (t *TimeseriesWidget) GetTitleSizeOk() (TextSize, bool) { - if t == nil || t.TitleSize == nil { - return TextSize{}, false - } - return *t.TitleSize, true -} - -// HasTitleSize returns a boolean if a field has been set. -func (t *TimeseriesWidget) HasTitleSize() bool { - if t != nil && t.TitleSize != nil { - return true - } - - return false -} - -// SetTitleSize allocates a new t.TitleSize and returns the pointer to it. -func (t *TimeseriesWidget) SetTitleSize(v TextSize) { - t.TitleSize = &v -} - -// GetTitleText returns the TitleText field if non-nil, zero value otherwise. -func (t *TimeseriesWidget) GetTitleText() string { - if t == nil || t.TitleText == nil { - return "" - } - return *t.TitleText -} - -// GetOkTitleText returns a tuple with the TitleText field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (t *TimeseriesWidget) GetTitleTextOk() (string, bool) { - if t == nil || t.TitleText == nil { - return "", false - } - return *t.TitleText, true -} - -// HasTitleText returns a boolean if a field has been set. -func (t *TimeseriesWidget) HasTitleText() bool { - if t != nil && t.TitleText != nil { - return true - } - - return false -} - -// SetTitleText allocates a new t.TitleText and returns the pointer to it. -func (t *TimeseriesWidget) SetTitleText(v string) { - t.TitleText = &v -} - // GetType returns the Type field if non-nil, zero value otherwise. -func (t *TimeseriesWidget) GetType() string { +func (t *TileDefRequestStyle) GetType() string { if t == nil || t.Type == nil { return "" } return *t.Type } -// GetOkType returns a tuple with the Type field if it's non-nil, zero value otherwise +// GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. -func (t *TimeseriesWidget) GetTypeOk() (string, bool) { +func (t *TileDefRequestStyle) GetTypeOk() (string, bool) { if t == nil || t.Type == nil { return "", false } @@ -11966,7 +8432,7 @@ func (t *TimeseriesWidget) GetTypeOk() (string, bool) { } // HasType returns a boolean if a field has been set. -func (t *TimeseriesWidget) HasType() bool { +func (t *TileDefRequestStyle) HasType() bool { if t != nil && t.Type != nil { return true } @@ -11975,29 +8441,29 @@ func (t *TimeseriesWidget) HasType() bool { } // SetType allocates a new t.Type and returns the pointer to it. -func (t *TimeseriesWidget) SetType(v string) { +func (t *TileDefRequestStyle) SetType(v string) { t.Type = &v } // GetWidth returns the Width field if non-nil, zero value otherwise. -func (t *TimeseriesWidget) GetWidth() int { +func (t *TileDefRequestStyle) GetWidth() string { if t == nil || t.Width == nil { - return 0 + return "" } return *t.Width } -// GetOkWidth returns a tuple with the Width field if it's non-nil, zero value otherwise +// GetWidthOk returns a tuple with the Width field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. -func (t *TimeseriesWidget) GetWidthOk() (int, bool) { +func (t *TileDefRequestStyle) GetWidthOk() (string, bool) { if t == nil || t.Width == nil { - return 0, false + return "", false } return *t.Width, true } // HasWidth returns a boolean if a field has been set. -func (t *TimeseriesWidget) HasWidth() bool { +func (t *TileDefRequestStyle) HasWidth() bool { if t != nil && t.Width != nil { return true } @@ -12006,473 +8472,256 @@ func (t *TimeseriesWidget) HasWidth() bool { } // SetWidth allocates a new t.Width and returns the pointer to it. -func (t *TimeseriesWidget) SetWidth(v int) { +func (t *TileDefRequestStyle) SetWidth(v string) { t.Width = &v } -// GetX returns the X field if non-nil, zero value otherwise. -func (t *TimeseriesWidget) GetX() int { - if t == nil || t.X == nil { - return 0 - } - return *t.X -} - -// GetOkX returns a tuple with the X field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (t *TimeseriesWidget) GetXOk() (int, bool) { - if t == nil || t.X == nil { - return 0, false - } - return *t.X, true -} - -// HasX returns a boolean if a field has been set. -func (t *TimeseriesWidget) HasX() bool { - if t != nil && t.X != nil { - return true - } - - return false -} - -// SetX allocates a new t.X and returns the pointer to it. -func (t *TimeseriesWidget) SetX(v int) { - t.X = &v -} - -// GetY returns the Y field if non-nil, zero value otherwise. -func (t *TimeseriesWidget) GetY() int { - if t == nil || t.Y == nil { - return 0 - } - return *t.Y -} - -// GetOkY returns a tuple with the Y field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (t *TimeseriesWidget) GetYOk() (int, bool) { - if t == nil || t.Y == nil { - return 0, false - } - return *t.Y, true -} - -// HasY returns a boolean if a field has been set. -func (t *TimeseriesWidget) HasY() bool { - if t != nil && t.Y != nil { - return true - } - - return false -} - -// SetY allocates a new t.Y and returns the pointer to it. -func (t *TimeseriesWidget) SetY(v int) { - t.Y = &v -} - -// GetHeight returns the Height field if non-nil, zero value otherwise. -func (t *ToplistWidget) GetHeight() int { - if t == nil || t.Height == nil { - return 0 - } - return *t.Height -} - -// GetOkHeight returns a tuple with the Height field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (t *ToplistWidget) GetHeightOk() (int, bool) { - if t == nil || t.Height == nil { - return 0, false - } - return *t.Height, true -} - -// HasHeight returns a boolean if a field has been set. -func (t *ToplistWidget) HasHeight() bool { - if t != nil && t.Height != nil { - return true - } - - return false -} - -// SetHeight allocates a new t.Height and returns the pointer to it. -func (t *ToplistWidget) SetHeight(v int) { - t.Height = &v -} - -// GetLegend returns the Legend field if non-nil, zero value otherwise. -func (t *ToplistWidget) GetLegend() bool { - if t == nil || t.Legend == nil { - return false - } - return *t.Legend -} - -// GetOkLegend returns a tuple with the Legend field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (t *ToplistWidget) GetLegendOk() (bool, bool) { - if t == nil || t.Legend == nil { - return false, false - } - return *t.Legend, true -} - -// HasLegend returns a boolean if a field has been set. -func (t *ToplistWidget) HasLegend() bool { - if t != nil && t.Legend != nil { - return true - } - - return false -} - -// SetLegend allocates a new t.Legend and returns the pointer to it. -func (t *ToplistWidget) SetLegend(v bool) { - t.Legend = &v -} - -// GetLegendSize returns the LegendSize field if non-nil, zero value otherwise. -func (t *ToplistWidget) GetLegendSize() int { - if t == nil || t.LegendSize == nil { - return 0 - } - return *t.LegendSize -} - -// GetOkLegendSize returns a tuple with the LegendSize field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (t *ToplistWidget) GetLegendSizeOk() (int, bool) { - if t == nil || t.LegendSize == nil { - return 0, false - } - return *t.LegendSize, true -} - -// HasLegendSize returns a boolean if a field has been set. -func (t *ToplistWidget) HasLegendSize() bool { - if t != nil && t.LegendSize != nil { - return true - } - - return false -} - -// SetLegendSize allocates a new t.LegendSize and returns the pointer to it. -func (t *ToplistWidget) SetLegendSize(v int) { - t.LegendSize = &v -} - -// GetTileDef returns the TileDef field if non-nil, zero value otherwise. -func (t *ToplistWidget) GetTileDef() TileDef { - if t == nil || t.TileDef == nil { - return TileDef{} - } - return *t.TileDef -} - -// GetOkTileDef returns a tuple with the TileDef field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (t *ToplistWidget) GetTileDefOk() (TileDef, bool) { - if t == nil || t.TileDef == nil { - return TileDef{}, false - } - return *t.TileDef, true -} - -// HasTileDef returns a boolean if a field has been set. -func (t *ToplistWidget) HasTileDef() bool { - if t != nil && t.TileDef != nil { - return true - } - - return false -} - -// SetTileDef allocates a new t.TileDef and returns the pointer to it. -func (t *ToplistWidget) SetTileDef(v TileDef) { - t.TileDef = &v -} - -// GetTimeframe returns the Timeframe field if non-nil, zero value otherwise. -func (t *ToplistWidget) GetTimeframe() string { - if t == nil || t.Timeframe == nil { +// GetFillMax returns the FillMax field if non-nil, zero value otherwise. +func (t *TileDefStyle) GetFillMax() string { + if t == nil || t.FillMax == nil { return "" } - return *t.Timeframe + return *t.FillMax } -// GetOkTimeframe returns a tuple with the Timeframe field if it's non-nil, zero value otherwise +// GetFillMaxOk returns a tuple with the FillMax field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. -func (t *ToplistWidget) GetTimeframeOk() (string, bool) { - if t == nil || t.Timeframe == nil { +func (t *TileDefStyle) GetFillMaxOk() (string, bool) { + if t == nil || t.FillMax == nil { return "", false } - return *t.Timeframe, true + return *t.FillMax, true } -// HasTimeframe returns a boolean if a field has been set. -func (t *ToplistWidget) HasTimeframe() bool { - if t != nil && t.Timeframe != nil { +// HasFillMax returns a boolean if a field has been set. +func (t *TileDefStyle) HasFillMax() bool { + if t != nil && t.FillMax != nil { return true } return false } -// SetTimeframe allocates a new t.Timeframe and returns the pointer to it. -func (t *ToplistWidget) SetTimeframe(v string) { - t.Timeframe = &v +// SetFillMax allocates a new t.FillMax and returns the pointer to it. +func (t *TileDefStyle) SetFillMax(v string) { + t.FillMax = &v } -// GetTitle returns the Title field if non-nil, zero value otherwise. -func (t *ToplistWidget) GetTitle() bool { - if t == nil || t.Title == nil { - return false - } - return *t.Title -} - -// GetOkTitle returns a tuple with the Title field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (t *ToplistWidget) GetTitleOk() (bool, bool) { - if t == nil || t.Title == nil { - return false, false - } - return *t.Title, true -} - -// HasTitle returns a boolean if a field has been set. -func (t *ToplistWidget) HasTitle() bool { - if t != nil && t.Title != nil { - return true - } - - return false -} - -// SetTitle allocates a new t.Title and returns the pointer to it. -func (t *ToplistWidget) SetTitle(v bool) { - t.Title = &v -} - -// GetTitleAlign returns the TitleAlign field if non-nil, zero value otherwise. -func (t *ToplistWidget) GetTitleAlign() string { - if t == nil || t.TitleAlign == nil { +// GetFillMin returns the FillMin field if non-nil, zero value otherwise. +func (t *TileDefStyle) GetFillMin() string { + if t == nil || t.FillMin == nil { return "" } - return *t.TitleAlign + return *t.FillMin } -// GetOkTitleAlign returns a tuple with the TitleAlign field if it's non-nil, zero value otherwise +// GetFillMinOk returns a tuple with the FillMin field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. -func (t *ToplistWidget) GetTitleAlignOk() (string, bool) { - if t == nil || t.TitleAlign == nil { +func (t *TileDefStyle) GetFillMinOk() (string, bool) { + if t == nil || t.FillMin == nil { return "", false } - return *t.TitleAlign, true + return *t.FillMin, true } -// HasTitleAlign returns a boolean if a field has been set. -func (t *ToplistWidget) HasTitleAlign() bool { - if t != nil && t.TitleAlign != nil { +// HasFillMin returns a boolean if a field has been set. +func (t *TileDefStyle) HasFillMin() bool { + if t != nil && t.FillMin != nil { return true } return false } -// SetTitleAlign allocates a new t.TitleAlign and returns the pointer to it. -func (t *ToplistWidget) SetTitleAlign(v string) { - t.TitleAlign = &v +// SetFillMin allocates a new t.FillMin and returns the pointer to it. +func (t *TileDefStyle) SetFillMin(v string) { + t.FillMin = &v } -// GetTitleSize returns the TitleSize field if non-nil, zero value otherwise. -func (t *ToplistWidget) GetTitleSize() TextSize { - if t == nil || t.TitleSize == nil { - return TextSize{} - } - return *t.TitleSize -} - -// GetOkTitleSize returns a tuple with the TitleSize field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (t *ToplistWidget) GetTitleSizeOk() (TextSize, bool) { - if t == nil || t.TitleSize == nil { - return TextSize{}, false - } - return *t.TitleSize, true -} - -// HasTitleSize returns a boolean if a field has been set. -func (t *ToplistWidget) HasTitleSize() bool { - if t != nil && t.TitleSize != nil { - return true - } - - return false -} - -// SetTitleSize allocates a new t.TitleSize and returns the pointer to it. -func (t *ToplistWidget) SetTitleSize(v TextSize) { - t.TitleSize = &v -} - -// GetTitleText returns the TitleText field if non-nil, zero value otherwise. -func (t *ToplistWidget) GetTitleText() string { - if t == nil || t.TitleText == nil { +// GetPalette returns the Palette field if non-nil, zero value otherwise. +func (t *TileDefStyle) GetPalette() string { + if t == nil || t.Palette == nil { return "" } - return *t.TitleText + return *t.Palette } -// GetOkTitleText returns a tuple with the TitleText field if it's non-nil, zero value otherwise +// GetPaletteOk returns a tuple with the Palette field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. -func (t *ToplistWidget) GetTitleTextOk() (string, bool) { - if t == nil || t.TitleText == nil { +func (t *TileDefStyle) GetPaletteOk() (string, bool) { + if t == nil || t.Palette == nil { return "", false } - return *t.TitleText, true + return *t.Palette, true } -// HasTitleText returns a boolean if a field has been set. -func (t *ToplistWidget) HasTitleText() bool { - if t != nil && t.TitleText != nil { +// HasPalette returns a boolean if a field has been set. +func (t *TileDefStyle) HasPalette() bool { + if t != nil && t.Palette != nil { return true } return false } -// SetTitleText allocates a new t.TitleText and returns the pointer to it. -func (t *ToplistWidget) SetTitleText(v string) { - t.TitleText = &v +// SetPalette allocates a new t.Palette and returns the pointer to it. +func (t *TileDefStyle) SetPalette(v string) { + t.Palette = &v } -// GetType returns the Type field if non-nil, zero value otherwise. -func (t *ToplistWidget) GetType() string { - if t == nil || t.Type == nil { +// GetPaletteFlip returns the PaletteFlip field if non-nil, zero value otherwise. +func (t *TileDefStyle) GetPaletteFlip() string { + if t == nil || t.PaletteFlip == nil { return "" } - return *t.Type + return *t.PaletteFlip } -// GetOkType returns a tuple with the Type field if it's non-nil, zero value otherwise +// GetPaletteFlipOk returns a tuple with the PaletteFlip field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. -func (t *ToplistWidget) GetTypeOk() (string, bool) { - if t == nil || t.Type == nil { +func (t *TileDefStyle) GetPaletteFlipOk() (string, bool) { + if t == nil || t.PaletteFlip == nil { return "", false } - return *t.Type, true + return *t.PaletteFlip, true } -// HasType returns a boolean if a field has been set. -func (t *ToplistWidget) HasType() bool { - if t != nil && t.Type != nil { +// HasPaletteFlip returns a boolean if a field has been set. +func (t *TileDefStyle) HasPaletteFlip() bool { + if t != nil && t.PaletteFlip != nil { return true } return false } -// SetType allocates a new t.Type and returns the pointer to it. -func (t *ToplistWidget) SetType(v string) { - t.Type = &v +// SetPaletteFlip allocates a new t.PaletteFlip and returns the pointer to it. +func (t *TileDefStyle) SetPaletteFlip(v string) { + t.PaletteFlip = &v } -// GetWidth returns the Width field if non-nil, zero value otherwise. -func (t *ToplistWidget) GetWidth() int { - if t == nil || t.Width == nil { +// GetLiveSpan returns the LiveSpan field if non-nil, zero value otherwise. +func (t *Time) GetLiveSpan() string { + if t == nil || t.LiveSpan == nil { + return "" + } + return *t.LiveSpan +} + +// GetLiveSpanOk returns a tuple with the LiveSpan field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (t *Time) GetLiveSpanOk() (string, bool) { + if t == nil || t.LiveSpan == nil { + return "", false + } + return *t.LiveSpan, true +} + +// HasLiveSpan returns a boolean if a field has been set. +func (t *Time) HasLiveSpan() bool { + if t != nil && t.LiveSpan != nil { + return true + } + + return false +} + +// SetLiveSpan allocates a new t.LiveSpan and returns the pointer to it. +func (t *Time) SetLiveSpan(v string) { + t.LiveSpan = &v +} + +// GetFromTs returns the FromTs field if non-nil, zero value otherwise. +func (t *TriggeringValue) GetFromTs() int { + if t == nil || t.FromTs == nil { return 0 } - return *t.Width + return *t.FromTs } -// GetOkWidth returns a tuple with the Width field if it's non-nil, zero value otherwise +// GetFromTsOk returns a tuple with the FromTs field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. -func (t *ToplistWidget) GetWidthOk() (int, bool) { - if t == nil || t.Width == nil { +func (t *TriggeringValue) GetFromTsOk() (int, bool) { + if t == nil || t.FromTs == nil { return 0, false } - return *t.Width, true + return *t.FromTs, true } -// HasWidth returns a boolean if a field has been set. -func (t *ToplistWidget) HasWidth() bool { - if t != nil && t.Width != nil { +// HasFromTs returns a boolean if a field has been set. +func (t *TriggeringValue) HasFromTs() bool { + if t != nil && t.FromTs != nil { return true } return false } -// SetWidth allocates a new t.Width and returns the pointer to it. -func (t *ToplistWidget) SetWidth(v int) { - t.Width = &v +// SetFromTs allocates a new t.FromTs and returns the pointer to it. +func (t *TriggeringValue) SetFromTs(v int) { + t.FromTs = &v } -// GetX returns the X field if non-nil, zero value otherwise. -func (t *ToplistWidget) GetX() int { - if t == nil || t.X == nil { +// GetToTs returns the ToTs field if non-nil, zero value otherwise. +func (t *TriggeringValue) GetToTs() int { + if t == nil || t.ToTs == nil { return 0 } - return *t.X + return *t.ToTs } -// GetOkX returns a tuple with the X field if it's non-nil, zero value otherwise +// GetToTsOk returns a tuple with the ToTs field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. -func (t *ToplistWidget) GetXOk() (int, bool) { - if t == nil || t.X == nil { +func (t *TriggeringValue) GetToTsOk() (int, bool) { + if t == nil || t.ToTs == nil { return 0, false } - return *t.X, true + return *t.ToTs, true } -// HasX returns a boolean if a field has been set. -func (t *ToplistWidget) HasX() bool { - if t != nil && t.X != nil { +// HasToTs returns a boolean if a field has been set. +func (t *TriggeringValue) HasToTs() bool { + if t != nil && t.ToTs != nil { return true } return false } -// SetX allocates a new t.X and returns the pointer to it. -func (t *ToplistWidget) SetX(v int) { - t.X = &v +// SetToTs allocates a new t.ToTs and returns the pointer to it. +func (t *TriggeringValue) SetToTs(v int) { + t.ToTs = &v } -// GetY returns the Y field if non-nil, zero value otherwise. -func (t *ToplistWidget) GetY() int { - if t == nil || t.Y == nil { +// GetValue returns the Value field if non-nil, zero value otherwise. +func (t *TriggeringValue) GetValue() int { + if t == nil || t.Value == nil { return 0 } - return *t.Y + return *t.Value } -// GetOkY returns a tuple with the Y field if it's non-nil, zero value otherwise +// GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. -func (t *ToplistWidget) GetYOk() (int, bool) { - if t == nil || t.Y == nil { +func (t *TriggeringValue) GetValueOk() (int, bool) { + if t == nil || t.Value == nil { return 0, false } - return *t.Y, true + return *t.Value, true } -// HasY returns a boolean if a field has been set. -func (t *ToplistWidget) HasY() bool { - if t != nil && t.Y != nil { +// HasValue returns a boolean if a field has been set. +func (t *TriggeringValue) HasValue() bool { + if t != nil && t.Value != nil { return true } return false } -// SetY allocates a new t.Y and returns the pointer to it. -func (t *ToplistWidget) SetY(v int) { - t.Y = &v +// SetValue allocates a new t.Value and returns the pointer to it. +func (t *TriggeringValue) SetValue(v int) { + t.Value = &v } // GetAccessRole returns the AccessRole field if non-nil, zero value otherwise. @@ -12483,7 +8732,7 @@ func (u *User) GetAccessRole() string { return *u.AccessRole } -// GetOkAccessRole returns a tuple with the AccessRole field if it's non-nil, zero value otherwise +// GetAccessRoleOk returns a tuple with the AccessRole field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (u *User) GetAccessRoleOk() (string, bool) { if u == nil || u.AccessRole == nil { @@ -12514,7 +8763,7 @@ func (u *User) GetDisabled() bool { return *u.Disabled } -// GetOkDisabled returns a tuple with the Disabled field if it's non-nil, zero value otherwise +// GetDisabledOk returns a tuple with the Disabled field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (u *User) GetDisabledOk() (bool, bool) { if u == nil || u.Disabled == nil { @@ -12545,7 +8794,7 @@ func (u *User) GetEmail() string { return *u.Email } -// GetOkEmail returns a tuple with the Email field if it's non-nil, zero value otherwise +// GetEmailOk returns a tuple with the Email field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (u *User) GetEmailOk() (string, bool) { if u == nil || u.Email == nil { @@ -12576,7 +8825,7 @@ func (u *User) GetHandle() string { return *u.Handle } -// GetOkHandle returns a tuple with the Handle field if it's non-nil, zero value otherwise +// GetHandleOk returns a tuple with the Handle field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (u *User) GetHandleOk() (string, bool) { if u == nil || u.Handle == nil { @@ -12607,7 +8856,7 @@ func (u *User) GetIsAdmin() bool { return *u.IsAdmin } -// GetOkIsAdmin returns a tuple with the IsAdmin field if it's non-nil, zero value otherwise +// GetIsAdminOk returns a tuple with the IsAdmin field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (u *User) GetIsAdminOk() (bool, bool) { if u == nil || u.IsAdmin == nil { @@ -12638,7 +8887,7 @@ func (u *User) GetName() string { return *u.Name } -// GetOkName returns a tuple with the Name field if it's non-nil, zero value otherwise +// GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (u *User) GetNameOk() (string, bool) { if u == nil || u.Name == nil { @@ -12669,7 +8918,7 @@ func (u *User) GetRole() string { return *u.Role } -// GetOkRole returns a tuple with the Role field if it's non-nil, zero value otherwise +// GetRoleOk returns a tuple with the Role field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (u *User) GetRoleOk() (string, bool) { if u == nil || u.Role == nil { @@ -12700,7 +8949,7 @@ func (u *User) GetVerified() bool { return *u.Verified } -// GetOkVerified returns a tuple with the Verified field if it's non-nil, zero value otherwise +// GetVerifiedOk returns a tuple with the Verified field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (u *User) GetVerifiedOk() (bool, bool) { if u == nil || u.Verified == nil { @@ -12723,562 +8972,1802 @@ func (u *User) SetVerified(v bool) { u.Verified = &v } -// GetAlertGraphWidget returns the AlertGraphWidget field if non-nil, zero value otherwise. -func (w *Widget) GetAlertGraphWidget() AlertGraphWidget { - if w == nil || w.AlertGraphWidget == nil { - return AlertGraphWidget{} +// GetAlertID returns the AlertID field if non-nil, zero value otherwise. +func (w *Widget) GetAlertID() int { + if w == nil || w.AlertID == nil { + return 0 } - return *w.AlertGraphWidget + return *w.AlertID } -// GetOkAlertGraphWidget returns a tuple with the AlertGraphWidget field if it's non-nil, zero value otherwise +// GetAlertIDOk returns a tuple with the AlertID field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. -func (w *Widget) GetAlertGraphWidgetOk() (AlertGraphWidget, bool) { - if w == nil || w.AlertGraphWidget == nil { - return AlertGraphWidget{}, false +func (w *Widget) GetAlertIDOk() (int, bool) { + if w == nil || w.AlertID == nil { + return 0, false } - return *w.AlertGraphWidget, true + return *w.AlertID, true } -// HasAlertGraphWidget returns a boolean if a field has been set. -func (w *Widget) HasAlertGraphWidget() bool { - if w != nil && w.AlertGraphWidget != nil { +// HasAlertID returns a boolean if a field has been set. +func (w *Widget) HasAlertID() bool { + if w != nil && w.AlertID != nil { return true } return false } -// SetAlertGraphWidget allocates a new w.AlertGraphWidget and returns the pointer to it. -func (w *Widget) SetAlertGraphWidget(v AlertGraphWidget) { - w.AlertGraphWidget = &v +// SetAlertID allocates a new w.AlertID and returns the pointer to it. +func (w *Widget) SetAlertID(v int) { + w.AlertID = &v } -// GetAlertValueWidget returns the AlertValueWidget field if non-nil, zero value otherwise. -func (w *Widget) GetAlertValueWidget() AlertValueWidget { - if w == nil || w.AlertValueWidget == nil { - return AlertValueWidget{} +// GetAutoRefresh returns the AutoRefresh field if non-nil, zero value otherwise. +func (w *Widget) GetAutoRefresh() bool { + if w == nil || w.AutoRefresh == nil { + return false } - return *w.AlertValueWidget + return *w.AutoRefresh } -// GetOkAlertValueWidget returns a tuple with the AlertValueWidget field if it's non-nil, zero value otherwise +// GetAutoRefreshOk returns a tuple with the AutoRefresh field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. -func (w *Widget) GetAlertValueWidgetOk() (AlertValueWidget, bool) { - if w == nil || w.AlertValueWidget == nil { - return AlertValueWidget{}, false +func (w *Widget) GetAutoRefreshOk() (bool, bool) { + if w == nil || w.AutoRefresh == nil { + return false, false } - return *w.AlertValueWidget, true + return *w.AutoRefresh, true } -// HasAlertValueWidget returns a boolean if a field has been set. -func (w *Widget) HasAlertValueWidget() bool { - if w != nil && w.AlertValueWidget != nil { +// HasAutoRefresh returns a boolean if a field has been set. +func (w *Widget) HasAutoRefresh() bool { + if w != nil && w.AutoRefresh != nil { return true } return false } -// SetAlertValueWidget allocates a new w.AlertValueWidget and returns the pointer to it. -func (w *Widget) SetAlertValueWidget(v AlertValueWidget) { - w.AlertValueWidget = &v +// SetAutoRefresh allocates a new w.AutoRefresh and returns the pointer to it. +func (w *Widget) SetAutoRefresh(v bool) { + w.AutoRefresh = &v } -// GetChangeWidget returns the ChangeWidget field if non-nil, zero value otherwise. -func (w *Widget) GetChangeWidget() ChangeWidget { - if w == nil || w.ChangeWidget == nil { - return ChangeWidget{} - } - return *w.ChangeWidget -} - -// GetOkChangeWidget returns a tuple with the ChangeWidget field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (w *Widget) GetChangeWidgetOk() (ChangeWidget, bool) { - if w == nil || w.ChangeWidget == nil { - return ChangeWidget{}, false - } - return *w.ChangeWidget, true -} - -// HasChangeWidget returns a boolean if a field has been set. -func (w *Widget) HasChangeWidget() bool { - if w != nil && w.ChangeWidget != nil { - return true - } - - return false -} - -// SetChangeWidget allocates a new w.ChangeWidget and returns the pointer to it. -func (w *Widget) SetChangeWidget(v ChangeWidget) { - w.ChangeWidget = &v -} - -// GetCheckStatusWidget returns the CheckStatusWidget field if non-nil, zero value otherwise. -func (w *Widget) GetCheckStatusWidget() CheckStatusWidget { - if w == nil || w.CheckStatusWidget == nil { - return CheckStatusWidget{} - } - return *w.CheckStatusWidget -} - -// GetOkCheckStatusWidget returns a tuple with the CheckStatusWidget field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (w *Widget) GetCheckStatusWidgetOk() (CheckStatusWidget, bool) { - if w == nil || w.CheckStatusWidget == nil { - return CheckStatusWidget{}, false - } - return *w.CheckStatusWidget, true -} - -// HasCheckStatusWidget returns a boolean if a field has been set. -func (w *Widget) HasCheckStatusWidget() bool { - if w != nil && w.CheckStatusWidget != nil { - return true - } - - return false -} - -// SetCheckStatusWidget allocates a new w.CheckStatusWidget and returns the pointer to it. -func (w *Widget) SetCheckStatusWidget(v CheckStatusWidget) { - w.CheckStatusWidget = &v -} - -// GetDefault returns the Default field if non-nil, zero value otherwise. -func (w *Widget) GetDefault() string { - if w == nil || w.Default == nil { +// GetBgcolor returns the Bgcolor field if non-nil, zero value otherwise. +func (w *Widget) GetBgcolor() string { + if w == nil || w.Bgcolor == nil { return "" } - return *w.Default + return *w.Bgcolor } -// GetOkDefault returns a tuple with the Default field if it's non-nil, zero value otherwise +// GetBgcolorOk returns a tuple with the Bgcolor field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. -func (w *Widget) GetDefaultOk() (string, bool) { - if w == nil || w.Default == nil { +func (w *Widget) GetBgcolorOk() (string, bool) { + if w == nil || w.Bgcolor == nil { return "", false } - return *w.Default, true + return *w.Bgcolor, true } -// HasDefault returns a boolean if a field has been set. -func (w *Widget) HasDefault() bool { - if w != nil && w.Default != nil { +// HasBgcolor returns a boolean if a field has been set. +func (w *Widget) HasBgcolor() bool { + if w != nil && w.Bgcolor != nil { return true } return false } -// SetDefault allocates a new w.Default and returns the pointer to it. -func (w *Widget) SetDefault(v string) { - w.Default = &v +// SetBgcolor allocates a new w.Bgcolor and returns the pointer to it. +func (w *Widget) SetBgcolor(v string) { + w.Bgcolor = &v } -// GetEventStreamWidget returns the EventStreamWidget field if non-nil, zero value otherwise. -func (w *Widget) GetEventStreamWidget() EventStreamWidget { - if w == nil || w.EventStreamWidget == nil { - return EventStreamWidget{} - } - return *w.EventStreamWidget -} - -// GetOkEventStreamWidget returns a tuple with the EventStreamWidget field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (w *Widget) GetEventStreamWidgetOk() (EventStreamWidget, bool) { - if w == nil || w.EventStreamWidget == nil { - return EventStreamWidget{}, false - } - return *w.EventStreamWidget, true -} - -// HasEventStreamWidget returns a boolean if a field has been set. -func (w *Widget) HasEventStreamWidget() bool { - if w != nil && w.EventStreamWidget != nil { - return true - } - - return false -} - -// SetEventStreamWidget allocates a new w.EventStreamWidget and returns the pointer to it. -func (w *Widget) SetEventStreamWidget(v EventStreamWidget) { - w.EventStreamWidget = &v -} - -// GetEventTimelineWidget returns the EventTimelineWidget field if non-nil, zero value otherwise. -func (w *Widget) GetEventTimelineWidget() EventTimelineWidget { - if w == nil || w.EventTimelineWidget == nil { - return EventTimelineWidget{} - } - return *w.EventTimelineWidget -} - -// GetOkEventTimelineWidget returns a tuple with the EventTimelineWidget field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (w *Widget) GetEventTimelineWidgetOk() (EventTimelineWidget, bool) { - if w == nil || w.EventTimelineWidget == nil { - return EventTimelineWidget{}, false - } - return *w.EventTimelineWidget, true -} - -// HasEventTimelineWidget returns a boolean if a field has been set. -func (w *Widget) HasEventTimelineWidget() bool { - if w != nil && w.EventTimelineWidget != nil { - return true - } - - return false -} - -// SetEventTimelineWidget allocates a new w.EventTimelineWidget and returns the pointer to it. -func (w *Widget) SetEventTimelineWidget(v EventTimelineWidget) { - w.EventTimelineWidget = &v -} - -// GetFreeTextWidget returns the FreeTextWidget field if non-nil, zero value otherwise. -func (w *Widget) GetFreeTextWidget() FreeTextWidget { - if w == nil || w.FreeTextWidget == nil { - return FreeTextWidget{} - } - return *w.FreeTextWidget -} - -// GetOkFreeTextWidget returns a tuple with the FreeTextWidget field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (w *Widget) GetFreeTextWidgetOk() (FreeTextWidget, bool) { - if w == nil || w.FreeTextWidget == nil { - return FreeTextWidget{}, false - } - return *w.FreeTextWidget, true -} - -// HasFreeTextWidget returns a boolean if a field has been set. -func (w *Widget) HasFreeTextWidget() bool { - if w != nil && w.FreeTextWidget != nil { - return true - } - - return false -} - -// SetFreeTextWidget allocates a new w.FreeTextWidget and returns the pointer to it. -func (w *Widget) SetFreeTextWidget(v FreeTextWidget) { - w.FreeTextWidget = &v -} - -// GetGraphWidget returns the GraphWidget field if non-nil, zero value otherwise. -func (w *Widget) GetGraphWidget() GraphWidget { - if w == nil || w.GraphWidget == nil { - return GraphWidget{} - } - return *w.GraphWidget -} - -// GetOkGraphWidget returns a tuple with the GraphWidget field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (w *Widget) GetGraphWidgetOk() (GraphWidget, bool) { - if w == nil || w.GraphWidget == nil { - return GraphWidget{}, false - } - return *w.GraphWidget, true -} - -// HasGraphWidget returns a boolean if a field has been set. -func (w *Widget) HasGraphWidget() bool { - if w != nil && w.GraphWidget != nil { - return true - } - - return false -} - -// SetGraphWidget allocates a new w.GraphWidget and returns the pointer to it. -func (w *Widget) SetGraphWidget(v GraphWidget) { - w.GraphWidget = &v -} - -// GetHostMapWidget returns the HostMapWidget field if non-nil, zero value otherwise. -func (w *Widget) GetHostMapWidget() HostMapWidget { - if w == nil || w.HostMapWidget == nil { - return HostMapWidget{} - } - return *w.HostMapWidget -} - -// GetOkHostMapWidget returns a tuple with the HostMapWidget field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (w *Widget) GetHostMapWidgetOk() (HostMapWidget, bool) { - if w == nil || w.HostMapWidget == nil { - return HostMapWidget{}, false - } - return *w.HostMapWidget, true -} - -// HasHostMapWidget returns a boolean if a field has been set. -func (w *Widget) HasHostMapWidget() bool { - if w != nil && w.HostMapWidget != nil { - return true - } - - return false -} - -// SetHostMapWidget allocates a new w.HostMapWidget and returns the pointer to it. -func (w *Widget) SetHostMapWidget(v HostMapWidget) { - w.HostMapWidget = &v -} - -// GetIFrameWidget returns the IFrameWidget field if non-nil, zero value otherwise. -func (w *Widget) GetIFrameWidget() IFrameWidget { - if w == nil || w.IFrameWidget == nil { - return IFrameWidget{} - } - return *w.IFrameWidget -} - -// GetOkIFrameWidget returns a tuple with the IFrameWidget field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (w *Widget) GetIFrameWidgetOk() (IFrameWidget, bool) { - if w == nil || w.IFrameWidget == nil { - return IFrameWidget{}, false - } - return *w.IFrameWidget, true -} - -// HasIFrameWidget returns a boolean if a field has been set. -func (w *Widget) HasIFrameWidget() bool { - if w != nil && w.IFrameWidget != nil { - return true - } - - return false -} - -// SetIFrameWidget allocates a new w.IFrameWidget and returns the pointer to it. -func (w *Widget) SetIFrameWidget(v IFrameWidget) { - w.IFrameWidget = &v -} - -// GetImageWidget returns the ImageWidget field if non-nil, zero value otherwise. -func (w *Widget) GetImageWidget() ImageWidget { - if w == nil || w.ImageWidget == nil { - return ImageWidget{} - } - return *w.ImageWidget -} - -// GetOkImageWidget returns a tuple with the ImageWidget field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (w *Widget) GetImageWidgetOk() (ImageWidget, bool) { - if w == nil || w.ImageWidget == nil { - return ImageWidget{}, false - } - return *w.ImageWidget, true -} - -// HasImageWidget returns a boolean if a field has been set. -func (w *Widget) HasImageWidget() bool { - if w != nil && w.ImageWidget != nil { - return true - } - - return false -} - -// SetImageWidget allocates a new w.ImageWidget and returns the pointer to it. -func (w *Widget) SetImageWidget(v ImageWidget) { - w.ImageWidget = &v -} - -// GetName returns the Name field if non-nil, zero value otherwise. -func (w *Widget) GetName() string { - if w == nil || w.Name == nil { +// GetCheck returns the Check field if non-nil, zero value otherwise. +func (w *Widget) GetCheck() string { + if w == nil || w.Check == nil { return "" } - return *w.Name + return *w.Check } -// GetOkName returns a tuple with the Name field if it's non-nil, zero value otherwise +// GetCheckOk returns a tuple with the Check field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. -func (w *Widget) GetNameOk() (string, bool) { - if w == nil || w.Name == nil { +func (w *Widget) GetCheckOk() (string, bool) { + if w == nil || w.Check == nil { return "", false } - return *w.Name, true + return *w.Check, true } -// HasName returns a boolean if a field has been set. -func (w *Widget) HasName() bool { - if w != nil && w.Name != nil { +// HasCheck returns a boolean if a field has been set. +func (w *Widget) HasCheck() bool { + if w != nil && w.Check != nil { return true } return false } -// SetName allocates a new w.Name and returns the pointer to it. -func (w *Widget) SetName(v string) { - w.Name = &v +// SetCheck allocates a new w.Check and returns the pointer to it. +func (w *Widget) SetCheck(v string) { + w.Check = &v } -// GetNoteWidget returns the NoteWidget field if non-nil, zero value otherwise. -func (w *Widget) GetNoteWidget() NoteWidget { - if w == nil || w.NoteWidget == nil { - return NoteWidget{} - } - return *w.NoteWidget -} - -// GetOkNoteWidget returns a tuple with the NoteWidget field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (w *Widget) GetNoteWidgetOk() (NoteWidget, bool) { - if w == nil || w.NoteWidget == nil { - return NoteWidget{}, false - } - return *w.NoteWidget, true -} - -// HasNoteWidget returns a boolean if a field has been set. -func (w *Widget) HasNoteWidget() bool { - if w != nil && w.NoteWidget != nil { - return true - } - - return false -} - -// SetNoteWidget allocates a new w.NoteWidget and returns the pointer to it. -func (w *Widget) SetNoteWidget(v NoteWidget) { - w.NoteWidget = &v -} - -// GetPrefix returns the Prefix field if non-nil, zero value otherwise. -func (w *Widget) GetPrefix() string { - if w == nil || w.Prefix == nil { +// GetColor returns the Color field if non-nil, zero value otherwise. +func (w *Widget) GetColor() string { + if w == nil || w.Color == nil { return "" } - return *w.Prefix + return *w.Color } -// GetOkPrefix returns a tuple with the Prefix field if it's non-nil, zero value otherwise +// GetColorOk returns a tuple with the Color field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. -func (w *Widget) GetPrefixOk() (string, bool) { - if w == nil || w.Prefix == nil { +func (w *Widget) GetColorOk() (string, bool) { + if w == nil || w.Color == nil { return "", false } - return *w.Prefix, true + return *w.Color, true } -// HasPrefix returns a boolean if a field has been set. -func (w *Widget) HasPrefix() bool { - if w != nil && w.Prefix != nil { +// HasColor returns a boolean if a field has been set. +func (w *Widget) HasColor() bool { + if w != nil && w.Color != nil { return true } return false } -// SetPrefix allocates a new w.Prefix and returns the pointer to it. -func (w *Widget) SetPrefix(v string) { - w.Prefix = &v +// SetColor allocates a new w.Color and returns the pointer to it. +func (w *Widget) SetColor(v string) { + w.Color = &v } -// GetQueryValueWidget returns the QueryValueWidget field if non-nil, zero value otherwise. -func (w *Widget) GetQueryValueWidget() QueryValueWidget { - if w == nil || w.QueryValueWidget == nil { - return QueryValueWidget{} +// GetColorPreference returns the ColorPreference field if non-nil, zero value otherwise. +func (w *Widget) GetColorPreference() string { + if w == nil || w.ColorPreference == nil { + return "" } - return *w.QueryValueWidget + return *w.ColorPreference } -// GetOkQueryValueWidget returns a tuple with the QueryValueWidget field if it's non-nil, zero value otherwise +// GetColorPreferenceOk returns a tuple with the ColorPreference field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. -func (w *Widget) GetQueryValueWidgetOk() (QueryValueWidget, bool) { - if w == nil || w.QueryValueWidget == nil { - return QueryValueWidget{}, false +func (w *Widget) GetColorPreferenceOk() (string, bool) { + if w == nil || w.ColorPreference == nil { + return "", false } - return *w.QueryValueWidget, true + return *w.ColorPreference, true } -// HasQueryValueWidget returns a boolean if a field has been set. -func (w *Widget) HasQueryValueWidget() bool { - if w != nil && w.QueryValueWidget != nil { +// HasColorPreference returns a boolean if a field has been set. +func (w *Widget) HasColorPreference() bool { + if w != nil && w.ColorPreference != nil { return true } return false } -// SetQueryValueWidget allocates a new w.QueryValueWidget and returns the pointer to it. -func (w *Widget) SetQueryValueWidget(v QueryValueWidget) { - w.QueryValueWidget = &v +// SetColorPreference allocates a new w.ColorPreference and returns the pointer to it. +func (w *Widget) SetColorPreference(v string) { + w.ColorPreference = &v } -// GetTimeseriesWidget returns the TimeseriesWidget field if non-nil, zero value otherwise. -func (w *Widget) GetTimeseriesWidget() TimeseriesWidget { - if w == nil || w.TimeseriesWidget == nil { - return TimeseriesWidget{} +// GetColumns returns the Columns field if non-nil, zero value otherwise. +func (w *Widget) GetColumns() string { + if w == nil || w.Columns == nil { + return "" } - return *w.TimeseriesWidget + return *w.Columns } -// GetOkTimeseriesWidget returns a tuple with the TimeseriesWidget field if it's non-nil, zero value otherwise +// GetColumnsOk returns a tuple with the Columns field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. -func (w *Widget) GetTimeseriesWidgetOk() (TimeseriesWidget, bool) { - if w == nil || w.TimeseriesWidget == nil { - return TimeseriesWidget{}, false +func (w *Widget) GetColumnsOk() (string, bool) { + if w == nil || w.Columns == nil { + return "", false } - return *w.TimeseriesWidget, true + return *w.Columns, true } -// HasTimeseriesWidget returns a boolean if a field has been set. -func (w *Widget) HasTimeseriesWidget() bool { - if w != nil && w.TimeseriesWidget != nil { +// HasColumns returns a boolean if a field has been set. +func (w *Widget) HasColumns() bool { + if w != nil && w.Columns != nil { return true } return false } -// SetTimeseriesWidget allocates a new w.TimeseriesWidget and returns the pointer to it. -func (w *Widget) SetTimeseriesWidget(v TimeseriesWidget) { - w.TimeseriesWidget = &v +// SetColumns allocates a new w.Columns and returns the pointer to it. +func (w *Widget) SetColumns(v string) { + w.Columns = &v } -// GetToplistWidget returns the ToplistWidget field if non-nil, zero value otherwise. -func (w *Widget) GetToplistWidget() ToplistWidget { - if w == nil || w.ToplistWidget == nil { - return ToplistWidget{} +// GetDisplayFormat returns the DisplayFormat field if non-nil, zero value otherwise. +func (w *Widget) GetDisplayFormat() string { + if w == nil || w.DisplayFormat == nil { + return "" } - return *w.ToplistWidget + return *w.DisplayFormat } -// GetOkToplistWidget returns a tuple with the ToplistWidget field if it's non-nil, zero value otherwise +// GetDisplayFormatOk returns a tuple with the DisplayFormat field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. -func (w *Widget) GetToplistWidgetOk() (ToplistWidget, bool) { - if w == nil || w.ToplistWidget == nil { - return ToplistWidget{}, false +func (w *Widget) GetDisplayFormatOk() (string, bool) { + if w == nil || w.DisplayFormat == nil { + return "", false } - return *w.ToplistWidget, true + return *w.DisplayFormat, true } -// HasToplistWidget returns a boolean if a field has been set. -func (w *Widget) HasToplistWidget() bool { - if w != nil && w.ToplistWidget != nil { +// HasDisplayFormat returns a boolean if a field has been set. +func (w *Widget) HasDisplayFormat() bool { + if w != nil && w.DisplayFormat != nil { return true } return false } -// SetToplistWidget allocates a new w.ToplistWidget and returns the pointer to it. -func (w *Widget) SetToplistWidget(v ToplistWidget) { - w.ToplistWidget = &v +// SetDisplayFormat allocates a new w.DisplayFormat and returns the pointer to it. +func (w *Widget) SetDisplayFormat(v string) { + w.DisplayFormat = &v +} + +// GetEnv returns the Env field if non-nil, zero value otherwise. +func (w *Widget) GetEnv() string { + if w == nil || w.Env == nil { + return "" + } + return *w.Env +} + +// GetEnvOk returns a tuple with the Env field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (w *Widget) GetEnvOk() (string, bool) { + if w == nil || w.Env == nil { + return "", false + } + return *w.Env, true +} + +// HasEnv returns a boolean if a field has been set. +func (w *Widget) HasEnv() bool { + if w != nil && w.Env != nil { + return true + } + + return false +} + +// SetEnv allocates a new w.Env and returns the pointer to it. +func (w *Widget) SetEnv(v string) { + w.Env = &v +} + +// GetEventSize returns the EventSize field if non-nil, zero value otherwise. +func (w *Widget) GetEventSize() string { + if w == nil || w.EventSize == nil { + return "" + } + return *w.EventSize +} + +// GetEventSizeOk returns a tuple with the EventSize field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (w *Widget) GetEventSizeOk() (string, bool) { + if w == nil || w.EventSize == nil { + return "", false + } + return *w.EventSize, true +} + +// HasEventSize returns a boolean if a field has been set. +func (w *Widget) HasEventSize() bool { + if w != nil && w.EventSize != nil { + return true + } + + return false +} + +// SetEventSize allocates a new w.EventSize and returns the pointer to it. +func (w *Widget) SetEventSize(v string) { + w.EventSize = &v +} + +// GetFontSize returns the FontSize field if non-nil, zero value otherwise. +func (w *Widget) GetFontSize() string { + if w == nil || w.FontSize == nil { + return "" + } + return *w.FontSize +} + +// GetFontSizeOk returns a tuple with the FontSize field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (w *Widget) GetFontSizeOk() (string, bool) { + if w == nil || w.FontSize == nil { + return "", false + } + return *w.FontSize, true +} + +// HasFontSize returns a boolean if a field has been set. +func (w *Widget) HasFontSize() bool { + if w != nil && w.FontSize != nil { + return true + } + + return false +} + +// SetFontSize allocates a new w.FontSize and returns the pointer to it. +func (w *Widget) SetFontSize(v string) { + w.FontSize = &v +} + +// GetGroup returns the Group field if non-nil, zero value otherwise. +func (w *Widget) GetGroup() string { + if w == nil || w.Group == nil { + return "" + } + return *w.Group +} + +// GetGroupOk returns a tuple with the Group field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (w *Widget) GetGroupOk() (string, bool) { + if w == nil || w.Group == nil { + return "", false + } + return *w.Group, true +} + +// HasGroup returns a boolean if a field has been set. +func (w *Widget) HasGroup() bool { + if w != nil && w.Group != nil { + return true + } + + return false +} + +// SetGroup allocates a new w.Group and returns the pointer to it. +func (w *Widget) SetGroup(v string) { + w.Group = &v +} + +// GetGrouping returns the Grouping field if non-nil, zero value otherwise. +func (w *Widget) GetGrouping() string { + if w == nil || w.Grouping == nil { + return "" + } + return *w.Grouping +} + +// GetGroupingOk returns a tuple with the Grouping field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (w *Widget) GetGroupingOk() (string, bool) { + if w == nil || w.Grouping == nil { + return "", false + } + return *w.Grouping, true +} + +// HasGrouping returns a boolean if a field has been set. +func (w *Widget) HasGrouping() bool { + if w != nil && w.Grouping != nil { + return true + } + + return false +} + +// SetGrouping allocates a new w.Grouping and returns the pointer to it. +func (w *Widget) SetGrouping(v string) { + w.Grouping = &v +} + +// GetHeight returns the Height field if non-nil, zero value otherwise. +func (w *Widget) GetHeight() int { + if w == nil || w.Height == nil { + return 0 + } + return *w.Height +} + +// GetHeightOk returns a tuple with the Height field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (w *Widget) GetHeightOk() (int, bool) { + if w == nil || w.Height == nil { + return 0, false + } + return *w.Height, true +} + +// HasHeight returns a boolean if a field has been set. +func (w *Widget) HasHeight() bool { + if w != nil && w.Height != nil { + return true + } + + return false +} + +// SetHeight allocates a new w.Height and returns the pointer to it. +func (w *Widget) SetHeight(v int) { + w.Height = &v +} + +// GetHideZeroCounts returns the HideZeroCounts field if non-nil, zero value otherwise. +func (w *Widget) GetHideZeroCounts() bool { + if w == nil || w.HideZeroCounts == nil { + return false + } + return *w.HideZeroCounts +} + +// GetHideZeroCountsOk returns a tuple with the HideZeroCounts field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (w *Widget) GetHideZeroCountsOk() (bool, bool) { + if w == nil || w.HideZeroCounts == nil { + return false, false + } + return *w.HideZeroCounts, true +} + +// HasHideZeroCounts returns a boolean if a field has been set. +func (w *Widget) HasHideZeroCounts() bool { + if w != nil && w.HideZeroCounts != nil { + return true + } + + return false +} + +// SetHideZeroCounts allocates a new w.HideZeroCounts and returns the pointer to it. +func (w *Widget) SetHideZeroCounts(v bool) { + w.HideZeroCounts = &v +} + +// GetHTML returns the HTML field if non-nil, zero value otherwise. +func (w *Widget) GetHTML() string { + if w == nil || w.HTML == nil { + return "" + } + return *w.HTML +} + +// GetHTMLOk returns a tuple with the HTML field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (w *Widget) GetHTMLOk() (string, bool) { + if w == nil || w.HTML == nil { + return "", false + } + return *w.HTML, true +} + +// HasHTML returns a boolean if a field has been set. +func (w *Widget) HasHTML() bool { + if w != nil && w.HTML != nil { + return true + } + + return false +} + +// SetHTML allocates a new w.HTML and returns the pointer to it. +func (w *Widget) SetHTML(v string) { + w.HTML = &v +} + +// GetLayoutVersion returns the LayoutVersion field if non-nil, zero value otherwise. +func (w *Widget) GetLayoutVersion() string { + if w == nil || w.LayoutVersion == nil { + return "" + } + return *w.LayoutVersion +} + +// GetLayoutVersionOk returns a tuple with the LayoutVersion field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (w *Widget) GetLayoutVersionOk() (string, bool) { + if w == nil || w.LayoutVersion == nil { + return "", false + } + return *w.LayoutVersion, true +} + +// HasLayoutVersion returns a boolean if a field has been set. +func (w *Widget) HasLayoutVersion() bool { + if w != nil && w.LayoutVersion != nil { + return true + } + + return false +} + +// SetLayoutVersion allocates a new w.LayoutVersion and returns the pointer to it. +func (w *Widget) SetLayoutVersion(v string) { + w.LayoutVersion = &v +} + +// GetLegend returns the Legend field if non-nil, zero value otherwise. +func (w *Widget) GetLegend() bool { + if w == nil || w.Legend == nil { + return false + } + return *w.Legend +} + +// GetLegendOk returns a tuple with the Legend field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (w *Widget) GetLegendOk() (bool, bool) { + if w == nil || w.Legend == nil { + return false, false + } + return *w.Legend, true +} + +// HasLegend returns a boolean if a field has been set. +func (w *Widget) HasLegend() bool { + if w != nil && w.Legend != nil { + return true + } + + return false +} + +// SetLegend allocates a new w.Legend and returns the pointer to it. +func (w *Widget) SetLegend(v bool) { + w.Legend = &v +} + +// GetLegendSize returns the LegendSize field if non-nil, zero value otherwise. +func (w *Widget) GetLegendSize() string { + if w == nil || w.LegendSize == nil { + return "" + } + return *w.LegendSize +} + +// GetLegendSizeOk returns a tuple with the LegendSize field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (w *Widget) GetLegendSizeOk() (string, bool) { + if w == nil || w.LegendSize == nil { + return "", false + } + return *w.LegendSize, true +} + +// HasLegendSize returns a boolean if a field has been set. +func (w *Widget) HasLegendSize() bool { + if w != nil && w.LegendSize != nil { + return true + } + + return false +} + +// SetLegendSize allocates a new w.LegendSize and returns the pointer to it. +func (w *Widget) SetLegendSize(v string) { + w.LegendSize = &v +} + +// GetLogset returns the Logset field if non-nil, zero value otherwise. +func (w *Widget) GetLogset() string { + if w == nil || w.Logset == nil { + return "" + } + return *w.Logset +} + +// GetLogsetOk returns a tuple with the Logset field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (w *Widget) GetLogsetOk() (string, bool) { + if w == nil || w.Logset == nil { + return "", false + } + return *w.Logset, true +} + +// HasLogset returns a boolean if a field has been set. +func (w *Widget) HasLogset() bool { + if w != nil && w.Logset != nil { + return true + } + + return false +} + +// SetLogset allocates a new w.Logset and returns the pointer to it. +func (w *Widget) SetLogset(v string) { + w.Logset = &v +} + +// GetManageStatusShowTitle returns the ManageStatusShowTitle field if non-nil, zero value otherwise. +func (w *Widget) GetManageStatusShowTitle() bool { + if w == nil || w.ManageStatusShowTitle == nil { + return false + } + return *w.ManageStatusShowTitle +} + +// GetManageStatusShowTitleOk returns a tuple with the ManageStatusShowTitle field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (w *Widget) GetManageStatusShowTitleOk() (bool, bool) { + if w == nil || w.ManageStatusShowTitle == nil { + return false, false + } + return *w.ManageStatusShowTitle, true +} + +// HasManageStatusShowTitle returns a boolean if a field has been set. +func (w *Widget) HasManageStatusShowTitle() bool { + if w != nil && w.ManageStatusShowTitle != nil { + return true + } + + return false +} + +// SetManageStatusShowTitle allocates a new w.ManageStatusShowTitle and returns the pointer to it. +func (w *Widget) SetManageStatusShowTitle(v bool) { + w.ManageStatusShowTitle = &v +} + +// GetManageStatusTitleAlign returns the ManageStatusTitleAlign field if non-nil, zero value otherwise. +func (w *Widget) GetManageStatusTitleAlign() string { + if w == nil || w.ManageStatusTitleAlign == nil { + return "" + } + return *w.ManageStatusTitleAlign +} + +// GetManageStatusTitleAlignOk returns a tuple with the ManageStatusTitleAlign field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (w *Widget) GetManageStatusTitleAlignOk() (string, bool) { + if w == nil || w.ManageStatusTitleAlign == nil { + return "", false + } + return *w.ManageStatusTitleAlign, true +} + +// HasManageStatusTitleAlign returns a boolean if a field has been set. +func (w *Widget) HasManageStatusTitleAlign() bool { + if w != nil && w.ManageStatusTitleAlign != nil { + return true + } + + return false +} + +// SetManageStatusTitleAlign allocates a new w.ManageStatusTitleAlign and returns the pointer to it. +func (w *Widget) SetManageStatusTitleAlign(v string) { + w.ManageStatusTitleAlign = &v +} + +// GetManageStatusTitleSize returns the ManageStatusTitleSize field if non-nil, zero value otherwise. +func (w *Widget) GetManageStatusTitleSize() string { + if w == nil || w.ManageStatusTitleSize == nil { + return "" + } + return *w.ManageStatusTitleSize +} + +// GetManageStatusTitleSizeOk returns a tuple with the ManageStatusTitleSize field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (w *Widget) GetManageStatusTitleSizeOk() (string, bool) { + if w == nil || w.ManageStatusTitleSize == nil { + return "", false + } + return *w.ManageStatusTitleSize, true +} + +// HasManageStatusTitleSize returns a boolean if a field has been set. +func (w *Widget) HasManageStatusTitleSize() bool { + if w != nil && w.ManageStatusTitleSize != nil { + return true + } + + return false +} + +// SetManageStatusTitleSize allocates a new w.ManageStatusTitleSize and returns the pointer to it. +func (w *Widget) SetManageStatusTitleSize(v string) { + w.ManageStatusTitleSize = &v +} + +// GetManageStatusTitleText returns the ManageStatusTitleText field if non-nil, zero value otherwise. +func (w *Widget) GetManageStatusTitleText() string { + if w == nil || w.ManageStatusTitleText == nil { + return "" + } + return *w.ManageStatusTitleText +} + +// GetManageStatusTitleTextOk returns a tuple with the ManageStatusTitleText field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (w *Widget) GetManageStatusTitleTextOk() (string, bool) { + if w == nil || w.ManageStatusTitleText == nil { + return "", false + } + return *w.ManageStatusTitleText, true +} + +// HasManageStatusTitleText returns a boolean if a field has been set. +func (w *Widget) HasManageStatusTitleText() bool { + if w != nil && w.ManageStatusTitleText != nil { + return true + } + + return false +} + +// SetManageStatusTitleText allocates a new w.ManageStatusTitleText and returns the pointer to it. +func (w *Widget) SetManageStatusTitleText(v string) { + w.ManageStatusTitleText = &v +} + +// GetMargin returns the Margin field if non-nil, zero value otherwise. +func (w *Widget) GetMargin() string { + if w == nil || w.Margin == nil { + return "" + } + return *w.Margin +} + +// GetMarginOk returns a tuple with the Margin field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (w *Widget) GetMarginOk() (string, bool) { + if w == nil || w.Margin == nil { + return "", false + } + return *w.Margin, true +} + +// HasMargin returns a boolean if a field has been set. +func (w *Widget) HasMargin() bool { + if w != nil && w.Margin != nil { + return true + } + + return false +} + +// SetMargin allocates a new w.Margin and returns the pointer to it. +func (w *Widget) SetMargin(v string) { + w.Margin = &v +} + +// GetMonitor returns the Monitor field if non-nil, zero value otherwise. +func (w *Widget) GetMonitor() ScreenboardMonitor { + if w == nil || w.Monitor == nil { + return ScreenboardMonitor{} + } + return *w.Monitor +} + +// GetMonitorOk returns a tuple with the Monitor field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (w *Widget) GetMonitorOk() (ScreenboardMonitor, bool) { + if w == nil || w.Monitor == nil { + return ScreenboardMonitor{}, false + } + return *w.Monitor, true +} + +// HasMonitor returns a boolean if a field has been set. +func (w *Widget) HasMonitor() bool { + if w != nil && w.Monitor != nil { + return true + } + + return false +} + +// SetMonitor allocates a new w.Monitor and returns the pointer to it. +func (w *Widget) SetMonitor(v ScreenboardMonitor) { + w.Monitor = &v +} + +// GetMustShowBreakdown returns the MustShowBreakdown field if non-nil, zero value otherwise. +func (w *Widget) GetMustShowBreakdown() bool { + if w == nil || w.MustShowBreakdown == nil { + return false + } + return *w.MustShowBreakdown +} + +// GetMustShowBreakdownOk returns a tuple with the MustShowBreakdown field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (w *Widget) GetMustShowBreakdownOk() (bool, bool) { + if w == nil || w.MustShowBreakdown == nil { + return false, false + } + return *w.MustShowBreakdown, true +} + +// HasMustShowBreakdown returns a boolean if a field has been set. +func (w *Widget) HasMustShowBreakdown() bool { + if w != nil && w.MustShowBreakdown != nil { + return true + } + + return false +} + +// SetMustShowBreakdown allocates a new w.MustShowBreakdown and returns the pointer to it. +func (w *Widget) SetMustShowBreakdown(v bool) { + w.MustShowBreakdown = &v +} + +// GetMustShowDistribution returns the MustShowDistribution field if non-nil, zero value otherwise. +func (w *Widget) GetMustShowDistribution() bool { + if w == nil || w.MustShowDistribution == nil { + return false + } + return *w.MustShowDistribution +} + +// GetMustShowDistributionOk returns a tuple with the MustShowDistribution field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (w *Widget) GetMustShowDistributionOk() (bool, bool) { + if w == nil || w.MustShowDistribution == nil { + return false, false + } + return *w.MustShowDistribution, true +} + +// HasMustShowDistribution returns a boolean if a field has been set. +func (w *Widget) HasMustShowDistribution() bool { + if w != nil && w.MustShowDistribution != nil { + return true + } + + return false +} + +// SetMustShowDistribution allocates a new w.MustShowDistribution and returns the pointer to it. +func (w *Widget) SetMustShowDistribution(v bool) { + w.MustShowDistribution = &v +} + +// GetMustShowErrors returns the MustShowErrors field if non-nil, zero value otherwise. +func (w *Widget) GetMustShowErrors() bool { + if w == nil || w.MustShowErrors == nil { + return false + } + return *w.MustShowErrors +} + +// GetMustShowErrorsOk returns a tuple with the MustShowErrors field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (w *Widget) GetMustShowErrorsOk() (bool, bool) { + if w == nil || w.MustShowErrors == nil { + return false, false + } + return *w.MustShowErrors, true +} + +// HasMustShowErrors returns a boolean if a field has been set. +func (w *Widget) HasMustShowErrors() bool { + if w != nil && w.MustShowErrors != nil { + return true + } + + return false +} + +// SetMustShowErrors allocates a new w.MustShowErrors and returns the pointer to it. +func (w *Widget) SetMustShowErrors(v bool) { + w.MustShowErrors = &v +} + +// GetMustShowHits returns the MustShowHits field if non-nil, zero value otherwise. +func (w *Widget) GetMustShowHits() bool { + if w == nil || w.MustShowHits == nil { + return false + } + return *w.MustShowHits +} + +// GetMustShowHitsOk returns a tuple with the MustShowHits field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (w *Widget) GetMustShowHitsOk() (bool, bool) { + if w == nil || w.MustShowHits == nil { + return false, false + } + return *w.MustShowHits, true +} + +// HasMustShowHits returns a boolean if a field has been set. +func (w *Widget) HasMustShowHits() bool { + if w != nil && w.MustShowHits != nil { + return true + } + + return false +} + +// SetMustShowHits allocates a new w.MustShowHits and returns the pointer to it. +func (w *Widget) SetMustShowHits(v bool) { + w.MustShowHits = &v +} + +// GetMustShowLatency returns the MustShowLatency field if non-nil, zero value otherwise. +func (w *Widget) GetMustShowLatency() bool { + if w == nil || w.MustShowLatency == nil { + return false + } + return *w.MustShowLatency +} + +// GetMustShowLatencyOk returns a tuple with the MustShowLatency field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (w *Widget) GetMustShowLatencyOk() (bool, bool) { + if w == nil || w.MustShowLatency == nil { + return false, false + } + return *w.MustShowLatency, true +} + +// HasMustShowLatency returns a boolean if a field has been set. +func (w *Widget) HasMustShowLatency() bool { + if w != nil && w.MustShowLatency != nil { + return true + } + + return false +} + +// SetMustShowLatency allocates a new w.MustShowLatency and returns the pointer to it. +func (w *Widget) SetMustShowLatency(v bool) { + w.MustShowLatency = &v +} + +// GetMustShowResourceList returns the MustShowResourceList field if non-nil, zero value otherwise. +func (w *Widget) GetMustShowResourceList() bool { + if w == nil || w.MustShowResourceList == nil { + return false + } + return *w.MustShowResourceList +} + +// GetMustShowResourceListOk returns a tuple with the MustShowResourceList field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (w *Widget) GetMustShowResourceListOk() (bool, bool) { + if w == nil || w.MustShowResourceList == nil { + return false, false + } + return *w.MustShowResourceList, true +} + +// HasMustShowResourceList returns a boolean if a field has been set. +func (w *Widget) HasMustShowResourceList() bool { + if w != nil && w.MustShowResourceList != nil { + return true + } + + return false +} + +// SetMustShowResourceList allocates a new w.MustShowResourceList and returns the pointer to it. +func (w *Widget) SetMustShowResourceList(v bool) { + w.MustShowResourceList = &v +} + +// GetParams returns the Params field if non-nil, zero value otherwise. +func (w *Widget) GetParams() Params { + if w == nil || w.Params == nil { + return Params{} + } + return *w.Params +} + +// GetParamsOk returns a tuple with the Params field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (w *Widget) GetParamsOk() (Params, bool) { + if w == nil || w.Params == nil { + return Params{}, false + } + return *w.Params, true +} + +// HasParams returns a boolean if a field has been set. +func (w *Widget) HasParams() bool { + if w != nil && w.Params != nil { + return true + } + + return false +} + +// SetParams allocates a new w.Params and returns the pointer to it. +func (w *Widget) SetParams(v Params) { + w.Params = &v +} + +// GetPrecision returns the Precision field if non-nil, zero value otherwise. +func (w *Widget) GetPrecision() string { + if w == nil || w.Precision == nil { + return "" + } + return *w.Precision +} + +// GetPrecisionOk returns a tuple with the Precision field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (w *Widget) GetPrecisionOk() (string, bool) { + if w == nil || w.Precision == nil { + return "", false + } + return *w.Precision, true +} + +// HasPrecision returns a boolean if a field has been set. +func (w *Widget) HasPrecision() bool { + if w != nil && w.Precision != nil { + return true + } + + return false +} + +// SetPrecision allocates a new w.Precision and returns the pointer to it. +func (w *Widget) SetPrecision(v string) { + w.Precision = &v +} + +// GetQuery returns the Query field if non-nil, zero value otherwise. +func (w *Widget) GetQuery() string { + if w == nil || w.Query == nil { + return "" + } + return *w.Query +} + +// GetQueryOk returns a tuple with the Query field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (w *Widget) GetQueryOk() (string, bool) { + if w == nil || w.Query == nil { + return "", false + } + return *w.Query, true +} + +// HasQuery returns a boolean if a field has been set. +func (w *Widget) HasQuery() bool { + if w != nil && w.Query != nil { + return true + } + + return false +} + +// SetQuery allocates a new w.Query and returns the pointer to it. +func (w *Widget) SetQuery(v string) { + w.Query = &v +} + +// GetServiceName returns the ServiceName field if non-nil, zero value otherwise. +func (w *Widget) GetServiceName() string { + if w == nil || w.ServiceName == nil { + return "" + } + return *w.ServiceName +} + +// GetServiceNameOk returns a tuple with the ServiceName field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (w *Widget) GetServiceNameOk() (string, bool) { + if w == nil || w.ServiceName == nil { + return "", false + } + return *w.ServiceName, true +} + +// HasServiceName returns a boolean if a field has been set. +func (w *Widget) HasServiceName() bool { + if w != nil && w.ServiceName != nil { + return true + } + + return false +} + +// SetServiceName allocates a new w.ServiceName and returns the pointer to it. +func (w *Widget) SetServiceName(v string) { + w.ServiceName = &v +} + +// GetServiceService returns the ServiceService field if non-nil, zero value otherwise. +func (w *Widget) GetServiceService() string { + if w == nil || w.ServiceService == nil { + return "" + } + return *w.ServiceService +} + +// GetServiceServiceOk returns a tuple with the ServiceService field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (w *Widget) GetServiceServiceOk() (string, bool) { + if w == nil || w.ServiceService == nil { + return "", false + } + return *w.ServiceService, true +} + +// HasServiceService returns a boolean if a field has been set. +func (w *Widget) HasServiceService() bool { + if w != nil && w.ServiceService != nil { + return true + } + + return false +} + +// SetServiceService allocates a new w.ServiceService and returns the pointer to it. +func (w *Widget) SetServiceService(v string) { + w.ServiceService = &v +} + +// GetSizeVersion returns the SizeVersion field if non-nil, zero value otherwise. +func (w *Widget) GetSizeVersion() string { + if w == nil || w.SizeVersion == nil { + return "" + } + return *w.SizeVersion +} + +// GetSizeVersionOk returns a tuple with the SizeVersion field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (w *Widget) GetSizeVersionOk() (string, bool) { + if w == nil || w.SizeVersion == nil { + return "", false + } + return *w.SizeVersion, true +} + +// HasSizeVersion returns a boolean if a field has been set. +func (w *Widget) HasSizeVersion() bool { + if w != nil && w.SizeVersion != nil { + return true + } + + return false +} + +// SetSizeVersion allocates a new w.SizeVersion and returns the pointer to it. +func (w *Widget) SetSizeVersion(v string) { + w.SizeVersion = &v +} + +// GetSizing returns the Sizing field if non-nil, zero value otherwise. +func (w *Widget) GetSizing() string { + if w == nil || w.Sizing == nil { + return "" + } + return *w.Sizing +} + +// GetSizingOk returns a tuple with the Sizing field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (w *Widget) GetSizingOk() (string, bool) { + if w == nil || w.Sizing == nil { + return "", false + } + return *w.Sizing, true +} + +// HasSizing returns a boolean if a field has been set. +func (w *Widget) HasSizing() bool { + if w != nil && w.Sizing != nil { + return true + } + + return false +} + +// SetSizing allocates a new w.Sizing and returns the pointer to it. +func (w *Widget) SetSizing(v string) { + w.Sizing = &v +} + +// GetText returns the Text field if non-nil, zero value otherwise. +func (w *Widget) GetText() string { + if w == nil || w.Text == nil { + return "" + } + return *w.Text +} + +// GetTextOk returns a tuple with the Text field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (w *Widget) GetTextOk() (string, bool) { + if w == nil || w.Text == nil { + return "", false + } + return *w.Text, true +} + +// HasText returns a boolean if a field has been set. +func (w *Widget) HasText() bool { + if w != nil && w.Text != nil { + return true + } + + return false +} + +// SetText allocates a new w.Text and returns the pointer to it. +func (w *Widget) SetText(v string) { + w.Text = &v +} + +// GetTextAlign returns the TextAlign field if non-nil, zero value otherwise. +func (w *Widget) GetTextAlign() string { + if w == nil || w.TextAlign == nil { + return "" + } + return *w.TextAlign +} + +// GetTextAlignOk returns a tuple with the TextAlign field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (w *Widget) GetTextAlignOk() (string, bool) { + if w == nil || w.TextAlign == nil { + return "", false + } + return *w.TextAlign, true +} + +// HasTextAlign returns a boolean if a field has been set. +func (w *Widget) HasTextAlign() bool { + if w != nil && w.TextAlign != nil { + return true + } + + return false +} + +// SetTextAlign allocates a new w.TextAlign and returns the pointer to it. +func (w *Widget) SetTextAlign(v string) { + w.TextAlign = &v +} + +// GetTextSize returns the TextSize field if non-nil, zero value otherwise. +func (w *Widget) GetTextSize() string { + if w == nil || w.TextSize == nil { + return "" + } + return *w.TextSize +} + +// GetTextSizeOk returns a tuple with the TextSize field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (w *Widget) GetTextSizeOk() (string, bool) { + if w == nil || w.TextSize == nil { + return "", false + } + return *w.TextSize, true +} + +// HasTextSize returns a boolean if a field has been set. +func (w *Widget) HasTextSize() bool { + if w != nil && w.TextSize != nil { + return true + } + + return false +} + +// SetTextSize allocates a new w.TextSize and returns the pointer to it. +func (w *Widget) SetTextSize(v string) { + w.TextSize = &v +} + +// GetTick returns the Tick field if non-nil, zero value otherwise. +func (w *Widget) GetTick() bool { + if w == nil || w.Tick == nil { + return false + } + return *w.Tick +} + +// GetTickOk returns a tuple with the Tick field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (w *Widget) GetTickOk() (bool, bool) { + if w == nil || w.Tick == nil { + return false, false + } + return *w.Tick, true +} + +// HasTick returns a boolean if a field has been set. +func (w *Widget) HasTick() bool { + if w != nil && w.Tick != nil { + return true + } + + return false +} + +// SetTick allocates a new w.Tick and returns the pointer to it. +func (w *Widget) SetTick(v bool) { + w.Tick = &v +} + +// GetTickEdge returns the TickEdge field if non-nil, zero value otherwise. +func (w *Widget) GetTickEdge() string { + if w == nil || w.TickEdge == nil { + return "" + } + return *w.TickEdge +} + +// GetTickEdgeOk returns a tuple with the TickEdge field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (w *Widget) GetTickEdgeOk() (string, bool) { + if w == nil || w.TickEdge == nil { + return "", false + } + return *w.TickEdge, true +} + +// HasTickEdge returns a boolean if a field has been set. +func (w *Widget) HasTickEdge() bool { + if w != nil && w.TickEdge != nil { + return true + } + + return false +} + +// SetTickEdge allocates a new w.TickEdge and returns the pointer to it. +func (w *Widget) SetTickEdge(v string) { + w.TickEdge = &v +} + +// GetTickPos returns the TickPos field if non-nil, zero value otherwise. +func (w *Widget) GetTickPos() string { + if w == nil || w.TickPos == nil { + return "" + } + return *w.TickPos +} + +// GetTickPosOk returns a tuple with the TickPos field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (w *Widget) GetTickPosOk() (string, bool) { + if w == nil || w.TickPos == nil { + return "", false + } + return *w.TickPos, true +} + +// HasTickPos returns a boolean if a field has been set. +func (w *Widget) HasTickPos() bool { + if w != nil && w.TickPos != nil { + return true + } + + return false +} + +// SetTickPos allocates a new w.TickPos and returns the pointer to it. +func (w *Widget) SetTickPos(v string) { + w.TickPos = &v +} + +// GetTileDef returns the TileDef field if non-nil, zero value otherwise. +func (w *Widget) GetTileDef() TileDef { + if w == nil || w.TileDef == nil { + return TileDef{} + } + return *w.TileDef +} + +// GetTileDefOk returns a tuple with the TileDef field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (w *Widget) GetTileDefOk() (TileDef, bool) { + if w == nil || w.TileDef == nil { + return TileDef{}, false + } + return *w.TileDef, true +} + +// HasTileDef returns a boolean if a field has been set. +func (w *Widget) HasTileDef() bool { + if w != nil && w.TileDef != nil { + return true + } + + return false +} + +// SetTileDef allocates a new w.TileDef and returns the pointer to it. +func (w *Widget) SetTileDef(v TileDef) { + w.TileDef = &v +} + +// GetTime returns the Time field if non-nil, zero value otherwise. +func (w *Widget) GetTime() Time { + if w == nil || w.Time == nil { + return Time{} + } + return *w.Time +} + +// GetTimeOk returns a tuple with the Time field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (w *Widget) GetTimeOk() (Time, bool) { + if w == nil || w.Time == nil { + return Time{}, false + } + return *w.Time, true +} + +// HasTime returns a boolean if a field has been set. +func (w *Widget) HasTime() bool { + if w != nil && w.Time != nil { + return true + } + + return false +} + +// SetTime allocates a new w.Time and returns the pointer to it. +func (w *Widget) SetTime(v Time) { + w.Time = &v +} + +// GetTitle returns the Title field if non-nil, zero value otherwise. +func (w *Widget) GetTitle() bool { + if w == nil || w.Title == nil { + return false + } + return *w.Title +} + +// GetTitleOk returns a tuple with the Title field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (w *Widget) GetTitleOk() (bool, bool) { + if w == nil || w.Title == nil { + return false, false + } + return *w.Title, true +} + +// HasTitle returns a boolean if a field has been set. +func (w *Widget) HasTitle() bool { + if w != nil && w.Title != nil { + return true + } + + return false +} + +// SetTitle allocates a new w.Title and returns the pointer to it. +func (w *Widget) SetTitle(v bool) { + w.Title = &v +} + +// GetTitleAlign returns the TitleAlign field if non-nil, zero value otherwise. +func (w *Widget) GetTitleAlign() string { + if w == nil || w.TitleAlign == nil { + return "" + } + return *w.TitleAlign +} + +// GetTitleAlignOk returns a tuple with the TitleAlign field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (w *Widget) GetTitleAlignOk() (string, bool) { + if w == nil || w.TitleAlign == nil { + return "", false + } + return *w.TitleAlign, true +} + +// HasTitleAlign returns a boolean if a field has been set. +func (w *Widget) HasTitleAlign() bool { + if w != nil && w.TitleAlign != nil { + return true + } + + return false +} + +// SetTitleAlign allocates a new w.TitleAlign and returns the pointer to it. +func (w *Widget) SetTitleAlign(v string) { + w.TitleAlign = &v +} + +// GetTitleSize returns the TitleSize field if non-nil, zero value otherwise. +func (w *Widget) GetTitleSize() int { + if w == nil || w.TitleSize == nil { + return 0 + } + return *w.TitleSize +} + +// GetTitleSizeOk returns a tuple with the TitleSize field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (w *Widget) GetTitleSizeOk() (int, bool) { + if w == nil || w.TitleSize == nil { + return 0, false + } + return *w.TitleSize, true +} + +// HasTitleSize returns a boolean if a field has been set. +func (w *Widget) HasTitleSize() bool { + if w != nil && w.TitleSize != nil { + return true + } + + return false +} + +// SetTitleSize allocates a new w.TitleSize and returns the pointer to it. +func (w *Widget) SetTitleSize(v int) { + w.TitleSize = &v +} + +// GetTitleText returns the TitleText field if non-nil, zero value otherwise. +func (w *Widget) GetTitleText() string { + if w == nil || w.TitleText == nil { + return "" + } + return *w.TitleText +} + +// GetTitleTextOk returns a tuple with the TitleText field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (w *Widget) GetTitleTextOk() (string, bool) { + if w == nil || w.TitleText == nil { + return "", false + } + return *w.TitleText, true +} + +// HasTitleText returns a boolean if a field has been set. +func (w *Widget) HasTitleText() bool { + if w != nil && w.TitleText != nil { + return true + } + + return false +} + +// SetTitleText allocates a new w.TitleText and returns the pointer to it. +func (w *Widget) SetTitleText(v string) { + w.TitleText = &v +} + +// GetType returns the Type field if non-nil, zero value otherwise. +func (w *Widget) GetType() string { + if w == nil || w.Type == nil { + return "" + } + return *w.Type +} + +// GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (w *Widget) GetTypeOk() (string, bool) { + if w == nil || w.Type == nil { + return "", false + } + return *w.Type, true +} + +// HasType returns a boolean if a field has been set. +func (w *Widget) HasType() bool { + if w != nil && w.Type != nil { + return true + } + + return false +} + +// SetType allocates a new w.Type and returns the pointer to it. +func (w *Widget) SetType(v string) { + w.Type = &v +} + +// GetUnit returns the Unit field if non-nil, zero value otherwise. +func (w *Widget) GetUnit() string { + if w == nil || w.Unit == nil { + return "" + } + return *w.Unit +} + +// GetUnitOk returns a tuple with the Unit field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (w *Widget) GetUnitOk() (string, bool) { + if w == nil || w.Unit == nil { + return "", false + } + return *w.Unit, true +} + +// HasUnit returns a boolean if a field has been set. +func (w *Widget) HasUnit() bool { + if w != nil && w.Unit != nil { + return true + } + + return false +} + +// SetUnit allocates a new w.Unit and returns the pointer to it. +func (w *Widget) SetUnit(v string) { + w.Unit = &v +} + +// GetURL returns the URL field if non-nil, zero value otherwise. +func (w *Widget) GetURL() string { + if w == nil || w.URL == nil { + return "" + } + return *w.URL +} + +// GetURLOk returns a tuple with the URL field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (w *Widget) GetURLOk() (string, bool) { + if w == nil || w.URL == nil { + return "", false + } + return *w.URL, true +} + +// HasURL returns a boolean if a field has been set. +func (w *Widget) HasURL() bool { + if w != nil && w.URL != nil { + return true + } + + return false +} + +// SetURL allocates a new w.URL and returns the pointer to it. +func (w *Widget) SetURL(v string) { + w.URL = &v +} + +// GetVizType returns the VizType field if non-nil, zero value otherwise. +func (w *Widget) GetVizType() string { + if w == nil || w.VizType == nil { + return "" + } + return *w.VizType +} + +// GetVizTypeOk returns a tuple with the VizType field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (w *Widget) GetVizTypeOk() (string, bool) { + if w == nil || w.VizType == nil { + return "", false + } + return *w.VizType, true +} + +// HasVizType returns a boolean if a field has been set. +func (w *Widget) HasVizType() bool { + if w != nil && w.VizType != nil { + return true + } + + return false +} + +// SetVizType allocates a new w.VizType and returns the pointer to it. +func (w *Widget) SetVizType(v string) { + w.VizType = &v +} + +// GetWidth returns the Width field if non-nil, zero value otherwise. +func (w *Widget) GetWidth() int { + if w == nil || w.Width == nil { + return 0 + } + return *w.Width +} + +// GetWidthOk returns a tuple with the Width field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (w *Widget) GetWidthOk() (int, bool) { + if w == nil || w.Width == nil { + return 0, false + } + return *w.Width, true +} + +// HasWidth returns a boolean if a field has been set. +func (w *Widget) HasWidth() bool { + if w != nil && w.Width != nil { + return true + } + + return false +} + +// SetWidth allocates a new w.Width and returns the pointer to it. +func (w *Widget) SetWidth(v int) { + w.Width = &v +} + +// GetX returns the X field if non-nil, zero value otherwise. +func (w *Widget) GetX() int { + if w == nil || w.X == nil { + return 0 + } + return *w.X +} + +// GetXOk returns a tuple with the X field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (w *Widget) GetXOk() (int, bool) { + if w == nil || w.X == nil { + return 0, false + } + return *w.X, true +} + +// HasX returns a boolean if a field has been set. +func (w *Widget) HasX() bool { + if w != nil && w.X != nil { + return true + } + + return false +} + +// SetX allocates a new w.X and returns the pointer to it. +func (w *Widget) SetX(v int) { + w.X = &v +} + +// GetY returns the Y field if non-nil, zero value otherwise. +func (w *Widget) GetY() int { + if w == nil || w.Y == nil { + return 0 + } + return *w.Y +} + +// GetYOk returns a tuple with the Y field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (w *Widget) GetYOk() (int, bool) { + if w == nil || w.Y == nil { + return 0, false + } + return *w.Y, true +} + +// HasY returns a boolean if a field has been set. +func (w *Widget) HasY() bool { + if w != nil && w.Y != nil { + return true + } + + return false +} + +// SetY allocates a new w.Y and returns the pointer to it. +func (w *Widget) SetY(v int) { + w.Y = &v } // GetMax returns the Max field if non-nil, zero value otherwise. @@ -13289,7 +10778,7 @@ func (y *Yaxis) GetMax() float64 { return *y.Max } -// GetOkMax returns a tuple with the Max field if it's non-nil, zero value otherwise +// GetMaxOk returns a tuple with the Max field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (y *Yaxis) GetMaxOk() (float64, bool) { if y == nil || y.Max == nil { @@ -13320,7 +10809,7 @@ func (y *Yaxis) GetMin() float64 { return *y.Min } -// GetOkMin returns a tuple with the Min field if it's non-nil, zero value otherwise +// GetMinOk returns a tuple with the Min field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (y *Yaxis) GetMinOk() (float64, bool) { if y == nil || y.Min == nil { @@ -13351,7 +10840,7 @@ func (y *Yaxis) GetScale() string { return *y.Scale } -// GetOkScale returns a tuple with the Scale field if it's non-nil, zero value otherwise +// GetScaleOk returns a tuple with the Scale field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. func (y *Yaxis) GetScaleOk() (string, bool) { if y == nil || y.Scale == nil { diff --git a/vendor/github.com/zorkian/go-datadog-api/integrations.go b/vendor/github.com/zorkian/go-datadog-api/integrations.go index c3ed2f4e..a79223ed 100644 --- a/vendor/github.com/zorkian/go-datadog-api/integrations.go +++ b/vendor/github.com/zorkian/go-datadog-api/integrations.go @@ -176,3 +176,66 @@ func (client *Client) GetIntegrationAWS() (*[]IntegrationAWSAccount, error) { func (client *Client) DeleteIntegrationAWS(awsAccount *IntegrationAWSAccountDeleteRequest) error { return client.doJsonRequest("DELETE", "/v1/integration/aws", awsAccount, nil) } + +/* + Google Cloud Platform Integration +*/ + +// IntegrationGCP defines the response for listing Datadog-Google CloudPlatform integration. +type IntegrationGCP struct { + ProjectID *string `json:"project_id"` + ClientEmail *string `json:"client_email"` + HostFilters *string `json:"host_filters"` +} + +// IntegrationGCPCreateRequest defines the request payload for creating Datadog-Google CloudPlatform integration. +type IntegrationGCPCreateRequest struct { + Type *string `json:"type"` // Should be service_account + ProjectID *string `json:"project_id"` + PrivateKeyID *string `json:"private_key_id"` + PrivateKey *string `json:"private_key"` + ClientEmail *string `json:"client_email"` + ClientID *string `json:"client_id"` + AuthURI *string `json:"auth_uri"` // Should be https://accounts.google.com/o/oauth2/auth + TokenURI *string `json:"token_uri"` // Should be https://accounts.google.com/o/oauth2/token + AuthProviderX509CertURL *string `json:"auth_provider_x509_cert_url"` // Should be https://www.googleapis.com/oauth2/v1/certs + ClientX509CertURL *string `json:"client_x509_cert_url"` // https://www.googleapis.com/robot/v1/metadata/x509/ + HostFilters *string `json:"host_filters,omitempty"` +} + +// IntegrationGCPUpdateRequest defines the request payload for updating Datadog-Google CloudPlatform integration. +type IntegrationGCPUpdateRequest struct { + ProjectID *string `json:"project_id"` + ClientEmail *string `json:"client_email"` + HostFilters *string `json:"host_filters,omitempty"` +} + +// IntegrationGCPDeleteRequest defines the request payload for deleting Datadog-Google CloudPlatform integration. +type IntegrationGCPDeleteRequest struct { + ProjectID *string `json:"project_id"` + ClientEmail *string `json:"client_email"` +} + +// ListIntegrationGCP gets all Google Cloud Platform Integrations. +func (client *Client) ListIntegrationGCP() ([]*IntegrationGCP, error) { + var list []*IntegrationGCP + if err := client.doJsonRequest("GET", "/v1/integration/gcp", nil, &list); err != nil { + return nil, err + } + return list, nil +} + +// CreateIntegrationGCP creates a new Google Cloud Platform Integration. +func (client *Client) CreateIntegrationGCP(cir *IntegrationGCPCreateRequest) error { + return client.doJsonRequest("POST", "/v1/integration/gcp", cir, nil) +} + +// UpdateIntegrationGCP updates a Google Cloud Platform Integration. +func (client *Client) UpdateIntegrationGCP(cir *IntegrationGCPUpdateRequest) error { + return client.doJsonRequest("POST", "/v1/integration/gcp/host_filters", cir, nil) +} + +// DeleteIntegrationGCP deletes a Google Cloud Platform Integration. +func (client *Client) DeleteIntegrationGCP(cir *IntegrationGCPDeleteRequest) error { + return client.doJsonRequest("DELETE", "/v1/integration/gcp", cir, nil) +} diff --git a/vendor/github.com/zorkian/go-datadog-api/monitors.go b/vendor/github.com/zorkian/go-datadog-api/monitors.go index 3a97cc27..f8a10c9d 100644 --- a/vendor/github.com/zorkian/go-datadog-api/monitors.go +++ b/vendor/github.com/zorkian/go-datadog-api/monitors.go @@ -57,18 +57,40 @@ type Options struct { Locked *bool `json:"locked,omitempty"` } +type TriggeringValue struct { + FromTs *int `json:"from_ts,omitempty"` + ToTs *int `json:"to_ts,omitempty"` + Value *int `json:"value,omitempty"` +} + +type GroupData struct { + LastNoDataTs *int `json:"last_nodata_ts,omitempty"` + LastNotifiedTs *int `json:"last_notified_ts,omitempty"` + LastResolvedTs *int `json:"last_resolved_ts,omitempty"` + LastTriggeredTs *int `json:"last_triggered_ts,omitempty"` + Name *string `json:"name,omitempty"` + Status *string `json:"status,omitempty"` + TriggeringValue *TriggeringValue `json:"triggering_value,omitempty"` +} + +type State struct { + Groups map[string]GroupData `json:"groups,omitempty"` +} + // Monitor allows watching a metric or check that you care about, // notifying your team when some defined threshold is exceeded type Monitor struct { - Creator *Creator `json:"creator,omitempty"` - Id *int `json:"id,omitempty"` - Type *string `json:"type,omitempty"` - Query *string `json:"query,omitempty"` - Name *string `json:"name,omitempty"` - Message *string `json:"message,omitempty"` - OverallState *string `json:"overall_state,omitempty"` - Tags []string `json:"tags"` - Options *Options `json:"options,omitempty"` + Creator *Creator `json:"creator,omitempty"` + Id *int `json:"id,omitempty"` + Type *string `json:"type,omitempty"` + Query *string `json:"query,omitempty"` + Name *string `json:"name,omitempty"` + Message *string `json:"message,omitempty"` + OverallState *string `json:"overall_state,omitempty"` + OverallStateModified *string `json:"overall_state_modified,omitempty"` + Tags []string `json:"tags"` + Options *Options `json:"options,omitempty"` + State State `json:"state,omitempty"` } // Creator contains the creator of the monitor diff --git a/vendor/github.com/zorkian/go-datadog-api/request.go b/vendor/github.com/zorkian/go-datadog-api/request.go index f65ac5a9..a89ed42e 100644 --- a/vendor/github.com/zorkian/go-datadog-api/request.go +++ b/vendor/github.com/zorkian/go-datadog-api/request.go @@ -22,6 +22,12 @@ import ( "github.com/cenkalti/backoff" ) +// Response contains common fields that might be present in any API response. +type Response struct { + Status string `json:"status"` + Error string `json:"error"` +} + // uriForAPI is to be called with something like "/v1/events" and it will give // the proper request URI to be posted to. func (client *Client) uriForAPI(api string) (string, error) { @@ -99,14 +105,6 @@ func (client *Client) doJsonRequestUnredacted(method, api string, return fmt.Errorf("API error %s: %s", resp.Status, body) } - // If they don't care about the body, then we don't care to give them one, - // so bail out because we're done. - if out == nil { - // read the response body so http conn can be reused immediately - io.Copy(ioutil.Discard, resp.Body) - return nil - } - body, err := ioutil.ReadAll(resp.Body) if err != nil { return err @@ -118,6 +116,27 @@ func (client *Client) doJsonRequestUnredacted(method, api string, body = []byte{'{', '}'} } + // Try to parse common response fields to check whether there's an error reported in a response. + var common *Response + err = json.Unmarshal(body, &common) + if err != nil { + // UnmarshalTypeError errors are ignored, because in some cases API response is an array that cannot be + // unmarshalled into a struct. + _, ok := err.(*json.UnmarshalTypeError) + if !ok { + return err + } + } + if common != nil && common.Status == "error" { + return fmt.Errorf("API returned error: %s", common.Error) + } + + // If they don't care about the body, then we don't care to give them one, + // so bail out because we're done. + if out == nil { + return nil + } + return json.Unmarshal(body, &out) } diff --git a/vendor/github.com/zorkian/go-datadog-api/screen_widgets.go b/vendor/github.com/zorkian/go-datadog-api/screen_widgets.go index 28955bf5..d5c4d466 100644 --- a/vendor/github.com/zorkian/go-datadog-api/screen_widgets.go +++ b/vendor/github.com/zorkian/go-datadog-api/screen_widgets.go @@ -1,287 +1,204 @@ package datadog -type TextSize struct { - Size *int - Auto *bool -} +import "encoding/json" type TileDef struct { - Events []TileDefEvent `json:"events,omitempty"` - Markers []TimeseriesMarker `json:"markers,omitempty"` - Requests []TimeseriesRequest `json:"requests,omitempty"` - Viz *string `json:"viz,omitempty"` -} + Events []TileDefEvent `json:"events,omitempty"` + Markers []TileDefMarker `json:"markers,omitempty"` + Requests []TileDefRequest `json:"requests,omitempty"` + Viz *string `json:"viz,omitempty"` + CustomUnit *string `json:"custom_unit,omitempty"` + Autoscale *bool `json:"autoscale,omitempty"` + Precision *json.Number `json:"precision,omitempty"` + TextAlign *string `json:"text_align,omitempty"` -type TimeseriesRequest struct { - Query *string `json:"q,omitempty"` - Type *string `json:"type,omitempty"` - ConditionalFormats []ConditionalFormat `json:"conditional_formats,omitempty"` - Style *TimeseriesRequestStyle `json:"style,omitempty"` -} - -type TimeseriesRequestStyle struct { - Palette *string `json:"palette,omitempty"` -} - -type TimeseriesMarker struct { - Label *string `json:"label,omitempty"` - Type *string `json:"type,omitempty"` - Value *string `json:"value,omitempty"` + // For hostmap + NodeType *string `json:"nodeType,omitempty"` + Scope []*string `json:"scope,omitempty"` + Group []*string `json:"group,omitempty"` + NoGroupHosts *bool `json:"noGroupHosts,omitempty"` + NoMetricHosts *bool `json:"noMetricHosts,omitempty"` + Style *TileDefStyle `json:"style,omitempty"` } type TileDefEvent struct { Query *string `json:"q"` } -type AlertValueWidget struct { - TitleSize *int `json:"title_size,omitempty"` - Title *bool `json:"title,omitempty"` - TitleAlign *string `json:"title_align,omitempty"` - TextAlign *string `json:"text_align,omitempty"` - TitleText *string `json:"title_text,omitempty"` - Precision *int `json:"precision,omitempty"` - AlertId *int `json:"alert_id,omitempty"` - Timeframe *string `json:"timeframe,omitempty"` - AddTimeframe *bool `json:"add_timeframe,omitempty"` - Y *int `json:"y,omitempty"` - X *int `json:"x,omitempty"` - TextSize *string `json:"text_size,omitempty"` - Height *int `json:"height,omitempty"` - Width *int `json:"width,omitempty"` - Type *string `json:"type,omitempty"` - Unit *string `json:"unit,omitempty"` +type TileDefMarker struct { + Label *string `json:"label,omitempty"` + Type *string `json:"type,omitempty"` + Value *string `json:"value,omitempty"` } -type ChangeWidget struct { - TitleSize *int `json:"title_size,omitempty"` - Title *bool `json:"title,omitempty"` - TitleAlign *string `json:"title_align,omitempty"` - TitleText *string `json:"title_text,omitempty"` - Height *int `json:"height,omitempty"` - Width *int `json:"width,omitempty"` - X *int `json:"y,omitempty"` - Y *int `json:"x,omitempty"` - Aggregator *string `json:"aggregator,omitempty"` - TileDef *TileDef `json:"tile_def,omitempty"` +type TileDefRequest struct { + Query *string `json:"q,omitempty"` + + // For Hostmap + Type *string `json:"type,omitempty"` + + // For Process + QueryType *string `json:"query_type,omitempty"` + Metric *string `json:"metric,omitempty"` + TextFilter *string `json:"text_filter,omitempty"` + TagFilters []*string `json:"tag_filters"` + Limit *int `json:"limit,omitempty"` + + ConditionalFormats []ConditionalFormat `json:"conditional_formats,omitempty"` + Style *TileDefRequestStyle `json:"style,omitempty"` + Aggregator *string `json:"aggregator,omitempty"` + CompareTo *string `json:"compare_to,omitempty"` + ChangeType *string `json:"change_type,omitempty"` + OrderBy *string `json:"order_by,omitempty"` + OrderDir *string `json:"order_dir,omitempty"` + ExtraCol *string `json:"extra_col,omitempty"` + IncreaseGood *bool `json:"increase_good,omitempty"` } -type GraphWidget struct { - TitleSize *int `json:"title_size,omitempty"` - Title *bool `json:"title,omitempty"` - TitleAlign *string `json:"title_align,omitempty"` - TitleText *string `json:"title_text,omitempty"` - Height *int `json:"height,omitempty"` - Width *int `json:"width,omitempty"` - X *int `json:"y,omitempty"` - Y *int `json:"x,omitempty"` - Type *string `json:"type,omitempty"` - Timeframe *string `json:"timeframe,omitempty"` - LegendSize *int `json:"legend_size,omitempty"` - Legend *bool `json:"legend,omitempty"` - TileDef *TileDef `json:"tile_def,omitempty"` -} - -type EventTimelineWidget struct { - TitleSize *int `json:"title_size,omitempty"` - Title *bool `json:"title,omitempty"` - TitleAlign *string `json:"title_align,omitempty"` - TitleText *string `json:"title_text,omitempty"` - Height *int `json:"height,omitempty"` - Width *int `json:"width,omitempty"` - X *int `json:"y,omitempty"` - Y *int `json:"x,omitempty"` - Type *string `json:"type,omitempty"` - Timeframe *string `json:"timeframe,omitempty"` - Query *string `json:"query,omitempty"` -} - -type AlertGraphWidget struct { - TitleSize *int `json:"title_size,omitempty"` - VizType *string `json:"timeseries,omitempty"` - Title *bool `json:"title,omitempty"` - TitleAlign *string `json:"title_align,omitempty"` - TitleText *string `json:"title_text,omitempty"` - Height *int `json:"height,omitempty"` - Width *int `json:"width,omitempty"` - X *int `json:"y,omitempty"` - Y *int `json:"x,omitempty"` - AlertId *int `json:"alert_id,omitempty"` - Timeframe *string `json:"timeframe,omitempty"` - Type *string `json:"type,omitempty"` - AddTimeframe *bool `json:"add_timeframe,omitempty"` -} - -type HostMapWidget struct { - TitleSize *int `json:"title_size,omitempty"` - Title *bool `json:"title,omitempty"` - TitleAlign *string `json:"title_align,omitempty"` - TitleText *string `json:"title_text,omitempty"` - Height *int `json:"height,omitempty"` - Width *int `json:"width,omitempty"` - X *int `json:"y,omitempty"` - Y *int `json:"x,omitempty"` - Query *string `json:"query,omitempty"` - Timeframe *string `json:"timeframe,omitempty"` - LegendSize *int `json:"legend_size,omitempty"` - Type *string `json:"type,omitempty"` - Legend *bool `json:"legend,omitempty"` - TileDef *TileDef `json:"tile_def,omitempty"` -} - -type CheckStatusWidget struct { - TitleSize *int `json:"title_size,omitempty"` - Title *bool `json:"title,omitempty"` - TitleAlign *string `json:"title_align,omitempty"` - TextAlign *string `json:"text_align,omitempty"` - TitleText *string `json:"title_text,omitempty"` - Height *int `json:"height,omitempty"` - Width *int `json:"width,omitempty"` - X *int `json:"y,omitempty"` - Y *int `json:"x,omitempty"` - Tags *string `json:"tags,omitempty"` - Timeframe *string `json:"timeframe,omitempty"` - TextSize *string `json:"text_size,omitempty"` - Type *string `json:"type,omitempty"` - Check *string `json:"check,omitempty"` - Group *string `json:"group,omitempty"` - Grouping *string `json:"grouping,omitempty"` -} - -type IFrameWidget struct { - TitleSize *int `json:"title_size,omitempty"` - Title *bool `json:"title,omitempty"` - Url *string `json:"url,omitempty"` - TitleAlign *string `json:"title_align,omitempty"` - TitleText *string `json:"title_text,omitempty"` - Height *int `json:"height,omitempty"` - Width *int `json:"width,omitempty"` - X *int `json:"y,omitempty"` - Y *int `json:"x,omitempty"` - Type *string `json:"type,omitempty"` -} - -type NoteWidget struct { - TitleSize *int `json:"title_size,omitempty"` - Title *bool `json:"title,omitempty"` - RefreshEvery *int `json:"refresh_every,omitempty"` - TickPos *string `json:"tick_pos,omitempty"` - TitleAlign *string `json:"title_align,omitempty"` - TickEdge *string `json:"tick_edge,omitempty"` - TextAlign *string `json:"text_align,omitempty"` - TitleText *string `json:"title_text,omitempty"` - Height *int `json:"height,omitempty"` - Color *string `json:"bgcolor,omitempty"` - Html *string `json:"html,omitempty"` - Y *int `json:"y,omitempty"` - X *int `json:"x,omitempty"` - FontSize *int `json:"font_size,omitempty"` - Tick *bool `json:"tick,omitempty"` - Note *string `json:"type,omitempty"` - Width *int `json:"width,omitempty"` - AutoRefresh *bool `json:"auto_refresh,omitempty"` -} - -type TimeseriesWidget struct { - Height *int `json:"height,omitempty"` - Legend *bool `json:"legend,omitempty"` - TileDef *TileDef `json:"tile_def,omitempty"` - Timeframe *string `json:"timeframe,omitempty"` - Title *bool `json:"title,omitempty"` - TitleAlign *string `json:"title_align,omitempty"` - TitleSize *TextSize `json:"title_size,omitempty"` - TitleText *string `json:"title_text,omitempty"` - Type *string `json:"type,omitempty"` - Width *int `json:"width,omitempty"` - X *int `json:"x,omitempty"` - Y *int `json:"y,omitempty"` -} - -type QueryValueWidget struct { - Timeframe *string `json:"timeframe,omitempty"` - TimeframeAggregator *string `json:"aggr,omitempty"` - Aggregator *string `json:"aggregator,omitempty"` - CalcFunc *string `json:"calc_func,omitempty"` - ConditionalFormats []ConditionalFormat `json:"conditional_formats,omitempty"` - Height *int `json:"height,omitempty"` - IsValidQuery *bool `json:"is_valid_query,omitempty,omitempty"` - Metric *string `json:"metric,omitempty"` - MetricType *string `json:"metric_type,omitempty"` - Precision *int `json:"precision,omitempty"` - Query *string `json:"query,omitempty"` - ResultCalcFunc *string `json:"res_calc_func,omitempty"` - Tags []string `json:"tags,omitempty"` - TextAlign *string `json:"text_align,omitempty"` - TextSize *TextSize `json:"text_size,omitempty"` - Title *bool `json:"title,omitempty"` - TitleAlign *string `json:"title_align,omitempty"` - TitleSize *TextSize `json:"title_size,omitempty"` - TitleText *string `json:"title_text,omitempty"` - Type *string `json:"type,omitempty"` - Unit *string `json:"auto,omitempty"` - Width *int `json:"width,omitempty"` - X *int `json:"x,omitempty"` - Y *int `json:"y,omitempty"` -} type ConditionalFormat struct { Color *string `json:"color,omitempty"` + Palette *string `json:"palette,omitempty"` Comparator *string `json:"comparator,omitempty"` - Inverted *bool `json:"invert,omitempty"` - Value *int `json:"value,omitempty"` + Invert *bool `json:"invert,omitempty"` + Value *string `json:"value,omitempty"` + ImageURL *string `json:"image_url,omitempty"` } -type ToplistWidget struct { - Height *int `json:"height,omitempty"` - Legend *bool `json:"legend,omitempty"` - LegendSize *int `json:"legend_size,omitempty"` - TileDef *TileDef `json:"tile_def,omitempty"` - Timeframe *string `json:"timeframe,omitempty"` - Title *bool `json:"title,omitempty"` - TitleAlign *string `json:"title_align,omitempty"` - TitleSize *TextSize `json:"title_size,omitempty"` - TitleText *string `json:"title_text,omitempty"` - Type *string `json:"type,omitempty"` - Width *int `json:"width,omitempty"` - X *int `json:"x,omitempty"` - Y *int `json:"y,omitempty"` +type TileDefRequestStyle struct { + Palette *string `json:"palette,omitempty"` + Type *string `json:"type,omitempty"` + Width *string `json:"width,omitempty"` } -type EventStreamWidget struct { - EventSize *string `json:"event_size,omitempty"` - Height *int `json:"height,omitempty"` - Query *string `json:"query,omitempty"` - Timeframe *string `json:"timeframe,omitempty"` - Title *bool `json:"title,omitempty"` - TitleAlign *string `json:"title_align,omitempty"` - TitleSize *TextSize `json:"title_size,omitempty"` - TitleText *string `json:"title_text,omitempty"` - Type *string `json:"type,omitempty"` - Width *int `json:"width,omitempty"` - X *int `json:"x,omitempty"` - Y *int `json:"y,omitempty"` +type TileDefStyle struct { + Palette *string `json:"palette,omitempty"` + PaletteFlip *string `json:"paletteFlip,omitempty"` + FillMin *string `json:"fillMin,omitempty"` + FillMax *string `json:"fillMax,omitempty"` } -type FreeTextWidget struct { - Color *string `json:"color,omitempty"` - FontSize *string `json:"font_size,omitempty"` - Height *int `json:"height,omitempty"` - Text *string `json:"text,omitempty"` +type Time struct { + LiveSpan *string `json:"live_span,omitempty"` +} + +type Widget struct { + // Common attributes + Type *string `json:"type,omitempty"` + Title *bool `json:"title,omitempty"` + TitleText *string `json:"title_text,omitempty"` + TitleAlign *string `json:"title_align,omitempty"` + TitleSize *int `json:"title_size,omitempty"` + Height *int `json:"height,omitempty"` + Width *int `json:"width,omitempty"` + X *int `json:"y,omitempty"` + Y *int `json:"x,omitempty"` + + // For Timeseries, TopList, EventTimeline, EvenStream, AlertGraph, CheckStatus, ServiceSummary, LogStream widgets + Time *Time `json:"time,omitempty"` + + // For Timeseries, QueryValue, HostMap, Change, Toplist, Process widgets + TileDef *TileDef `json:"tile_def,omitempty"` + + // For FreeText widget + Text *string `json:"text,omitempty"` + Color *string `json:"color,omitempty"` + + // For AlertValue widget + TextSize *string `json:"text_size,omitempty"` + Unit *string `json:"unit,omitempty"` + Precision *string `json:"precision,omitempty"` + + // AlertGraph widget + VizType *string `json:"viz_type,omitempty"` + + // For AlertValue, QueryValue, FreeText, Note widgets TextAlign *string `json:"text_align,omitempty"` - Type *string `json:"type,omitempty"` - Width *int `json:"width,omitempty"` - X *int `json:"x,omitempty"` - Y *int `json:"y,omitempty"` + + // For FreeText, Note widgets + FontSize *string `json:"font_size,omitempty"` + + // For AlertValue, AlertGraph widgets + AlertID *int `json:"alert_id,omitempty"` + AutoRefresh *bool `json:"auto_refresh,omitempty"` + + // For Timeseries, QueryValue, Toplist widgets + Legend *bool `json:"legend,omitempty"` + LegendSize *string `json:"legend_size,omitempty"` + + // For EventTimeline, EventStream, Hostmap, LogStream widgets + Query *string `json:"query,omitempty"` + + // For Image, IFrame widgets + URL *string `json:"url,omitempty"` + + // For CheckStatus widget + Tags []*string `json:"tags,omitempty"` + Check *string `json:"check,omitempty"` + Grouping *string `json:"grouping,omitempty"` + GroupBy []*string `json:"group_by,omitempty"` + Group *string `json:"group,omitempty"` + + // Note widget + TickPos *string `json:"tick_pos,omitempty"` + TickEdge *string `json:"tick_edge,omitempty"` + HTML *string `json:"html,omitempty"` + Tick *bool `json:"tick,omitempty"` + Bgcolor *string `json:"bgcolor,omitempty"` + + // EventStream widget + EventSize *string `json:"event_size,omitempty"` + + // Image widget + Sizing *string `json:"sizing,omitempty"` + Margin *string `json:"margin,omitempty"` + + // For ServiceSummary (trace_service) widget + Env *string `json:"env,omitempty"` + ServiceService *string `json:"serviceService,omitempty"` + ServiceName *string `json:"serviceName,omitempty"` + SizeVersion *string `json:"sizeVersion,omitempty"` + LayoutVersion *string `json:"layoutVersion,omitempty"` + MustShowHits *bool `json:"mustShowHits,omitempty"` + MustShowErrors *bool `json:"mustShowErrors,omitempty"` + MustShowLatency *bool `json:"mustShowLatency,omitempty"` + MustShowBreakdown *bool `json:"mustShowBreakdown,omitempty"` + MustShowDistribution *bool `json:"mustShowDistribution,omitempty"` + MustShowResourceList *bool `json:"mustShowResourceList,omitempty"` + + // For MonitorSummary (manage_status) widget + DisplayFormat *string `json:"displayFormat,omitempty"` + ColorPreference *string `json:"colorPreference,omitempty"` + HideZeroCounts *bool `json:"hideZeroCounts,omitempty"` + ManageStatusShowTitle *bool `json:"showTitle,omitempty"` + ManageStatusTitleText *string `json:"titleText,omitempty"` + ManageStatusTitleSize *string `json:"titleSize,omitempty"` + ManageStatusTitleAlign *string `json:"titleAlign,omitempty"` + Params *Params `json:"params,omitempty"` + + // For LogStream widget + Columns *string `json:"columns,omitempty"` + Logset *string `json:"logset,omitempty"` + + // For Uptime + // Widget is undocumented, subject to breaking API changes, and without customer support + Timeframes []*string `json:"timeframes,omitempty"` + Rules map[string]*Rule `json:"rules,omitempty"` + Monitor *ScreenboardMonitor `json:"monitor,omitempty"` } -type ImageWidget struct { - Height *int `json:"height,omitempty"` - Sizing *string `json:"sizing,omitempty"` - Title *bool `json:"title,omitempty"` - TitleAlign *string `json:"title_align,omitempty"` - TitleSize *TextSize `json:"title_size,omitempty"` - TitleText *string `json:"title_text,omitempty"` - Type *string `json:"type,omitempty"` - Url *string `json:"url,omitempty"` - Width *int `json:"width,omitempty"` - X *int `json:"x,omitempty"` - Y *int `json:"y,omitempty"` +type Params struct { + Sort *string `json:"sort,omitempty"` + Text *string `json:"text,omitempty"` + Count *string `json:"count,omitempty"` + Start *string `json:"start,omitempty"` +} + +type Rule struct { + Threshold *json.Number `json:"threshold,omitempty"` + Timeframe *string `json:"timeframe,omitempty"` + Color *string `json:"color,omitempty"` +} + +type ScreenboardMonitor struct { + Id *int `json:"id,omitempty"` } diff --git a/vendor/github.com/zorkian/go-datadog-api/screenboards.go b/vendor/github.com/zorkian/go-datadog-api/screenboards.go index 2866fd58..3bc52a5f 100644 --- a/vendor/github.com/zorkian/go-datadog-api/screenboards.go +++ b/vendor/github.com/zorkian/go-datadog-api/screenboards.go @@ -20,34 +20,11 @@ type Screenboard struct { Height *string `json:"height,omitempty"` Width *string `json:"width,omitempty"` Shared *bool `json:"shared,omitempty"` - Templated *bool `json:"templated,omitempty"` TemplateVariables []TemplateVariable `json:"template_variables,omitempty"` Widgets []Widget `json:"widgets"` ReadOnly *bool `json:"read_only,omitempty"` } -//type Widget struct { -type Widget struct { - Default *string `json:"default,omitempty"` - Name *string `json:"name,omitempty"` - Prefix *string `json:"prefix,omitempty"` - TimeseriesWidget *TimeseriesWidget `json:"timeseries,omitempty"` - QueryValueWidget *QueryValueWidget `json:"query_value,omitempty"` - EventStreamWidget *EventStreamWidget `json:"event_stream,omitempty"` - FreeTextWidget *FreeTextWidget `json:"free_text,omitempty"` - ToplistWidget *ToplistWidget `json:"toplist,omitempty"` - ImageWidget *ImageWidget `json:"image,omitempty"` - ChangeWidget *ChangeWidget `json:"change,omitempty"` - GraphWidget *GraphWidget `json:"graph,omitempty"` - EventTimelineWidget *EventTimelineWidget `json:"event_timeline,omitempty"` - AlertValueWidget *AlertValueWidget `json:"alert_value,omitempty"` - AlertGraphWidget *AlertGraphWidget `json:"alert_graph,omitempty"` - HostMapWidget *HostMapWidget `json:"hostmap,omitempty"` - CheckStatusWidget *CheckStatusWidget `json:"check_status,omitempty"` - IFrameWidget *IFrameWidget `json:"iframe,omitempty"` - NoteWidget *NoteWidget `json:"frame,omitempty"` -} - // ScreenboardLite represents a user created screenboard. This is the mini // struct when we load the summaries. type ScreenboardLite struct { diff --git a/vendor/github.com/zorkian/go-datadog-api/series.go b/vendor/github.com/zorkian/go-datadog-api/series.go index 7337dcb3..024a68bb 100644 --- a/vendor/github.com/zorkian/go-datadog-api/series.go +++ b/vendor/github.com/zorkian/go-datadog-api/series.go @@ -30,12 +30,12 @@ type Metric struct { // Unit represents a unit definition that we might receive when query for timeseries data. type Unit struct { - Family string `json:"family"` + Family string `json:"family"` ScaleFactor float32 `json:"scale_factor"` - Name string `json:"name"` - ShortName string `json:"short_name"` - Plural string `json:"plural"` - Id int `json:"id"` + Name string `json:"name"` + ShortName string `json:"short_name"` + Plural string `json:"plural"` + Id int `json:"id"` } // A Series is characterized by 2 units as: x per y diff --git a/vendor/golang.org/x/oauth2/internal/token.go b/vendor/golang.org/x/oauth2/internal/token.go index 999e668e..53259a41 100644 --- a/vendor/golang.org/x/oauth2/internal/token.go +++ b/vendor/golang.org/x/oauth2/internal/token.go @@ -103,12 +103,14 @@ var brokenAuthHeaderProviders = []string{ "https://api.twitch.tv/", "https://id.twitch.tv/", "https://app.box.com/", + "https://api.box.com/", "https://connect.stripe.com/", "https://login.mailchimp.com/", "https://login.microsoftonline.com/", "https://login.salesforce.com/", "https://login.windows.net", "https://login.live.com/", + "https://login.live-int.com/", "https://oauth.sandbox.trainingpeaks.com/", "https://oauth.trainingpeaks.com/", "https://oauth.vk.com/", @@ -130,6 +132,8 @@ var brokenAuthHeaderProviders = []string{ "https://multisport.todaysplan.com.au/rest/oauth/access_token", "https://whats.todaysplan.com.au/rest/oauth/access_token", "https://stackoverflow.com/oauth/access_token", + "https://account.health.nokia.com", + "https://accounts.zoho.com", } // brokenAuthHeaderDomains lists broken providers that issue dynamic endpoints. diff --git a/vendor/google.golang.org/api/calendar/v3/calendar-api.json b/vendor/google.golang.org/api/calendar/v3/calendar-api.json index b1dd97e6..0aab2d09 100644 --- a/vendor/google.golang.org/api/calendar/v3/calendar-api.json +++ b/vendor/google.golang.org/api/calendar/v3/calendar-api.json @@ -5,8 +5,17 @@ "https://www.googleapis.com/auth/calendar": { "description": "Manage your calendars" }, + "https://www.googleapis.com/auth/calendar.events": { + "description": "View and edit events on all your calendars" + }, + "https://www.googleapis.com/auth/calendar.events.readonly": { + "description": "View events on all your calendars" + }, "https://www.googleapis.com/auth/calendar.readonly": { "description": "View your calendars" + }, + "https://www.googleapis.com/auth/calendar.settings.readonly": { + "description": "View your Calendar settings" } } } @@ -17,7 +26,7 @@ "description": "Manipulates events and other calendar data.", "discoveryVersion": "v1", "documentationLink": "https://developers.google.com/google-apps/calendar/firstapp", - "etag": "\"J3WqvAcMk4eQjJXvfSI4Yr8VouA/UfSqMqLGclhjNS9q0g-j705eXE8\"", + "etag": "\"J3WqvAcMk4eQjJXvfSI4Yr8VouA/HcEmuhTEJ15i1AnuK6mgjI8kmMs\"", "icons": { "x16": "http://www.google.com/images/icons/product/calendar-16.png", "x32": "http://www.google.com/images/icons/product/calendar-32.png" @@ -743,7 +752,10 @@ }, "scopes": [ "https://www.googleapis.com/auth/calendar", - "https://www.googleapis.com/auth/calendar.readonly" + "https://www.googleapis.com/auth/calendar.events", + "https://www.googleapis.com/auth/calendar.events.readonly", + "https://www.googleapis.com/auth/calendar.readonly", + "https://www.googleapis.com/auth/calendar.settings.readonly" ] } } @@ -789,14 +801,30 @@ "type": "string" }, "sendNotifications": { - "description": "Whether to send notifications about the deletion of the event. Optional. The default is False.", + "description": "Deprecated. Please use sendUpdates instead.\n\nWhether to send notifications about the deletion of the event. Note that some emails might still be sent even if you set the value to false. The default is false.", "location": "query", "type": "boolean" + }, + "sendUpdates": { + "description": "Guests who should receive notifications about the deletion of the event.", + "enum": [ + "all", + "externalOnly", + "none" + ], + "enumDescriptions": [ + "Notifications are sent to all guests.", + "Notifications are sent to non-Google Calendar guests only.", + "No notifications are sent. This value should only be used for migration use cases (note that in most migration cases the import method should be used)." + ], + "location": "query", + "type": "string" } }, "path": "calendars/{calendarId}/events/{eventId}", "scopes": [ - "https://www.googleapis.com/auth/calendar" + "https://www.googleapis.com/auth/calendar", + "https://www.googleapis.com/auth/calendar.events" ] }, "get": { @@ -844,6 +872,8 @@ }, "scopes": [ "https://www.googleapis.com/auth/calendar", + "https://www.googleapis.com/auth/calendar.events", + "https://www.googleapis.com/auth/calendar.events.readonly", "https://www.googleapis.com/auth/calendar.readonly" ] }, @@ -883,7 +913,8 @@ "$ref": "Event" }, "scopes": [ - "https://www.googleapis.com/auth/calendar" + "https://www.googleapis.com/auth/calendar", + "https://www.googleapis.com/auth/calendar.events" ] }, "insert": { @@ -916,10 +947,25 @@ "type": "integer" }, "sendNotifications": { - "description": "Whether to send notifications about the creation of the new event. Optional. The default is False.", + "description": "Deprecated. Please use sendUpdates instead.\n\nWhether to send notifications about the creation of the new event. Note that some emails might still be sent even if you set the value to false. The default is false.", "location": "query", "type": "boolean" }, + "sendUpdates": { + "description": "Whether to send notifications about the creation of the new event. Note that some emails might still be sent. The default is false.", + "enum": [ + "all", + "externalOnly", + "none" + ], + "enumDescriptions": [ + "Notifications are sent to all guests.", + "Notifications are sent to non-Google Calendar guests only.", + "No notifications are sent. This value should only be used for migration use cases (note that in most migration cases the import method should be used)." + ], + "location": "query", + "type": "string" + }, "supportsAttachments": { "description": "Whether API client performing operation supports event attachments. Optional. The default is False.", "location": "query", @@ -934,7 +980,8 @@ "$ref": "Event" }, "scopes": [ - "https://www.googleapis.com/auth/calendar" + "https://www.googleapis.com/auth/calendar", + "https://www.googleapis.com/auth/calendar.events" ] }, "instances": { @@ -1016,6 +1063,8 @@ }, "scopes": [ "https://www.googleapis.com/auth/calendar", + "https://www.googleapis.com/auth/calendar.events", + "https://www.googleapis.com/auth/calendar.events.readonly", "https://www.googleapis.com/auth/calendar.readonly" ], "supportsSubscription": true @@ -1144,6 +1193,8 @@ }, "scopes": [ "https://www.googleapis.com/auth/calendar", + "https://www.googleapis.com/auth/calendar.events", + "https://www.googleapis.com/auth/calendar.events.readonly", "https://www.googleapis.com/auth/calendar.readonly" ], "supportsSubscription": true @@ -1177,9 +1228,24 @@ "type": "string" }, "sendNotifications": { - "description": "Whether to send notifications about the change of the event's organizer. Optional. The default is False.", + "description": "Deprecated. Please use sendUpdates instead.\n\nWhether to send notifications about the change of the event's organizer. Note that some emails might still be sent even if you set the value to false. The default is false.", "location": "query", "type": "boolean" + }, + "sendUpdates": { + "description": "Guests who should receive notifications about the change of the event's organizer.", + "enum": [ + "all", + "externalOnly", + "none" + ], + "enumDescriptions": [ + "Notifications are sent to all guests.", + "Notifications are sent to non-Google Calendar guests only.", + "No notifications are sent. This value should only be used for migration use cases (note that in most migration cases the import method should be used)." + ], + "location": "query", + "type": "string" } }, "path": "calendars/{calendarId}/events/{eventId}/move", @@ -1187,7 +1253,8 @@ "$ref": "Event" }, "scopes": [ - "https://www.googleapis.com/auth/calendar" + "https://www.googleapis.com/auth/calendar", + "https://www.googleapis.com/auth/calendar.events" ] }, "patch": { @@ -1232,10 +1299,25 @@ "type": "integer" }, "sendNotifications": { - "description": "Whether to send notifications about the event update (e.g. attendee's responses, title changes, etc.). Optional. The default is False.", + "description": "Deprecated. Please use sendUpdates instead.\n\nWhether to send notifications about the event update (for example, description changes, etc.). Note that some emails might still be sent even if you set the value to false. The default is false.", "location": "query", "type": "boolean" }, + "sendUpdates": { + "description": "Guests who should receive notifications about the event update (for example, title changes, etc.).", + "enum": [ + "all", + "externalOnly", + "none" + ], + "enumDescriptions": [ + "Notifications are sent to all guests.", + "Notifications are sent to non-Google Calendar guests only.", + "No notifications are sent. This value should only be used for migration use cases (note that in most migration cases the import method should be used)." + ], + "location": "query", + "type": "string" + }, "supportsAttachments": { "description": "Whether API client performing operation supports event attachments. Optional. The default is False.", "location": "query", @@ -1250,7 +1332,8 @@ "$ref": "Event" }, "scopes": [ - "https://www.googleapis.com/auth/calendar" + "https://www.googleapis.com/auth/calendar", + "https://www.googleapis.com/auth/calendar.events" ] }, "quickAdd": { @@ -1269,10 +1352,25 @@ "type": "string" }, "sendNotifications": { - "description": "Whether to send notifications about the creation of the event. Optional. The default is False.", + "description": "Deprecated. Please use sendUpdates instead.\n\nWhether to send notifications about the creation of the event. Note that some emails might still be sent even if you set the value to false. The default is false.", "location": "query", "type": "boolean" }, + "sendUpdates": { + "description": "Guests who should receive notifications about the creation of the new event.", + "enum": [ + "all", + "externalOnly", + "none" + ], + "enumDescriptions": [ + "Notifications are sent to all guests.", + "Notifications are sent to non-Google Calendar guests only.", + "No notifications are sent. This value should only be used for migration use cases (note that in most migration cases the import method should be used)." + ], + "location": "query", + "type": "string" + }, "text": { "description": "The text describing the event to be created.", "location": "query", @@ -1285,7 +1383,8 @@ "$ref": "Event" }, "scopes": [ - "https://www.googleapis.com/auth/calendar" + "https://www.googleapis.com/auth/calendar", + "https://www.googleapis.com/auth/calendar.events" ] }, "update": { @@ -1330,10 +1429,25 @@ "type": "integer" }, "sendNotifications": { - "description": "Whether to send notifications about the event update (e.g. attendee's responses, title changes, etc.). Optional. The default is False.", + "description": "Deprecated. Please use sendUpdates instead.\n\nWhether to send notifications about the event update (for example, description changes, etc.). Note that some emails might still be sent even if you set the value to false. The default is false.", "location": "query", "type": "boolean" }, + "sendUpdates": { + "description": "Guests who should receive notifications about the event update (for example, title changes, etc.).", + "enum": [ + "all", + "externalOnly", + "none" + ], + "enumDescriptions": [ + "Notifications are sent to all guests.", + "Notifications are sent to non-Google Calendar guests only.", + "No notifications are sent. This value should only be used for migration use cases (note that in most migration cases the import method should be used)." + ], + "location": "query", + "type": "string" + }, "supportsAttachments": { "description": "Whether API client performing operation supports event attachments. Optional. The default is False.", "location": "query", @@ -1348,7 +1462,8 @@ "$ref": "Event" }, "scopes": [ - "https://www.googleapis.com/auth/calendar" + "https://www.googleapis.com/auth/calendar", + "https://www.googleapis.com/auth/calendar.events" ] }, "watch": { @@ -1479,6 +1594,8 @@ }, "scopes": [ "https://www.googleapis.com/auth/calendar", + "https://www.googleapis.com/auth/calendar.events", + "https://www.googleapis.com/auth/calendar.events.readonly", "https://www.googleapis.com/auth/calendar.readonly" ], "supportsSubscription": true @@ -1528,7 +1645,8 @@ }, "scopes": [ "https://www.googleapis.com/auth/calendar", - "https://www.googleapis.com/auth/calendar.readonly" + "https://www.googleapis.com/auth/calendar.readonly", + "https://www.googleapis.com/auth/calendar.settings.readonly" ] }, "list": { @@ -1560,7 +1678,8 @@ }, "scopes": [ "https://www.googleapis.com/auth/calendar", - "https://www.googleapis.com/auth/calendar.readonly" + "https://www.googleapis.com/auth/calendar.readonly", + "https://www.googleapis.com/auth/calendar.settings.readonly" ], "supportsSubscription": true }, @@ -1597,14 +1716,15 @@ }, "scopes": [ "https://www.googleapis.com/auth/calendar", - "https://www.googleapis.com/auth/calendar.readonly" + "https://www.googleapis.com/auth/calendar.readonly", + "https://www.googleapis.com/auth/calendar.settings.readonly" ], "supportsSubscription": true } } } }, - "revision": "20180814", + "revision": "20181002", "rootUrl": "https://www.googleapis.com/", "schemas": { "Acl": { @@ -2114,6 +2234,13 @@ "description": "The access code to access the conference. The maximum length is 128 characters.\nWhen creating new conference data, populate only the subset of {meetingCode, accessCode, passcode, password, pin} fields that match the terminology that the conference provider uses. Only the populated fields should be displayed.\nOptional.", "type": "string" }, + "entryPointFeatures": { + "description": "Features of the entry point, such as being toll or toll-free. One entry point can have multiple features. However, toll and toll-free cannot be both set on the same entry point.", + "items": { + "type": "string" + }, + "type": "array" + }, "entryPointType": { "description": "The type of the conference entry point.\nPossible values are: \n- \"video\" - joining a conference over HTTP. A conference can have zero or one video entry point.\n- \"phone\" - joining a conference by dialing a phone number. A conference can have zero or more phone entry points.\n- \"sip\" - joining a conference over SIP. A conference can have zero or one sip entry point.\n- \"more\" - further conference joining instructions, for example additional phone numbers. A conference can have zero or one more entry point. A conference with only a more entry point is not a valid conference.", "type": "string" @@ -2138,6 +2265,10 @@ "description": "The PIN to access the conference. The maximum length is 128 characters.\nWhen creating new conference data, populate only the subset of {meetingCode, accessCode, passcode, password, pin} fields that match the terminology that the conference provider uses. Only the populated fields should be displayed.\nOptional.", "type": "string" }, + "regionCode": { + "description": "The CLDR/ISO 3166 region code for the country associated with this phone access. Example: \"SE\" for Sweden.\nCalendar backend will populate this field only for EntryPointType.PHONE.", + "type": "string" + }, "uri": { "description": "The URI of the entry point. The maximum length is 1300 characters.\nFormat: \n- for video, http: or https: schema is required.\n- for phone, tel: schema is required. The URI should include the entire dial sequence (e.g., tel:+12345678900,,,123456789;1234).\n- for sip, sip: schema is required, e.g., sip:12345678@myprovider.com.\n- for more, http: or https: schema is required.", "type": "string" diff --git a/vendor/google.golang.org/api/calendar/v3/calendar-gen.go b/vendor/google.golang.org/api/calendar/v3/calendar-gen.go index 8f274d67..19c8015e 100644 --- a/vendor/google.golang.org/api/calendar/v3/calendar-gen.go +++ b/vendor/google.golang.org/api/calendar/v3/calendar-gen.go @@ -50,8 +50,17 @@ const ( // Manage your calendars CalendarScope = "https://www.googleapis.com/auth/calendar" + // View and edit events on all your calendars + CalendarEventsScope = "https://www.googleapis.com/auth/calendar.events" + + // View events on all your calendars + CalendarEventsReadonlyScope = "https://www.googleapis.com/auth/calendar.events.readonly" + // View your calendars CalendarReadonlyScope = "https://www.googleapis.com/auth/calendar.readonly" + + // View your Calendar settings + CalendarSettingsReadonlyScope = "https://www.googleapis.com/auth/calendar.settings.readonly" ) func New(client *http.Client) (*Service, error) { @@ -1067,6 +1076,11 @@ type EntryPoint struct { // Optional. AccessCode string `json:"accessCode,omitempty"` + // EntryPointFeatures: Features of the entry point, such as being toll + // or toll-free. One entry point can have multiple features. However, + // toll and toll-free cannot be both set on the same entry point. + EntryPointFeatures []string `json:"entryPointFeatures,omitempty"` + // EntryPointType: The type of the conference entry point. // Possible values are: // - "video" - joining a conference over HTTP. A conference can have @@ -1126,6 +1140,12 @@ type EntryPoint struct { // Optional. Pin string `json:"pin,omitempty"` + // RegionCode: The CLDR/ISO 3166 region code for the country associated + // with this phone access. Example: "SE" for Sweden. + // Calendar backend will populate this field only for + // EntryPointType.PHONE. + RegionCode string `json:"regionCode,omitempty"` + // Uri: The URI of the entry point. The maximum length is 1300 // characters. // Format: @@ -2340,9 +2360,13 @@ func (c *AclDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "calendars/{calendarId}/acl/{ruleId}") urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "calendarId": c.calendarId, @@ -2459,9 +2483,13 @@ func (c *AclGetCall) doRequest(alt string) (*http.Response, error) { } var body io.Reader = nil c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "calendars/{calendarId}/acl/{ruleId}") urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "calendarId": c.calendarId, @@ -2606,9 +2634,13 @@ func (c *AclInsertCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "calendars/{calendarId}/acl") urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "calendarId": c.calendarId, @@ -2791,9 +2823,13 @@ func (c *AclListCall) doRequest(alt string) (*http.Response, error) { } var body io.Reader = nil c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "calendars/{calendarId}/acl") urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "calendarId": c.calendarId, @@ -2977,9 +3013,13 @@ func (c *AclPatchCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "calendars/{calendarId}/acl/{ruleId}") urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "calendarId": c.calendarId, @@ -3134,9 +3174,13 @@ func (c *AclUpdateCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "calendars/{calendarId}/acl/{ruleId}") urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("PUT", urls, body) + req, err := http.NewRequest("PUT", urls, body) + if err != nil { + return nil, err + } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "calendarId": c.calendarId, @@ -3320,9 +3364,13 @@ func (c *AclWatchCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "calendars/{calendarId}/acl/watch") urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "calendarId": c.calendarId, @@ -3470,9 +3518,13 @@ func (c *CalendarListDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "users/me/calendarList/{calendarId}") urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "calendarId": c.calendarId, @@ -3579,9 +3631,13 @@ func (c *CalendarListGetCall) doRequest(alt string) (*http.Response, error) { } var body io.Reader = nil c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "users/me/calendarList/{calendarId}") urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "calendarId": c.calendarId, @@ -3718,9 +3774,13 @@ func (c *CalendarListInsertCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "users/me/calendarList") urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } req.Header = reqHeaders return gensupport.SendRequest(c.ctx_, c.s.client, req) } @@ -3914,9 +3974,13 @@ func (c *CalendarListListCall) doRequest(alt string) (*http.Response, error) { } var body io.Reader = nil c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "users/me/calendarList") urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } req.Header = reqHeaders return gensupport.SendRequest(c.ctx_, c.s.client, req) } @@ -4110,9 +4174,13 @@ func (c *CalendarListPatchCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "users/me/calendarList/{calendarId}") urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "calendarId": c.calendarId, @@ -4258,9 +4326,13 @@ func (c *CalendarListUpdateCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "users/me/calendarList/{calendarId}") urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("PUT", urls, body) + req, err := http.NewRequest("PUT", urls, body) + if err != nil { + return nil, err + } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "calendarId": c.calendarId, @@ -4459,9 +4531,13 @@ func (c *CalendarListWatchCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "users/me/calendarList/watch") urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } req.Header = reqHeaders return gensupport.SendRequest(c.ctx_, c.s.client, req) } @@ -4621,9 +4697,13 @@ func (c *CalendarsClearCall) doRequest(alt string) (*http.Response, error) { reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "calendars/{calendarId}/clear") urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "calendarId": c.calendarId, @@ -4717,9 +4797,13 @@ func (c *CalendarsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "calendars/{calendarId}") urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "calendarId": c.calendarId, @@ -4826,9 +4910,13 @@ func (c *CalendarsGetCall) doRequest(alt string) (*http.Response, error) { } var body io.Reader = nil c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "calendars/{calendarId}") urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "calendarId": c.calendarId, @@ -4955,9 +5043,13 @@ func (c *CalendarsInsertCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "calendars") urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } req.Header = reqHeaders return gensupport.SendRequest(c.ctx_, c.s.client, req) } @@ -5075,9 +5167,13 @@ func (c *CalendarsPatchCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "calendars/{calendarId}") urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "calendarId": c.calendarId, @@ -5208,9 +5304,13 @@ func (c *CalendarsUpdateCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "calendars/{calendarId}") urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("PUT", urls, body) + req, err := http.NewRequest("PUT", urls, body) + if err != nil { + return nil, err + } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "calendarId": c.calendarId, @@ -5339,9 +5439,13 @@ func (c *ChannelsStopCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "channels/stop") urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } req.Header = reqHeaders return gensupport.SendRequest(c.ctx_, c.s.client, req) } @@ -5369,7 +5473,10 @@ func (c *ChannelsStopCall) Do(opts ...googleapi.CallOption) error { // }, // "scopes": [ // "https://www.googleapis.com/auth/calendar", - // "https://www.googleapis.com/auth/calendar.readonly" + // "https://www.googleapis.com/auth/calendar.events", + // "https://www.googleapis.com/auth/calendar.events.readonly", + // "https://www.googleapis.com/auth/calendar.readonly", + // "https://www.googleapis.com/auth/calendar.settings.readonly" // ] // } @@ -5437,9 +5544,13 @@ func (c *ColorsGetCall) doRequest(alt string) (*http.Response, error) { } var body io.Reader = nil c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "colors") urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } req.Header = reqHeaders return gensupport.SendRequest(c.ctx_, c.s.client, req) } @@ -5517,13 +5628,31 @@ func (r *EventsService) Delete(calendarId string, eventId string) *EventsDeleteC } // SendNotifications sets the optional parameter "sendNotifications": -// Whether to send notifications about the deletion of the event. The -// default is False. +// Deprecated. Please use sendUpdates instead. +// +// Whether to send notifications about the deletion of the event. Note +// that some emails might still be sent even if you set the value to +// false. The default is false. func (c *EventsDeleteCall) SendNotifications(sendNotifications bool) *EventsDeleteCall { c.urlParams_.Set("sendNotifications", fmt.Sprint(sendNotifications)) return c } +// SendUpdates sets the optional parameter "sendUpdates": Guests who +// should receive notifications about the deletion of the event. +// +// Possible values: +// "all" - Notifications are sent to all guests. +// "externalOnly" - Notifications are sent to non-Google Calendar +// guests only. +// "none" - No notifications are sent. This value should only be used +// for migration use cases (note that in most migration cases the import +// method should be used). +func (c *EventsDeleteCall) SendUpdates(sendUpdates string) *EventsDeleteCall { + c.urlParams_.Set("sendUpdates", sendUpdates) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -5557,9 +5686,13 @@ func (c *EventsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "calendars/{calendarId}/events/{eventId}") urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "calendarId": c.calendarId, @@ -5602,14 +5735,30 @@ func (c *EventsDeleteCall) Do(opts ...googleapi.CallOption) error { // "type": "string" // }, // "sendNotifications": { - // "description": "Whether to send notifications about the deletion of the event. Optional. The default is False.", + // "description": "Deprecated. Please use sendUpdates instead.\n\nWhether to send notifications about the deletion of the event. Note that some emails might still be sent even if you set the value to false. The default is false.", // "location": "query", // "type": "boolean" + // }, + // "sendUpdates": { + // "description": "Guests who should receive notifications about the deletion of the event.", + // "enum": [ + // "all", + // "externalOnly", + // "none" + // ], + // "enumDescriptions": [ + // "Notifications are sent to all guests.", + // "Notifications are sent to non-Google Calendar guests only.", + // "No notifications are sent. This value should only be used for migration use cases (note that in most migration cases the import method should be used)." + // ], + // "location": "query", + // "type": "string" // } // }, // "path": "calendars/{calendarId}/events/{eventId}", // "scopes": [ - // "https://www.googleapis.com/auth/calendar" + // "https://www.googleapis.com/auth/calendar", + // "https://www.googleapis.com/auth/calendar.events" // ] // } @@ -5709,9 +5858,13 @@ func (c *EventsGetCall) doRequest(alt string) (*http.Response, error) { } var body io.Reader = nil c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "calendars/{calendarId}/events/{eventId}") urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "calendarId": c.calendarId, @@ -5802,6 +5955,8 @@ func (c *EventsGetCall) Do(opts ...googleapi.CallOption) (*Event, error) { // }, // "scopes": [ // "https://www.googleapis.com/auth/calendar", + // "https://www.googleapis.com/auth/calendar.events", + // "https://www.googleapis.com/auth/calendar.events.readonly", // "https://www.googleapis.com/auth/calendar.readonly" // ] // } @@ -5886,9 +6041,13 @@ func (c *EventsImportCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "calendars/{calendarId}/events/import") urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "calendarId": c.calendarId, @@ -5969,7 +6128,8 @@ func (c *EventsImportCall) Do(opts ...googleapi.CallOption) (*Event, error) { // "$ref": "Event" // }, // "scopes": [ - // "https://www.googleapis.com/auth/calendar" + // "https://www.googleapis.com/auth/calendar", + // "https://www.googleapis.com/auth/calendar.events" // ] // } @@ -6016,13 +6176,32 @@ func (c *EventsInsertCall) MaxAttendees(maxAttendees int64) *EventsInsertCall { } // SendNotifications sets the optional parameter "sendNotifications": +// Deprecated. Please use sendUpdates instead. +// // Whether to send notifications about the creation of the new event. -// The default is False. +// Note that some emails might still be sent even if you set the value +// to false. The default is false. func (c *EventsInsertCall) SendNotifications(sendNotifications bool) *EventsInsertCall { c.urlParams_.Set("sendNotifications", fmt.Sprint(sendNotifications)) return c } +// SendUpdates sets the optional parameter "sendUpdates": Whether to +// send notifications about the creation of the new event. Note that +// some emails might still be sent. The default is false. +// +// Possible values: +// "all" - Notifications are sent to all guests. +// "externalOnly" - Notifications are sent to non-Google Calendar +// guests only. +// "none" - No notifications are sent. This value should only be used +// for migration use cases (note that in most migration cases the import +// method should be used). +func (c *EventsInsertCall) SendUpdates(sendUpdates string) *EventsInsertCall { + c.urlParams_.Set("sendUpdates", sendUpdates) + return c +} + // SupportsAttachments sets the optional parameter // "supportsAttachments": Whether API client performing operation // supports event attachments. The default is False. @@ -6069,9 +6248,13 @@ func (c *EventsInsertCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "calendars/{calendarId}/events") urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "calendarId": c.calendarId, @@ -6146,10 +6329,25 @@ func (c *EventsInsertCall) Do(opts ...googleapi.CallOption) (*Event, error) { // "type": "integer" // }, // "sendNotifications": { - // "description": "Whether to send notifications about the creation of the new event. Optional. The default is False.", + // "description": "Deprecated. Please use sendUpdates instead.\n\nWhether to send notifications about the creation of the new event. Note that some emails might still be sent even if you set the value to false. The default is false.", // "location": "query", // "type": "boolean" // }, + // "sendUpdates": { + // "description": "Whether to send notifications about the creation of the new event. Note that some emails might still be sent. The default is false.", + // "enum": [ + // "all", + // "externalOnly", + // "none" + // ], + // "enumDescriptions": [ + // "Notifications are sent to all guests.", + // "Notifications are sent to non-Google Calendar guests only.", + // "No notifications are sent. This value should only be used for migration use cases (note that in most migration cases the import method should be used)." + // ], + // "location": "query", + // "type": "string" + // }, // "supportsAttachments": { // "description": "Whether API client performing operation supports event attachments. Optional. The default is False.", // "location": "query", @@ -6164,7 +6362,8 @@ func (c *EventsInsertCall) Do(opts ...googleapi.CallOption) (*Event, error) { // "$ref": "Event" // }, // "scopes": [ - // "https://www.googleapis.com/auth/calendar" + // "https://www.googleapis.com/auth/calendar", + // "https://www.googleapis.com/auth/calendar.events" // ] // } @@ -6313,9 +6512,13 @@ func (c *EventsInstancesCall) doRequest(alt string) (*http.Response, error) { } var body io.Reader = nil c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "calendars/{calendarId}/events/{eventId}/instances") urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "calendarId": c.calendarId, @@ -6440,6 +6643,8 @@ func (c *EventsInstancesCall) Do(opts ...googleapi.CallOption) (*Events, error) // }, // "scopes": [ // "https://www.googleapis.com/auth/calendar", + // "https://www.googleapis.com/auth/calendar.events", + // "https://www.googleapis.com/auth/calendar.events.readonly", // "https://www.googleapis.com/auth/calendar.readonly" // ], // "supportsSubscription": true @@ -6716,9 +6921,13 @@ func (c *EventsListCall) doRequest(alt string) (*http.Response, error) { } var body io.Reader = nil c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "calendars/{calendarId}/events") urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "calendarId": c.calendarId, @@ -6887,6 +7096,8 @@ func (c *EventsListCall) Do(opts ...googleapi.CallOption) (*Events, error) { // }, // "scopes": [ // "https://www.googleapis.com/auth/calendar", + // "https://www.googleapis.com/auth/calendar.events", + // "https://www.googleapis.com/auth/calendar.events.readonly", // "https://www.googleapis.com/auth/calendar.readonly" // ], // "supportsSubscription": true @@ -6937,13 +7148,32 @@ func (r *EventsService) Move(calendarId string, eventId string, destinationid st } // SendNotifications sets the optional parameter "sendNotifications": +// Deprecated. Please use sendUpdates instead. +// // Whether to send notifications about the change of the event's -// organizer. The default is False. +// organizer. Note that some emails might still be sent even if you set +// the value to false. The default is false. func (c *EventsMoveCall) SendNotifications(sendNotifications bool) *EventsMoveCall { c.urlParams_.Set("sendNotifications", fmt.Sprint(sendNotifications)) return c } +// SendUpdates sets the optional parameter "sendUpdates": Guests who +// should receive notifications about the change of the event's +// organizer. +// +// Possible values: +// "all" - Notifications are sent to all guests. +// "externalOnly" - Notifications are sent to non-Google Calendar +// guests only. +// "none" - No notifications are sent. This value should only be used +// for migration use cases (note that in most migration cases the import +// method should be used). +func (c *EventsMoveCall) SendUpdates(sendUpdates string) *EventsMoveCall { + c.urlParams_.Set("sendUpdates", sendUpdates) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -6977,9 +7207,13 @@ func (c *EventsMoveCall) doRequest(alt string) (*http.Response, error) { reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "calendars/{calendarId}/events/{eventId}/move") urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "calendarId": c.calendarId, @@ -7054,9 +7288,24 @@ func (c *EventsMoveCall) Do(opts ...googleapi.CallOption) (*Event, error) { // "type": "string" // }, // "sendNotifications": { - // "description": "Whether to send notifications about the change of the event's organizer. Optional. The default is False.", + // "description": "Deprecated. Please use sendUpdates instead.\n\nWhether to send notifications about the change of the event's organizer. Note that some emails might still be sent even if you set the value to false. The default is false.", // "location": "query", // "type": "boolean" + // }, + // "sendUpdates": { + // "description": "Guests who should receive notifications about the change of the event's organizer.", + // "enum": [ + // "all", + // "externalOnly", + // "none" + // ], + // "enumDescriptions": [ + // "Notifications are sent to all guests.", + // "Notifications are sent to non-Google Calendar guests only.", + // "No notifications are sent. This value should only be used for migration use cases (note that in most migration cases the import method should be used)." + // ], + // "location": "query", + // "type": "string" // } // }, // "path": "calendars/{calendarId}/events/{eventId}/move", @@ -7064,7 +7313,8 @@ func (c *EventsMoveCall) Do(opts ...googleapi.CallOption) (*Event, error) { // "$ref": "Event" // }, // "scopes": [ - // "https://www.googleapis.com/auth/calendar" + // "https://www.googleapis.com/auth/calendar", + // "https://www.googleapis.com/auth/calendar.events" // ] // } @@ -7125,13 +7375,32 @@ func (c *EventsPatchCall) MaxAttendees(maxAttendees int64) *EventsPatchCall { } // SendNotifications sets the optional parameter "sendNotifications": -// Whether to send notifications about the event update (e.g. attendee's -// responses, title changes, etc.). The default is False. +// Deprecated. Please use sendUpdates instead. +// +// Whether to send notifications about the event update (for example, +// description changes, etc.). Note that some emails might still be sent +// even if you set the value to false. The default is false. func (c *EventsPatchCall) SendNotifications(sendNotifications bool) *EventsPatchCall { c.urlParams_.Set("sendNotifications", fmt.Sprint(sendNotifications)) return c } +// SendUpdates sets the optional parameter "sendUpdates": Guests who +// should receive notifications about the event update (for example, +// title changes, etc.). +// +// Possible values: +// "all" - Notifications are sent to all guests. +// "externalOnly" - Notifications are sent to non-Google Calendar +// guests only. +// "none" - No notifications are sent. This value should only be used +// for migration use cases (note that in most migration cases the import +// method should be used). +func (c *EventsPatchCall) SendUpdates(sendUpdates string) *EventsPatchCall { + c.urlParams_.Set("sendUpdates", sendUpdates) + return c +} + // SupportsAttachments sets the optional parameter // "supportsAttachments": Whether API client performing operation // supports event attachments. The default is False. @@ -7178,9 +7447,13 @@ func (c *EventsPatchCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "calendars/{calendarId}/events/{eventId}") urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "calendarId": c.calendarId, @@ -7268,10 +7541,25 @@ func (c *EventsPatchCall) Do(opts ...googleapi.CallOption) (*Event, error) { // "type": "integer" // }, // "sendNotifications": { - // "description": "Whether to send notifications about the event update (e.g. attendee's responses, title changes, etc.). Optional. The default is False.", + // "description": "Deprecated. Please use sendUpdates instead.\n\nWhether to send notifications about the event update (for example, description changes, etc.). Note that some emails might still be sent even if you set the value to false. The default is false.", // "location": "query", // "type": "boolean" // }, + // "sendUpdates": { + // "description": "Guests who should receive notifications about the event update (for example, title changes, etc.).", + // "enum": [ + // "all", + // "externalOnly", + // "none" + // ], + // "enumDescriptions": [ + // "Notifications are sent to all guests.", + // "Notifications are sent to non-Google Calendar guests only.", + // "No notifications are sent. This value should only be used for migration use cases (note that in most migration cases the import method should be used)." + // ], + // "location": "query", + // "type": "string" + // }, // "supportsAttachments": { // "description": "Whether API client performing operation supports event attachments. Optional. The default is False.", // "location": "query", @@ -7286,7 +7574,8 @@ func (c *EventsPatchCall) Do(opts ...googleapi.CallOption) (*Event, error) { // "$ref": "Event" // }, // "scopes": [ - // "https://www.googleapis.com/auth/calendar" + // "https://www.googleapis.com/auth/calendar", + // "https://www.googleapis.com/auth/calendar.events" // ] // } @@ -7311,13 +7600,31 @@ func (r *EventsService) QuickAdd(calendarId string, text string) *EventsQuickAdd } // SendNotifications sets the optional parameter "sendNotifications": -// Whether to send notifications about the creation of the event. The -// default is False. +// Deprecated. Please use sendUpdates instead. +// +// Whether to send notifications about the creation of the event. Note +// that some emails might still be sent even if you set the value to +// false. The default is false. func (c *EventsQuickAddCall) SendNotifications(sendNotifications bool) *EventsQuickAddCall { c.urlParams_.Set("sendNotifications", fmt.Sprint(sendNotifications)) return c } +// SendUpdates sets the optional parameter "sendUpdates": Guests who +// should receive notifications about the creation of the new event. +// +// Possible values: +// "all" - Notifications are sent to all guests. +// "externalOnly" - Notifications are sent to non-Google Calendar +// guests only. +// "none" - No notifications are sent. This value should only be used +// for migration use cases (note that in most migration cases the import +// method should be used). +func (c *EventsQuickAddCall) SendUpdates(sendUpdates string) *EventsQuickAddCall { + c.urlParams_.Set("sendUpdates", sendUpdates) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -7351,9 +7658,13 @@ func (c *EventsQuickAddCall) doRequest(alt string) (*http.Response, error) { reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "calendars/{calendarId}/events/quickAdd") urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "calendarId": c.calendarId, @@ -7414,10 +7725,25 @@ func (c *EventsQuickAddCall) Do(opts ...googleapi.CallOption) (*Event, error) { // "type": "string" // }, // "sendNotifications": { - // "description": "Whether to send notifications about the creation of the event. Optional. The default is False.", + // "description": "Deprecated. Please use sendUpdates instead.\n\nWhether to send notifications about the creation of the event. Note that some emails might still be sent even if you set the value to false. The default is false.", // "location": "query", // "type": "boolean" // }, + // "sendUpdates": { + // "description": "Guests who should receive notifications about the creation of the new event.", + // "enum": [ + // "all", + // "externalOnly", + // "none" + // ], + // "enumDescriptions": [ + // "Notifications are sent to all guests.", + // "Notifications are sent to non-Google Calendar guests only.", + // "No notifications are sent. This value should only be used for migration use cases (note that in most migration cases the import method should be used)." + // ], + // "location": "query", + // "type": "string" + // }, // "text": { // "description": "The text describing the event to be created.", // "location": "query", @@ -7430,7 +7756,8 @@ func (c *EventsQuickAddCall) Do(opts ...googleapi.CallOption) (*Event, error) { // "$ref": "Event" // }, // "scopes": [ - // "https://www.googleapis.com/auth/calendar" + // "https://www.googleapis.com/auth/calendar", + // "https://www.googleapis.com/auth/calendar.events" // ] // } @@ -7491,13 +7818,32 @@ func (c *EventsUpdateCall) MaxAttendees(maxAttendees int64) *EventsUpdateCall { } // SendNotifications sets the optional parameter "sendNotifications": -// Whether to send notifications about the event update (e.g. attendee's -// responses, title changes, etc.). The default is False. +// Deprecated. Please use sendUpdates instead. +// +// Whether to send notifications about the event update (for example, +// description changes, etc.). Note that some emails might still be sent +// even if you set the value to false. The default is false. func (c *EventsUpdateCall) SendNotifications(sendNotifications bool) *EventsUpdateCall { c.urlParams_.Set("sendNotifications", fmt.Sprint(sendNotifications)) return c } +// SendUpdates sets the optional parameter "sendUpdates": Guests who +// should receive notifications about the event update (for example, +// title changes, etc.). +// +// Possible values: +// "all" - Notifications are sent to all guests. +// "externalOnly" - Notifications are sent to non-Google Calendar +// guests only. +// "none" - No notifications are sent. This value should only be used +// for migration use cases (note that in most migration cases the import +// method should be used). +func (c *EventsUpdateCall) SendUpdates(sendUpdates string) *EventsUpdateCall { + c.urlParams_.Set("sendUpdates", sendUpdates) + return c +} + // SupportsAttachments sets the optional parameter // "supportsAttachments": Whether API client performing operation // supports event attachments. The default is False. @@ -7544,9 +7890,13 @@ func (c *EventsUpdateCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "calendars/{calendarId}/events/{eventId}") urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("PUT", urls, body) + req, err := http.NewRequest("PUT", urls, body) + if err != nil { + return nil, err + } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "calendarId": c.calendarId, @@ -7634,10 +7984,25 @@ func (c *EventsUpdateCall) Do(opts ...googleapi.CallOption) (*Event, error) { // "type": "integer" // }, // "sendNotifications": { - // "description": "Whether to send notifications about the event update (e.g. attendee's responses, title changes, etc.). Optional. The default is False.", + // "description": "Deprecated. Please use sendUpdates instead.\n\nWhether to send notifications about the event update (for example, description changes, etc.). Note that some emails might still be sent even if you set the value to false. The default is false.", // "location": "query", // "type": "boolean" // }, + // "sendUpdates": { + // "description": "Guests who should receive notifications about the event update (for example, title changes, etc.).", + // "enum": [ + // "all", + // "externalOnly", + // "none" + // ], + // "enumDescriptions": [ + // "Notifications are sent to all guests.", + // "Notifications are sent to non-Google Calendar guests only.", + // "No notifications are sent. This value should only be used for migration use cases (note that in most migration cases the import method should be used)." + // ], + // "location": "query", + // "type": "string" + // }, // "supportsAttachments": { // "description": "Whether API client performing operation supports event attachments. Optional. The default is False.", // "location": "query", @@ -7652,7 +8017,8 @@ func (c *EventsUpdateCall) Do(opts ...googleapi.CallOption) (*Event, error) { // "$ref": "Event" // }, // "scopes": [ - // "https://www.googleapis.com/auth/calendar" + // "https://www.googleapis.com/auth/calendar", + // "https://www.googleapis.com/auth/calendar.events" // ] // } @@ -7899,9 +8265,13 @@ func (c *EventsWatchCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "calendars/{calendarId}/events/watch") urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "calendarId": c.calendarId, @@ -8074,6 +8444,8 @@ func (c *EventsWatchCall) Do(opts ...googleapi.CallOption) (*Channel, error) { // }, // "scopes": [ // "https://www.googleapis.com/auth/calendar", + // "https://www.googleapis.com/auth/calendar.events", + // "https://www.googleapis.com/auth/calendar.events.readonly", // "https://www.googleapis.com/auth/calendar.readonly" // ], // "supportsSubscription": true @@ -8136,9 +8508,13 @@ func (c *FreebusyQueryCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "freeBusy") urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } req.Header = reqHeaders return gensupport.SendRequest(c.ctx_, c.s.client, req) } @@ -8263,9 +8639,13 @@ func (c *SettingsGetCall) doRequest(alt string) (*http.Response, error) { } var body io.Reader = nil c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "users/me/settings/{setting}") urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "setting": c.setting, @@ -8331,7 +8711,8 @@ func (c *SettingsGetCall) Do(opts ...googleapi.CallOption) (*Setting, error) { // }, // "scopes": [ // "https://www.googleapis.com/auth/calendar", - // "https://www.googleapis.com/auth/calendar.readonly" + // "https://www.googleapis.com/auth/calendar.readonly", + // "https://www.googleapis.com/auth/calendar.settings.readonly" // ] // } @@ -8428,9 +8809,13 @@ func (c *SettingsListCall) doRequest(alt string) (*http.Response, error) { } var body io.Reader = nil c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "users/me/settings") urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } req.Header = reqHeaders return gensupport.SendRequest(c.ctx_, c.s.client, req) } @@ -8501,7 +8886,8 @@ func (c *SettingsListCall) Do(opts ...googleapi.CallOption) (*Settings, error) { // }, // "scopes": [ // "https://www.googleapis.com/auth/calendar", - // "https://www.googleapis.com/auth/calendar.readonly" + // "https://www.googleapis.com/auth/calendar.readonly", + // "https://www.googleapis.com/auth/calendar.settings.readonly" // ], // "supportsSubscription": true // } @@ -8613,9 +8999,13 @@ func (c *SettingsWatchCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "users/me/settings/watch") urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } req.Header = reqHeaders return gensupport.SendRequest(c.ctx_, c.s.client, req) } @@ -8690,7 +9080,8 @@ func (c *SettingsWatchCall) Do(opts ...googleapi.CallOption) (*Channel, error) { // }, // "scopes": [ // "https://www.googleapis.com/auth/calendar", - // "https://www.googleapis.com/auth/calendar.readonly" + // "https://www.googleapis.com/auth/calendar.readonly", + // "https://www.googleapis.com/auth/calendar.settings.readonly" // ], // "supportsSubscription": true // } diff --git a/vendor/google.golang.org/api/gensupport/jsonfloat.go b/vendor/google.golang.org/api/gensupport/jsonfloat.go index cb02335d..83778508 100644 --- a/vendor/google.golang.org/api/gensupport/jsonfloat.go +++ b/vendor/google.golang.org/api/gensupport/jsonfloat.go @@ -1,4 +1,4 @@ -// Copyright 2016 Google Inc. All Rights Reserved. +// Copyright 2016 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/vendor/google.golang.org/api/gensupport/retry.go b/vendor/google.golang.org/api/gensupport/retry.go index c60b3c39..e58c75e4 100644 --- a/vendor/google.golang.org/api/gensupport/retry.go +++ b/vendor/google.golang.org/api/gensupport/retry.go @@ -1,4 +1,4 @@ -// Copyright 2017 Google Inc. All Rights Reserved. +// Copyright 2017 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/vendor/google.golang.org/api/sheets/v4/sheets-gen.go b/vendor/google.golang.org/api/sheets/v4/sheets-gen.go index 61649011..2e3172d8 100644 --- a/vendor/google.golang.org/api/sheets/v4/sheets-gen.go +++ b/vendor/google.golang.org/api/sheets/v4/sheets-gen.go @@ -9605,9 +9605,13 @@ func (c *SpreadsheetsBatchUpdateCall) doRequest(alt string) (*http.Response, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v4/spreadsheets/{spreadsheetId}:batchUpdate") urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "spreadsheetId": c.spreadsheetId, @@ -9740,9 +9744,13 @@ func (c *SpreadsheetsCreateCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v4/spreadsheets") urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } req.Header = reqHeaders return gensupport.SendRequest(c.ctx_, c.s.client, req) } @@ -9910,9 +9918,13 @@ func (c *SpreadsheetsGetCall) doRequest(alt string) (*http.Response, error) { } var body io.Reader = nil c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v4/spreadsheets/{spreadsheetId}") urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "spreadsheetId": c.spreadsheetId, @@ -10083,9 +10095,13 @@ func (c *SpreadsheetsGetByDataFilterCall) doRequest(alt string) (*http.Response, } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v4/spreadsheets/{spreadsheetId}:getByDataFilter") urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "spreadsheetId": c.spreadsheetId, @@ -10231,9 +10247,13 @@ func (c *SpreadsheetsDeveloperMetadataGetCall) doRequest(alt string) (*http.Resp } var body io.Reader = nil c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v4/spreadsheets/{spreadsheetId}/developerMetadata/{metadataId}") urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "spreadsheetId": c.spreadsheetId, @@ -10382,9 +10402,13 @@ func (c *SpreadsheetsDeveloperMetadataSearchCall) doRequest(alt string) (*http.R } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v4/spreadsheets/{spreadsheetId}/developerMetadata:search") urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "spreadsheetId": c.spreadsheetId, @@ -10522,9 +10546,13 @@ func (c *SpreadsheetsSheetsCopyToCall) doRequest(alt string) (*http.Response, er } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v4/spreadsheets/{spreadsheetId}/sheets/{sheetId}:copyTo") urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "spreadsheetId": c.spreadsheetId, @@ -10753,9 +10781,13 @@ func (c *SpreadsheetsValuesAppendCall) doRequest(alt string) (*http.Response, er } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v4/spreadsheets/{spreadsheetId}/values/{range}:append") urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "spreadsheetId": c.spreadsheetId, @@ -10946,9 +10978,13 @@ func (c *SpreadsheetsValuesBatchClearCall) doRequest(alt string) (*http.Response } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v4/spreadsheets/{spreadsheetId}/values:batchClear") urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "spreadsheetId": c.spreadsheetId, @@ -11089,9 +11125,13 @@ func (c *SpreadsheetsValuesBatchClearByDataFilterCall) doRequest(alt string) (*h } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v4/spreadsheets/{spreadsheetId}/values:batchClearByDataFilter") urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "spreadsheetId": c.spreadsheetId, @@ -11291,9 +11331,13 @@ func (c *SpreadsheetsValuesBatchGetCall) doRequest(alt string) (*http.Response, } var body io.Reader = nil c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v4/spreadsheets/{spreadsheetId}/values:batchGet") urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "spreadsheetId": c.spreadsheetId, @@ -11466,9 +11510,13 @@ func (c *SpreadsheetsValuesBatchGetByDataFilterCall) doRequest(alt string) (*htt } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v4/spreadsheets/{spreadsheetId}/values:batchGetByDataFilter") urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "spreadsheetId": c.spreadsheetId, @@ -11606,9 +11654,13 @@ func (c *SpreadsheetsValuesBatchUpdateCall) doRequest(alt string) (*http.Respons } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v4/spreadsheets/{spreadsheetId}/values:batchUpdate") urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "spreadsheetId": c.spreadsheetId, @@ -11746,9 +11798,13 @@ func (c *SpreadsheetsValuesBatchUpdateByDataFilterCall) doRequest(alt string) (* } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v4/spreadsheets/{spreadsheetId}/values:batchUpdateByDataFilter") urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "spreadsheetId": c.spreadsheetId, @@ -11889,9 +11945,13 @@ func (c *SpreadsheetsValuesClearCall) doRequest(alt string) (*http.Response, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v4/spreadsheets/{spreadsheetId}/values/{range}:clear") urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "spreadsheetId": c.spreadsheetId, @@ -12092,9 +12152,13 @@ func (c *SpreadsheetsValuesGetCall) doRequest(alt string) (*http.Response, error } var body io.Reader = nil c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v4/spreadsheets/{spreadsheetId}/values/{range}") urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "spreadsheetId": c.spreadsheetId, @@ -12327,9 +12391,13 @@ func (c *SpreadsheetsValuesUpdateCall) doRequest(alt string) (*http.Response, er } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v4/spreadsheets/{spreadsheetId}/values/{range}") urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("PUT", urls, body) + req, err := http.NewRequest("PUT", urls, body) + if err != nil { + return nil, err + } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "spreadsheetId": c.spreadsheetId, diff --git a/vendor/google.golang.org/appengine/go.mod b/vendor/google.golang.org/appengine/go.mod new file mode 100644 index 00000000..f449359d --- /dev/null +++ b/vendor/google.golang.org/appengine/go.mod @@ -0,0 +1,7 @@ +module google.golang.org/appengine + +require ( + github.com/golang/protobuf v1.2.0 + golang.org/x/net v0.0.0-20180724234803-3673e40ba225 + golang.org/x/text v0.3.0 +) diff --git a/vendor/google.golang.org/appengine/go.sum b/vendor/google.golang.org/appengine/go.sum new file mode 100644 index 00000000..5e644c2e --- /dev/null +++ b/vendor/google.golang.org/appengine/go.sum @@ -0,0 +1,3 @@ +github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= diff --git a/vendor/google.golang.org/appengine/internal/app_identity/app_identity_service.pb.go b/vendor/google.golang.org/appengine/internal/app_identity/app_identity_service.pb.go index 89d3ea9c..9a2ff77a 100644 --- a/vendor/google.golang.org/appengine/internal/app_identity/app_identity_service.pb.go +++ b/vendor/google.golang.org/appengine/internal/app_identity/app_identity_service.pb.go @@ -1,26 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // source: google.golang.org/appengine/internal/app_identity/app_identity_service.proto -/* -Package app_identity is a generated protocol buffer package. - -It is generated from these files: - google.golang.org/appengine/internal/app_identity/app_identity_service.proto - -It has these top-level messages: - AppIdentityServiceError - SignForAppRequest - SignForAppResponse - GetPublicCertificateForAppRequest - PublicCertificate - GetPublicCertificateForAppResponse - GetServiceAccountNameRequest - GetServiceAccountNameResponse - GetAccessTokenRequest - GetAccessTokenResponse - GetDefaultGcsBucketNameRequest - GetDefaultGcsBucketNameResponse -*/ package app_identity import proto "github.com/golang/protobuf/proto" @@ -89,27 +69,69 @@ func (x *AppIdentityServiceError_ErrorCode) UnmarshalJSON(data []byte) error { return nil } func (AppIdentityServiceError_ErrorCode) EnumDescriptor() ([]byte, []int) { - return fileDescriptor0, []int{0, 0} + return fileDescriptor_app_identity_service_08a6e3f74b04cfa4, []int{0, 0} } type AppIdentityServiceError struct { - XXX_unrecognized []byte `json:"-"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *AppIdentityServiceError) Reset() { *m = AppIdentityServiceError{} } -func (m *AppIdentityServiceError) String() string { return proto.CompactTextString(m) } -func (*AppIdentityServiceError) ProtoMessage() {} -func (*AppIdentityServiceError) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} } +func (m *AppIdentityServiceError) Reset() { *m = AppIdentityServiceError{} } +func (m *AppIdentityServiceError) String() string { return proto.CompactTextString(m) } +func (*AppIdentityServiceError) ProtoMessage() {} +func (*AppIdentityServiceError) Descriptor() ([]byte, []int) { + return fileDescriptor_app_identity_service_08a6e3f74b04cfa4, []int{0} +} +func (m *AppIdentityServiceError) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_AppIdentityServiceError.Unmarshal(m, b) +} +func (m *AppIdentityServiceError) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_AppIdentityServiceError.Marshal(b, m, deterministic) +} +func (dst *AppIdentityServiceError) XXX_Merge(src proto.Message) { + xxx_messageInfo_AppIdentityServiceError.Merge(dst, src) +} +func (m *AppIdentityServiceError) XXX_Size() int { + return xxx_messageInfo_AppIdentityServiceError.Size(m) +} +func (m *AppIdentityServiceError) XXX_DiscardUnknown() { + xxx_messageInfo_AppIdentityServiceError.DiscardUnknown(m) +} + +var xxx_messageInfo_AppIdentityServiceError proto.InternalMessageInfo type SignForAppRequest struct { - BytesToSign []byte `protobuf:"bytes,1,opt,name=bytes_to_sign,json=bytesToSign" json:"bytes_to_sign,omitempty"` - XXX_unrecognized []byte `json:"-"` + BytesToSign []byte `protobuf:"bytes,1,opt,name=bytes_to_sign,json=bytesToSign" json:"bytes_to_sign,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *SignForAppRequest) Reset() { *m = SignForAppRequest{} } -func (m *SignForAppRequest) String() string { return proto.CompactTextString(m) } -func (*SignForAppRequest) ProtoMessage() {} -func (*SignForAppRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} } +func (m *SignForAppRequest) Reset() { *m = SignForAppRequest{} } +func (m *SignForAppRequest) String() string { return proto.CompactTextString(m) } +func (*SignForAppRequest) ProtoMessage() {} +func (*SignForAppRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_app_identity_service_08a6e3f74b04cfa4, []int{1} +} +func (m *SignForAppRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_SignForAppRequest.Unmarshal(m, b) +} +func (m *SignForAppRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_SignForAppRequest.Marshal(b, m, deterministic) +} +func (dst *SignForAppRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_SignForAppRequest.Merge(dst, src) +} +func (m *SignForAppRequest) XXX_Size() int { + return xxx_messageInfo_SignForAppRequest.Size(m) +} +func (m *SignForAppRequest) XXX_DiscardUnknown() { + xxx_messageInfo_SignForAppRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_SignForAppRequest proto.InternalMessageInfo func (m *SignForAppRequest) GetBytesToSign() []byte { if m != nil { @@ -119,15 +141,36 @@ func (m *SignForAppRequest) GetBytesToSign() []byte { } type SignForAppResponse struct { - KeyName *string `protobuf:"bytes,1,opt,name=key_name,json=keyName" json:"key_name,omitempty"` - SignatureBytes []byte `protobuf:"bytes,2,opt,name=signature_bytes,json=signatureBytes" json:"signature_bytes,omitempty"` - XXX_unrecognized []byte `json:"-"` + KeyName *string `protobuf:"bytes,1,opt,name=key_name,json=keyName" json:"key_name,omitempty"` + SignatureBytes []byte `protobuf:"bytes,2,opt,name=signature_bytes,json=signatureBytes" json:"signature_bytes,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *SignForAppResponse) Reset() { *m = SignForAppResponse{} } -func (m *SignForAppResponse) String() string { return proto.CompactTextString(m) } -func (*SignForAppResponse) ProtoMessage() {} -func (*SignForAppResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} } +func (m *SignForAppResponse) Reset() { *m = SignForAppResponse{} } +func (m *SignForAppResponse) String() string { return proto.CompactTextString(m) } +func (*SignForAppResponse) ProtoMessage() {} +func (*SignForAppResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_app_identity_service_08a6e3f74b04cfa4, []int{2} +} +func (m *SignForAppResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_SignForAppResponse.Unmarshal(m, b) +} +func (m *SignForAppResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_SignForAppResponse.Marshal(b, m, deterministic) +} +func (dst *SignForAppResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_SignForAppResponse.Merge(dst, src) +} +func (m *SignForAppResponse) XXX_Size() int { + return xxx_messageInfo_SignForAppResponse.Size(m) +} +func (m *SignForAppResponse) XXX_DiscardUnknown() { + xxx_messageInfo_SignForAppResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_SignForAppResponse proto.InternalMessageInfo func (m *SignForAppResponse) GetKeyName() string { if m != nil && m.KeyName != nil { @@ -144,26 +187,66 @@ func (m *SignForAppResponse) GetSignatureBytes() []byte { } type GetPublicCertificateForAppRequest struct { - XXX_unrecognized []byte `json:"-"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *GetPublicCertificateForAppRequest) Reset() { *m = GetPublicCertificateForAppRequest{} } func (m *GetPublicCertificateForAppRequest) String() string { return proto.CompactTextString(m) } func (*GetPublicCertificateForAppRequest) ProtoMessage() {} func (*GetPublicCertificateForAppRequest) Descriptor() ([]byte, []int) { - return fileDescriptor0, []int{3} + return fileDescriptor_app_identity_service_08a6e3f74b04cfa4, []int{3} } +func (m *GetPublicCertificateForAppRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GetPublicCertificateForAppRequest.Unmarshal(m, b) +} +func (m *GetPublicCertificateForAppRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GetPublicCertificateForAppRequest.Marshal(b, m, deterministic) +} +func (dst *GetPublicCertificateForAppRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetPublicCertificateForAppRequest.Merge(dst, src) +} +func (m *GetPublicCertificateForAppRequest) XXX_Size() int { + return xxx_messageInfo_GetPublicCertificateForAppRequest.Size(m) +} +func (m *GetPublicCertificateForAppRequest) XXX_DiscardUnknown() { + xxx_messageInfo_GetPublicCertificateForAppRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_GetPublicCertificateForAppRequest proto.InternalMessageInfo type PublicCertificate struct { - KeyName *string `protobuf:"bytes,1,opt,name=key_name,json=keyName" json:"key_name,omitempty"` - X509CertificatePem *string `protobuf:"bytes,2,opt,name=x509_certificate_pem,json=x509CertificatePem" json:"x509_certificate_pem,omitempty"` - XXX_unrecognized []byte `json:"-"` + KeyName *string `protobuf:"bytes,1,opt,name=key_name,json=keyName" json:"key_name,omitempty"` + X509CertificatePem *string `protobuf:"bytes,2,opt,name=x509_certificate_pem,json=x509CertificatePem" json:"x509_certificate_pem,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *PublicCertificate) Reset() { *m = PublicCertificate{} } -func (m *PublicCertificate) String() string { return proto.CompactTextString(m) } -func (*PublicCertificate) ProtoMessage() {} -func (*PublicCertificate) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{4} } +func (m *PublicCertificate) Reset() { *m = PublicCertificate{} } +func (m *PublicCertificate) String() string { return proto.CompactTextString(m) } +func (*PublicCertificate) ProtoMessage() {} +func (*PublicCertificate) Descriptor() ([]byte, []int) { + return fileDescriptor_app_identity_service_08a6e3f74b04cfa4, []int{4} +} +func (m *PublicCertificate) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_PublicCertificate.Unmarshal(m, b) +} +func (m *PublicCertificate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_PublicCertificate.Marshal(b, m, deterministic) +} +func (dst *PublicCertificate) XXX_Merge(src proto.Message) { + xxx_messageInfo_PublicCertificate.Merge(dst, src) +} +func (m *PublicCertificate) XXX_Size() int { + return xxx_messageInfo_PublicCertificate.Size(m) +} +func (m *PublicCertificate) XXX_DiscardUnknown() { + xxx_messageInfo_PublicCertificate.DiscardUnknown(m) +} + +var xxx_messageInfo_PublicCertificate proto.InternalMessageInfo func (m *PublicCertificate) GetKeyName() string { if m != nil && m.KeyName != nil { @@ -182,15 +265,34 @@ func (m *PublicCertificate) GetX509CertificatePem() string { type GetPublicCertificateForAppResponse struct { PublicCertificateList []*PublicCertificate `protobuf:"bytes,1,rep,name=public_certificate_list,json=publicCertificateList" json:"public_certificate_list,omitempty"` MaxClientCacheTimeInSecond *int64 `protobuf:"varint,2,opt,name=max_client_cache_time_in_second,json=maxClientCacheTimeInSecond" json:"max_client_cache_time_in_second,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *GetPublicCertificateForAppResponse) Reset() { *m = GetPublicCertificateForAppResponse{} } func (m *GetPublicCertificateForAppResponse) String() string { return proto.CompactTextString(m) } func (*GetPublicCertificateForAppResponse) ProtoMessage() {} func (*GetPublicCertificateForAppResponse) Descriptor() ([]byte, []int) { - return fileDescriptor0, []int{5} + return fileDescriptor_app_identity_service_08a6e3f74b04cfa4, []int{5} } +func (m *GetPublicCertificateForAppResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GetPublicCertificateForAppResponse.Unmarshal(m, b) +} +func (m *GetPublicCertificateForAppResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GetPublicCertificateForAppResponse.Marshal(b, m, deterministic) +} +func (dst *GetPublicCertificateForAppResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetPublicCertificateForAppResponse.Merge(dst, src) +} +func (m *GetPublicCertificateForAppResponse) XXX_Size() int { + return xxx_messageInfo_GetPublicCertificateForAppResponse.Size(m) +} +func (m *GetPublicCertificateForAppResponse) XXX_DiscardUnknown() { + xxx_messageInfo_GetPublicCertificateForAppResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_GetPublicCertificateForAppResponse proto.InternalMessageInfo func (m *GetPublicCertificateForAppResponse) GetPublicCertificateList() []*PublicCertificate { if m != nil { @@ -207,23 +309,65 @@ func (m *GetPublicCertificateForAppResponse) GetMaxClientCacheTimeInSecond() int } type GetServiceAccountNameRequest struct { - XXX_unrecognized []byte `json:"-"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *GetServiceAccountNameRequest) Reset() { *m = GetServiceAccountNameRequest{} } -func (m *GetServiceAccountNameRequest) String() string { return proto.CompactTextString(m) } -func (*GetServiceAccountNameRequest) ProtoMessage() {} -func (*GetServiceAccountNameRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{6} } +func (m *GetServiceAccountNameRequest) Reset() { *m = GetServiceAccountNameRequest{} } +func (m *GetServiceAccountNameRequest) String() string { return proto.CompactTextString(m) } +func (*GetServiceAccountNameRequest) ProtoMessage() {} +func (*GetServiceAccountNameRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_app_identity_service_08a6e3f74b04cfa4, []int{6} +} +func (m *GetServiceAccountNameRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GetServiceAccountNameRequest.Unmarshal(m, b) +} +func (m *GetServiceAccountNameRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GetServiceAccountNameRequest.Marshal(b, m, deterministic) +} +func (dst *GetServiceAccountNameRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetServiceAccountNameRequest.Merge(dst, src) +} +func (m *GetServiceAccountNameRequest) XXX_Size() int { + return xxx_messageInfo_GetServiceAccountNameRequest.Size(m) +} +func (m *GetServiceAccountNameRequest) XXX_DiscardUnknown() { + xxx_messageInfo_GetServiceAccountNameRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_GetServiceAccountNameRequest proto.InternalMessageInfo type GetServiceAccountNameResponse struct { - ServiceAccountName *string `protobuf:"bytes,1,opt,name=service_account_name,json=serviceAccountName" json:"service_account_name,omitempty"` - XXX_unrecognized []byte `json:"-"` + ServiceAccountName *string `protobuf:"bytes,1,opt,name=service_account_name,json=serviceAccountName" json:"service_account_name,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *GetServiceAccountNameResponse) Reset() { *m = GetServiceAccountNameResponse{} } -func (m *GetServiceAccountNameResponse) String() string { return proto.CompactTextString(m) } -func (*GetServiceAccountNameResponse) ProtoMessage() {} -func (*GetServiceAccountNameResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{7} } +func (m *GetServiceAccountNameResponse) Reset() { *m = GetServiceAccountNameResponse{} } +func (m *GetServiceAccountNameResponse) String() string { return proto.CompactTextString(m) } +func (*GetServiceAccountNameResponse) ProtoMessage() {} +func (*GetServiceAccountNameResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_app_identity_service_08a6e3f74b04cfa4, []int{7} +} +func (m *GetServiceAccountNameResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GetServiceAccountNameResponse.Unmarshal(m, b) +} +func (m *GetServiceAccountNameResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GetServiceAccountNameResponse.Marshal(b, m, deterministic) +} +func (dst *GetServiceAccountNameResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetServiceAccountNameResponse.Merge(dst, src) +} +func (m *GetServiceAccountNameResponse) XXX_Size() int { + return xxx_messageInfo_GetServiceAccountNameResponse.Size(m) +} +func (m *GetServiceAccountNameResponse) XXX_DiscardUnknown() { + xxx_messageInfo_GetServiceAccountNameResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_GetServiceAccountNameResponse proto.InternalMessageInfo func (m *GetServiceAccountNameResponse) GetServiceAccountName() string { if m != nil && m.ServiceAccountName != nil { @@ -233,16 +377,37 @@ func (m *GetServiceAccountNameResponse) GetServiceAccountName() string { } type GetAccessTokenRequest struct { - Scope []string `protobuf:"bytes,1,rep,name=scope" json:"scope,omitempty"` - ServiceAccountId *int64 `protobuf:"varint,2,opt,name=service_account_id,json=serviceAccountId" json:"service_account_id,omitempty"` - ServiceAccountName *string `protobuf:"bytes,3,opt,name=service_account_name,json=serviceAccountName" json:"service_account_name,omitempty"` - XXX_unrecognized []byte `json:"-"` + Scope []string `protobuf:"bytes,1,rep,name=scope" json:"scope,omitempty"` + ServiceAccountId *int64 `protobuf:"varint,2,opt,name=service_account_id,json=serviceAccountId" json:"service_account_id,omitempty"` + ServiceAccountName *string `protobuf:"bytes,3,opt,name=service_account_name,json=serviceAccountName" json:"service_account_name,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *GetAccessTokenRequest) Reset() { *m = GetAccessTokenRequest{} } -func (m *GetAccessTokenRequest) String() string { return proto.CompactTextString(m) } -func (*GetAccessTokenRequest) ProtoMessage() {} -func (*GetAccessTokenRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{8} } +func (m *GetAccessTokenRequest) Reset() { *m = GetAccessTokenRequest{} } +func (m *GetAccessTokenRequest) String() string { return proto.CompactTextString(m) } +func (*GetAccessTokenRequest) ProtoMessage() {} +func (*GetAccessTokenRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_app_identity_service_08a6e3f74b04cfa4, []int{8} +} +func (m *GetAccessTokenRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GetAccessTokenRequest.Unmarshal(m, b) +} +func (m *GetAccessTokenRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GetAccessTokenRequest.Marshal(b, m, deterministic) +} +func (dst *GetAccessTokenRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetAccessTokenRequest.Merge(dst, src) +} +func (m *GetAccessTokenRequest) XXX_Size() int { + return xxx_messageInfo_GetAccessTokenRequest.Size(m) +} +func (m *GetAccessTokenRequest) XXX_DiscardUnknown() { + xxx_messageInfo_GetAccessTokenRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_GetAccessTokenRequest proto.InternalMessageInfo func (m *GetAccessTokenRequest) GetScope() []string { if m != nil { @@ -266,15 +431,36 @@ func (m *GetAccessTokenRequest) GetServiceAccountName() string { } type GetAccessTokenResponse struct { - AccessToken *string `protobuf:"bytes,1,opt,name=access_token,json=accessToken" json:"access_token,omitempty"` - ExpirationTime *int64 `protobuf:"varint,2,opt,name=expiration_time,json=expirationTime" json:"expiration_time,omitempty"` - XXX_unrecognized []byte `json:"-"` + AccessToken *string `protobuf:"bytes,1,opt,name=access_token,json=accessToken" json:"access_token,omitempty"` + ExpirationTime *int64 `protobuf:"varint,2,opt,name=expiration_time,json=expirationTime" json:"expiration_time,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *GetAccessTokenResponse) Reset() { *m = GetAccessTokenResponse{} } -func (m *GetAccessTokenResponse) String() string { return proto.CompactTextString(m) } -func (*GetAccessTokenResponse) ProtoMessage() {} -func (*GetAccessTokenResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{9} } +func (m *GetAccessTokenResponse) Reset() { *m = GetAccessTokenResponse{} } +func (m *GetAccessTokenResponse) String() string { return proto.CompactTextString(m) } +func (*GetAccessTokenResponse) ProtoMessage() {} +func (*GetAccessTokenResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_app_identity_service_08a6e3f74b04cfa4, []int{9} +} +func (m *GetAccessTokenResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GetAccessTokenResponse.Unmarshal(m, b) +} +func (m *GetAccessTokenResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GetAccessTokenResponse.Marshal(b, m, deterministic) +} +func (dst *GetAccessTokenResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetAccessTokenResponse.Merge(dst, src) +} +func (m *GetAccessTokenResponse) XXX_Size() int { + return xxx_messageInfo_GetAccessTokenResponse.Size(m) +} +func (m *GetAccessTokenResponse) XXX_DiscardUnknown() { + xxx_messageInfo_GetAccessTokenResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_GetAccessTokenResponse proto.InternalMessageInfo func (m *GetAccessTokenResponse) GetAccessToken() string { if m != nil && m.AccessToken != nil { @@ -291,25 +477,65 @@ func (m *GetAccessTokenResponse) GetExpirationTime() int64 { } type GetDefaultGcsBucketNameRequest struct { - XXX_unrecognized []byte `json:"-"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *GetDefaultGcsBucketNameRequest) Reset() { *m = GetDefaultGcsBucketNameRequest{} } -func (m *GetDefaultGcsBucketNameRequest) String() string { return proto.CompactTextString(m) } -func (*GetDefaultGcsBucketNameRequest) ProtoMessage() {} -func (*GetDefaultGcsBucketNameRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{10} } +func (m *GetDefaultGcsBucketNameRequest) Reset() { *m = GetDefaultGcsBucketNameRequest{} } +func (m *GetDefaultGcsBucketNameRequest) String() string { return proto.CompactTextString(m) } +func (*GetDefaultGcsBucketNameRequest) ProtoMessage() {} +func (*GetDefaultGcsBucketNameRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_app_identity_service_08a6e3f74b04cfa4, []int{10} +} +func (m *GetDefaultGcsBucketNameRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GetDefaultGcsBucketNameRequest.Unmarshal(m, b) +} +func (m *GetDefaultGcsBucketNameRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GetDefaultGcsBucketNameRequest.Marshal(b, m, deterministic) +} +func (dst *GetDefaultGcsBucketNameRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetDefaultGcsBucketNameRequest.Merge(dst, src) +} +func (m *GetDefaultGcsBucketNameRequest) XXX_Size() int { + return xxx_messageInfo_GetDefaultGcsBucketNameRequest.Size(m) +} +func (m *GetDefaultGcsBucketNameRequest) XXX_DiscardUnknown() { + xxx_messageInfo_GetDefaultGcsBucketNameRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_GetDefaultGcsBucketNameRequest proto.InternalMessageInfo type GetDefaultGcsBucketNameResponse struct { - DefaultGcsBucketName *string `protobuf:"bytes,1,opt,name=default_gcs_bucket_name,json=defaultGcsBucketName" json:"default_gcs_bucket_name,omitempty"` - XXX_unrecognized []byte `json:"-"` + DefaultGcsBucketName *string `protobuf:"bytes,1,opt,name=default_gcs_bucket_name,json=defaultGcsBucketName" json:"default_gcs_bucket_name,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *GetDefaultGcsBucketNameResponse) Reset() { *m = GetDefaultGcsBucketNameResponse{} } func (m *GetDefaultGcsBucketNameResponse) String() string { return proto.CompactTextString(m) } func (*GetDefaultGcsBucketNameResponse) ProtoMessage() {} func (*GetDefaultGcsBucketNameResponse) Descriptor() ([]byte, []int) { - return fileDescriptor0, []int{11} + return fileDescriptor_app_identity_service_08a6e3f74b04cfa4, []int{11} } +func (m *GetDefaultGcsBucketNameResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GetDefaultGcsBucketNameResponse.Unmarshal(m, b) +} +func (m *GetDefaultGcsBucketNameResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GetDefaultGcsBucketNameResponse.Marshal(b, m, deterministic) +} +func (dst *GetDefaultGcsBucketNameResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetDefaultGcsBucketNameResponse.Merge(dst, src) +} +func (m *GetDefaultGcsBucketNameResponse) XXX_Size() int { + return xxx_messageInfo_GetDefaultGcsBucketNameResponse.Size(m) +} +func (m *GetDefaultGcsBucketNameResponse) XXX_DiscardUnknown() { + xxx_messageInfo_GetDefaultGcsBucketNameResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_GetDefaultGcsBucketNameResponse proto.InternalMessageInfo func (m *GetDefaultGcsBucketNameResponse) GetDefaultGcsBucketName() string { if m != nil && m.DefaultGcsBucketName != nil { @@ -334,10 +560,10 @@ func init() { } func init() { - proto.RegisterFile("google.golang.org/appengine/internal/app_identity/app_identity_service.proto", fileDescriptor0) + proto.RegisterFile("google.golang.org/appengine/internal/app_identity/app_identity_service.proto", fileDescriptor_app_identity_service_08a6e3f74b04cfa4) } -var fileDescriptor0 = []byte{ +var fileDescriptor_app_identity_service_08a6e3f74b04cfa4 = []byte{ // 676 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x54, 0xdb, 0x6e, 0xda, 0x58, 0x14, 0x1d, 0x26, 0x1a, 0x31, 0x6c, 0x12, 0x62, 0xce, 0x90, 0xcb, 0x8c, 0x32, 0xb9, 0x78, 0x1e, diff --git a/vendor/google.golang.org/appengine/internal/base/api_base.pb.go b/vendor/google.golang.org/appengine/internal/base/api_base.pb.go index 6205a7ae..db4777e6 100644 --- a/vendor/google.golang.org/appengine/internal/base/api_base.pb.go +++ b/vendor/google.golang.org/appengine/internal/base/api_base.pb.go @@ -1,21 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // source: google.golang.org/appengine/internal/base/api_base.proto -/* -Package base is a generated protocol buffer package. - -It is generated from these files: - google.golang.org/appengine/internal/base/api_base.proto - -It has these top-level messages: - StringProto - Integer32Proto - Integer64Proto - BoolProto - DoubleProto - BytesProto - VoidProto -*/ package base import proto "github.com/golang/protobuf/proto" @@ -34,14 +19,35 @@ var _ = math.Inf const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package type StringProto struct { - Value *string `protobuf:"bytes,1,req,name=value" json:"value,omitempty"` - XXX_unrecognized []byte `json:"-"` + Value *string `protobuf:"bytes,1,req,name=value" json:"value,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *StringProto) Reset() { *m = StringProto{} } -func (m *StringProto) String() string { return proto.CompactTextString(m) } -func (*StringProto) ProtoMessage() {} -func (*StringProto) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} } +func (m *StringProto) Reset() { *m = StringProto{} } +func (m *StringProto) String() string { return proto.CompactTextString(m) } +func (*StringProto) ProtoMessage() {} +func (*StringProto) Descriptor() ([]byte, []int) { + return fileDescriptor_api_base_9d49f8792e0c1140, []int{0} +} +func (m *StringProto) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_StringProto.Unmarshal(m, b) +} +func (m *StringProto) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_StringProto.Marshal(b, m, deterministic) +} +func (dst *StringProto) XXX_Merge(src proto.Message) { + xxx_messageInfo_StringProto.Merge(dst, src) +} +func (m *StringProto) XXX_Size() int { + return xxx_messageInfo_StringProto.Size(m) +} +func (m *StringProto) XXX_DiscardUnknown() { + xxx_messageInfo_StringProto.DiscardUnknown(m) +} + +var xxx_messageInfo_StringProto proto.InternalMessageInfo func (m *StringProto) GetValue() string { if m != nil && m.Value != nil { @@ -51,14 +57,35 @@ func (m *StringProto) GetValue() string { } type Integer32Proto struct { - Value *int32 `protobuf:"varint,1,req,name=value" json:"value,omitempty"` - XXX_unrecognized []byte `json:"-"` + Value *int32 `protobuf:"varint,1,req,name=value" json:"value,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *Integer32Proto) Reset() { *m = Integer32Proto{} } -func (m *Integer32Proto) String() string { return proto.CompactTextString(m) } -func (*Integer32Proto) ProtoMessage() {} -func (*Integer32Proto) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} } +func (m *Integer32Proto) Reset() { *m = Integer32Proto{} } +func (m *Integer32Proto) String() string { return proto.CompactTextString(m) } +func (*Integer32Proto) ProtoMessage() {} +func (*Integer32Proto) Descriptor() ([]byte, []int) { + return fileDescriptor_api_base_9d49f8792e0c1140, []int{1} +} +func (m *Integer32Proto) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Integer32Proto.Unmarshal(m, b) +} +func (m *Integer32Proto) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Integer32Proto.Marshal(b, m, deterministic) +} +func (dst *Integer32Proto) XXX_Merge(src proto.Message) { + xxx_messageInfo_Integer32Proto.Merge(dst, src) +} +func (m *Integer32Proto) XXX_Size() int { + return xxx_messageInfo_Integer32Proto.Size(m) +} +func (m *Integer32Proto) XXX_DiscardUnknown() { + xxx_messageInfo_Integer32Proto.DiscardUnknown(m) +} + +var xxx_messageInfo_Integer32Proto proto.InternalMessageInfo func (m *Integer32Proto) GetValue() int32 { if m != nil && m.Value != nil { @@ -68,14 +95,35 @@ func (m *Integer32Proto) GetValue() int32 { } type Integer64Proto struct { - Value *int64 `protobuf:"varint,1,req,name=value" json:"value,omitempty"` - XXX_unrecognized []byte `json:"-"` + Value *int64 `protobuf:"varint,1,req,name=value" json:"value,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *Integer64Proto) Reset() { *m = Integer64Proto{} } -func (m *Integer64Proto) String() string { return proto.CompactTextString(m) } -func (*Integer64Proto) ProtoMessage() {} -func (*Integer64Proto) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} } +func (m *Integer64Proto) Reset() { *m = Integer64Proto{} } +func (m *Integer64Proto) String() string { return proto.CompactTextString(m) } +func (*Integer64Proto) ProtoMessage() {} +func (*Integer64Proto) Descriptor() ([]byte, []int) { + return fileDescriptor_api_base_9d49f8792e0c1140, []int{2} +} +func (m *Integer64Proto) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Integer64Proto.Unmarshal(m, b) +} +func (m *Integer64Proto) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Integer64Proto.Marshal(b, m, deterministic) +} +func (dst *Integer64Proto) XXX_Merge(src proto.Message) { + xxx_messageInfo_Integer64Proto.Merge(dst, src) +} +func (m *Integer64Proto) XXX_Size() int { + return xxx_messageInfo_Integer64Proto.Size(m) +} +func (m *Integer64Proto) XXX_DiscardUnknown() { + xxx_messageInfo_Integer64Proto.DiscardUnknown(m) +} + +var xxx_messageInfo_Integer64Proto proto.InternalMessageInfo func (m *Integer64Proto) GetValue() int64 { if m != nil && m.Value != nil { @@ -85,14 +133,35 @@ func (m *Integer64Proto) GetValue() int64 { } type BoolProto struct { - Value *bool `protobuf:"varint,1,req,name=value" json:"value,omitempty"` - XXX_unrecognized []byte `json:"-"` + Value *bool `protobuf:"varint,1,req,name=value" json:"value,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *BoolProto) Reset() { *m = BoolProto{} } -func (m *BoolProto) String() string { return proto.CompactTextString(m) } -func (*BoolProto) ProtoMessage() {} -func (*BoolProto) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} } +func (m *BoolProto) Reset() { *m = BoolProto{} } +func (m *BoolProto) String() string { return proto.CompactTextString(m) } +func (*BoolProto) ProtoMessage() {} +func (*BoolProto) Descriptor() ([]byte, []int) { + return fileDescriptor_api_base_9d49f8792e0c1140, []int{3} +} +func (m *BoolProto) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_BoolProto.Unmarshal(m, b) +} +func (m *BoolProto) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_BoolProto.Marshal(b, m, deterministic) +} +func (dst *BoolProto) XXX_Merge(src proto.Message) { + xxx_messageInfo_BoolProto.Merge(dst, src) +} +func (m *BoolProto) XXX_Size() int { + return xxx_messageInfo_BoolProto.Size(m) +} +func (m *BoolProto) XXX_DiscardUnknown() { + xxx_messageInfo_BoolProto.DiscardUnknown(m) +} + +var xxx_messageInfo_BoolProto proto.InternalMessageInfo func (m *BoolProto) GetValue() bool { if m != nil && m.Value != nil { @@ -102,14 +171,35 @@ func (m *BoolProto) GetValue() bool { } type DoubleProto struct { - Value *float64 `protobuf:"fixed64,1,req,name=value" json:"value,omitempty"` - XXX_unrecognized []byte `json:"-"` + Value *float64 `protobuf:"fixed64,1,req,name=value" json:"value,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *DoubleProto) Reset() { *m = DoubleProto{} } -func (m *DoubleProto) String() string { return proto.CompactTextString(m) } -func (*DoubleProto) ProtoMessage() {} -func (*DoubleProto) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{4} } +func (m *DoubleProto) Reset() { *m = DoubleProto{} } +func (m *DoubleProto) String() string { return proto.CompactTextString(m) } +func (*DoubleProto) ProtoMessage() {} +func (*DoubleProto) Descriptor() ([]byte, []int) { + return fileDescriptor_api_base_9d49f8792e0c1140, []int{4} +} +func (m *DoubleProto) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_DoubleProto.Unmarshal(m, b) +} +func (m *DoubleProto) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_DoubleProto.Marshal(b, m, deterministic) +} +func (dst *DoubleProto) XXX_Merge(src proto.Message) { + xxx_messageInfo_DoubleProto.Merge(dst, src) +} +func (m *DoubleProto) XXX_Size() int { + return xxx_messageInfo_DoubleProto.Size(m) +} +func (m *DoubleProto) XXX_DiscardUnknown() { + xxx_messageInfo_DoubleProto.DiscardUnknown(m) +} + +var xxx_messageInfo_DoubleProto proto.InternalMessageInfo func (m *DoubleProto) GetValue() float64 { if m != nil && m.Value != nil { @@ -119,14 +209,35 @@ func (m *DoubleProto) GetValue() float64 { } type BytesProto struct { - Value []byte `protobuf:"bytes,1,req,name=value" json:"value,omitempty"` - XXX_unrecognized []byte `json:"-"` + Value []byte `protobuf:"bytes,1,req,name=value" json:"value,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *BytesProto) Reset() { *m = BytesProto{} } -func (m *BytesProto) String() string { return proto.CompactTextString(m) } -func (*BytesProto) ProtoMessage() {} -func (*BytesProto) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{5} } +func (m *BytesProto) Reset() { *m = BytesProto{} } +func (m *BytesProto) String() string { return proto.CompactTextString(m) } +func (*BytesProto) ProtoMessage() {} +func (*BytesProto) Descriptor() ([]byte, []int) { + return fileDescriptor_api_base_9d49f8792e0c1140, []int{5} +} +func (m *BytesProto) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_BytesProto.Unmarshal(m, b) +} +func (m *BytesProto) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_BytesProto.Marshal(b, m, deterministic) +} +func (dst *BytesProto) XXX_Merge(src proto.Message) { + xxx_messageInfo_BytesProto.Merge(dst, src) +} +func (m *BytesProto) XXX_Size() int { + return xxx_messageInfo_BytesProto.Size(m) +} +func (m *BytesProto) XXX_DiscardUnknown() { + xxx_messageInfo_BytesProto.DiscardUnknown(m) +} + +var xxx_messageInfo_BytesProto proto.InternalMessageInfo func (m *BytesProto) GetValue() []byte { if m != nil { @@ -136,13 +247,34 @@ func (m *BytesProto) GetValue() []byte { } type VoidProto struct { - XXX_unrecognized []byte `json:"-"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *VoidProto) Reset() { *m = VoidProto{} } -func (m *VoidProto) String() string { return proto.CompactTextString(m) } -func (*VoidProto) ProtoMessage() {} -func (*VoidProto) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{6} } +func (m *VoidProto) Reset() { *m = VoidProto{} } +func (m *VoidProto) String() string { return proto.CompactTextString(m) } +func (*VoidProto) ProtoMessage() {} +func (*VoidProto) Descriptor() ([]byte, []int) { + return fileDescriptor_api_base_9d49f8792e0c1140, []int{6} +} +func (m *VoidProto) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_VoidProto.Unmarshal(m, b) +} +func (m *VoidProto) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_VoidProto.Marshal(b, m, deterministic) +} +func (dst *VoidProto) XXX_Merge(src proto.Message) { + xxx_messageInfo_VoidProto.Merge(dst, src) +} +func (m *VoidProto) XXX_Size() int { + return xxx_messageInfo_VoidProto.Size(m) +} +func (m *VoidProto) XXX_DiscardUnknown() { + xxx_messageInfo_VoidProto.DiscardUnknown(m) +} + +var xxx_messageInfo_VoidProto proto.InternalMessageInfo func init() { proto.RegisterType((*StringProto)(nil), "appengine.base.StringProto") @@ -155,10 +287,10 @@ func init() { } func init() { - proto.RegisterFile("google.golang.org/appengine/internal/base/api_base.proto", fileDescriptor0) + proto.RegisterFile("google.golang.org/appengine/internal/base/api_base.proto", fileDescriptor_api_base_9d49f8792e0c1140) } -var fileDescriptor0 = []byte{ +var fileDescriptor_api_base_9d49f8792e0c1140 = []byte{ // 199 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0xcf, 0x3f, 0x4b, 0xc6, 0x30, 0x10, 0x06, 0x70, 0x5a, 0xad, 0xb4, 0x57, 0xe9, 0x20, 0x0e, 0x1d, 0xb5, 0x05, 0x71, 0x4a, 0x40, diff --git a/vendor/google.golang.org/appengine/internal/datastore/datastore_v3.pb.go b/vendor/google.golang.org/appengine/internal/datastore/datastore_v3.pb.go index 393342c1..2fb74828 100644 --- a/vendor/google.golang.org/appengine/internal/datastore/datastore_v3.pb.go +++ b/vendor/google.golang.org/appengine/internal/datastore/datastore_v3.pb.go @@ -1,52 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // source: google.golang.org/appengine/internal/datastore/datastore_v3.proto -/* -Package datastore is a generated protocol buffer package. - -It is generated from these files: - google.golang.org/appengine/internal/datastore/datastore_v3.proto - -It has these top-level messages: - Action - PropertyValue - Property - Path - Reference - User - EntityProto - CompositeProperty - Index - CompositeIndex - IndexPostfix - IndexPosition - Snapshot - InternalHeader - Transaction - Query - CompiledQuery - CompiledCursor - Cursor - Error - Cost - GetRequest - GetResponse - PutRequest - PutResponse - TouchRequest - TouchResponse - DeleteRequest - DeleteResponse - NextRequest - QueryResult - AllocateIdsRequest - AllocateIdsResponse - CompositeIndices - AddActionsRequest - AddActionsResponse - BeginTransactionRequest - CommitResponse -*/ package datastore import proto "github.com/golang/protobuf/proto" @@ -150,7 +104,9 @@ func (x *Property_Meaning) UnmarshalJSON(data []byte) error { *x = Property_Meaning(value) return nil } -func (Property_Meaning) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{2, 0} } +func (Property_Meaning) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{2, 0} +} type Property_FtsTokenizationOption int32 @@ -185,7 +141,7 @@ func (x *Property_FtsTokenizationOption) UnmarshalJSON(data []byte) error { return nil } func (Property_FtsTokenizationOption) EnumDescriptor() ([]byte, []int) { - return fileDescriptor0, []int{2, 1} + return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{2, 1} } type EntityProto_Kind int32 @@ -223,7 +179,9 @@ func (x *EntityProto_Kind) UnmarshalJSON(data []byte) error { *x = EntityProto_Kind(value) return nil } -func (EntityProto_Kind) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{6, 0} } +func (EntityProto_Kind) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{6, 0} +} type Index_Property_Direction int32 @@ -258,7 +216,7 @@ func (x *Index_Property_Direction) UnmarshalJSON(data []byte) error { return nil } func (Index_Property_Direction) EnumDescriptor() ([]byte, []int) { - return fileDescriptor0, []int{8, 0, 0} + return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{8, 0, 0} } type CompositeIndex_State int32 @@ -299,7 +257,9 @@ func (x *CompositeIndex_State) UnmarshalJSON(data []byte) error { *x = CompositeIndex_State(value) return nil } -func (CompositeIndex_State) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{9, 0} } +func (CompositeIndex_State) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{9, 0} +} type Snapshot_Status int32 @@ -333,7 +293,9 @@ func (x *Snapshot_Status) UnmarshalJSON(data []byte) error { *x = Snapshot_Status(value) return nil } -func (Snapshot_Status) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{12, 0} } +func (Snapshot_Status) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{12, 0} +} type Query_Hint int32 @@ -370,7 +332,9 @@ func (x *Query_Hint) UnmarshalJSON(data []byte) error { *x = Query_Hint(value) return nil } -func (Query_Hint) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{15, 0} } +func (Query_Hint) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{15, 0} +} type Query_Filter_Operator int32 @@ -419,7 +383,9 @@ func (x *Query_Filter_Operator) UnmarshalJSON(data []byte) error { *x = Query_Filter_Operator(value) return nil } -func (Query_Filter_Operator) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{15, 0, 0} } +func (Query_Filter_Operator) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{15, 0, 0} +} type Query_Order_Direction int32 @@ -453,7 +419,9 @@ func (x *Query_Order_Direction) UnmarshalJSON(data []byte) error { *x = Query_Order_Direction(value) return nil } -func (Query_Order_Direction) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{15, 1, 0} } +func (Query_Order_Direction) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{15, 1, 0} +} type Error_ErrorCode int32 @@ -514,7 +482,9 @@ func (x *Error_ErrorCode) UnmarshalJSON(data []byte) error { *x = Error_ErrorCode(value) return nil } -func (Error_ErrorCode) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{19, 0} } +func (Error_ErrorCode) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{19, 0} +} type PutRequest_AutoIdPolicy int32 @@ -548,7 +518,9 @@ func (x *PutRequest_AutoIdPolicy) UnmarshalJSON(data []byte) error { *x = PutRequest_AutoIdPolicy(value) return nil } -func (PutRequest_AutoIdPolicy) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{23, 0} } +func (PutRequest_AutoIdPolicy) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{23, 0} +} type BeginTransactionRequest_TransactionMode int32 @@ -586,33 +558,75 @@ func (x *BeginTransactionRequest_TransactionMode) UnmarshalJSON(data []byte) err return nil } func (BeginTransactionRequest_TransactionMode) EnumDescriptor() ([]byte, []int) { - return fileDescriptor0, []int{36, 0} + return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{36, 0} } type Action struct { - XXX_unrecognized []byte `json:"-"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *Action) Reset() { *m = Action{} } -func (m *Action) String() string { return proto.CompactTextString(m) } -func (*Action) ProtoMessage() {} -func (*Action) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} } +func (m *Action) Reset() { *m = Action{} } +func (m *Action) String() string { return proto.CompactTextString(m) } +func (*Action) ProtoMessage() {} +func (*Action) Descriptor() ([]byte, []int) { + return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{0} +} +func (m *Action) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Action.Unmarshal(m, b) +} +func (m *Action) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Action.Marshal(b, m, deterministic) +} +func (dst *Action) XXX_Merge(src proto.Message) { + xxx_messageInfo_Action.Merge(dst, src) +} +func (m *Action) XXX_Size() int { + return xxx_messageInfo_Action.Size(m) +} +func (m *Action) XXX_DiscardUnknown() { + xxx_messageInfo_Action.DiscardUnknown(m) +} + +var xxx_messageInfo_Action proto.InternalMessageInfo type PropertyValue struct { - Int64Value *int64 `protobuf:"varint,1,opt,name=int64Value" json:"int64Value,omitempty"` - BooleanValue *bool `protobuf:"varint,2,opt,name=booleanValue" json:"booleanValue,omitempty"` - StringValue *string `protobuf:"bytes,3,opt,name=stringValue" json:"stringValue,omitempty"` - DoubleValue *float64 `protobuf:"fixed64,4,opt,name=doubleValue" json:"doubleValue,omitempty"` - Pointvalue *PropertyValue_PointValue `protobuf:"group,5,opt,name=PointValue,json=pointvalue" json:"pointvalue,omitempty"` - Uservalue *PropertyValue_UserValue `protobuf:"group,8,opt,name=UserValue,json=uservalue" json:"uservalue,omitempty"` - Referencevalue *PropertyValue_ReferenceValue `protobuf:"group,12,opt,name=ReferenceValue,json=referencevalue" json:"referencevalue,omitempty"` - XXX_unrecognized []byte `json:"-"` + Int64Value *int64 `protobuf:"varint,1,opt,name=int64Value" json:"int64Value,omitempty"` + BooleanValue *bool `protobuf:"varint,2,opt,name=booleanValue" json:"booleanValue,omitempty"` + StringValue *string `protobuf:"bytes,3,opt,name=stringValue" json:"stringValue,omitempty"` + DoubleValue *float64 `protobuf:"fixed64,4,opt,name=doubleValue" json:"doubleValue,omitempty"` + Pointvalue *PropertyValue_PointValue `protobuf:"group,5,opt,name=PointValue,json=pointvalue" json:"pointvalue,omitempty"` + Uservalue *PropertyValue_UserValue `protobuf:"group,8,opt,name=UserValue,json=uservalue" json:"uservalue,omitempty"` + Referencevalue *PropertyValue_ReferenceValue `protobuf:"group,12,opt,name=ReferenceValue,json=referencevalue" json:"referencevalue,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *PropertyValue) Reset() { *m = PropertyValue{} } -func (m *PropertyValue) String() string { return proto.CompactTextString(m) } -func (*PropertyValue) ProtoMessage() {} -func (*PropertyValue) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} } +func (m *PropertyValue) Reset() { *m = PropertyValue{} } +func (m *PropertyValue) String() string { return proto.CompactTextString(m) } +func (*PropertyValue) ProtoMessage() {} +func (*PropertyValue) Descriptor() ([]byte, []int) { + return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{1} +} +func (m *PropertyValue) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_PropertyValue.Unmarshal(m, b) +} +func (m *PropertyValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_PropertyValue.Marshal(b, m, deterministic) +} +func (dst *PropertyValue) XXX_Merge(src proto.Message) { + xxx_messageInfo_PropertyValue.Merge(dst, src) +} +func (m *PropertyValue) XXX_Size() int { + return xxx_messageInfo_PropertyValue.Size(m) +} +func (m *PropertyValue) XXX_DiscardUnknown() { + xxx_messageInfo_PropertyValue.DiscardUnknown(m) +} + +var xxx_messageInfo_PropertyValue proto.InternalMessageInfo func (m *PropertyValue) GetInt64Value() int64 { if m != nil && m.Int64Value != nil { @@ -664,15 +678,36 @@ func (m *PropertyValue) GetReferencevalue() *PropertyValue_ReferenceValue { } type PropertyValue_PointValue struct { - X *float64 `protobuf:"fixed64,6,req,name=x" json:"x,omitempty"` - Y *float64 `protobuf:"fixed64,7,req,name=y" json:"y,omitempty"` - XXX_unrecognized []byte `json:"-"` + X *float64 `protobuf:"fixed64,6,req,name=x" json:"x,omitempty"` + Y *float64 `protobuf:"fixed64,7,req,name=y" json:"y,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *PropertyValue_PointValue) Reset() { *m = PropertyValue_PointValue{} } -func (m *PropertyValue_PointValue) String() string { return proto.CompactTextString(m) } -func (*PropertyValue_PointValue) ProtoMessage() {} -func (*PropertyValue_PointValue) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1, 0} } +func (m *PropertyValue_PointValue) Reset() { *m = PropertyValue_PointValue{} } +func (m *PropertyValue_PointValue) String() string { return proto.CompactTextString(m) } +func (*PropertyValue_PointValue) ProtoMessage() {} +func (*PropertyValue_PointValue) Descriptor() ([]byte, []int) { + return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{1, 0} +} +func (m *PropertyValue_PointValue) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_PropertyValue_PointValue.Unmarshal(m, b) +} +func (m *PropertyValue_PointValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_PropertyValue_PointValue.Marshal(b, m, deterministic) +} +func (dst *PropertyValue_PointValue) XXX_Merge(src proto.Message) { + xxx_messageInfo_PropertyValue_PointValue.Merge(dst, src) +} +func (m *PropertyValue_PointValue) XXX_Size() int { + return xxx_messageInfo_PropertyValue_PointValue.Size(m) +} +func (m *PropertyValue_PointValue) XXX_DiscardUnknown() { + xxx_messageInfo_PropertyValue_PointValue.DiscardUnknown(m) +} + +var xxx_messageInfo_PropertyValue_PointValue proto.InternalMessageInfo func (m *PropertyValue_PointValue) GetX() float64 { if m != nil && m.X != nil { @@ -689,18 +724,39 @@ func (m *PropertyValue_PointValue) GetY() float64 { } type PropertyValue_UserValue struct { - Email *string `protobuf:"bytes,9,req,name=email" json:"email,omitempty"` - AuthDomain *string `protobuf:"bytes,10,req,name=auth_domain,json=authDomain" json:"auth_domain,omitempty"` - Nickname *string `protobuf:"bytes,11,opt,name=nickname" json:"nickname,omitempty"` - FederatedIdentity *string `protobuf:"bytes,21,opt,name=federated_identity,json=federatedIdentity" json:"federated_identity,omitempty"` - FederatedProvider *string `protobuf:"bytes,22,opt,name=federated_provider,json=federatedProvider" json:"federated_provider,omitempty"` - XXX_unrecognized []byte `json:"-"` + Email *string `protobuf:"bytes,9,req,name=email" json:"email,omitempty"` + AuthDomain *string `protobuf:"bytes,10,req,name=auth_domain,json=authDomain" json:"auth_domain,omitempty"` + Nickname *string `protobuf:"bytes,11,opt,name=nickname" json:"nickname,omitempty"` + FederatedIdentity *string `protobuf:"bytes,21,opt,name=federated_identity,json=federatedIdentity" json:"federated_identity,omitempty"` + FederatedProvider *string `protobuf:"bytes,22,opt,name=federated_provider,json=federatedProvider" json:"federated_provider,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *PropertyValue_UserValue) Reset() { *m = PropertyValue_UserValue{} } -func (m *PropertyValue_UserValue) String() string { return proto.CompactTextString(m) } -func (*PropertyValue_UserValue) ProtoMessage() {} -func (*PropertyValue_UserValue) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1, 1} } +func (m *PropertyValue_UserValue) Reset() { *m = PropertyValue_UserValue{} } +func (m *PropertyValue_UserValue) String() string { return proto.CompactTextString(m) } +func (*PropertyValue_UserValue) ProtoMessage() {} +func (*PropertyValue_UserValue) Descriptor() ([]byte, []int) { + return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{1, 1} +} +func (m *PropertyValue_UserValue) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_PropertyValue_UserValue.Unmarshal(m, b) +} +func (m *PropertyValue_UserValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_PropertyValue_UserValue.Marshal(b, m, deterministic) +} +func (dst *PropertyValue_UserValue) XXX_Merge(src proto.Message) { + xxx_messageInfo_PropertyValue_UserValue.Merge(dst, src) +} +func (m *PropertyValue_UserValue) XXX_Size() int { + return xxx_messageInfo_PropertyValue_UserValue.Size(m) +} +func (m *PropertyValue_UserValue) XXX_DiscardUnknown() { + xxx_messageInfo_PropertyValue_UserValue.DiscardUnknown(m) +} + +var xxx_messageInfo_PropertyValue_UserValue proto.InternalMessageInfo func (m *PropertyValue_UserValue) GetEmail() string { if m != nil && m.Email != nil { @@ -738,16 +794,37 @@ func (m *PropertyValue_UserValue) GetFederatedProvider() string { } type PropertyValue_ReferenceValue struct { - App *string `protobuf:"bytes,13,req,name=app" json:"app,omitempty"` - NameSpace *string `protobuf:"bytes,20,opt,name=name_space,json=nameSpace" json:"name_space,omitempty"` - Pathelement []*PropertyValue_ReferenceValue_PathElement `protobuf:"group,14,rep,name=PathElement,json=pathelement" json:"pathelement,omitempty"` - XXX_unrecognized []byte `json:"-"` + App *string `protobuf:"bytes,13,req,name=app" json:"app,omitempty"` + NameSpace *string `protobuf:"bytes,20,opt,name=name_space,json=nameSpace" json:"name_space,omitempty"` + Pathelement []*PropertyValue_ReferenceValue_PathElement `protobuf:"group,14,rep,name=PathElement,json=pathelement" json:"pathelement,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *PropertyValue_ReferenceValue) Reset() { *m = PropertyValue_ReferenceValue{} } -func (m *PropertyValue_ReferenceValue) String() string { return proto.CompactTextString(m) } -func (*PropertyValue_ReferenceValue) ProtoMessage() {} -func (*PropertyValue_ReferenceValue) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1, 2} } +func (m *PropertyValue_ReferenceValue) Reset() { *m = PropertyValue_ReferenceValue{} } +func (m *PropertyValue_ReferenceValue) String() string { return proto.CompactTextString(m) } +func (*PropertyValue_ReferenceValue) ProtoMessage() {} +func (*PropertyValue_ReferenceValue) Descriptor() ([]byte, []int) { + return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{1, 2} +} +func (m *PropertyValue_ReferenceValue) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_PropertyValue_ReferenceValue.Unmarshal(m, b) +} +func (m *PropertyValue_ReferenceValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_PropertyValue_ReferenceValue.Marshal(b, m, deterministic) +} +func (dst *PropertyValue_ReferenceValue) XXX_Merge(src proto.Message) { + xxx_messageInfo_PropertyValue_ReferenceValue.Merge(dst, src) +} +func (m *PropertyValue_ReferenceValue) XXX_Size() int { + return xxx_messageInfo_PropertyValue_ReferenceValue.Size(m) +} +func (m *PropertyValue_ReferenceValue) XXX_DiscardUnknown() { + xxx_messageInfo_PropertyValue_ReferenceValue.DiscardUnknown(m) +} + +var xxx_messageInfo_PropertyValue_ReferenceValue proto.InternalMessageInfo func (m *PropertyValue_ReferenceValue) GetApp() string { if m != nil && m.App != nil { @@ -771,10 +848,12 @@ func (m *PropertyValue_ReferenceValue) GetPathelement() []*PropertyValue_Referen } type PropertyValue_ReferenceValue_PathElement struct { - Type *string `protobuf:"bytes,15,req,name=type" json:"type,omitempty"` - Id *int64 `protobuf:"varint,16,opt,name=id" json:"id,omitempty"` - Name *string `protobuf:"bytes,17,opt,name=name" json:"name,omitempty"` - XXX_unrecognized []byte `json:"-"` + Type *string `protobuf:"bytes,15,req,name=type" json:"type,omitempty"` + Id *int64 `protobuf:"varint,16,opt,name=id" json:"id,omitempty"` + Name *string `protobuf:"bytes,17,opt,name=name" json:"name,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *PropertyValue_ReferenceValue_PathElement) Reset() { @@ -783,8 +862,25 @@ func (m *PropertyValue_ReferenceValue_PathElement) Reset() { func (m *PropertyValue_ReferenceValue_PathElement) String() string { return proto.CompactTextString(m) } func (*PropertyValue_ReferenceValue_PathElement) ProtoMessage() {} func (*PropertyValue_ReferenceValue_PathElement) Descriptor() ([]byte, []int) { - return fileDescriptor0, []int{1, 2, 0} + return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{1, 2, 0} } +func (m *PropertyValue_ReferenceValue_PathElement) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_PropertyValue_ReferenceValue_PathElement.Unmarshal(m, b) +} +func (m *PropertyValue_ReferenceValue_PathElement) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_PropertyValue_ReferenceValue_PathElement.Marshal(b, m, deterministic) +} +func (dst *PropertyValue_ReferenceValue_PathElement) XXX_Merge(src proto.Message) { + xxx_messageInfo_PropertyValue_ReferenceValue_PathElement.Merge(dst, src) +} +func (m *PropertyValue_ReferenceValue_PathElement) XXX_Size() int { + return xxx_messageInfo_PropertyValue_ReferenceValue_PathElement.Size(m) +} +func (m *PropertyValue_ReferenceValue_PathElement) XXX_DiscardUnknown() { + xxx_messageInfo_PropertyValue_ReferenceValue_PathElement.DiscardUnknown(m) +} + +var xxx_messageInfo_PropertyValue_ReferenceValue_PathElement proto.InternalMessageInfo func (m *PropertyValue_ReferenceValue_PathElement) GetType() string { if m != nil && m.Type != nil { @@ -816,13 +912,34 @@ type Property struct { Searchable *bool `protobuf:"varint,6,opt,name=searchable,def=0" json:"searchable,omitempty"` FtsTokenizationOption *Property_FtsTokenizationOption `protobuf:"varint,8,opt,name=fts_tokenization_option,json=ftsTokenizationOption,enum=appengine.Property_FtsTokenizationOption" json:"fts_tokenization_option,omitempty"` Locale *string `protobuf:"bytes,9,opt,name=locale,def=en" json:"locale,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *Property) Reset() { *m = Property{} } -func (m *Property) String() string { return proto.CompactTextString(m) } -func (*Property) ProtoMessage() {} -func (*Property) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} } +func (m *Property) Reset() { *m = Property{} } +func (m *Property) String() string { return proto.CompactTextString(m) } +func (*Property) ProtoMessage() {} +func (*Property) Descriptor() ([]byte, []int) { + return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{2} +} +func (m *Property) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Property.Unmarshal(m, b) +} +func (m *Property) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Property.Marshal(b, m, deterministic) +} +func (dst *Property) XXX_Merge(src proto.Message) { + xxx_messageInfo_Property.Merge(dst, src) +} +func (m *Property) XXX_Size() int { + return xxx_messageInfo_Property.Size(m) +} +func (m *Property) XXX_DiscardUnknown() { + xxx_messageInfo_Property.DiscardUnknown(m) +} + +var xxx_messageInfo_Property proto.InternalMessageInfo const Default_Property_Meaning Property_Meaning = Property_NO_MEANING const Default_Property_Searchable bool = false @@ -885,14 +1002,35 @@ func (m *Property) GetLocale() string { } type Path struct { - Element []*Path_Element `protobuf:"group,1,rep,name=Element,json=element" json:"element,omitempty"` - XXX_unrecognized []byte `json:"-"` + Element []*Path_Element `protobuf:"group,1,rep,name=Element,json=element" json:"element,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *Path) Reset() { *m = Path{} } -func (m *Path) String() string { return proto.CompactTextString(m) } -func (*Path) ProtoMessage() {} -func (*Path) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} } +func (m *Path) Reset() { *m = Path{} } +func (m *Path) String() string { return proto.CompactTextString(m) } +func (*Path) ProtoMessage() {} +func (*Path) Descriptor() ([]byte, []int) { + return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{3} +} +func (m *Path) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Path.Unmarshal(m, b) +} +func (m *Path) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Path.Marshal(b, m, deterministic) +} +func (dst *Path) XXX_Merge(src proto.Message) { + xxx_messageInfo_Path.Merge(dst, src) +} +func (m *Path) XXX_Size() int { + return xxx_messageInfo_Path.Size(m) +} +func (m *Path) XXX_DiscardUnknown() { + xxx_messageInfo_Path.DiscardUnknown(m) +} + +var xxx_messageInfo_Path proto.InternalMessageInfo func (m *Path) GetElement() []*Path_Element { if m != nil { @@ -902,16 +1040,37 @@ func (m *Path) GetElement() []*Path_Element { } type Path_Element struct { - Type *string `protobuf:"bytes,2,req,name=type" json:"type,omitempty"` - Id *int64 `protobuf:"varint,3,opt,name=id" json:"id,omitempty"` - Name *string `protobuf:"bytes,4,opt,name=name" json:"name,omitempty"` - XXX_unrecognized []byte `json:"-"` + Type *string `protobuf:"bytes,2,req,name=type" json:"type,omitempty"` + Id *int64 `protobuf:"varint,3,opt,name=id" json:"id,omitempty"` + Name *string `protobuf:"bytes,4,opt,name=name" json:"name,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *Path_Element) Reset() { *m = Path_Element{} } -func (m *Path_Element) String() string { return proto.CompactTextString(m) } -func (*Path_Element) ProtoMessage() {} -func (*Path_Element) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3, 0} } +func (m *Path_Element) Reset() { *m = Path_Element{} } +func (m *Path_Element) String() string { return proto.CompactTextString(m) } +func (*Path_Element) ProtoMessage() {} +func (*Path_Element) Descriptor() ([]byte, []int) { + return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{3, 0} +} +func (m *Path_Element) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Path_Element.Unmarshal(m, b) +} +func (m *Path_Element) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Path_Element.Marshal(b, m, deterministic) +} +func (dst *Path_Element) XXX_Merge(src proto.Message) { + xxx_messageInfo_Path_Element.Merge(dst, src) +} +func (m *Path_Element) XXX_Size() int { + return xxx_messageInfo_Path_Element.Size(m) +} +func (m *Path_Element) XXX_DiscardUnknown() { + xxx_messageInfo_Path_Element.DiscardUnknown(m) +} + +var xxx_messageInfo_Path_Element proto.InternalMessageInfo func (m *Path_Element) GetType() string { if m != nil && m.Type != nil { @@ -935,16 +1094,37 @@ func (m *Path_Element) GetName() string { } type Reference struct { - App *string `protobuf:"bytes,13,req,name=app" json:"app,omitempty"` - NameSpace *string `protobuf:"bytes,20,opt,name=name_space,json=nameSpace" json:"name_space,omitempty"` - Path *Path `protobuf:"bytes,14,req,name=path" json:"path,omitempty"` - XXX_unrecognized []byte `json:"-"` + App *string `protobuf:"bytes,13,req,name=app" json:"app,omitempty"` + NameSpace *string `protobuf:"bytes,20,opt,name=name_space,json=nameSpace" json:"name_space,omitempty"` + Path *Path `protobuf:"bytes,14,req,name=path" json:"path,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *Reference) Reset() { *m = Reference{} } -func (m *Reference) String() string { return proto.CompactTextString(m) } -func (*Reference) ProtoMessage() {} -func (*Reference) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{4} } +func (m *Reference) Reset() { *m = Reference{} } +func (m *Reference) String() string { return proto.CompactTextString(m) } +func (*Reference) ProtoMessage() {} +func (*Reference) Descriptor() ([]byte, []int) { + return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{4} +} +func (m *Reference) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Reference.Unmarshal(m, b) +} +func (m *Reference) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Reference.Marshal(b, m, deterministic) +} +func (dst *Reference) XXX_Merge(src proto.Message) { + xxx_messageInfo_Reference.Merge(dst, src) +} +func (m *Reference) XXX_Size() int { + return xxx_messageInfo_Reference.Size(m) +} +func (m *Reference) XXX_DiscardUnknown() { + xxx_messageInfo_Reference.DiscardUnknown(m) +} + +var xxx_messageInfo_Reference proto.InternalMessageInfo func (m *Reference) GetApp() string { if m != nil && m.App != nil { @@ -968,18 +1148,39 @@ func (m *Reference) GetPath() *Path { } type User struct { - Email *string `protobuf:"bytes,1,req,name=email" json:"email,omitempty"` - AuthDomain *string `protobuf:"bytes,2,req,name=auth_domain,json=authDomain" json:"auth_domain,omitempty"` - Nickname *string `protobuf:"bytes,3,opt,name=nickname" json:"nickname,omitempty"` - FederatedIdentity *string `protobuf:"bytes,6,opt,name=federated_identity,json=federatedIdentity" json:"federated_identity,omitempty"` - FederatedProvider *string `protobuf:"bytes,7,opt,name=federated_provider,json=federatedProvider" json:"federated_provider,omitempty"` - XXX_unrecognized []byte `json:"-"` + Email *string `protobuf:"bytes,1,req,name=email" json:"email,omitempty"` + AuthDomain *string `protobuf:"bytes,2,req,name=auth_domain,json=authDomain" json:"auth_domain,omitempty"` + Nickname *string `protobuf:"bytes,3,opt,name=nickname" json:"nickname,omitempty"` + FederatedIdentity *string `protobuf:"bytes,6,opt,name=federated_identity,json=federatedIdentity" json:"federated_identity,omitempty"` + FederatedProvider *string `protobuf:"bytes,7,opt,name=federated_provider,json=federatedProvider" json:"federated_provider,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *User) Reset() { *m = User{} } -func (m *User) String() string { return proto.CompactTextString(m) } -func (*User) ProtoMessage() {} -func (*User) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{5} } +func (m *User) Reset() { *m = User{} } +func (m *User) String() string { return proto.CompactTextString(m) } +func (*User) ProtoMessage() {} +func (*User) Descriptor() ([]byte, []int) { + return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{5} +} +func (m *User) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_User.Unmarshal(m, b) +} +func (m *User) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_User.Marshal(b, m, deterministic) +} +func (dst *User) XXX_Merge(src proto.Message) { + xxx_messageInfo_User.Merge(dst, src) +} +func (m *User) XXX_Size() int { + return xxx_messageInfo_User.Size(m) +} +func (m *User) XXX_DiscardUnknown() { + xxx_messageInfo_User.DiscardUnknown(m) +} + +var xxx_messageInfo_User proto.InternalMessageInfo func (m *User) GetEmail() string { if m != nil && m.Email != nil { @@ -1017,21 +1218,42 @@ func (m *User) GetFederatedProvider() string { } type EntityProto struct { - Key *Reference `protobuf:"bytes,13,req,name=key" json:"key,omitempty"` - EntityGroup *Path `protobuf:"bytes,16,req,name=entity_group,json=entityGroup" json:"entity_group,omitempty"` - Owner *User `protobuf:"bytes,17,opt,name=owner" json:"owner,omitempty"` - Kind *EntityProto_Kind `protobuf:"varint,4,opt,name=kind,enum=appengine.EntityProto_Kind" json:"kind,omitempty"` - KindUri *string `protobuf:"bytes,5,opt,name=kind_uri,json=kindUri" json:"kind_uri,omitempty"` - Property []*Property `protobuf:"bytes,14,rep,name=property" json:"property,omitempty"` - RawProperty []*Property `protobuf:"bytes,15,rep,name=raw_property,json=rawProperty" json:"raw_property,omitempty"` - Rank *int32 `protobuf:"varint,18,opt,name=rank" json:"rank,omitempty"` - XXX_unrecognized []byte `json:"-"` + Key *Reference `protobuf:"bytes,13,req,name=key" json:"key,omitempty"` + EntityGroup *Path `protobuf:"bytes,16,req,name=entity_group,json=entityGroup" json:"entity_group,omitempty"` + Owner *User `protobuf:"bytes,17,opt,name=owner" json:"owner,omitempty"` + Kind *EntityProto_Kind `protobuf:"varint,4,opt,name=kind,enum=appengine.EntityProto_Kind" json:"kind,omitempty"` + KindUri *string `protobuf:"bytes,5,opt,name=kind_uri,json=kindUri" json:"kind_uri,omitempty"` + Property []*Property `protobuf:"bytes,14,rep,name=property" json:"property,omitempty"` + RawProperty []*Property `protobuf:"bytes,15,rep,name=raw_property,json=rawProperty" json:"raw_property,omitempty"` + Rank *int32 `protobuf:"varint,18,opt,name=rank" json:"rank,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *EntityProto) Reset() { *m = EntityProto{} } -func (m *EntityProto) String() string { return proto.CompactTextString(m) } -func (*EntityProto) ProtoMessage() {} -func (*EntityProto) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{6} } +func (m *EntityProto) Reset() { *m = EntityProto{} } +func (m *EntityProto) String() string { return proto.CompactTextString(m) } +func (*EntityProto) ProtoMessage() {} +func (*EntityProto) Descriptor() ([]byte, []int) { + return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{6} +} +func (m *EntityProto) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_EntityProto.Unmarshal(m, b) +} +func (m *EntityProto) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_EntityProto.Marshal(b, m, deterministic) +} +func (dst *EntityProto) XXX_Merge(src proto.Message) { + xxx_messageInfo_EntityProto.Merge(dst, src) +} +func (m *EntityProto) XXX_Size() int { + return xxx_messageInfo_EntityProto.Size(m) +} +func (m *EntityProto) XXX_DiscardUnknown() { + xxx_messageInfo_EntityProto.DiscardUnknown(m) +} + +var xxx_messageInfo_EntityProto proto.InternalMessageInfo func (m *EntityProto) GetKey() *Reference { if m != nil { @@ -1090,15 +1312,36 @@ func (m *EntityProto) GetRank() int32 { } type CompositeProperty struct { - IndexId *int64 `protobuf:"varint,1,req,name=index_id,json=indexId" json:"index_id,omitempty"` - Value []string `protobuf:"bytes,2,rep,name=value" json:"value,omitempty"` - XXX_unrecognized []byte `json:"-"` + IndexId *int64 `protobuf:"varint,1,req,name=index_id,json=indexId" json:"index_id,omitempty"` + Value []string `protobuf:"bytes,2,rep,name=value" json:"value,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *CompositeProperty) Reset() { *m = CompositeProperty{} } -func (m *CompositeProperty) String() string { return proto.CompactTextString(m) } -func (*CompositeProperty) ProtoMessage() {} -func (*CompositeProperty) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{7} } +func (m *CompositeProperty) Reset() { *m = CompositeProperty{} } +func (m *CompositeProperty) String() string { return proto.CompactTextString(m) } +func (*CompositeProperty) ProtoMessage() {} +func (*CompositeProperty) Descriptor() ([]byte, []int) { + return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{7} +} +func (m *CompositeProperty) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_CompositeProperty.Unmarshal(m, b) +} +func (m *CompositeProperty) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_CompositeProperty.Marshal(b, m, deterministic) +} +func (dst *CompositeProperty) XXX_Merge(src proto.Message) { + xxx_messageInfo_CompositeProperty.Merge(dst, src) +} +func (m *CompositeProperty) XXX_Size() int { + return xxx_messageInfo_CompositeProperty.Size(m) +} +func (m *CompositeProperty) XXX_DiscardUnknown() { + xxx_messageInfo_CompositeProperty.DiscardUnknown(m) +} + +var xxx_messageInfo_CompositeProperty proto.InternalMessageInfo func (m *CompositeProperty) GetIndexId() int64 { if m != nil && m.IndexId != nil { @@ -1115,16 +1358,37 @@ func (m *CompositeProperty) GetValue() []string { } type Index struct { - EntityType *string `protobuf:"bytes,1,req,name=entity_type,json=entityType" json:"entity_type,omitempty"` - Ancestor *bool `protobuf:"varint,5,req,name=ancestor" json:"ancestor,omitempty"` - Property []*Index_Property `protobuf:"group,2,rep,name=Property,json=property" json:"property,omitempty"` - XXX_unrecognized []byte `json:"-"` + EntityType *string `protobuf:"bytes,1,req,name=entity_type,json=entityType" json:"entity_type,omitempty"` + Ancestor *bool `protobuf:"varint,5,req,name=ancestor" json:"ancestor,omitempty"` + Property []*Index_Property `protobuf:"group,2,rep,name=Property,json=property" json:"property,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *Index) Reset() { *m = Index{} } -func (m *Index) String() string { return proto.CompactTextString(m) } -func (*Index) ProtoMessage() {} -func (*Index) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{8} } +func (m *Index) Reset() { *m = Index{} } +func (m *Index) String() string { return proto.CompactTextString(m) } +func (*Index) ProtoMessage() {} +func (*Index) Descriptor() ([]byte, []int) { + return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{8} +} +func (m *Index) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Index.Unmarshal(m, b) +} +func (m *Index) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Index.Marshal(b, m, deterministic) +} +func (dst *Index) XXX_Merge(src proto.Message) { + xxx_messageInfo_Index.Merge(dst, src) +} +func (m *Index) XXX_Size() int { + return xxx_messageInfo_Index.Size(m) +} +func (m *Index) XXX_DiscardUnknown() { + xxx_messageInfo_Index.DiscardUnknown(m) +} + +var xxx_messageInfo_Index proto.InternalMessageInfo func (m *Index) GetEntityType() string { if m != nil && m.EntityType != nil { @@ -1148,15 +1412,36 @@ func (m *Index) GetProperty() []*Index_Property { } type Index_Property struct { - Name *string `protobuf:"bytes,3,req,name=name" json:"name,omitempty"` - Direction *Index_Property_Direction `protobuf:"varint,4,opt,name=direction,enum=appengine.Index_Property_Direction,def=1" json:"direction,omitempty"` - XXX_unrecognized []byte `json:"-"` + Name *string `protobuf:"bytes,3,req,name=name" json:"name,omitempty"` + Direction *Index_Property_Direction `protobuf:"varint,4,opt,name=direction,enum=appengine.Index_Property_Direction,def=1" json:"direction,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *Index_Property) Reset() { *m = Index_Property{} } -func (m *Index_Property) String() string { return proto.CompactTextString(m) } -func (*Index_Property) ProtoMessage() {} -func (*Index_Property) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{8, 0} } +func (m *Index_Property) Reset() { *m = Index_Property{} } +func (m *Index_Property) String() string { return proto.CompactTextString(m) } +func (*Index_Property) ProtoMessage() {} +func (*Index_Property) Descriptor() ([]byte, []int) { + return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{8, 0} +} +func (m *Index_Property) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Index_Property.Unmarshal(m, b) +} +func (m *Index_Property) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Index_Property.Marshal(b, m, deterministic) +} +func (dst *Index_Property) XXX_Merge(src proto.Message) { + xxx_messageInfo_Index_Property.Merge(dst, src) +} +func (m *Index_Property) XXX_Size() int { + return xxx_messageInfo_Index_Property.Size(m) +} +func (m *Index_Property) XXX_DiscardUnknown() { + xxx_messageInfo_Index_Property.DiscardUnknown(m) +} + +var xxx_messageInfo_Index_Property proto.InternalMessageInfo const Default_Index_Property_Direction Index_Property_Direction = Index_Property_ASCENDING @@ -1175,18 +1460,39 @@ func (m *Index_Property) GetDirection() Index_Property_Direction { } type CompositeIndex struct { - AppId *string `protobuf:"bytes,1,req,name=app_id,json=appId" json:"app_id,omitempty"` - Id *int64 `protobuf:"varint,2,req,name=id" json:"id,omitempty"` - Definition *Index `protobuf:"bytes,3,req,name=definition" json:"definition,omitempty"` - State *CompositeIndex_State `protobuf:"varint,4,req,name=state,enum=appengine.CompositeIndex_State" json:"state,omitempty"` - OnlyUseIfRequired *bool `protobuf:"varint,6,opt,name=only_use_if_required,json=onlyUseIfRequired,def=0" json:"only_use_if_required,omitempty"` - XXX_unrecognized []byte `json:"-"` + AppId *string `protobuf:"bytes,1,req,name=app_id,json=appId" json:"app_id,omitempty"` + Id *int64 `protobuf:"varint,2,req,name=id" json:"id,omitempty"` + Definition *Index `protobuf:"bytes,3,req,name=definition" json:"definition,omitempty"` + State *CompositeIndex_State `protobuf:"varint,4,req,name=state,enum=appengine.CompositeIndex_State" json:"state,omitempty"` + OnlyUseIfRequired *bool `protobuf:"varint,6,opt,name=only_use_if_required,json=onlyUseIfRequired,def=0" json:"only_use_if_required,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *CompositeIndex) Reset() { *m = CompositeIndex{} } -func (m *CompositeIndex) String() string { return proto.CompactTextString(m) } -func (*CompositeIndex) ProtoMessage() {} -func (*CompositeIndex) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{9} } +func (m *CompositeIndex) Reset() { *m = CompositeIndex{} } +func (m *CompositeIndex) String() string { return proto.CompactTextString(m) } +func (*CompositeIndex) ProtoMessage() {} +func (*CompositeIndex) Descriptor() ([]byte, []int) { + return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{9} +} +func (m *CompositeIndex) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_CompositeIndex.Unmarshal(m, b) +} +func (m *CompositeIndex) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_CompositeIndex.Marshal(b, m, deterministic) +} +func (dst *CompositeIndex) XXX_Merge(src proto.Message) { + xxx_messageInfo_CompositeIndex.Merge(dst, src) +} +func (m *CompositeIndex) XXX_Size() int { + return xxx_messageInfo_CompositeIndex.Size(m) +} +func (m *CompositeIndex) XXX_DiscardUnknown() { + xxx_messageInfo_CompositeIndex.DiscardUnknown(m) +} + +var xxx_messageInfo_CompositeIndex proto.InternalMessageInfo const Default_CompositeIndex_OnlyUseIfRequired bool = false @@ -1226,16 +1532,37 @@ func (m *CompositeIndex) GetOnlyUseIfRequired() bool { } type IndexPostfix struct { - IndexValue []*IndexPostfix_IndexValue `protobuf:"bytes,1,rep,name=index_value,json=indexValue" json:"index_value,omitempty"` - Key *Reference `protobuf:"bytes,2,opt,name=key" json:"key,omitempty"` - Before *bool `protobuf:"varint,3,opt,name=before,def=1" json:"before,omitempty"` - XXX_unrecognized []byte `json:"-"` + IndexValue []*IndexPostfix_IndexValue `protobuf:"bytes,1,rep,name=index_value,json=indexValue" json:"index_value,omitempty"` + Key *Reference `protobuf:"bytes,2,opt,name=key" json:"key,omitempty"` + Before *bool `protobuf:"varint,3,opt,name=before,def=1" json:"before,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *IndexPostfix) Reset() { *m = IndexPostfix{} } -func (m *IndexPostfix) String() string { return proto.CompactTextString(m) } -func (*IndexPostfix) ProtoMessage() {} -func (*IndexPostfix) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{10} } +func (m *IndexPostfix) Reset() { *m = IndexPostfix{} } +func (m *IndexPostfix) String() string { return proto.CompactTextString(m) } +func (*IndexPostfix) ProtoMessage() {} +func (*IndexPostfix) Descriptor() ([]byte, []int) { + return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{10} +} +func (m *IndexPostfix) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_IndexPostfix.Unmarshal(m, b) +} +func (m *IndexPostfix) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_IndexPostfix.Marshal(b, m, deterministic) +} +func (dst *IndexPostfix) XXX_Merge(src proto.Message) { + xxx_messageInfo_IndexPostfix.Merge(dst, src) +} +func (m *IndexPostfix) XXX_Size() int { + return xxx_messageInfo_IndexPostfix.Size(m) +} +func (m *IndexPostfix) XXX_DiscardUnknown() { + xxx_messageInfo_IndexPostfix.DiscardUnknown(m) +} + +var xxx_messageInfo_IndexPostfix proto.InternalMessageInfo const Default_IndexPostfix_Before bool = true @@ -1261,15 +1588,36 @@ func (m *IndexPostfix) GetBefore() bool { } type IndexPostfix_IndexValue struct { - PropertyName *string `protobuf:"bytes,1,req,name=property_name,json=propertyName" json:"property_name,omitempty"` - Value *PropertyValue `protobuf:"bytes,2,req,name=value" json:"value,omitempty"` - XXX_unrecognized []byte `json:"-"` + PropertyName *string `protobuf:"bytes,1,req,name=property_name,json=propertyName" json:"property_name,omitempty"` + Value *PropertyValue `protobuf:"bytes,2,req,name=value" json:"value,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *IndexPostfix_IndexValue) Reset() { *m = IndexPostfix_IndexValue{} } -func (m *IndexPostfix_IndexValue) String() string { return proto.CompactTextString(m) } -func (*IndexPostfix_IndexValue) ProtoMessage() {} -func (*IndexPostfix_IndexValue) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{10, 0} } +func (m *IndexPostfix_IndexValue) Reset() { *m = IndexPostfix_IndexValue{} } +func (m *IndexPostfix_IndexValue) String() string { return proto.CompactTextString(m) } +func (*IndexPostfix_IndexValue) ProtoMessage() {} +func (*IndexPostfix_IndexValue) Descriptor() ([]byte, []int) { + return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{10, 0} +} +func (m *IndexPostfix_IndexValue) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_IndexPostfix_IndexValue.Unmarshal(m, b) +} +func (m *IndexPostfix_IndexValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_IndexPostfix_IndexValue.Marshal(b, m, deterministic) +} +func (dst *IndexPostfix_IndexValue) XXX_Merge(src proto.Message) { + xxx_messageInfo_IndexPostfix_IndexValue.Merge(dst, src) +} +func (m *IndexPostfix_IndexValue) XXX_Size() int { + return xxx_messageInfo_IndexPostfix_IndexValue.Size(m) +} +func (m *IndexPostfix_IndexValue) XXX_DiscardUnknown() { + xxx_messageInfo_IndexPostfix_IndexValue.DiscardUnknown(m) +} + +var xxx_messageInfo_IndexPostfix_IndexValue proto.InternalMessageInfo func (m *IndexPostfix_IndexValue) GetPropertyName() string { if m != nil && m.PropertyName != nil { @@ -1286,15 +1634,36 @@ func (m *IndexPostfix_IndexValue) GetValue() *PropertyValue { } type IndexPosition struct { - Key *string `protobuf:"bytes,1,opt,name=key" json:"key,omitempty"` - Before *bool `protobuf:"varint,2,opt,name=before,def=1" json:"before,omitempty"` - XXX_unrecognized []byte `json:"-"` + Key *string `protobuf:"bytes,1,opt,name=key" json:"key,omitempty"` + Before *bool `protobuf:"varint,2,opt,name=before,def=1" json:"before,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *IndexPosition) Reset() { *m = IndexPosition{} } -func (m *IndexPosition) String() string { return proto.CompactTextString(m) } -func (*IndexPosition) ProtoMessage() {} -func (*IndexPosition) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{11} } +func (m *IndexPosition) Reset() { *m = IndexPosition{} } +func (m *IndexPosition) String() string { return proto.CompactTextString(m) } +func (*IndexPosition) ProtoMessage() {} +func (*IndexPosition) Descriptor() ([]byte, []int) { + return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{11} +} +func (m *IndexPosition) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_IndexPosition.Unmarshal(m, b) +} +func (m *IndexPosition) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_IndexPosition.Marshal(b, m, deterministic) +} +func (dst *IndexPosition) XXX_Merge(src proto.Message) { + xxx_messageInfo_IndexPosition.Merge(dst, src) +} +func (m *IndexPosition) XXX_Size() int { + return xxx_messageInfo_IndexPosition.Size(m) +} +func (m *IndexPosition) XXX_DiscardUnknown() { + xxx_messageInfo_IndexPosition.DiscardUnknown(m) +} + +var xxx_messageInfo_IndexPosition proto.InternalMessageInfo const Default_IndexPosition_Before bool = true @@ -1313,14 +1682,35 @@ func (m *IndexPosition) GetBefore() bool { } type Snapshot struct { - Ts *int64 `protobuf:"varint,1,req,name=ts" json:"ts,omitempty"` - XXX_unrecognized []byte `json:"-"` + Ts *int64 `protobuf:"varint,1,req,name=ts" json:"ts,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *Snapshot) Reset() { *m = Snapshot{} } -func (m *Snapshot) String() string { return proto.CompactTextString(m) } -func (*Snapshot) ProtoMessage() {} -func (*Snapshot) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{12} } +func (m *Snapshot) Reset() { *m = Snapshot{} } +func (m *Snapshot) String() string { return proto.CompactTextString(m) } +func (*Snapshot) ProtoMessage() {} +func (*Snapshot) Descriptor() ([]byte, []int) { + return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{12} +} +func (m *Snapshot) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Snapshot.Unmarshal(m, b) +} +func (m *Snapshot) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Snapshot.Marshal(b, m, deterministic) +} +func (dst *Snapshot) XXX_Merge(src proto.Message) { + xxx_messageInfo_Snapshot.Merge(dst, src) +} +func (m *Snapshot) XXX_Size() int { + return xxx_messageInfo_Snapshot.Size(m) +} +func (m *Snapshot) XXX_DiscardUnknown() { + xxx_messageInfo_Snapshot.DiscardUnknown(m) +} + +var xxx_messageInfo_Snapshot proto.InternalMessageInfo func (m *Snapshot) GetTs() int64 { if m != nil && m.Ts != nil { @@ -1330,14 +1720,35 @@ func (m *Snapshot) GetTs() int64 { } type InternalHeader struct { - Qos *string `protobuf:"bytes,1,opt,name=qos" json:"qos,omitempty"` - XXX_unrecognized []byte `json:"-"` + Qos *string `protobuf:"bytes,1,opt,name=qos" json:"qos,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *InternalHeader) Reset() { *m = InternalHeader{} } -func (m *InternalHeader) String() string { return proto.CompactTextString(m) } -func (*InternalHeader) ProtoMessage() {} -func (*InternalHeader) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{13} } +func (m *InternalHeader) Reset() { *m = InternalHeader{} } +func (m *InternalHeader) String() string { return proto.CompactTextString(m) } +func (*InternalHeader) ProtoMessage() {} +func (*InternalHeader) Descriptor() ([]byte, []int) { + return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{13} +} +func (m *InternalHeader) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_InternalHeader.Unmarshal(m, b) +} +func (m *InternalHeader) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_InternalHeader.Marshal(b, m, deterministic) +} +func (dst *InternalHeader) XXX_Merge(src proto.Message) { + xxx_messageInfo_InternalHeader.Merge(dst, src) +} +func (m *InternalHeader) XXX_Size() int { + return xxx_messageInfo_InternalHeader.Size(m) +} +func (m *InternalHeader) XXX_DiscardUnknown() { + xxx_messageInfo_InternalHeader.DiscardUnknown(m) +} + +var xxx_messageInfo_InternalHeader proto.InternalMessageInfo func (m *InternalHeader) GetQos() string { if m != nil && m.Qos != nil { @@ -1347,17 +1758,38 @@ func (m *InternalHeader) GetQos() string { } type Transaction struct { - Header *InternalHeader `protobuf:"bytes,4,opt,name=header" json:"header,omitempty"` - Handle *uint64 `protobuf:"fixed64,1,req,name=handle" json:"handle,omitempty"` - App *string `protobuf:"bytes,2,req,name=app" json:"app,omitempty"` - MarkChanges *bool `protobuf:"varint,3,opt,name=mark_changes,json=markChanges,def=0" json:"mark_changes,omitempty"` - XXX_unrecognized []byte `json:"-"` + Header *InternalHeader `protobuf:"bytes,4,opt,name=header" json:"header,omitempty"` + Handle *uint64 `protobuf:"fixed64,1,req,name=handle" json:"handle,omitempty"` + App *string `protobuf:"bytes,2,req,name=app" json:"app,omitempty"` + MarkChanges *bool `protobuf:"varint,3,opt,name=mark_changes,json=markChanges,def=0" json:"mark_changes,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *Transaction) Reset() { *m = Transaction{} } -func (m *Transaction) String() string { return proto.CompactTextString(m) } -func (*Transaction) ProtoMessage() {} -func (*Transaction) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{14} } +func (m *Transaction) Reset() { *m = Transaction{} } +func (m *Transaction) String() string { return proto.CompactTextString(m) } +func (*Transaction) ProtoMessage() {} +func (*Transaction) Descriptor() ([]byte, []int) { + return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{14} +} +func (m *Transaction) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Transaction.Unmarshal(m, b) +} +func (m *Transaction) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Transaction.Marshal(b, m, deterministic) +} +func (dst *Transaction) XXX_Merge(src proto.Message) { + xxx_messageInfo_Transaction.Merge(dst, src) +} +func (m *Transaction) XXX_Size() int { + return xxx_messageInfo_Transaction.Size(m) +} +func (m *Transaction) XXX_DiscardUnknown() { + xxx_messageInfo_Transaction.DiscardUnknown(m) +} + +var xxx_messageInfo_Transaction proto.InternalMessageInfo const Default_Transaction_MarkChanges bool = false @@ -1390,40 +1822,61 @@ func (m *Transaction) GetMarkChanges() bool { } type Query struct { - Header *InternalHeader `protobuf:"bytes,39,opt,name=header" json:"header,omitempty"` - App *string `protobuf:"bytes,1,req,name=app" json:"app,omitempty"` - NameSpace *string `protobuf:"bytes,29,opt,name=name_space,json=nameSpace" json:"name_space,omitempty"` - Kind *string `protobuf:"bytes,3,opt,name=kind" json:"kind,omitempty"` - Ancestor *Reference `protobuf:"bytes,17,opt,name=ancestor" json:"ancestor,omitempty"` - Filter []*Query_Filter `protobuf:"group,4,rep,name=Filter,json=filter" json:"filter,omitempty"` - SearchQuery *string `protobuf:"bytes,8,opt,name=search_query,json=searchQuery" json:"search_query,omitempty"` - Order []*Query_Order `protobuf:"group,9,rep,name=Order,json=order" json:"order,omitempty"` - Hint *Query_Hint `protobuf:"varint,18,opt,name=hint,enum=appengine.Query_Hint" json:"hint,omitempty"` - Count *int32 `protobuf:"varint,23,opt,name=count" json:"count,omitempty"` - Offset *int32 `protobuf:"varint,12,opt,name=offset,def=0" json:"offset,omitempty"` - Limit *int32 `protobuf:"varint,16,opt,name=limit" json:"limit,omitempty"` - CompiledCursor *CompiledCursor `protobuf:"bytes,30,opt,name=compiled_cursor,json=compiledCursor" json:"compiled_cursor,omitempty"` - EndCompiledCursor *CompiledCursor `protobuf:"bytes,31,opt,name=end_compiled_cursor,json=endCompiledCursor" json:"end_compiled_cursor,omitempty"` - CompositeIndex []*CompositeIndex `protobuf:"bytes,19,rep,name=composite_index,json=compositeIndex" json:"composite_index,omitempty"` - RequirePerfectPlan *bool `protobuf:"varint,20,opt,name=require_perfect_plan,json=requirePerfectPlan,def=0" json:"require_perfect_plan,omitempty"` - KeysOnly *bool `protobuf:"varint,21,opt,name=keys_only,json=keysOnly,def=0" json:"keys_only,omitempty"` - Transaction *Transaction `protobuf:"bytes,22,opt,name=transaction" json:"transaction,omitempty"` - Compile *bool `protobuf:"varint,25,opt,name=compile,def=0" json:"compile,omitempty"` - FailoverMs *int64 `protobuf:"varint,26,opt,name=failover_ms,json=failoverMs" json:"failover_ms,omitempty"` - Strong *bool `protobuf:"varint,32,opt,name=strong" json:"strong,omitempty"` - PropertyName []string `protobuf:"bytes,33,rep,name=property_name,json=propertyName" json:"property_name,omitempty"` - GroupByPropertyName []string `protobuf:"bytes,34,rep,name=group_by_property_name,json=groupByPropertyName" json:"group_by_property_name,omitempty"` - Distinct *bool `protobuf:"varint,24,opt,name=distinct" json:"distinct,omitempty"` - MinSafeTimeSeconds *int64 `protobuf:"varint,35,opt,name=min_safe_time_seconds,json=minSafeTimeSeconds" json:"min_safe_time_seconds,omitempty"` - SafeReplicaName []string `protobuf:"bytes,36,rep,name=safe_replica_name,json=safeReplicaName" json:"safe_replica_name,omitempty"` - PersistOffset *bool `protobuf:"varint,37,opt,name=persist_offset,json=persistOffset,def=0" json:"persist_offset,omitempty"` - XXX_unrecognized []byte `json:"-"` + Header *InternalHeader `protobuf:"bytes,39,opt,name=header" json:"header,omitempty"` + App *string `protobuf:"bytes,1,req,name=app" json:"app,omitempty"` + NameSpace *string `protobuf:"bytes,29,opt,name=name_space,json=nameSpace" json:"name_space,omitempty"` + Kind *string `protobuf:"bytes,3,opt,name=kind" json:"kind,omitempty"` + Ancestor *Reference `protobuf:"bytes,17,opt,name=ancestor" json:"ancestor,omitempty"` + Filter []*Query_Filter `protobuf:"group,4,rep,name=Filter,json=filter" json:"filter,omitempty"` + SearchQuery *string `protobuf:"bytes,8,opt,name=search_query,json=searchQuery" json:"search_query,omitempty"` + Order []*Query_Order `protobuf:"group,9,rep,name=Order,json=order" json:"order,omitempty"` + Hint *Query_Hint `protobuf:"varint,18,opt,name=hint,enum=appengine.Query_Hint" json:"hint,omitempty"` + Count *int32 `protobuf:"varint,23,opt,name=count" json:"count,omitempty"` + Offset *int32 `protobuf:"varint,12,opt,name=offset,def=0" json:"offset,omitempty"` + Limit *int32 `protobuf:"varint,16,opt,name=limit" json:"limit,omitempty"` + CompiledCursor *CompiledCursor `protobuf:"bytes,30,opt,name=compiled_cursor,json=compiledCursor" json:"compiled_cursor,omitempty"` + EndCompiledCursor *CompiledCursor `protobuf:"bytes,31,opt,name=end_compiled_cursor,json=endCompiledCursor" json:"end_compiled_cursor,omitempty"` + CompositeIndex []*CompositeIndex `protobuf:"bytes,19,rep,name=composite_index,json=compositeIndex" json:"composite_index,omitempty"` + RequirePerfectPlan *bool `protobuf:"varint,20,opt,name=require_perfect_plan,json=requirePerfectPlan,def=0" json:"require_perfect_plan,omitempty"` + KeysOnly *bool `protobuf:"varint,21,opt,name=keys_only,json=keysOnly,def=0" json:"keys_only,omitempty"` + Transaction *Transaction `protobuf:"bytes,22,opt,name=transaction" json:"transaction,omitempty"` + Compile *bool `protobuf:"varint,25,opt,name=compile,def=0" json:"compile,omitempty"` + FailoverMs *int64 `protobuf:"varint,26,opt,name=failover_ms,json=failoverMs" json:"failover_ms,omitempty"` + Strong *bool `protobuf:"varint,32,opt,name=strong" json:"strong,omitempty"` + PropertyName []string `protobuf:"bytes,33,rep,name=property_name,json=propertyName" json:"property_name,omitempty"` + GroupByPropertyName []string `protobuf:"bytes,34,rep,name=group_by_property_name,json=groupByPropertyName" json:"group_by_property_name,omitempty"` + Distinct *bool `protobuf:"varint,24,opt,name=distinct" json:"distinct,omitempty"` + MinSafeTimeSeconds *int64 `protobuf:"varint,35,opt,name=min_safe_time_seconds,json=minSafeTimeSeconds" json:"min_safe_time_seconds,omitempty"` + SafeReplicaName []string `protobuf:"bytes,36,rep,name=safe_replica_name,json=safeReplicaName" json:"safe_replica_name,omitempty"` + PersistOffset *bool `protobuf:"varint,37,opt,name=persist_offset,json=persistOffset,def=0" json:"persist_offset,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *Query) Reset() { *m = Query{} } -func (m *Query) String() string { return proto.CompactTextString(m) } -func (*Query) ProtoMessage() {} -func (*Query) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{15} } +func (m *Query) Reset() { *m = Query{} } +func (m *Query) String() string { return proto.CompactTextString(m) } +func (*Query) ProtoMessage() {} +func (*Query) Descriptor() ([]byte, []int) { + return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{15} +} +func (m *Query) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Query.Unmarshal(m, b) +} +func (m *Query) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Query.Marshal(b, m, deterministic) +} +func (dst *Query) XXX_Merge(src proto.Message) { + xxx_messageInfo_Query.Merge(dst, src) +} +func (m *Query) XXX_Size() int { + return xxx_messageInfo_Query.Size(m) +} +func (m *Query) XXX_DiscardUnknown() { + xxx_messageInfo_Query.DiscardUnknown(m) +} + +var xxx_messageInfo_Query proto.InternalMessageInfo const Default_Query_Offset int32 = 0 const Default_Query_RequirePerfectPlan bool = false @@ -1621,15 +2074,36 @@ func (m *Query) GetPersistOffset() bool { } type Query_Filter struct { - Op *Query_Filter_Operator `protobuf:"varint,6,req,name=op,enum=appengine.Query_Filter_Operator" json:"op,omitempty"` - Property []*Property `protobuf:"bytes,14,rep,name=property" json:"property,omitempty"` - XXX_unrecognized []byte `json:"-"` + Op *Query_Filter_Operator `protobuf:"varint,6,req,name=op,enum=appengine.Query_Filter_Operator" json:"op,omitempty"` + Property []*Property `protobuf:"bytes,14,rep,name=property" json:"property,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *Query_Filter) Reset() { *m = Query_Filter{} } -func (m *Query_Filter) String() string { return proto.CompactTextString(m) } -func (*Query_Filter) ProtoMessage() {} -func (*Query_Filter) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{15, 0} } +func (m *Query_Filter) Reset() { *m = Query_Filter{} } +func (m *Query_Filter) String() string { return proto.CompactTextString(m) } +func (*Query_Filter) ProtoMessage() {} +func (*Query_Filter) Descriptor() ([]byte, []int) { + return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{15, 0} +} +func (m *Query_Filter) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Query_Filter.Unmarshal(m, b) +} +func (m *Query_Filter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Query_Filter.Marshal(b, m, deterministic) +} +func (dst *Query_Filter) XXX_Merge(src proto.Message) { + xxx_messageInfo_Query_Filter.Merge(dst, src) +} +func (m *Query_Filter) XXX_Size() int { + return xxx_messageInfo_Query_Filter.Size(m) +} +func (m *Query_Filter) XXX_DiscardUnknown() { + xxx_messageInfo_Query_Filter.DiscardUnknown(m) +} + +var xxx_messageInfo_Query_Filter proto.InternalMessageInfo func (m *Query_Filter) GetOp() Query_Filter_Operator { if m != nil && m.Op != nil { @@ -1646,15 +2120,36 @@ func (m *Query_Filter) GetProperty() []*Property { } type Query_Order struct { - Property *string `protobuf:"bytes,10,req,name=property" json:"property,omitempty"` - Direction *Query_Order_Direction `protobuf:"varint,11,opt,name=direction,enum=appengine.Query_Order_Direction,def=1" json:"direction,omitempty"` - XXX_unrecognized []byte `json:"-"` + Property *string `protobuf:"bytes,10,req,name=property" json:"property,omitempty"` + Direction *Query_Order_Direction `protobuf:"varint,11,opt,name=direction,enum=appengine.Query_Order_Direction,def=1" json:"direction,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *Query_Order) Reset() { *m = Query_Order{} } -func (m *Query_Order) String() string { return proto.CompactTextString(m) } -func (*Query_Order) ProtoMessage() {} -func (*Query_Order) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{15, 1} } +func (m *Query_Order) Reset() { *m = Query_Order{} } +func (m *Query_Order) String() string { return proto.CompactTextString(m) } +func (*Query_Order) ProtoMessage() {} +func (*Query_Order) Descriptor() ([]byte, []int) { + return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{15, 1} +} +func (m *Query_Order) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Query_Order.Unmarshal(m, b) +} +func (m *Query_Order) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Query_Order.Marshal(b, m, deterministic) +} +func (dst *Query_Order) XXX_Merge(src proto.Message) { + xxx_messageInfo_Query_Order.Merge(dst, src) +} +func (m *Query_Order) XXX_Size() int { + return xxx_messageInfo_Query_Order.Size(m) +} +func (m *Query_Order) XXX_DiscardUnknown() { + xxx_messageInfo_Query_Order.DiscardUnknown(m) +} + +var xxx_messageInfo_Query_Order proto.InternalMessageInfo const Default_Query_Order_Direction Query_Order_Direction = Query_Order_ASCENDING @@ -1673,22 +2168,43 @@ func (m *Query_Order) GetDirection() Query_Order_Direction { } type CompiledQuery struct { - Primaryscan *CompiledQuery_PrimaryScan `protobuf:"group,1,req,name=PrimaryScan,json=primaryscan" json:"primaryscan,omitempty"` - Mergejoinscan []*CompiledQuery_MergeJoinScan `protobuf:"group,7,rep,name=MergeJoinScan,json=mergejoinscan" json:"mergejoinscan,omitempty"` - IndexDef *Index `protobuf:"bytes,21,opt,name=index_def,json=indexDef" json:"index_def,omitempty"` - Offset *int32 `protobuf:"varint,10,opt,name=offset,def=0" json:"offset,omitempty"` - Limit *int32 `protobuf:"varint,11,opt,name=limit" json:"limit,omitempty"` - KeysOnly *bool `protobuf:"varint,12,req,name=keys_only,json=keysOnly" json:"keys_only,omitempty"` - PropertyName []string `protobuf:"bytes,24,rep,name=property_name,json=propertyName" json:"property_name,omitempty"` - DistinctInfixSize *int32 `protobuf:"varint,25,opt,name=distinct_infix_size,json=distinctInfixSize" json:"distinct_infix_size,omitempty"` - Entityfilter *CompiledQuery_EntityFilter `protobuf:"group,13,opt,name=EntityFilter,json=entityfilter" json:"entityfilter,omitempty"` - XXX_unrecognized []byte `json:"-"` + Primaryscan *CompiledQuery_PrimaryScan `protobuf:"group,1,req,name=PrimaryScan,json=primaryscan" json:"primaryscan,omitempty"` + Mergejoinscan []*CompiledQuery_MergeJoinScan `protobuf:"group,7,rep,name=MergeJoinScan,json=mergejoinscan" json:"mergejoinscan,omitempty"` + IndexDef *Index `protobuf:"bytes,21,opt,name=index_def,json=indexDef" json:"index_def,omitempty"` + Offset *int32 `protobuf:"varint,10,opt,name=offset,def=0" json:"offset,omitempty"` + Limit *int32 `protobuf:"varint,11,opt,name=limit" json:"limit,omitempty"` + KeysOnly *bool `protobuf:"varint,12,req,name=keys_only,json=keysOnly" json:"keys_only,omitempty"` + PropertyName []string `protobuf:"bytes,24,rep,name=property_name,json=propertyName" json:"property_name,omitempty"` + DistinctInfixSize *int32 `protobuf:"varint,25,opt,name=distinct_infix_size,json=distinctInfixSize" json:"distinct_infix_size,omitempty"` + Entityfilter *CompiledQuery_EntityFilter `protobuf:"group,13,opt,name=EntityFilter,json=entityfilter" json:"entityfilter,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *CompiledQuery) Reset() { *m = CompiledQuery{} } -func (m *CompiledQuery) String() string { return proto.CompactTextString(m) } -func (*CompiledQuery) ProtoMessage() {} -func (*CompiledQuery) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{16} } +func (m *CompiledQuery) Reset() { *m = CompiledQuery{} } +func (m *CompiledQuery) String() string { return proto.CompactTextString(m) } +func (*CompiledQuery) ProtoMessage() {} +func (*CompiledQuery) Descriptor() ([]byte, []int) { + return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{16} +} +func (m *CompiledQuery) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_CompiledQuery.Unmarshal(m, b) +} +func (m *CompiledQuery) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_CompiledQuery.Marshal(b, m, deterministic) +} +func (dst *CompiledQuery) XXX_Merge(src proto.Message) { + xxx_messageInfo_CompiledQuery.Merge(dst, src) +} +func (m *CompiledQuery) XXX_Size() int { + return xxx_messageInfo_CompiledQuery.Size(m) +} +func (m *CompiledQuery) XXX_DiscardUnknown() { + xxx_messageInfo_CompiledQuery.DiscardUnknown(m) +} + +var xxx_messageInfo_CompiledQuery proto.InternalMessageInfo const Default_CompiledQuery_Offset int32 = 0 @@ -1764,13 +2280,34 @@ type CompiledQuery_PrimaryScan struct { StartPostfixValue []string `protobuf:"bytes,22,rep,name=start_postfix_value,json=startPostfixValue" json:"start_postfix_value,omitempty"` EndPostfixValue []string `protobuf:"bytes,23,rep,name=end_postfix_value,json=endPostfixValue" json:"end_postfix_value,omitempty"` EndUnappliedLogTimestampUs *int64 `protobuf:"varint,19,opt,name=end_unapplied_log_timestamp_us,json=endUnappliedLogTimestampUs" json:"end_unapplied_log_timestamp_us,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *CompiledQuery_PrimaryScan) Reset() { *m = CompiledQuery_PrimaryScan{} } -func (m *CompiledQuery_PrimaryScan) String() string { return proto.CompactTextString(m) } -func (*CompiledQuery_PrimaryScan) ProtoMessage() {} -func (*CompiledQuery_PrimaryScan) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{16, 0} } +func (m *CompiledQuery_PrimaryScan) Reset() { *m = CompiledQuery_PrimaryScan{} } +func (m *CompiledQuery_PrimaryScan) String() string { return proto.CompactTextString(m) } +func (*CompiledQuery_PrimaryScan) ProtoMessage() {} +func (*CompiledQuery_PrimaryScan) Descriptor() ([]byte, []int) { + return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{16, 0} +} +func (m *CompiledQuery_PrimaryScan) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_CompiledQuery_PrimaryScan.Unmarshal(m, b) +} +func (m *CompiledQuery_PrimaryScan) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_CompiledQuery_PrimaryScan.Marshal(b, m, deterministic) +} +func (dst *CompiledQuery_PrimaryScan) XXX_Merge(src proto.Message) { + xxx_messageInfo_CompiledQuery_PrimaryScan.Merge(dst, src) +} +func (m *CompiledQuery_PrimaryScan) XXX_Size() int { + return xxx_messageInfo_CompiledQuery_PrimaryScan.Size(m) +} +func (m *CompiledQuery_PrimaryScan) XXX_DiscardUnknown() { + xxx_messageInfo_CompiledQuery_PrimaryScan.DiscardUnknown(m) +} + +var xxx_messageInfo_CompiledQuery_PrimaryScan proto.InternalMessageInfo func (m *CompiledQuery_PrimaryScan) GetIndexName() string { if m != nil && m.IndexName != nil { @@ -1829,16 +2366,37 @@ func (m *CompiledQuery_PrimaryScan) GetEndUnappliedLogTimestampUs() int64 { } type CompiledQuery_MergeJoinScan struct { - IndexName *string `protobuf:"bytes,8,req,name=index_name,json=indexName" json:"index_name,omitempty"` - PrefixValue []string `protobuf:"bytes,9,rep,name=prefix_value,json=prefixValue" json:"prefix_value,omitempty"` - ValuePrefix *bool `protobuf:"varint,20,opt,name=value_prefix,json=valuePrefix,def=0" json:"value_prefix,omitempty"` - XXX_unrecognized []byte `json:"-"` + IndexName *string `protobuf:"bytes,8,req,name=index_name,json=indexName" json:"index_name,omitempty"` + PrefixValue []string `protobuf:"bytes,9,rep,name=prefix_value,json=prefixValue" json:"prefix_value,omitempty"` + ValuePrefix *bool `protobuf:"varint,20,opt,name=value_prefix,json=valuePrefix,def=0" json:"value_prefix,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *CompiledQuery_MergeJoinScan) Reset() { *m = CompiledQuery_MergeJoinScan{} } -func (m *CompiledQuery_MergeJoinScan) String() string { return proto.CompactTextString(m) } -func (*CompiledQuery_MergeJoinScan) ProtoMessage() {} -func (*CompiledQuery_MergeJoinScan) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{16, 1} } +func (m *CompiledQuery_MergeJoinScan) Reset() { *m = CompiledQuery_MergeJoinScan{} } +func (m *CompiledQuery_MergeJoinScan) String() string { return proto.CompactTextString(m) } +func (*CompiledQuery_MergeJoinScan) ProtoMessage() {} +func (*CompiledQuery_MergeJoinScan) Descriptor() ([]byte, []int) { + return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{16, 1} +} +func (m *CompiledQuery_MergeJoinScan) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_CompiledQuery_MergeJoinScan.Unmarshal(m, b) +} +func (m *CompiledQuery_MergeJoinScan) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_CompiledQuery_MergeJoinScan.Marshal(b, m, deterministic) +} +func (dst *CompiledQuery_MergeJoinScan) XXX_Merge(src proto.Message) { + xxx_messageInfo_CompiledQuery_MergeJoinScan.Merge(dst, src) +} +func (m *CompiledQuery_MergeJoinScan) XXX_Size() int { + return xxx_messageInfo_CompiledQuery_MergeJoinScan.Size(m) +} +func (m *CompiledQuery_MergeJoinScan) XXX_DiscardUnknown() { + xxx_messageInfo_CompiledQuery_MergeJoinScan.DiscardUnknown(m) +} + +var xxx_messageInfo_CompiledQuery_MergeJoinScan proto.InternalMessageInfo const Default_CompiledQuery_MergeJoinScan_ValuePrefix bool = false @@ -1864,16 +2422,37 @@ func (m *CompiledQuery_MergeJoinScan) GetValuePrefix() bool { } type CompiledQuery_EntityFilter struct { - Distinct *bool `protobuf:"varint,14,opt,name=distinct,def=0" json:"distinct,omitempty"` - Kind *string `protobuf:"bytes,17,opt,name=kind" json:"kind,omitempty"` - Ancestor *Reference `protobuf:"bytes,18,opt,name=ancestor" json:"ancestor,omitempty"` - XXX_unrecognized []byte `json:"-"` + Distinct *bool `protobuf:"varint,14,opt,name=distinct,def=0" json:"distinct,omitempty"` + Kind *string `protobuf:"bytes,17,opt,name=kind" json:"kind,omitempty"` + Ancestor *Reference `protobuf:"bytes,18,opt,name=ancestor" json:"ancestor,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *CompiledQuery_EntityFilter) Reset() { *m = CompiledQuery_EntityFilter{} } -func (m *CompiledQuery_EntityFilter) String() string { return proto.CompactTextString(m) } -func (*CompiledQuery_EntityFilter) ProtoMessage() {} -func (*CompiledQuery_EntityFilter) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{16, 2} } +func (m *CompiledQuery_EntityFilter) Reset() { *m = CompiledQuery_EntityFilter{} } +func (m *CompiledQuery_EntityFilter) String() string { return proto.CompactTextString(m) } +func (*CompiledQuery_EntityFilter) ProtoMessage() {} +func (*CompiledQuery_EntityFilter) Descriptor() ([]byte, []int) { + return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{16, 2} +} +func (m *CompiledQuery_EntityFilter) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_CompiledQuery_EntityFilter.Unmarshal(m, b) +} +func (m *CompiledQuery_EntityFilter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_CompiledQuery_EntityFilter.Marshal(b, m, deterministic) +} +func (dst *CompiledQuery_EntityFilter) XXX_Merge(src proto.Message) { + xxx_messageInfo_CompiledQuery_EntityFilter.Merge(dst, src) +} +func (m *CompiledQuery_EntityFilter) XXX_Size() int { + return xxx_messageInfo_CompiledQuery_EntityFilter.Size(m) +} +func (m *CompiledQuery_EntityFilter) XXX_DiscardUnknown() { + xxx_messageInfo_CompiledQuery_EntityFilter.DiscardUnknown(m) +} + +var xxx_messageInfo_CompiledQuery_EntityFilter proto.InternalMessageInfo const Default_CompiledQuery_EntityFilter_Distinct bool = false @@ -1899,14 +2478,35 @@ func (m *CompiledQuery_EntityFilter) GetAncestor() *Reference { } type CompiledCursor struct { - Position *CompiledCursor_Position `protobuf:"group,2,opt,name=Position,json=position" json:"position,omitempty"` - XXX_unrecognized []byte `json:"-"` + Position *CompiledCursor_Position `protobuf:"group,2,opt,name=Position,json=position" json:"position,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *CompiledCursor) Reset() { *m = CompiledCursor{} } -func (m *CompiledCursor) String() string { return proto.CompactTextString(m) } -func (*CompiledCursor) ProtoMessage() {} -func (*CompiledCursor) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{17} } +func (m *CompiledCursor) Reset() { *m = CompiledCursor{} } +func (m *CompiledCursor) String() string { return proto.CompactTextString(m) } +func (*CompiledCursor) ProtoMessage() {} +func (*CompiledCursor) Descriptor() ([]byte, []int) { + return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{17} +} +func (m *CompiledCursor) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_CompiledCursor.Unmarshal(m, b) +} +func (m *CompiledCursor) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_CompiledCursor.Marshal(b, m, deterministic) +} +func (dst *CompiledCursor) XXX_Merge(src proto.Message) { + xxx_messageInfo_CompiledCursor.Merge(dst, src) +} +func (m *CompiledCursor) XXX_Size() int { + return xxx_messageInfo_CompiledCursor.Size(m) +} +func (m *CompiledCursor) XXX_DiscardUnknown() { + xxx_messageInfo_CompiledCursor.DiscardUnknown(m) +} + +var xxx_messageInfo_CompiledCursor proto.InternalMessageInfo func (m *CompiledCursor) GetPosition() *CompiledCursor_Position { if m != nil { @@ -1916,17 +2516,38 @@ func (m *CompiledCursor) GetPosition() *CompiledCursor_Position { } type CompiledCursor_Position struct { - StartKey *string `protobuf:"bytes,27,opt,name=start_key,json=startKey" json:"start_key,omitempty"` - Indexvalue []*CompiledCursor_Position_IndexValue `protobuf:"group,29,rep,name=IndexValue,json=indexvalue" json:"indexvalue,omitempty"` - Key *Reference `protobuf:"bytes,32,opt,name=key" json:"key,omitempty"` - StartInclusive *bool `protobuf:"varint,28,opt,name=start_inclusive,json=startInclusive,def=1" json:"start_inclusive,omitempty"` - XXX_unrecognized []byte `json:"-"` + StartKey *string `protobuf:"bytes,27,opt,name=start_key,json=startKey" json:"start_key,omitempty"` + Indexvalue []*CompiledCursor_Position_IndexValue `protobuf:"group,29,rep,name=IndexValue,json=indexvalue" json:"indexvalue,omitempty"` + Key *Reference `protobuf:"bytes,32,opt,name=key" json:"key,omitempty"` + StartInclusive *bool `protobuf:"varint,28,opt,name=start_inclusive,json=startInclusive,def=1" json:"start_inclusive,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *CompiledCursor_Position) Reset() { *m = CompiledCursor_Position{} } -func (m *CompiledCursor_Position) String() string { return proto.CompactTextString(m) } -func (*CompiledCursor_Position) ProtoMessage() {} -func (*CompiledCursor_Position) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{17, 0} } +func (m *CompiledCursor_Position) Reset() { *m = CompiledCursor_Position{} } +func (m *CompiledCursor_Position) String() string { return proto.CompactTextString(m) } +func (*CompiledCursor_Position) ProtoMessage() {} +func (*CompiledCursor_Position) Descriptor() ([]byte, []int) { + return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{17, 0} +} +func (m *CompiledCursor_Position) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_CompiledCursor_Position.Unmarshal(m, b) +} +func (m *CompiledCursor_Position) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_CompiledCursor_Position.Marshal(b, m, deterministic) +} +func (dst *CompiledCursor_Position) XXX_Merge(src proto.Message) { + xxx_messageInfo_CompiledCursor_Position.Merge(dst, src) +} +func (m *CompiledCursor_Position) XXX_Size() int { + return xxx_messageInfo_CompiledCursor_Position.Size(m) +} +func (m *CompiledCursor_Position) XXX_DiscardUnknown() { + xxx_messageInfo_CompiledCursor_Position.DiscardUnknown(m) +} + +var xxx_messageInfo_CompiledCursor_Position proto.InternalMessageInfo const Default_CompiledCursor_Position_StartInclusive bool = true @@ -1959,17 +2580,36 @@ func (m *CompiledCursor_Position) GetStartInclusive() bool { } type CompiledCursor_Position_IndexValue struct { - Property *string `protobuf:"bytes,30,opt,name=property" json:"property,omitempty"` - Value *PropertyValue `protobuf:"bytes,31,req,name=value" json:"value,omitempty"` - XXX_unrecognized []byte `json:"-"` + Property *string `protobuf:"bytes,30,opt,name=property" json:"property,omitempty"` + Value *PropertyValue `protobuf:"bytes,31,req,name=value" json:"value,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *CompiledCursor_Position_IndexValue) Reset() { *m = CompiledCursor_Position_IndexValue{} } func (m *CompiledCursor_Position_IndexValue) String() string { return proto.CompactTextString(m) } func (*CompiledCursor_Position_IndexValue) ProtoMessage() {} func (*CompiledCursor_Position_IndexValue) Descriptor() ([]byte, []int) { - return fileDescriptor0, []int{17, 0, 0} + return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{17, 0, 0} } +func (m *CompiledCursor_Position_IndexValue) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_CompiledCursor_Position_IndexValue.Unmarshal(m, b) +} +func (m *CompiledCursor_Position_IndexValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_CompiledCursor_Position_IndexValue.Marshal(b, m, deterministic) +} +func (dst *CompiledCursor_Position_IndexValue) XXX_Merge(src proto.Message) { + xxx_messageInfo_CompiledCursor_Position_IndexValue.Merge(dst, src) +} +func (m *CompiledCursor_Position_IndexValue) XXX_Size() int { + return xxx_messageInfo_CompiledCursor_Position_IndexValue.Size(m) +} +func (m *CompiledCursor_Position_IndexValue) XXX_DiscardUnknown() { + xxx_messageInfo_CompiledCursor_Position_IndexValue.DiscardUnknown(m) +} + +var xxx_messageInfo_CompiledCursor_Position_IndexValue proto.InternalMessageInfo func (m *CompiledCursor_Position_IndexValue) GetProperty() string { if m != nil && m.Property != nil { @@ -1986,15 +2626,36 @@ func (m *CompiledCursor_Position_IndexValue) GetValue() *PropertyValue { } type Cursor struct { - Cursor *uint64 `protobuf:"fixed64,1,req,name=cursor" json:"cursor,omitempty"` - App *string `protobuf:"bytes,2,opt,name=app" json:"app,omitempty"` - XXX_unrecognized []byte `json:"-"` + Cursor *uint64 `protobuf:"fixed64,1,req,name=cursor" json:"cursor,omitempty"` + App *string `protobuf:"bytes,2,opt,name=app" json:"app,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *Cursor) Reset() { *m = Cursor{} } -func (m *Cursor) String() string { return proto.CompactTextString(m) } -func (*Cursor) ProtoMessage() {} -func (*Cursor) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{18} } +func (m *Cursor) Reset() { *m = Cursor{} } +func (m *Cursor) String() string { return proto.CompactTextString(m) } +func (*Cursor) ProtoMessage() {} +func (*Cursor) Descriptor() ([]byte, []int) { + return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{18} +} +func (m *Cursor) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Cursor.Unmarshal(m, b) +} +func (m *Cursor) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Cursor.Marshal(b, m, deterministic) +} +func (dst *Cursor) XXX_Merge(src proto.Message) { + xxx_messageInfo_Cursor.Merge(dst, src) +} +func (m *Cursor) XXX_Size() int { + return xxx_messageInfo_Cursor.Size(m) +} +func (m *Cursor) XXX_DiscardUnknown() { + xxx_messageInfo_Cursor.DiscardUnknown(m) +} + +var xxx_messageInfo_Cursor proto.InternalMessageInfo func (m *Cursor) GetCursor() uint64 { if m != nil && m.Cursor != nil { @@ -2011,13 +2672,34 @@ func (m *Cursor) GetApp() string { } type Error struct { - XXX_unrecognized []byte `json:"-"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *Error) Reset() { *m = Error{} } -func (m *Error) String() string { return proto.CompactTextString(m) } -func (*Error) ProtoMessage() {} -func (*Error) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{19} } +func (m *Error) Reset() { *m = Error{} } +func (m *Error) String() string { return proto.CompactTextString(m) } +func (*Error) ProtoMessage() {} +func (*Error) Descriptor() ([]byte, []int) { + return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{19} +} +func (m *Error) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Error.Unmarshal(m, b) +} +func (m *Error) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Error.Marshal(b, m, deterministic) +} +func (dst *Error) XXX_Merge(src proto.Message) { + xxx_messageInfo_Error.Merge(dst, src) +} +func (m *Error) XXX_Size() int { + return xxx_messageInfo_Error.Size(m) +} +func (m *Error) XXX_DiscardUnknown() { + xxx_messageInfo_Error.DiscardUnknown(m) +} + +var xxx_messageInfo_Error proto.InternalMessageInfo type Cost struct { IndexWrites *int32 `protobuf:"varint,1,opt,name=index_writes,json=indexWrites" json:"index_writes,omitempty"` @@ -2027,13 +2709,34 @@ type Cost struct { Commitcost *Cost_CommitCost `protobuf:"group,5,opt,name=CommitCost,json=commitcost" json:"commitcost,omitempty"` ApproximateStorageDelta *int32 `protobuf:"varint,8,opt,name=approximate_storage_delta,json=approximateStorageDelta" json:"approximate_storage_delta,omitempty"` IdSequenceUpdates *int32 `protobuf:"varint,9,opt,name=id_sequence_updates,json=idSequenceUpdates" json:"id_sequence_updates,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *Cost) Reset() { *m = Cost{} } -func (m *Cost) String() string { return proto.CompactTextString(m) } -func (*Cost) ProtoMessage() {} -func (*Cost) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{20} } +func (m *Cost) Reset() { *m = Cost{} } +func (m *Cost) String() string { return proto.CompactTextString(m) } +func (*Cost) ProtoMessage() {} +func (*Cost) Descriptor() ([]byte, []int) { + return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{20} +} +func (m *Cost) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Cost.Unmarshal(m, b) +} +func (m *Cost) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Cost.Marshal(b, m, deterministic) +} +func (dst *Cost) XXX_Merge(src proto.Message) { + xxx_messageInfo_Cost.Merge(dst, src) +} +func (m *Cost) XXX_Size() int { + return xxx_messageInfo_Cost.Size(m) +} +func (m *Cost) XXX_DiscardUnknown() { + xxx_messageInfo_Cost.DiscardUnknown(m) +} + +var xxx_messageInfo_Cost proto.InternalMessageInfo func (m *Cost) GetIndexWrites() int32 { if m != nil && m.IndexWrites != nil { @@ -2085,15 +2788,36 @@ func (m *Cost) GetIdSequenceUpdates() int32 { } type Cost_CommitCost struct { - RequestedEntityPuts *int32 `protobuf:"varint,6,opt,name=requested_entity_puts,json=requestedEntityPuts" json:"requested_entity_puts,omitempty"` - RequestedEntityDeletes *int32 `protobuf:"varint,7,opt,name=requested_entity_deletes,json=requestedEntityDeletes" json:"requested_entity_deletes,omitempty"` - XXX_unrecognized []byte `json:"-"` + RequestedEntityPuts *int32 `protobuf:"varint,6,opt,name=requested_entity_puts,json=requestedEntityPuts" json:"requested_entity_puts,omitempty"` + RequestedEntityDeletes *int32 `protobuf:"varint,7,opt,name=requested_entity_deletes,json=requestedEntityDeletes" json:"requested_entity_deletes,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *Cost_CommitCost) Reset() { *m = Cost_CommitCost{} } -func (m *Cost_CommitCost) String() string { return proto.CompactTextString(m) } -func (*Cost_CommitCost) ProtoMessage() {} -func (*Cost_CommitCost) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{20, 0} } +func (m *Cost_CommitCost) Reset() { *m = Cost_CommitCost{} } +func (m *Cost_CommitCost) String() string { return proto.CompactTextString(m) } +func (*Cost_CommitCost) ProtoMessage() {} +func (*Cost_CommitCost) Descriptor() ([]byte, []int) { + return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{20, 0} +} +func (m *Cost_CommitCost) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Cost_CommitCost.Unmarshal(m, b) +} +func (m *Cost_CommitCost) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Cost_CommitCost.Marshal(b, m, deterministic) +} +func (dst *Cost_CommitCost) XXX_Merge(src proto.Message) { + xxx_messageInfo_Cost_CommitCost.Merge(dst, src) +} +func (m *Cost_CommitCost) XXX_Size() int { + return xxx_messageInfo_Cost_CommitCost.Size(m) +} +func (m *Cost_CommitCost) XXX_DiscardUnknown() { + xxx_messageInfo_Cost_CommitCost.DiscardUnknown(m) +} + +var xxx_messageInfo_Cost_CommitCost proto.InternalMessageInfo func (m *Cost_CommitCost) GetRequestedEntityPuts() int32 { if m != nil && m.RequestedEntityPuts != nil { @@ -2110,19 +2834,40 @@ func (m *Cost_CommitCost) GetRequestedEntityDeletes() int32 { } type GetRequest struct { - Header *InternalHeader `protobuf:"bytes,6,opt,name=header" json:"header,omitempty"` - Key []*Reference `protobuf:"bytes,1,rep,name=key" json:"key,omitempty"` - Transaction *Transaction `protobuf:"bytes,2,opt,name=transaction" json:"transaction,omitempty"` - FailoverMs *int64 `protobuf:"varint,3,opt,name=failover_ms,json=failoverMs" json:"failover_ms,omitempty"` - Strong *bool `protobuf:"varint,4,opt,name=strong" json:"strong,omitempty"` - AllowDeferred *bool `protobuf:"varint,5,opt,name=allow_deferred,json=allowDeferred,def=0" json:"allow_deferred,omitempty"` - XXX_unrecognized []byte `json:"-"` + Header *InternalHeader `protobuf:"bytes,6,opt,name=header" json:"header,omitempty"` + Key []*Reference `protobuf:"bytes,1,rep,name=key" json:"key,omitempty"` + Transaction *Transaction `protobuf:"bytes,2,opt,name=transaction" json:"transaction,omitempty"` + FailoverMs *int64 `protobuf:"varint,3,opt,name=failover_ms,json=failoverMs" json:"failover_ms,omitempty"` + Strong *bool `protobuf:"varint,4,opt,name=strong" json:"strong,omitempty"` + AllowDeferred *bool `protobuf:"varint,5,opt,name=allow_deferred,json=allowDeferred,def=0" json:"allow_deferred,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *GetRequest) Reset() { *m = GetRequest{} } -func (m *GetRequest) String() string { return proto.CompactTextString(m) } -func (*GetRequest) ProtoMessage() {} -func (*GetRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{21} } +func (m *GetRequest) Reset() { *m = GetRequest{} } +func (m *GetRequest) String() string { return proto.CompactTextString(m) } +func (*GetRequest) ProtoMessage() {} +func (*GetRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{21} +} +func (m *GetRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GetRequest.Unmarshal(m, b) +} +func (m *GetRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GetRequest.Marshal(b, m, deterministic) +} +func (dst *GetRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetRequest.Merge(dst, src) +} +func (m *GetRequest) XXX_Size() int { + return xxx_messageInfo_GetRequest.Size(m) +} +func (m *GetRequest) XXX_DiscardUnknown() { + xxx_messageInfo_GetRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_GetRequest proto.InternalMessageInfo const Default_GetRequest_AllowDeferred bool = false @@ -2169,16 +2914,37 @@ func (m *GetRequest) GetAllowDeferred() bool { } type GetResponse struct { - Entity []*GetResponse_Entity `protobuf:"group,1,rep,name=Entity,json=entity" json:"entity,omitempty"` - Deferred []*Reference `protobuf:"bytes,5,rep,name=deferred" json:"deferred,omitempty"` - InOrder *bool `protobuf:"varint,6,opt,name=in_order,json=inOrder,def=1" json:"in_order,omitempty"` - XXX_unrecognized []byte `json:"-"` + Entity []*GetResponse_Entity `protobuf:"group,1,rep,name=Entity,json=entity" json:"entity,omitempty"` + Deferred []*Reference `protobuf:"bytes,5,rep,name=deferred" json:"deferred,omitempty"` + InOrder *bool `protobuf:"varint,6,opt,name=in_order,json=inOrder,def=1" json:"in_order,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *GetResponse) Reset() { *m = GetResponse{} } -func (m *GetResponse) String() string { return proto.CompactTextString(m) } -func (*GetResponse) ProtoMessage() {} -func (*GetResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{22} } +func (m *GetResponse) Reset() { *m = GetResponse{} } +func (m *GetResponse) String() string { return proto.CompactTextString(m) } +func (*GetResponse) ProtoMessage() {} +func (*GetResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{22} +} +func (m *GetResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GetResponse.Unmarshal(m, b) +} +func (m *GetResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GetResponse.Marshal(b, m, deterministic) +} +func (dst *GetResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetResponse.Merge(dst, src) +} +func (m *GetResponse) XXX_Size() int { + return xxx_messageInfo_GetResponse.Size(m) +} +func (m *GetResponse) XXX_DiscardUnknown() { + xxx_messageInfo_GetResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_GetResponse proto.InternalMessageInfo const Default_GetResponse_InOrder bool = true @@ -2204,16 +2970,37 @@ func (m *GetResponse) GetInOrder() bool { } type GetResponse_Entity struct { - Entity *EntityProto `protobuf:"bytes,2,opt,name=entity" json:"entity,omitempty"` - Key *Reference `protobuf:"bytes,4,opt,name=key" json:"key,omitempty"` - Version *int64 `protobuf:"varint,3,opt,name=version" json:"version,omitempty"` - XXX_unrecognized []byte `json:"-"` + Entity *EntityProto `protobuf:"bytes,2,opt,name=entity" json:"entity,omitempty"` + Key *Reference `protobuf:"bytes,4,opt,name=key" json:"key,omitempty"` + Version *int64 `protobuf:"varint,3,opt,name=version" json:"version,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *GetResponse_Entity) Reset() { *m = GetResponse_Entity{} } -func (m *GetResponse_Entity) String() string { return proto.CompactTextString(m) } -func (*GetResponse_Entity) ProtoMessage() {} -func (*GetResponse_Entity) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{22, 0} } +func (m *GetResponse_Entity) Reset() { *m = GetResponse_Entity{} } +func (m *GetResponse_Entity) String() string { return proto.CompactTextString(m) } +func (*GetResponse_Entity) ProtoMessage() {} +func (*GetResponse_Entity) Descriptor() ([]byte, []int) { + return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{22, 0} +} +func (m *GetResponse_Entity) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GetResponse_Entity.Unmarshal(m, b) +} +func (m *GetResponse_Entity) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GetResponse_Entity.Marshal(b, m, deterministic) +} +func (dst *GetResponse_Entity) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetResponse_Entity.Merge(dst, src) +} +func (m *GetResponse_Entity) XXX_Size() int { + return xxx_messageInfo_GetResponse_Entity.Size(m) +} +func (m *GetResponse_Entity) XXX_DiscardUnknown() { + xxx_messageInfo_GetResponse_Entity.DiscardUnknown(m) +} + +var xxx_messageInfo_GetResponse_Entity proto.InternalMessageInfo func (m *GetResponse_Entity) GetEntity() *EntityProto { if m != nil { @@ -2237,22 +3024,43 @@ func (m *GetResponse_Entity) GetVersion() int64 { } type PutRequest struct { - Header *InternalHeader `protobuf:"bytes,11,opt,name=header" json:"header,omitempty"` - Entity []*EntityProto `protobuf:"bytes,1,rep,name=entity" json:"entity,omitempty"` - Transaction *Transaction `protobuf:"bytes,2,opt,name=transaction" json:"transaction,omitempty"` - CompositeIndex []*CompositeIndex `protobuf:"bytes,3,rep,name=composite_index,json=compositeIndex" json:"composite_index,omitempty"` - Trusted *bool `protobuf:"varint,4,opt,name=trusted,def=0" json:"trusted,omitempty"` - Force *bool `protobuf:"varint,7,opt,name=force,def=0" json:"force,omitempty"` - MarkChanges *bool `protobuf:"varint,8,opt,name=mark_changes,json=markChanges,def=0" json:"mark_changes,omitempty"` - Snapshot []*Snapshot `protobuf:"bytes,9,rep,name=snapshot" json:"snapshot,omitempty"` - AutoIdPolicy *PutRequest_AutoIdPolicy `protobuf:"varint,10,opt,name=auto_id_policy,json=autoIdPolicy,enum=appengine.PutRequest_AutoIdPolicy,def=0" json:"auto_id_policy,omitempty"` - XXX_unrecognized []byte `json:"-"` + Header *InternalHeader `protobuf:"bytes,11,opt,name=header" json:"header,omitempty"` + Entity []*EntityProto `protobuf:"bytes,1,rep,name=entity" json:"entity,omitempty"` + Transaction *Transaction `protobuf:"bytes,2,opt,name=transaction" json:"transaction,omitempty"` + CompositeIndex []*CompositeIndex `protobuf:"bytes,3,rep,name=composite_index,json=compositeIndex" json:"composite_index,omitempty"` + Trusted *bool `protobuf:"varint,4,opt,name=trusted,def=0" json:"trusted,omitempty"` + Force *bool `protobuf:"varint,7,opt,name=force,def=0" json:"force,omitempty"` + MarkChanges *bool `protobuf:"varint,8,opt,name=mark_changes,json=markChanges,def=0" json:"mark_changes,omitempty"` + Snapshot []*Snapshot `protobuf:"bytes,9,rep,name=snapshot" json:"snapshot,omitempty"` + AutoIdPolicy *PutRequest_AutoIdPolicy `protobuf:"varint,10,opt,name=auto_id_policy,json=autoIdPolicy,enum=appengine.PutRequest_AutoIdPolicy,def=0" json:"auto_id_policy,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *PutRequest) Reset() { *m = PutRequest{} } -func (m *PutRequest) String() string { return proto.CompactTextString(m) } -func (*PutRequest) ProtoMessage() {} -func (*PutRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{23} } +func (m *PutRequest) Reset() { *m = PutRequest{} } +func (m *PutRequest) String() string { return proto.CompactTextString(m) } +func (*PutRequest) ProtoMessage() {} +func (*PutRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{23} +} +func (m *PutRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_PutRequest.Unmarshal(m, b) +} +func (m *PutRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_PutRequest.Marshal(b, m, deterministic) +} +func (dst *PutRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_PutRequest.Merge(dst, src) +} +func (m *PutRequest) XXX_Size() int { + return xxx_messageInfo_PutRequest.Size(m) +} +func (m *PutRequest) XXX_DiscardUnknown() { + xxx_messageInfo_PutRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_PutRequest proto.InternalMessageInfo const Default_PutRequest_Trusted bool = false const Default_PutRequest_Force bool = false @@ -2323,16 +3131,37 @@ func (m *PutRequest) GetAutoIdPolicy() PutRequest_AutoIdPolicy { } type PutResponse struct { - Key []*Reference `protobuf:"bytes,1,rep,name=key" json:"key,omitempty"` - Cost *Cost `protobuf:"bytes,2,opt,name=cost" json:"cost,omitempty"` - Version []int64 `protobuf:"varint,3,rep,name=version" json:"version,omitempty"` - XXX_unrecognized []byte `json:"-"` + Key []*Reference `protobuf:"bytes,1,rep,name=key" json:"key,omitempty"` + Cost *Cost `protobuf:"bytes,2,opt,name=cost" json:"cost,omitempty"` + Version []int64 `protobuf:"varint,3,rep,name=version" json:"version,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *PutResponse) Reset() { *m = PutResponse{} } -func (m *PutResponse) String() string { return proto.CompactTextString(m) } -func (*PutResponse) ProtoMessage() {} -func (*PutResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{24} } +func (m *PutResponse) Reset() { *m = PutResponse{} } +func (m *PutResponse) String() string { return proto.CompactTextString(m) } +func (*PutResponse) ProtoMessage() {} +func (*PutResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{24} +} +func (m *PutResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_PutResponse.Unmarshal(m, b) +} +func (m *PutResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_PutResponse.Marshal(b, m, deterministic) +} +func (dst *PutResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_PutResponse.Merge(dst, src) +} +func (m *PutResponse) XXX_Size() int { + return xxx_messageInfo_PutResponse.Size(m) +} +func (m *PutResponse) XXX_DiscardUnknown() { + xxx_messageInfo_PutResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_PutResponse proto.InternalMessageInfo func (m *PutResponse) GetKey() []*Reference { if m != nil { @@ -2356,18 +3185,39 @@ func (m *PutResponse) GetVersion() []int64 { } type TouchRequest struct { - Header *InternalHeader `protobuf:"bytes,10,opt,name=header" json:"header,omitempty"` - Key []*Reference `protobuf:"bytes,1,rep,name=key" json:"key,omitempty"` - CompositeIndex []*CompositeIndex `protobuf:"bytes,2,rep,name=composite_index,json=compositeIndex" json:"composite_index,omitempty"` - Force *bool `protobuf:"varint,3,opt,name=force,def=0" json:"force,omitempty"` - Snapshot []*Snapshot `protobuf:"bytes,9,rep,name=snapshot" json:"snapshot,omitempty"` - XXX_unrecognized []byte `json:"-"` + Header *InternalHeader `protobuf:"bytes,10,opt,name=header" json:"header,omitempty"` + Key []*Reference `protobuf:"bytes,1,rep,name=key" json:"key,omitempty"` + CompositeIndex []*CompositeIndex `protobuf:"bytes,2,rep,name=composite_index,json=compositeIndex" json:"composite_index,omitempty"` + Force *bool `protobuf:"varint,3,opt,name=force,def=0" json:"force,omitempty"` + Snapshot []*Snapshot `protobuf:"bytes,9,rep,name=snapshot" json:"snapshot,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *TouchRequest) Reset() { *m = TouchRequest{} } -func (m *TouchRequest) String() string { return proto.CompactTextString(m) } -func (*TouchRequest) ProtoMessage() {} -func (*TouchRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{25} } +func (m *TouchRequest) Reset() { *m = TouchRequest{} } +func (m *TouchRequest) String() string { return proto.CompactTextString(m) } +func (*TouchRequest) ProtoMessage() {} +func (*TouchRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{25} +} +func (m *TouchRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_TouchRequest.Unmarshal(m, b) +} +func (m *TouchRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_TouchRequest.Marshal(b, m, deterministic) +} +func (dst *TouchRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_TouchRequest.Merge(dst, src) +} +func (m *TouchRequest) XXX_Size() int { + return xxx_messageInfo_TouchRequest.Size(m) +} +func (m *TouchRequest) XXX_DiscardUnknown() { + xxx_messageInfo_TouchRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_TouchRequest proto.InternalMessageInfo const Default_TouchRequest_Force bool = false @@ -2407,14 +3257,35 @@ func (m *TouchRequest) GetSnapshot() []*Snapshot { } type TouchResponse struct { - Cost *Cost `protobuf:"bytes,1,opt,name=cost" json:"cost,omitempty"` - XXX_unrecognized []byte `json:"-"` + Cost *Cost `protobuf:"bytes,1,opt,name=cost" json:"cost,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *TouchResponse) Reset() { *m = TouchResponse{} } -func (m *TouchResponse) String() string { return proto.CompactTextString(m) } -func (*TouchResponse) ProtoMessage() {} -func (*TouchResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{26} } +func (m *TouchResponse) Reset() { *m = TouchResponse{} } +func (m *TouchResponse) String() string { return proto.CompactTextString(m) } +func (*TouchResponse) ProtoMessage() {} +func (*TouchResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{26} +} +func (m *TouchResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_TouchResponse.Unmarshal(m, b) +} +func (m *TouchResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_TouchResponse.Marshal(b, m, deterministic) +} +func (dst *TouchResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_TouchResponse.Merge(dst, src) +} +func (m *TouchResponse) XXX_Size() int { + return xxx_messageInfo_TouchResponse.Size(m) +} +func (m *TouchResponse) XXX_DiscardUnknown() { + xxx_messageInfo_TouchResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_TouchResponse proto.InternalMessageInfo func (m *TouchResponse) GetCost() *Cost { if m != nil { @@ -2424,20 +3295,41 @@ func (m *TouchResponse) GetCost() *Cost { } type DeleteRequest struct { - Header *InternalHeader `protobuf:"bytes,10,opt,name=header" json:"header,omitempty"` - Key []*Reference `protobuf:"bytes,6,rep,name=key" json:"key,omitempty"` - Transaction *Transaction `protobuf:"bytes,5,opt,name=transaction" json:"transaction,omitempty"` - Trusted *bool `protobuf:"varint,4,opt,name=trusted,def=0" json:"trusted,omitempty"` - Force *bool `protobuf:"varint,7,opt,name=force,def=0" json:"force,omitempty"` - MarkChanges *bool `protobuf:"varint,8,opt,name=mark_changes,json=markChanges,def=0" json:"mark_changes,omitempty"` - Snapshot []*Snapshot `protobuf:"bytes,9,rep,name=snapshot" json:"snapshot,omitempty"` - XXX_unrecognized []byte `json:"-"` + Header *InternalHeader `protobuf:"bytes,10,opt,name=header" json:"header,omitempty"` + Key []*Reference `protobuf:"bytes,6,rep,name=key" json:"key,omitempty"` + Transaction *Transaction `protobuf:"bytes,5,opt,name=transaction" json:"transaction,omitempty"` + Trusted *bool `protobuf:"varint,4,opt,name=trusted,def=0" json:"trusted,omitempty"` + Force *bool `protobuf:"varint,7,opt,name=force,def=0" json:"force,omitempty"` + MarkChanges *bool `protobuf:"varint,8,opt,name=mark_changes,json=markChanges,def=0" json:"mark_changes,omitempty"` + Snapshot []*Snapshot `protobuf:"bytes,9,rep,name=snapshot" json:"snapshot,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *DeleteRequest) Reset() { *m = DeleteRequest{} } -func (m *DeleteRequest) String() string { return proto.CompactTextString(m) } -func (*DeleteRequest) ProtoMessage() {} -func (*DeleteRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{27} } +func (m *DeleteRequest) Reset() { *m = DeleteRequest{} } +func (m *DeleteRequest) String() string { return proto.CompactTextString(m) } +func (*DeleteRequest) ProtoMessage() {} +func (*DeleteRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{27} +} +func (m *DeleteRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_DeleteRequest.Unmarshal(m, b) +} +func (m *DeleteRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_DeleteRequest.Marshal(b, m, deterministic) +} +func (dst *DeleteRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_DeleteRequest.Merge(dst, src) +} +func (m *DeleteRequest) XXX_Size() int { + return xxx_messageInfo_DeleteRequest.Size(m) +} +func (m *DeleteRequest) XXX_DiscardUnknown() { + xxx_messageInfo_DeleteRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_DeleteRequest proto.InternalMessageInfo const Default_DeleteRequest_Trusted bool = false const Default_DeleteRequest_Force bool = false @@ -2493,15 +3385,36 @@ func (m *DeleteRequest) GetSnapshot() []*Snapshot { } type DeleteResponse struct { - Cost *Cost `protobuf:"bytes,1,opt,name=cost" json:"cost,omitempty"` - Version []int64 `protobuf:"varint,3,rep,name=version" json:"version,omitempty"` - XXX_unrecognized []byte `json:"-"` + Cost *Cost `protobuf:"bytes,1,opt,name=cost" json:"cost,omitempty"` + Version []int64 `protobuf:"varint,3,rep,name=version" json:"version,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *DeleteResponse) Reset() { *m = DeleteResponse{} } -func (m *DeleteResponse) String() string { return proto.CompactTextString(m) } -func (*DeleteResponse) ProtoMessage() {} -func (*DeleteResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{28} } +func (m *DeleteResponse) Reset() { *m = DeleteResponse{} } +func (m *DeleteResponse) String() string { return proto.CompactTextString(m) } +func (*DeleteResponse) ProtoMessage() {} +func (*DeleteResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{28} +} +func (m *DeleteResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_DeleteResponse.Unmarshal(m, b) +} +func (m *DeleteResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_DeleteResponse.Marshal(b, m, deterministic) +} +func (dst *DeleteResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_DeleteResponse.Merge(dst, src) +} +func (m *DeleteResponse) XXX_Size() int { + return xxx_messageInfo_DeleteResponse.Size(m) +} +func (m *DeleteResponse) XXX_DiscardUnknown() { + xxx_messageInfo_DeleteResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_DeleteResponse proto.InternalMessageInfo func (m *DeleteResponse) GetCost() *Cost { if m != nil { @@ -2518,18 +3431,39 @@ func (m *DeleteResponse) GetVersion() []int64 { } type NextRequest struct { - Header *InternalHeader `protobuf:"bytes,5,opt,name=header" json:"header,omitempty"` - Cursor *Cursor `protobuf:"bytes,1,req,name=cursor" json:"cursor,omitempty"` - Count *int32 `protobuf:"varint,2,opt,name=count" json:"count,omitempty"` - Offset *int32 `protobuf:"varint,4,opt,name=offset,def=0" json:"offset,omitempty"` - Compile *bool `protobuf:"varint,3,opt,name=compile,def=0" json:"compile,omitempty"` - XXX_unrecognized []byte `json:"-"` + Header *InternalHeader `protobuf:"bytes,5,opt,name=header" json:"header,omitempty"` + Cursor *Cursor `protobuf:"bytes,1,req,name=cursor" json:"cursor,omitempty"` + Count *int32 `protobuf:"varint,2,opt,name=count" json:"count,omitempty"` + Offset *int32 `protobuf:"varint,4,opt,name=offset,def=0" json:"offset,omitempty"` + Compile *bool `protobuf:"varint,3,opt,name=compile,def=0" json:"compile,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *NextRequest) Reset() { *m = NextRequest{} } -func (m *NextRequest) String() string { return proto.CompactTextString(m) } -func (*NextRequest) ProtoMessage() {} -func (*NextRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{29} } +func (m *NextRequest) Reset() { *m = NextRequest{} } +func (m *NextRequest) String() string { return proto.CompactTextString(m) } +func (*NextRequest) ProtoMessage() {} +func (*NextRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{29} +} +func (m *NextRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NextRequest.Unmarshal(m, b) +} +func (m *NextRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NextRequest.Marshal(b, m, deterministic) +} +func (dst *NextRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_NextRequest.Merge(dst, src) +} +func (m *NextRequest) XXX_Size() int { + return xxx_messageInfo_NextRequest.Size(m) +} +func (m *NextRequest) XXX_DiscardUnknown() { + xxx_messageInfo_NextRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_NextRequest proto.InternalMessageInfo const Default_NextRequest_Offset int32 = 0 const Default_NextRequest_Compile bool = false @@ -2570,24 +3504,45 @@ func (m *NextRequest) GetCompile() bool { } type QueryResult struct { - Cursor *Cursor `protobuf:"bytes,1,opt,name=cursor" json:"cursor,omitempty"` - Result []*EntityProto `protobuf:"bytes,2,rep,name=result" json:"result,omitempty"` - SkippedResults *int32 `protobuf:"varint,7,opt,name=skipped_results,json=skippedResults" json:"skipped_results,omitempty"` - MoreResults *bool `protobuf:"varint,3,req,name=more_results,json=moreResults" json:"more_results,omitempty"` - KeysOnly *bool `protobuf:"varint,4,opt,name=keys_only,json=keysOnly" json:"keys_only,omitempty"` - IndexOnly *bool `protobuf:"varint,9,opt,name=index_only,json=indexOnly" json:"index_only,omitempty"` - SmallOps *bool `protobuf:"varint,10,opt,name=small_ops,json=smallOps" json:"small_ops,omitempty"` - CompiledQuery *CompiledQuery `protobuf:"bytes,5,opt,name=compiled_query,json=compiledQuery" json:"compiled_query,omitempty"` - CompiledCursor *CompiledCursor `protobuf:"bytes,6,opt,name=compiled_cursor,json=compiledCursor" json:"compiled_cursor,omitempty"` - Index []*CompositeIndex `protobuf:"bytes,8,rep,name=index" json:"index,omitempty"` - Version []int64 `protobuf:"varint,11,rep,name=version" json:"version,omitempty"` - XXX_unrecognized []byte `json:"-"` + Cursor *Cursor `protobuf:"bytes,1,opt,name=cursor" json:"cursor,omitempty"` + Result []*EntityProto `protobuf:"bytes,2,rep,name=result" json:"result,omitempty"` + SkippedResults *int32 `protobuf:"varint,7,opt,name=skipped_results,json=skippedResults" json:"skipped_results,omitempty"` + MoreResults *bool `protobuf:"varint,3,req,name=more_results,json=moreResults" json:"more_results,omitempty"` + KeysOnly *bool `protobuf:"varint,4,opt,name=keys_only,json=keysOnly" json:"keys_only,omitempty"` + IndexOnly *bool `protobuf:"varint,9,opt,name=index_only,json=indexOnly" json:"index_only,omitempty"` + SmallOps *bool `protobuf:"varint,10,opt,name=small_ops,json=smallOps" json:"small_ops,omitempty"` + CompiledQuery *CompiledQuery `protobuf:"bytes,5,opt,name=compiled_query,json=compiledQuery" json:"compiled_query,omitempty"` + CompiledCursor *CompiledCursor `protobuf:"bytes,6,opt,name=compiled_cursor,json=compiledCursor" json:"compiled_cursor,omitempty"` + Index []*CompositeIndex `protobuf:"bytes,8,rep,name=index" json:"index,omitempty"` + Version []int64 `protobuf:"varint,11,rep,name=version" json:"version,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *QueryResult) Reset() { *m = QueryResult{} } -func (m *QueryResult) String() string { return proto.CompactTextString(m) } -func (*QueryResult) ProtoMessage() {} -func (*QueryResult) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{30} } +func (m *QueryResult) Reset() { *m = QueryResult{} } +func (m *QueryResult) String() string { return proto.CompactTextString(m) } +func (*QueryResult) ProtoMessage() {} +func (*QueryResult) Descriptor() ([]byte, []int) { + return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{30} +} +func (m *QueryResult) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_QueryResult.Unmarshal(m, b) +} +func (m *QueryResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_QueryResult.Marshal(b, m, deterministic) +} +func (dst *QueryResult) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryResult.Merge(dst, src) +} +func (m *QueryResult) XXX_Size() int { + return xxx_messageInfo_QueryResult.Size(m) +} +func (m *QueryResult) XXX_DiscardUnknown() { + xxx_messageInfo_QueryResult.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryResult proto.InternalMessageInfo func (m *QueryResult) GetCursor() *Cursor { if m != nil { @@ -2667,18 +3622,39 @@ func (m *QueryResult) GetVersion() []int64 { } type AllocateIdsRequest struct { - Header *InternalHeader `protobuf:"bytes,4,opt,name=header" json:"header,omitempty"` - ModelKey *Reference `protobuf:"bytes,1,opt,name=model_key,json=modelKey" json:"model_key,omitempty"` - Size *int64 `protobuf:"varint,2,opt,name=size" json:"size,omitempty"` - Max *int64 `protobuf:"varint,3,opt,name=max" json:"max,omitempty"` - Reserve []*Reference `protobuf:"bytes,5,rep,name=reserve" json:"reserve,omitempty"` - XXX_unrecognized []byte `json:"-"` + Header *InternalHeader `protobuf:"bytes,4,opt,name=header" json:"header,omitempty"` + ModelKey *Reference `protobuf:"bytes,1,opt,name=model_key,json=modelKey" json:"model_key,omitempty"` + Size *int64 `protobuf:"varint,2,opt,name=size" json:"size,omitempty"` + Max *int64 `protobuf:"varint,3,opt,name=max" json:"max,omitempty"` + Reserve []*Reference `protobuf:"bytes,5,rep,name=reserve" json:"reserve,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *AllocateIdsRequest) Reset() { *m = AllocateIdsRequest{} } -func (m *AllocateIdsRequest) String() string { return proto.CompactTextString(m) } -func (*AllocateIdsRequest) ProtoMessage() {} -func (*AllocateIdsRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{31} } +func (m *AllocateIdsRequest) Reset() { *m = AllocateIdsRequest{} } +func (m *AllocateIdsRequest) String() string { return proto.CompactTextString(m) } +func (*AllocateIdsRequest) ProtoMessage() {} +func (*AllocateIdsRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{31} +} +func (m *AllocateIdsRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_AllocateIdsRequest.Unmarshal(m, b) +} +func (m *AllocateIdsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_AllocateIdsRequest.Marshal(b, m, deterministic) +} +func (dst *AllocateIdsRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_AllocateIdsRequest.Merge(dst, src) +} +func (m *AllocateIdsRequest) XXX_Size() int { + return xxx_messageInfo_AllocateIdsRequest.Size(m) +} +func (m *AllocateIdsRequest) XXX_DiscardUnknown() { + xxx_messageInfo_AllocateIdsRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_AllocateIdsRequest proto.InternalMessageInfo func (m *AllocateIdsRequest) GetHeader() *InternalHeader { if m != nil { @@ -2716,16 +3692,37 @@ func (m *AllocateIdsRequest) GetReserve() []*Reference { } type AllocateIdsResponse struct { - Start *int64 `protobuf:"varint,1,req,name=start" json:"start,omitempty"` - End *int64 `protobuf:"varint,2,req,name=end" json:"end,omitempty"` - Cost *Cost `protobuf:"bytes,3,opt,name=cost" json:"cost,omitempty"` - XXX_unrecognized []byte `json:"-"` + Start *int64 `protobuf:"varint,1,req,name=start" json:"start,omitempty"` + End *int64 `protobuf:"varint,2,req,name=end" json:"end,omitempty"` + Cost *Cost `protobuf:"bytes,3,opt,name=cost" json:"cost,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *AllocateIdsResponse) Reset() { *m = AllocateIdsResponse{} } -func (m *AllocateIdsResponse) String() string { return proto.CompactTextString(m) } -func (*AllocateIdsResponse) ProtoMessage() {} -func (*AllocateIdsResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{32} } +func (m *AllocateIdsResponse) Reset() { *m = AllocateIdsResponse{} } +func (m *AllocateIdsResponse) String() string { return proto.CompactTextString(m) } +func (*AllocateIdsResponse) ProtoMessage() {} +func (*AllocateIdsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{32} +} +func (m *AllocateIdsResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_AllocateIdsResponse.Unmarshal(m, b) +} +func (m *AllocateIdsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_AllocateIdsResponse.Marshal(b, m, deterministic) +} +func (dst *AllocateIdsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_AllocateIdsResponse.Merge(dst, src) +} +func (m *AllocateIdsResponse) XXX_Size() int { + return xxx_messageInfo_AllocateIdsResponse.Size(m) +} +func (m *AllocateIdsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_AllocateIdsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_AllocateIdsResponse proto.InternalMessageInfo func (m *AllocateIdsResponse) GetStart() int64 { if m != nil && m.Start != nil { @@ -2749,14 +3746,35 @@ func (m *AllocateIdsResponse) GetCost() *Cost { } type CompositeIndices struct { - Index []*CompositeIndex `protobuf:"bytes,1,rep,name=index" json:"index,omitempty"` - XXX_unrecognized []byte `json:"-"` + Index []*CompositeIndex `protobuf:"bytes,1,rep,name=index" json:"index,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *CompositeIndices) Reset() { *m = CompositeIndices{} } -func (m *CompositeIndices) String() string { return proto.CompactTextString(m) } -func (*CompositeIndices) ProtoMessage() {} -func (*CompositeIndices) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{33} } +func (m *CompositeIndices) Reset() { *m = CompositeIndices{} } +func (m *CompositeIndices) String() string { return proto.CompactTextString(m) } +func (*CompositeIndices) ProtoMessage() {} +func (*CompositeIndices) Descriptor() ([]byte, []int) { + return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{33} +} +func (m *CompositeIndices) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_CompositeIndices.Unmarshal(m, b) +} +func (m *CompositeIndices) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_CompositeIndices.Marshal(b, m, deterministic) +} +func (dst *CompositeIndices) XXX_Merge(src proto.Message) { + xxx_messageInfo_CompositeIndices.Merge(dst, src) +} +func (m *CompositeIndices) XXX_Size() int { + return xxx_messageInfo_CompositeIndices.Size(m) +} +func (m *CompositeIndices) XXX_DiscardUnknown() { + xxx_messageInfo_CompositeIndices.DiscardUnknown(m) +} + +var xxx_messageInfo_CompositeIndices proto.InternalMessageInfo func (m *CompositeIndices) GetIndex() []*CompositeIndex { if m != nil { @@ -2766,16 +3784,37 @@ func (m *CompositeIndices) GetIndex() []*CompositeIndex { } type AddActionsRequest struct { - Header *InternalHeader `protobuf:"bytes,3,opt,name=header" json:"header,omitempty"` - Transaction *Transaction `protobuf:"bytes,1,req,name=transaction" json:"transaction,omitempty"` - Action []*Action `protobuf:"bytes,2,rep,name=action" json:"action,omitempty"` - XXX_unrecognized []byte `json:"-"` + Header *InternalHeader `protobuf:"bytes,3,opt,name=header" json:"header,omitempty"` + Transaction *Transaction `protobuf:"bytes,1,req,name=transaction" json:"transaction,omitempty"` + Action []*Action `protobuf:"bytes,2,rep,name=action" json:"action,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *AddActionsRequest) Reset() { *m = AddActionsRequest{} } -func (m *AddActionsRequest) String() string { return proto.CompactTextString(m) } -func (*AddActionsRequest) ProtoMessage() {} -func (*AddActionsRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{34} } +func (m *AddActionsRequest) Reset() { *m = AddActionsRequest{} } +func (m *AddActionsRequest) String() string { return proto.CompactTextString(m) } +func (*AddActionsRequest) ProtoMessage() {} +func (*AddActionsRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{34} +} +func (m *AddActionsRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_AddActionsRequest.Unmarshal(m, b) +} +func (m *AddActionsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_AddActionsRequest.Marshal(b, m, deterministic) +} +func (dst *AddActionsRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_AddActionsRequest.Merge(dst, src) +} +func (m *AddActionsRequest) XXX_Size() int { + return xxx_messageInfo_AddActionsRequest.Size(m) +} +func (m *AddActionsRequest) XXX_DiscardUnknown() { + xxx_messageInfo_AddActionsRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_AddActionsRequest proto.InternalMessageInfo func (m *AddActionsRequest) GetHeader() *InternalHeader { if m != nil { @@ -2799,28 +3838,70 @@ func (m *AddActionsRequest) GetAction() []*Action { } type AddActionsResponse struct { - XXX_unrecognized []byte `json:"-"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *AddActionsResponse) Reset() { *m = AddActionsResponse{} } -func (m *AddActionsResponse) String() string { return proto.CompactTextString(m) } -func (*AddActionsResponse) ProtoMessage() {} -func (*AddActionsResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{35} } +func (m *AddActionsResponse) Reset() { *m = AddActionsResponse{} } +func (m *AddActionsResponse) String() string { return proto.CompactTextString(m) } +func (*AddActionsResponse) ProtoMessage() {} +func (*AddActionsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{35} +} +func (m *AddActionsResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_AddActionsResponse.Unmarshal(m, b) +} +func (m *AddActionsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_AddActionsResponse.Marshal(b, m, deterministic) +} +func (dst *AddActionsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_AddActionsResponse.Merge(dst, src) +} +func (m *AddActionsResponse) XXX_Size() int { + return xxx_messageInfo_AddActionsResponse.Size(m) +} +func (m *AddActionsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_AddActionsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_AddActionsResponse proto.InternalMessageInfo type BeginTransactionRequest struct { - Header *InternalHeader `protobuf:"bytes,3,opt,name=header" json:"header,omitempty"` - App *string `protobuf:"bytes,1,req,name=app" json:"app,omitempty"` - AllowMultipleEg *bool `protobuf:"varint,2,opt,name=allow_multiple_eg,json=allowMultipleEg,def=0" json:"allow_multiple_eg,omitempty"` - DatabaseId *string `protobuf:"bytes,4,opt,name=database_id,json=databaseId" json:"database_id,omitempty"` - Mode *BeginTransactionRequest_TransactionMode `protobuf:"varint,5,opt,name=mode,enum=appengine.BeginTransactionRequest_TransactionMode,def=0" json:"mode,omitempty"` - PreviousTransaction *Transaction `protobuf:"bytes,7,opt,name=previous_transaction,json=previousTransaction" json:"previous_transaction,omitempty"` - XXX_unrecognized []byte `json:"-"` + Header *InternalHeader `protobuf:"bytes,3,opt,name=header" json:"header,omitempty"` + App *string `protobuf:"bytes,1,req,name=app" json:"app,omitempty"` + AllowMultipleEg *bool `protobuf:"varint,2,opt,name=allow_multiple_eg,json=allowMultipleEg,def=0" json:"allow_multiple_eg,omitempty"` + DatabaseId *string `protobuf:"bytes,4,opt,name=database_id,json=databaseId" json:"database_id,omitempty"` + Mode *BeginTransactionRequest_TransactionMode `protobuf:"varint,5,opt,name=mode,enum=appengine.BeginTransactionRequest_TransactionMode,def=0" json:"mode,omitempty"` + PreviousTransaction *Transaction `protobuf:"bytes,7,opt,name=previous_transaction,json=previousTransaction" json:"previous_transaction,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *BeginTransactionRequest) Reset() { *m = BeginTransactionRequest{} } -func (m *BeginTransactionRequest) String() string { return proto.CompactTextString(m) } -func (*BeginTransactionRequest) ProtoMessage() {} -func (*BeginTransactionRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{36} } +func (m *BeginTransactionRequest) Reset() { *m = BeginTransactionRequest{} } +func (m *BeginTransactionRequest) String() string { return proto.CompactTextString(m) } +func (*BeginTransactionRequest) ProtoMessage() {} +func (*BeginTransactionRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{36} +} +func (m *BeginTransactionRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_BeginTransactionRequest.Unmarshal(m, b) +} +func (m *BeginTransactionRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_BeginTransactionRequest.Marshal(b, m, deterministic) +} +func (dst *BeginTransactionRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_BeginTransactionRequest.Merge(dst, src) +} +func (m *BeginTransactionRequest) XXX_Size() int { + return xxx_messageInfo_BeginTransactionRequest.Size(m) +} +func (m *BeginTransactionRequest) XXX_DiscardUnknown() { + xxx_messageInfo_BeginTransactionRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_BeginTransactionRequest proto.InternalMessageInfo const Default_BeginTransactionRequest_AllowMultipleEg bool = false const Default_BeginTransactionRequest_Mode BeginTransactionRequest_TransactionMode = BeginTransactionRequest_UNKNOWN @@ -2868,15 +3949,36 @@ func (m *BeginTransactionRequest) GetPreviousTransaction() *Transaction { } type CommitResponse struct { - Cost *Cost `protobuf:"bytes,1,opt,name=cost" json:"cost,omitempty"` - Version []*CommitResponse_Version `protobuf:"group,3,rep,name=Version,json=version" json:"version,omitempty"` - XXX_unrecognized []byte `json:"-"` + Cost *Cost `protobuf:"bytes,1,opt,name=cost" json:"cost,omitempty"` + Version []*CommitResponse_Version `protobuf:"group,3,rep,name=Version,json=version" json:"version,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *CommitResponse) Reset() { *m = CommitResponse{} } -func (m *CommitResponse) String() string { return proto.CompactTextString(m) } -func (*CommitResponse) ProtoMessage() {} -func (*CommitResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{37} } +func (m *CommitResponse) Reset() { *m = CommitResponse{} } +func (m *CommitResponse) String() string { return proto.CompactTextString(m) } +func (*CommitResponse) ProtoMessage() {} +func (*CommitResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{37} +} +func (m *CommitResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_CommitResponse.Unmarshal(m, b) +} +func (m *CommitResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_CommitResponse.Marshal(b, m, deterministic) +} +func (dst *CommitResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_CommitResponse.Merge(dst, src) +} +func (m *CommitResponse) XXX_Size() int { + return xxx_messageInfo_CommitResponse.Size(m) +} +func (m *CommitResponse) XXX_DiscardUnknown() { + xxx_messageInfo_CommitResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_CommitResponse proto.InternalMessageInfo func (m *CommitResponse) GetCost() *Cost { if m != nil { @@ -2893,15 +3995,36 @@ func (m *CommitResponse) GetVersion() []*CommitResponse_Version { } type CommitResponse_Version struct { - RootEntityKey *Reference `protobuf:"bytes,4,req,name=root_entity_key,json=rootEntityKey" json:"root_entity_key,omitempty"` - Version *int64 `protobuf:"varint,5,req,name=version" json:"version,omitempty"` - XXX_unrecognized []byte `json:"-"` + RootEntityKey *Reference `protobuf:"bytes,4,req,name=root_entity_key,json=rootEntityKey" json:"root_entity_key,omitempty"` + Version *int64 `protobuf:"varint,5,req,name=version" json:"version,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *CommitResponse_Version) Reset() { *m = CommitResponse_Version{} } -func (m *CommitResponse_Version) String() string { return proto.CompactTextString(m) } -func (*CommitResponse_Version) ProtoMessage() {} -func (*CommitResponse_Version) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{37, 0} } +func (m *CommitResponse_Version) Reset() { *m = CommitResponse_Version{} } +func (m *CommitResponse_Version) String() string { return proto.CompactTextString(m) } +func (*CommitResponse_Version) ProtoMessage() {} +func (*CommitResponse_Version) Descriptor() ([]byte, []int) { + return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{37, 0} +} +func (m *CommitResponse_Version) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_CommitResponse_Version.Unmarshal(m, b) +} +func (m *CommitResponse_Version) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_CommitResponse_Version.Marshal(b, m, deterministic) +} +func (dst *CommitResponse_Version) XXX_Merge(src proto.Message) { + xxx_messageInfo_CommitResponse_Version.Merge(dst, src) +} +func (m *CommitResponse_Version) XXX_Size() int { + return xxx_messageInfo_CommitResponse_Version.Size(m) +} +func (m *CommitResponse_Version) XXX_DiscardUnknown() { + xxx_messageInfo_CommitResponse_Version.DiscardUnknown(m) +} + +var xxx_messageInfo_CommitResponse_Version proto.InternalMessageInfo func (m *CommitResponse_Version) GetRootEntityKey() *Reference { if m != nil { @@ -2976,10 +4099,10 @@ func init() { } func init() { - proto.RegisterFile("google.golang.org/appengine/internal/datastore/datastore_v3.proto", fileDescriptor0) + proto.RegisterFile("google.golang.org/appengine/internal/datastore/datastore_v3.proto", fileDescriptor_datastore_v3_83b17b80c34f6179) } -var fileDescriptor0 = []byte{ +var fileDescriptor_datastore_v3_83b17b80c34f6179 = []byte{ // 4156 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x5a, 0xcd, 0x73, 0xe3, 0x46, 0x76, 0x37, 0xc1, 0xef, 0x47, 0x89, 0x82, 0x5a, 0xf3, 0xc1, 0xa1, 0x3f, 0x46, 0xc6, 0xac, 0x6d, diff --git a/vendor/google.golang.org/appengine/internal/identity_vm.go b/vendor/google.golang.org/appengine/internal/identity_vm.go index d5fa75be..5d806726 100644 --- a/vendor/google.golang.org/appengine/internal/identity_vm.go +++ b/vendor/google.golang.org/appengine/internal/identity_vm.go @@ -7,8 +7,10 @@ package internal import ( + "log" "net/http" "os" + "strings" netcontext "golang.org/x/net/context" ) @@ -39,7 +41,21 @@ func RequestID(ctx netcontext.Context) string { } func Datacenter(ctx netcontext.Context) string { - return ctxHeaders(ctx).Get(hDatacenter) + if dc := ctxHeaders(ctx).Get(hDatacenter); dc != "" { + return dc + } + // If the header isn't set, read zone from the metadata service. + // It has the format projects/[NUMERIC_PROJECT_ID]/zones/[ZONE] + zone, err := getMetadata("instance/zone") + if err != nil { + log.Printf("Datacenter: %v", err) + return "" + } + parts := strings.Split(string(zone), "/") + if len(parts) == 0 { + return "" + } + return parts[len(parts)-1] } func ServerSoftware() string { @@ -47,6 +63,9 @@ func ServerSoftware() string { if s := os.Getenv("SERVER_SOFTWARE"); s != "" { return s } + if s := os.Getenv("GAE_ENV"); s != "" { + return s + } return "Google App Engine/1.x.x" } @@ -56,6 +75,9 @@ func ModuleName(_ netcontext.Context) string { if s := os.Getenv("GAE_MODULE_NAME"); s != "" { return s } + if s := os.Getenv("GAE_SERVICE"); s != "" { + return s + } return string(mustGetMetadata("instance/attributes/gae_backend_name")) } @@ -63,6 +85,9 @@ func VersionID(_ netcontext.Context) string { if s1, s2 := os.Getenv("GAE_MODULE_VERSION"), os.Getenv("GAE_MINOR_VERSION"); s1 != "" && s2 != "" { return s1 + "." + s2 } + if s1, s2 := os.Getenv("GAE_VERSION"), os.Getenv("GAE_DEPLOYMENT_ID"); s1 != "" && s2 != "" { + return s1 + "." + s2 + } return string(mustGetMetadata("instance/attributes/gae_backend_version")) + "." + string(mustGetMetadata("instance/attributes/gae_backend_minor_version")) } @@ -70,19 +95,27 @@ func InstanceID() string { if s := os.Getenv("GAE_MODULE_INSTANCE"); s != "" { return s } + if s := os.Getenv("GAE_INSTANCE"); s != "" { + return s + } return string(mustGetMetadata("instance/attributes/gae_backend_instance")) } func partitionlessAppID() string { // gae_project has everything except the partition prefix. - appID := os.Getenv("GAE_LONG_APP_ID") - if appID == "" { - appID = string(mustGetMetadata("instance/attributes/gae_project")) + if appID := os.Getenv("GAE_LONG_APP_ID"); appID != "" { + return appID } - return appID + if project := os.Getenv("GOOGLE_CLOUD_PROJECT"); project != "" { + return project + } + return string(mustGetMetadata("instance/attributes/gae_project")) } func fullyQualifiedAppID(_ netcontext.Context) string { + if s := os.Getenv("GAE_APPLICATION"); s != "" { + return s + } appID := partitionlessAppID() part := os.Getenv("GAE_PARTITION") diff --git a/vendor/google.golang.org/appengine/internal/log/log_service.pb.go b/vendor/google.golang.org/appengine/internal/log/log_service.pb.go index 5549605a..8545ac4a 100644 --- a/vendor/google.golang.org/appengine/internal/log/log_service.pb.go +++ b/vendor/google.golang.org/appengine/internal/log/log_service.pb.go @@ -1,28 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // source: google.golang.org/appengine/internal/log/log_service.proto -/* -Package log is a generated protocol buffer package. - -It is generated from these files: - google.golang.org/appengine/internal/log/log_service.proto - -It has these top-level messages: - LogServiceError - UserAppLogLine - UserAppLogGroup - FlushRequest - SetStatusRequest - LogOffset - LogLine - RequestLog - LogModuleVersion - LogReadRequest - LogReadResponse - LogUsageRecord - LogUsageRequest - LogUsageResponse -*/ package log import proto "github.com/golang/protobuf/proto" @@ -75,28 +53,72 @@ func (x *LogServiceError_ErrorCode) UnmarshalJSON(data []byte) error { *x = LogServiceError_ErrorCode(value) return nil } -func (LogServiceError_ErrorCode) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{0, 0} } +func (LogServiceError_ErrorCode) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_log_service_f054fd4b5012319d, []int{0, 0} +} type LogServiceError struct { - XXX_unrecognized []byte `json:"-"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *LogServiceError) Reset() { *m = LogServiceError{} } -func (m *LogServiceError) String() string { return proto.CompactTextString(m) } -func (*LogServiceError) ProtoMessage() {} -func (*LogServiceError) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} } +func (m *LogServiceError) Reset() { *m = LogServiceError{} } +func (m *LogServiceError) String() string { return proto.CompactTextString(m) } +func (*LogServiceError) ProtoMessage() {} +func (*LogServiceError) Descriptor() ([]byte, []int) { + return fileDescriptor_log_service_f054fd4b5012319d, []int{0} +} +func (m *LogServiceError) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_LogServiceError.Unmarshal(m, b) +} +func (m *LogServiceError) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_LogServiceError.Marshal(b, m, deterministic) +} +func (dst *LogServiceError) XXX_Merge(src proto.Message) { + xxx_messageInfo_LogServiceError.Merge(dst, src) +} +func (m *LogServiceError) XXX_Size() int { + return xxx_messageInfo_LogServiceError.Size(m) +} +func (m *LogServiceError) XXX_DiscardUnknown() { + xxx_messageInfo_LogServiceError.DiscardUnknown(m) +} + +var xxx_messageInfo_LogServiceError proto.InternalMessageInfo type UserAppLogLine struct { - TimestampUsec *int64 `protobuf:"varint,1,req,name=timestamp_usec,json=timestampUsec" json:"timestamp_usec,omitempty"` - Level *int64 `protobuf:"varint,2,req,name=level" json:"level,omitempty"` - Message *string `protobuf:"bytes,3,req,name=message" json:"message,omitempty"` - XXX_unrecognized []byte `json:"-"` + TimestampUsec *int64 `protobuf:"varint,1,req,name=timestamp_usec,json=timestampUsec" json:"timestamp_usec,omitempty"` + Level *int64 `protobuf:"varint,2,req,name=level" json:"level,omitempty"` + Message *string `protobuf:"bytes,3,req,name=message" json:"message,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *UserAppLogLine) Reset() { *m = UserAppLogLine{} } -func (m *UserAppLogLine) String() string { return proto.CompactTextString(m) } -func (*UserAppLogLine) ProtoMessage() {} -func (*UserAppLogLine) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} } +func (m *UserAppLogLine) Reset() { *m = UserAppLogLine{} } +func (m *UserAppLogLine) String() string { return proto.CompactTextString(m) } +func (*UserAppLogLine) ProtoMessage() {} +func (*UserAppLogLine) Descriptor() ([]byte, []int) { + return fileDescriptor_log_service_f054fd4b5012319d, []int{1} +} +func (m *UserAppLogLine) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_UserAppLogLine.Unmarshal(m, b) +} +func (m *UserAppLogLine) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_UserAppLogLine.Marshal(b, m, deterministic) +} +func (dst *UserAppLogLine) XXX_Merge(src proto.Message) { + xxx_messageInfo_UserAppLogLine.Merge(dst, src) +} +func (m *UserAppLogLine) XXX_Size() int { + return xxx_messageInfo_UserAppLogLine.Size(m) +} +func (m *UserAppLogLine) XXX_DiscardUnknown() { + xxx_messageInfo_UserAppLogLine.DiscardUnknown(m) +} + +var xxx_messageInfo_UserAppLogLine proto.InternalMessageInfo func (m *UserAppLogLine) GetTimestampUsec() int64 { if m != nil && m.TimestampUsec != nil { @@ -120,14 +142,35 @@ func (m *UserAppLogLine) GetMessage() string { } type UserAppLogGroup struct { - LogLine []*UserAppLogLine `protobuf:"bytes,2,rep,name=log_line,json=logLine" json:"log_line,omitempty"` - XXX_unrecognized []byte `json:"-"` + LogLine []*UserAppLogLine `protobuf:"bytes,2,rep,name=log_line,json=logLine" json:"log_line,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *UserAppLogGroup) Reset() { *m = UserAppLogGroup{} } -func (m *UserAppLogGroup) String() string { return proto.CompactTextString(m) } -func (*UserAppLogGroup) ProtoMessage() {} -func (*UserAppLogGroup) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} } +func (m *UserAppLogGroup) Reset() { *m = UserAppLogGroup{} } +func (m *UserAppLogGroup) String() string { return proto.CompactTextString(m) } +func (*UserAppLogGroup) ProtoMessage() {} +func (*UserAppLogGroup) Descriptor() ([]byte, []int) { + return fileDescriptor_log_service_f054fd4b5012319d, []int{2} +} +func (m *UserAppLogGroup) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_UserAppLogGroup.Unmarshal(m, b) +} +func (m *UserAppLogGroup) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_UserAppLogGroup.Marshal(b, m, deterministic) +} +func (dst *UserAppLogGroup) XXX_Merge(src proto.Message) { + xxx_messageInfo_UserAppLogGroup.Merge(dst, src) +} +func (m *UserAppLogGroup) XXX_Size() int { + return xxx_messageInfo_UserAppLogGroup.Size(m) +} +func (m *UserAppLogGroup) XXX_DiscardUnknown() { + xxx_messageInfo_UserAppLogGroup.DiscardUnknown(m) +} + +var xxx_messageInfo_UserAppLogGroup proto.InternalMessageInfo func (m *UserAppLogGroup) GetLogLine() []*UserAppLogLine { if m != nil { @@ -137,14 +180,35 @@ func (m *UserAppLogGroup) GetLogLine() []*UserAppLogLine { } type FlushRequest struct { - Logs []byte `protobuf:"bytes,1,opt,name=logs" json:"logs,omitempty"` - XXX_unrecognized []byte `json:"-"` + Logs []byte `protobuf:"bytes,1,opt,name=logs" json:"logs,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *FlushRequest) Reset() { *m = FlushRequest{} } -func (m *FlushRequest) String() string { return proto.CompactTextString(m) } -func (*FlushRequest) ProtoMessage() {} -func (*FlushRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} } +func (m *FlushRequest) Reset() { *m = FlushRequest{} } +func (m *FlushRequest) String() string { return proto.CompactTextString(m) } +func (*FlushRequest) ProtoMessage() {} +func (*FlushRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_log_service_f054fd4b5012319d, []int{3} +} +func (m *FlushRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_FlushRequest.Unmarshal(m, b) +} +func (m *FlushRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_FlushRequest.Marshal(b, m, deterministic) +} +func (dst *FlushRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_FlushRequest.Merge(dst, src) +} +func (m *FlushRequest) XXX_Size() int { + return xxx_messageInfo_FlushRequest.Size(m) +} +func (m *FlushRequest) XXX_DiscardUnknown() { + xxx_messageInfo_FlushRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_FlushRequest proto.InternalMessageInfo func (m *FlushRequest) GetLogs() []byte { if m != nil { @@ -154,14 +218,35 @@ func (m *FlushRequest) GetLogs() []byte { } type SetStatusRequest struct { - Status *string `protobuf:"bytes,1,req,name=status" json:"status,omitempty"` - XXX_unrecognized []byte `json:"-"` + Status *string `protobuf:"bytes,1,req,name=status" json:"status,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *SetStatusRequest) Reset() { *m = SetStatusRequest{} } -func (m *SetStatusRequest) String() string { return proto.CompactTextString(m) } -func (*SetStatusRequest) ProtoMessage() {} -func (*SetStatusRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{4} } +func (m *SetStatusRequest) Reset() { *m = SetStatusRequest{} } +func (m *SetStatusRequest) String() string { return proto.CompactTextString(m) } +func (*SetStatusRequest) ProtoMessage() {} +func (*SetStatusRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_log_service_f054fd4b5012319d, []int{4} +} +func (m *SetStatusRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_SetStatusRequest.Unmarshal(m, b) +} +func (m *SetStatusRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_SetStatusRequest.Marshal(b, m, deterministic) +} +func (dst *SetStatusRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_SetStatusRequest.Merge(dst, src) +} +func (m *SetStatusRequest) XXX_Size() int { + return xxx_messageInfo_SetStatusRequest.Size(m) +} +func (m *SetStatusRequest) XXX_DiscardUnknown() { + xxx_messageInfo_SetStatusRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_SetStatusRequest proto.InternalMessageInfo func (m *SetStatusRequest) GetStatus() string { if m != nil && m.Status != nil { @@ -171,14 +256,35 @@ func (m *SetStatusRequest) GetStatus() string { } type LogOffset struct { - RequestId []byte `protobuf:"bytes,1,opt,name=request_id,json=requestId" json:"request_id,omitempty"` - XXX_unrecognized []byte `json:"-"` + RequestId []byte `protobuf:"bytes,1,opt,name=request_id,json=requestId" json:"request_id,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *LogOffset) Reset() { *m = LogOffset{} } -func (m *LogOffset) String() string { return proto.CompactTextString(m) } -func (*LogOffset) ProtoMessage() {} -func (*LogOffset) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{5} } +func (m *LogOffset) Reset() { *m = LogOffset{} } +func (m *LogOffset) String() string { return proto.CompactTextString(m) } +func (*LogOffset) ProtoMessage() {} +func (*LogOffset) Descriptor() ([]byte, []int) { + return fileDescriptor_log_service_f054fd4b5012319d, []int{5} +} +func (m *LogOffset) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_LogOffset.Unmarshal(m, b) +} +func (m *LogOffset) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_LogOffset.Marshal(b, m, deterministic) +} +func (dst *LogOffset) XXX_Merge(src proto.Message) { + xxx_messageInfo_LogOffset.Merge(dst, src) +} +func (m *LogOffset) XXX_Size() int { + return xxx_messageInfo_LogOffset.Size(m) +} +func (m *LogOffset) XXX_DiscardUnknown() { + xxx_messageInfo_LogOffset.DiscardUnknown(m) +} + +var xxx_messageInfo_LogOffset proto.InternalMessageInfo func (m *LogOffset) GetRequestId() []byte { if m != nil { @@ -188,16 +294,37 @@ func (m *LogOffset) GetRequestId() []byte { } type LogLine struct { - Time *int64 `protobuf:"varint,1,req,name=time" json:"time,omitempty"` - Level *int32 `protobuf:"varint,2,req,name=level" json:"level,omitempty"` - LogMessage *string `protobuf:"bytes,3,req,name=log_message,json=logMessage" json:"log_message,omitempty"` - XXX_unrecognized []byte `json:"-"` + Time *int64 `protobuf:"varint,1,req,name=time" json:"time,omitempty"` + Level *int32 `protobuf:"varint,2,req,name=level" json:"level,omitempty"` + LogMessage *string `protobuf:"bytes,3,req,name=log_message,json=logMessage" json:"log_message,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *LogLine) Reset() { *m = LogLine{} } -func (m *LogLine) String() string { return proto.CompactTextString(m) } -func (*LogLine) ProtoMessage() {} -func (*LogLine) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{6} } +func (m *LogLine) Reset() { *m = LogLine{} } +func (m *LogLine) String() string { return proto.CompactTextString(m) } +func (*LogLine) ProtoMessage() {} +func (*LogLine) Descriptor() ([]byte, []int) { + return fileDescriptor_log_service_f054fd4b5012319d, []int{6} +} +func (m *LogLine) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_LogLine.Unmarshal(m, b) +} +func (m *LogLine) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_LogLine.Marshal(b, m, deterministic) +} +func (dst *LogLine) XXX_Merge(src proto.Message) { + xxx_messageInfo_LogLine.Merge(dst, src) +} +func (m *LogLine) XXX_Size() int { + return xxx_messageInfo_LogLine.Size(m) +} +func (m *LogLine) XXX_DiscardUnknown() { + xxx_messageInfo_LogLine.DiscardUnknown(m) +} + +var xxx_messageInfo_LogLine proto.InternalMessageInfo func (m *LogLine) GetTime() int64 { if m != nil && m.Time != nil { @@ -259,13 +386,34 @@ type RequestLog struct { WasThrottledForRequests *bool `protobuf:"varint,32,opt,name=was_throttled_for_requests,json=wasThrottledForRequests" json:"was_throttled_for_requests,omitempty"` ThrottledTime *int64 `protobuf:"varint,33,opt,name=throttled_time,json=throttledTime" json:"throttled_time,omitempty"` ServerName []byte `protobuf:"bytes,34,opt,name=server_name,json=serverName" json:"server_name,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *RequestLog) Reset() { *m = RequestLog{} } -func (m *RequestLog) String() string { return proto.CompactTextString(m) } -func (*RequestLog) ProtoMessage() {} -func (*RequestLog) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{7} } +func (m *RequestLog) Reset() { *m = RequestLog{} } +func (m *RequestLog) String() string { return proto.CompactTextString(m) } +func (*RequestLog) ProtoMessage() {} +func (*RequestLog) Descriptor() ([]byte, []int) { + return fileDescriptor_log_service_f054fd4b5012319d, []int{7} +} +func (m *RequestLog) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_RequestLog.Unmarshal(m, b) +} +func (m *RequestLog) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_RequestLog.Marshal(b, m, deterministic) +} +func (dst *RequestLog) XXX_Merge(src proto.Message) { + xxx_messageInfo_RequestLog.Merge(dst, src) +} +func (m *RequestLog) XXX_Size() int { + return xxx_messageInfo_RequestLog.Size(m) +} +func (m *RequestLog) XXX_DiscardUnknown() { + xxx_messageInfo_RequestLog.DiscardUnknown(m) +} + +var xxx_messageInfo_RequestLog proto.InternalMessageInfo const Default_RequestLog_ModuleId string = "default" const Default_RequestLog_ReplicaIndex int32 = -1 @@ -538,15 +686,36 @@ func (m *RequestLog) GetServerName() []byte { } type LogModuleVersion struct { - ModuleId *string `protobuf:"bytes,1,opt,name=module_id,json=moduleId,def=default" json:"module_id,omitempty"` - VersionId *string `protobuf:"bytes,2,opt,name=version_id,json=versionId" json:"version_id,omitempty"` - XXX_unrecognized []byte `json:"-"` + ModuleId *string `protobuf:"bytes,1,opt,name=module_id,json=moduleId,def=default" json:"module_id,omitempty"` + VersionId *string `protobuf:"bytes,2,opt,name=version_id,json=versionId" json:"version_id,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *LogModuleVersion) Reset() { *m = LogModuleVersion{} } -func (m *LogModuleVersion) String() string { return proto.CompactTextString(m) } -func (*LogModuleVersion) ProtoMessage() {} -func (*LogModuleVersion) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{8} } +func (m *LogModuleVersion) Reset() { *m = LogModuleVersion{} } +func (m *LogModuleVersion) String() string { return proto.CompactTextString(m) } +func (*LogModuleVersion) ProtoMessage() {} +func (*LogModuleVersion) Descriptor() ([]byte, []int) { + return fileDescriptor_log_service_f054fd4b5012319d, []int{8} +} +func (m *LogModuleVersion) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_LogModuleVersion.Unmarshal(m, b) +} +func (m *LogModuleVersion) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_LogModuleVersion.Marshal(b, m, deterministic) +} +func (dst *LogModuleVersion) XXX_Merge(src proto.Message) { + xxx_messageInfo_LogModuleVersion.Merge(dst, src) +} +func (m *LogModuleVersion) XXX_Size() int { + return xxx_messageInfo_LogModuleVersion.Size(m) +} +func (m *LogModuleVersion) XXX_DiscardUnknown() { + xxx_messageInfo_LogModuleVersion.DiscardUnknown(m) +} + +var xxx_messageInfo_LogModuleVersion proto.InternalMessageInfo const Default_LogModuleVersion_ModuleId string = "default" @@ -565,32 +734,53 @@ func (m *LogModuleVersion) GetVersionId() string { } type LogReadRequest struct { - AppId *string `protobuf:"bytes,1,req,name=app_id,json=appId" json:"app_id,omitempty"` - VersionId []string `protobuf:"bytes,2,rep,name=version_id,json=versionId" json:"version_id,omitempty"` - ModuleVersion []*LogModuleVersion `protobuf:"bytes,19,rep,name=module_version,json=moduleVersion" json:"module_version,omitempty"` - StartTime *int64 `protobuf:"varint,3,opt,name=start_time,json=startTime" json:"start_time,omitempty"` - EndTime *int64 `protobuf:"varint,4,opt,name=end_time,json=endTime" json:"end_time,omitempty"` - Offset *LogOffset `protobuf:"bytes,5,opt,name=offset" json:"offset,omitempty"` - RequestId [][]byte `protobuf:"bytes,6,rep,name=request_id,json=requestId" json:"request_id,omitempty"` - MinimumLogLevel *int32 `protobuf:"varint,7,opt,name=minimum_log_level,json=minimumLogLevel" json:"minimum_log_level,omitempty"` - IncludeIncomplete *bool `protobuf:"varint,8,opt,name=include_incomplete,json=includeIncomplete" json:"include_incomplete,omitempty"` - Count *int64 `protobuf:"varint,9,opt,name=count" json:"count,omitempty"` - CombinedLogRegex *string `protobuf:"bytes,14,opt,name=combined_log_regex,json=combinedLogRegex" json:"combined_log_regex,omitempty"` - HostRegex *string `protobuf:"bytes,15,opt,name=host_regex,json=hostRegex" json:"host_regex,omitempty"` - ReplicaIndex *int32 `protobuf:"varint,16,opt,name=replica_index,json=replicaIndex" json:"replica_index,omitempty"` - IncludeAppLogs *bool `protobuf:"varint,10,opt,name=include_app_logs,json=includeAppLogs" json:"include_app_logs,omitempty"` - AppLogsPerRequest *int32 `protobuf:"varint,17,opt,name=app_logs_per_request,json=appLogsPerRequest" json:"app_logs_per_request,omitempty"` - IncludeHost *bool `protobuf:"varint,11,opt,name=include_host,json=includeHost" json:"include_host,omitempty"` - IncludeAll *bool `protobuf:"varint,12,opt,name=include_all,json=includeAll" json:"include_all,omitempty"` - CacheIterator *bool `protobuf:"varint,13,opt,name=cache_iterator,json=cacheIterator" json:"cache_iterator,omitempty"` - NumShards *int32 `protobuf:"varint,18,opt,name=num_shards,json=numShards" json:"num_shards,omitempty"` - XXX_unrecognized []byte `json:"-"` + AppId *string `protobuf:"bytes,1,req,name=app_id,json=appId" json:"app_id,omitempty"` + VersionId []string `protobuf:"bytes,2,rep,name=version_id,json=versionId" json:"version_id,omitempty"` + ModuleVersion []*LogModuleVersion `protobuf:"bytes,19,rep,name=module_version,json=moduleVersion" json:"module_version,omitempty"` + StartTime *int64 `protobuf:"varint,3,opt,name=start_time,json=startTime" json:"start_time,omitempty"` + EndTime *int64 `protobuf:"varint,4,opt,name=end_time,json=endTime" json:"end_time,omitempty"` + Offset *LogOffset `protobuf:"bytes,5,opt,name=offset" json:"offset,omitempty"` + RequestId [][]byte `protobuf:"bytes,6,rep,name=request_id,json=requestId" json:"request_id,omitempty"` + MinimumLogLevel *int32 `protobuf:"varint,7,opt,name=minimum_log_level,json=minimumLogLevel" json:"minimum_log_level,omitempty"` + IncludeIncomplete *bool `protobuf:"varint,8,opt,name=include_incomplete,json=includeIncomplete" json:"include_incomplete,omitempty"` + Count *int64 `protobuf:"varint,9,opt,name=count" json:"count,omitempty"` + CombinedLogRegex *string `protobuf:"bytes,14,opt,name=combined_log_regex,json=combinedLogRegex" json:"combined_log_regex,omitempty"` + HostRegex *string `protobuf:"bytes,15,opt,name=host_regex,json=hostRegex" json:"host_regex,omitempty"` + ReplicaIndex *int32 `protobuf:"varint,16,opt,name=replica_index,json=replicaIndex" json:"replica_index,omitempty"` + IncludeAppLogs *bool `protobuf:"varint,10,opt,name=include_app_logs,json=includeAppLogs" json:"include_app_logs,omitempty"` + AppLogsPerRequest *int32 `protobuf:"varint,17,opt,name=app_logs_per_request,json=appLogsPerRequest" json:"app_logs_per_request,omitempty"` + IncludeHost *bool `protobuf:"varint,11,opt,name=include_host,json=includeHost" json:"include_host,omitempty"` + IncludeAll *bool `protobuf:"varint,12,opt,name=include_all,json=includeAll" json:"include_all,omitempty"` + CacheIterator *bool `protobuf:"varint,13,opt,name=cache_iterator,json=cacheIterator" json:"cache_iterator,omitempty"` + NumShards *int32 `protobuf:"varint,18,opt,name=num_shards,json=numShards" json:"num_shards,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *LogReadRequest) Reset() { *m = LogReadRequest{} } -func (m *LogReadRequest) String() string { return proto.CompactTextString(m) } -func (*LogReadRequest) ProtoMessage() {} -func (*LogReadRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{9} } +func (m *LogReadRequest) Reset() { *m = LogReadRequest{} } +func (m *LogReadRequest) String() string { return proto.CompactTextString(m) } +func (*LogReadRequest) ProtoMessage() {} +func (*LogReadRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_log_service_f054fd4b5012319d, []int{9} +} +func (m *LogReadRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_LogReadRequest.Unmarshal(m, b) +} +func (m *LogReadRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_LogReadRequest.Marshal(b, m, deterministic) +} +func (dst *LogReadRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_LogReadRequest.Merge(dst, src) +} +func (m *LogReadRequest) XXX_Size() int { + return xxx_messageInfo_LogReadRequest.Size(m) +} +func (m *LogReadRequest) XXX_DiscardUnknown() { + xxx_messageInfo_LogReadRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_LogReadRequest proto.InternalMessageInfo func (m *LogReadRequest) GetAppId() string { if m != nil && m.AppId != nil { @@ -726,16 +916,37 @@ func (m *LogReadRequest) GetNumShards() int32 { } type LogReadResponse struct { - Log []*RequestLog `protobuf:"bytes,1,rep,name=log" json:"log,omitempty"` - Offset *LogOffset `protobuf:"bytes,2,opt,name=offset" json:"offset,omitempty"` - LastEndTime *int64 `protobuf:"varint,3,opt,name=last_end_time,json=lastEndTime" json:"last_end_time,omitempty"` - XXX_unrecognized []byte `json:"-"` + Log []*RequestLog `protobuf:"bytes,1,rep,name=log" json:"log,omitempty"` + Offset *LogOffset `protobuf:"bytes,2,opt,name=offset" json:"offset,omitempty"` + LastEndTime *int64 `protobuf:"varint,3,opt,name=last_end_time,json=lastEndTime" json:"last_end_time,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *LogReadResponse) Reset() { *m = LogReadResponse{} } -func (m *LogReadResponse) String() string { return proto.CompactTextString(m) } -func (*LogReadResponse) ProtoMessage() {} -func (*LogReadResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{10} } +func (m *LogReadResponse) Reset() { *m = LogReadResponse{} } +func (m *LogReadResponse) String() string { return proto.CompactTextString(m) } +func (*LogReadResponse) ProtoMessage() {} +func (*LogReadResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_log_service_f054fd4b5012319d, []int{10} +} +func (m *LogReadResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_LogReadResponse.Unmarshal(m, b) +} +func (m *LogReadResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_LogReadResponse.Marshal(b, m, deterministic) +} +func (dst *LogReadResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_LogReadResponse.Merge(dst, src) +} +func (m *LogReadResponse) XXX_Size() int { + return xxx_messageInfo_LogReadResponse.Size(m) +} +func (m *LogReadResponse) XXX_DiscardUnknown() { + xxx_messageInfo_LogReadResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_LogReadResponse proto.InternalMessageInfo func (m *LogReadResponse) GetLog() []*RequestLog { if m != nil { @@ -759,19 +970,40 @@ func (m *LogReadResponse) GetLastEndTime() int64 { } type LogUsageRecord struct { - VersionId *string `protobuf:"bytes,1,opt,name=version_id,json=versionId" json:"version_id,omitempty"` - StartTime *int32 `protobuf:"varint,2,opt,name=start_time,json=startTime" json:"start_time,omitempty"` - EndTime *int32 `protobuf:"varint,3,opt,name=end_time,json=endTime" json:"end_time,omitempty"` - Count *int64 `protobuf:"varint,4,opt,name=count" json:"count,omitempty"` - TotalSize *int64 `protobuf:"varint,5,opt,name=total_size,json=totalSize" json:"total_size,omitempty"` - Records *int32 `protobuf:"varint,6,opt,name=records" json:"records,omitempty"` - XXX_unrecognized []byte `json:"-"` + VersionId *string `protobuf:"bytes,1,opt,name=version_id,json=versionId" json:"version_id,omitempty"` + StartTime *int32 `protobuf:"varint,2,opt,name=start_time,json=startTime" json:"start_time,omitempty"` + EndTime *int32 `protobuf:"varint,3,opt,name=end_time,json=endTime" json:"end_time,omitempty"` + Count *int64 `protobuf:"varint,4,opt,name=count" json:"count,omitempty"` + TotalSize *int64 `protobuf:"varint,5,opt,name=total_size,json=totalSize" json:"total_size,omitempty"` + Records *int32 `protobuf:"varint,6,opt,name=records" json:"records,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *LogUsageRecord) Reset() { *m = LogUsageRecord{} } -func (m *LogUsageRecord) String() string { return proto.CompactTextString(m) } -func (*LogUsageRecord) ProtoMessage() {} -func (*LogUsageRecord) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{11} } +func (m *LogUsageRecord) Reset() { *m = LogUsageRecord{} } +func (m *LogUsageRecord) String() string { return proto.CompactTextString(m) } +func (*LogUsageRecord) ProtoMessage() {} +func (*LogUsageRecord) Descriptor() ([]byte, []int) { + return fileDescriptor_log_service_f054fd4b5012319d, []int{11} +} +func (m *LogUsageRecord) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_LogUsageRecord.Unmarshal(m, b) +} +func (m *LogUsageRecord) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_LogUsageRecord.Marshal(b, m, deterministic) +} +func (dst *LogUsageRecord) XXX_Merge(src proto.Message) { + xxx_messageInfo_LogUsageRecord.Merge(dst, src) +} +func (m *LogUsageRecord) XXX_Size() int { + return xxx_messageInfo_LogUsageRecord.Size(m) +} +func (m *LogUsageRecord) XXX_DiscardUnknown() { + xxx_messageInfo_LogUsageRecord.DiscardUnknown(m) +} + +var xxx_messageInfo_LogUsageRecord proto.InternalMessageInfo func (m *LogUsageRecord) GetVersionId() string { if m != nil && m.VersionId != nil { @@ -816,21 +1048,42 @@ func (m *LogUsageRecord) GetRecords() int32 { } type LogUsageRequest struct { - AppId *string `protobuf:"bytes,1,req,name=app_id,json=appId" json:"app_id,omitempty"` - VersionId []string `protobuf:"bytes,2,rep,name=version_id,json=versionId" json:"version_id,omitempty"` - StartTime *int32 `protobuf:"varint,3,opt,name=start_time,json=startTime" json:"start_time,omitempty"` - EndTime *int32 `protobuf:"varint,4,opt,name=end_time,json=endTime" json:"end_time,omitempty"` - ResolutionHours *uint32 `protobuf:"varint,5,opt,name=resolution_hours,json=resolutionHours,def=1" json:"resolution_hours,omitempty"` - CombineVersions *bool `protobuf:"varint,6,opt,name=combine_versions,json=combineVersions" json:"combine_versions,omitempty"` - UsageVersion *int32 `protobuf:"varint,7,opt,name=usage_version,json=usageVersion" json:"usage_version,omitempty"` - VersionsOnly *bool `protobuf:"varint,8,opt,name=versions_only,json=versionsOnly" json:"versions_only,omitempty"` - XXX_unrecognized []byte `json:"-"` + AppId *string `protobuf:"bytes,1,req,name=app_id,json=appId" json:"app_id,omitempty"` + VersionId []string `protobuf:"bytes,2,rep,name=version_id,json=versionId" json:"version_id,omitempty"` + StartTime *int32 `protobuf:"varint,3,opt,name=start_time,json=startTime" json:"start_time,omitempty"` + EndTime *int32 `protobuf:"varint,4,opt,name=end_time,json=endTime" json:"end_time,omitempty"` + ResolutionHours *uint32 `protobuf:"varint,5,opt,name=resolution_hours,json=resolutionHours,def=1" json:"resolution_hours,omitempty"` + CombineVersions *bool `protobuf:"varint,6,opt,name=combine_versions,json=combineVersions" json:"combine_versions,omitempty"` + UsageVersion *int32 `protobuf:"varint,7,opt,name=usage_version,json=usageVersion" json:"usage_version,omitempty"` + VersionsOnly *bool `protobuf:"varint,8,opt,name=versions_only,json=versionsOnly" json:"versions_only,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *LogUsageRequest) Reset() { *m = LogUsageRequest{} } -func (m *LogUsageRequest) String() string { return proto.CompactTextString(m) } -func (*LogUsageRequest) ProtoMessage() {} -func (*LogUsageRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{12} } +func (m *LogUsageRequest) Reset() { *m = LogUsageRequest{} } +func (m *LogUsageRequest) String() string { return proto.CompactTextString(m) } +func (*LogUsageRequest) ProtoMessage() {} +func (*LogUsageRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_log_service_f054fd4b5012319d, []int{12} +} +func (m *LogUsageRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_LogUsageRequest.Unmarshal(m, b) +} +func (m *LogUsageRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_LogUsageRequest.Marshal(b, m, deterministic) +} +func (dst *LogUsageRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_LogUsageRequest.Merge(dst, src) +} +func (m *LogUsageRequest) XXX_Size() int { + return xxx_messageInfo_LogUsageRequest.Size(m) +} +func (m *LogUsageRequest) XXX_DiscardUnknown() { + xxx_messageInfo_LogUsageRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_LogUsageRequest proto.InternalMessageInfo const Default_LogUsageRequest_ResolutionHours uint32 = 1 @@ -891,15 +1144,36 @@ func (m *LogUsageRequest) GetVersionsOnly() bool { } type LogUsageResponse struct { - Usage []*LogUsageRecord `protobuf:"bytes,1,rep,name=usage" json:"usage,omitempty"` - Summary *LogUsageRecord `protobuf:"bytes,2,opt,name=summary" json:"summary,omitempty"` - XXX_unrecognized []byte `json:"-"` + Usage []*LogUsageRecord `protobuf:"bytes,1,rep,name=usage" json:"usage,omitempty"` + Summary *LogUsageRecord `protobuf:"bytes,2,opt,name=summary" json:"summary,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *LogUsageResponse) Reset() { *m = LogUsageResponse{} } -func (m *LogUsageResponse) String() string { return proto.CompactTextString(m) } -func (*LogUsageResponse) ProtoMessage() {} -func (*LogUsageResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{13} } +func (m *LogUsageResponse) Reset() { *m = LogUsageResponse{} } +func (m *LogUsageResponse) String() string { return proto.CompactTextString(m) } +func (*LogUsageResponse) ProtoMessage() {} +func (*LogUsageResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_log_service_f054fd4b5012319d, []int{13} +} +func (m *LogUsageResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_LogUsageResponse.Unmarshal(m, b) +} +func (m *LogUsageResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_LogUsageResponse.Marshal(b, m, deterministic) +} +func (dst *LogUsageResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_LogUsageResponse.Merge(dst, src) +} +func (m *LogUsageResponse) XXX_Size() int { + return xxx_messageInfo_LogUsageResponse.Size(m) +} +func (m *LogUsageResponse) XXX_DiscardUnknown() { + xxx_messageInfo_LogUsageResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_LogUsageResponse proto.InternalMessageInfo func (m *LogUsageResponse) GetUsage() []*LogUsageRecord { if m != nil { @@ -933,10 +1207,10 @@ func init() { } func init() { - proto.RegisterFile("google.golang.org/appengine/internal/log/log_service.proto", fileDescriptor0) + proto.RegisterFile("google.golang.org/appengine/internal/log/log_service.proto", fileDescriptor_log_service_f054fd4b5012319d) } -var fileDescriptor0 = []byte{ +var fileDescriptor_log_service_f054fd4b5012319d = []byte{ // 1553 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x56, 0xdd, 0x72, 0xdb, 0xc6, 0x15, 0x2e, 0x48, 0x51, 0x24, 0x0f, 0x49, 0x91, 0x5a, 0xcb, 0xce, 0xda, 0xae, 0x6b, 0x1a, 0x4e, diff --git a/vendor/google.golang.org/appengine/internal/metadata.go b/vendor/google.golang.org/appengine/internal/metadata.go index 9cc1f71d..c4ba63bb 100644 --- a/vendor/google.golang.org/appengine/internal/metadata.go +++ b/vendor/google.golang.org/appengine/internal/metadata.go @@ -12,7 +12,6 @@ package internal import ( "fmt" "io/ioutil" - "log" "net/http" "net/url" ) @@ -32,7 +31,7 @@ var ( func mustGetMetadata(key string) []byte { b, err := getMetadata(key) if err != nil { - log.Fatalf("Metadata fetch failed: %v", err) + panic(fmt.Sprintf("Metadata fetch failed for '%s': %v", key, err)) } return b } diff --git a/vendor/google.golang.org/appengine/internal/modules/modules_service.pb.go b/vendor/google.golang.org/appengine/internal/modules/modules_service.pb.go index 51800525..ddfc0c04 100644 --- a/vendor/google.golang.org/appengine/internal/modules/modules_service.pb.go +++ b/vendor/google.golang.org/appengine/internal/modules/modules_service.pb.go @@ -1,31 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // source: google.golang.org/appengine/internal/modules/modules_service.proto -/* -Package modules is a generated protocol buffer package. - -It is generated from these files: - google.golang.org/appengine/internal/modules/modules_service.proto - -It has these top-level messages: - ModulesServiceError - GetModulesRequest - GetModulesResponse - GetVersionsRequest - GetVersionsResponse - GetDefaultVersionRequest - GetDefaultVersionResponse - GetNumInstancesRequest - GetNumInstancesResponse - SetNumInstancesRequest - SetNumInstancesResponse - StartModuleRequest - StartModuleResponse - StopModuleRequest - StopModuleResponse - GetHostnameRequest - GetHostnameResponse -*/ package modules import proto "github.com/golang/protobuf/proto" @@ -88,36 +63,99 @@ func (x *ModulesServiceError_ErrorCode) UnmarshalJSON(data []byte) error { return nil } func (ModulesServiceError_ErrorCode) EnumDescriptor() ([]byte, []int) { - return fileDescriptor0, []int{0, 0} + return fileDescriptor_modules_service_9cd3bffe4e91c59a, []int{0, 0} } type ModulesServiceError struct { - XXX_unrecognized []byte `json:"-"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *ModulesServiceError) Reset() { *m = ModulesServiceError{} } -func (m *ModulesServiceError) String() string { return proto.CompactTextString(m) } -func (*ModulesServiceError) ProtoMessage() {} -func (*ModulesServiceError) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} } +func (m *ModulesServiceError) Reset() { *m = ModulesServiceError{} } +func (m *ModulesServiceError) String() string { return proto.CompactTextString(m) } +func (*ModulesServiceError) ProtoMessage() {} +func (*ModulesServiceError) Descriptor() ([]byte, []int) { + return fileDescriptor_modules_service_9cd3bffe4e91c59a, []int{0} +} +func (m *ModulesServiceError) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ModulesServiceError.Unmarshal(m, b) +} +func (m *ModulesServiceError) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ModulesServiceError.Marshal(b, m, deterministic) +} +func (dst *ModulesServiceError) XXX_Merge(src proto.Message) { + xxx_messageInfo_ModulesServiceError.Merge(dst, src) +} +func (m *ModulesServiceError) XXX_Size() int { + return xxx_messageInfo_ModulesServiceError.Size(m) +} +func (m *ModulesServiceError) XXX_DiscardUnknown() { + xxx_messageInfo_ModulesServiceError.DiscardUnknown(m) +} + +var xxx_messageInfo_ModulesServiceError proto.InternalMessageInfo type GetModulesRequest struct { - XXX_unrecognized []byte `json:"-"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *GetModulesRequest) Reset() { *m = GetModulesRequest{} } -func (m *GetModulesRequest) String() string { return proto.CompactTextString(m) } -func (*GetModulesRequest) ProtoMessage() {} -func (*GetModulesRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} } +func (m *GetModulesRequest) Reset() { *m = GetModulesRequest{} } +func (m *GetModulesRequest) String() string { return proto.CompactTextString(m) } +func (*GetModulesRequest) ProtoMessage() {} +func (*GetModulesRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_modules_service_9cd3bffe4e91c59a, []int{1} +} +func (m *GetModulesRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GetModulesRequest.Unmarshal(m, b) +} +func (m *GetModulesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GetModulesRequest.Marshal(b, m, deterministic) +} +func (dst *GetModulesRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetModulesRequest.Merge(dst, src) +} +func (m *GetModulesRequest) XXX_Size() int { + return xxx_messageInfo_GetModulesRequest.Size(m) +} +func (m *GetModulesRequest) XXX_DiscardUnknown() { + xxx_messageInfo_GetModulesRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_GetModulesRequest proto.InternalMessageInfo type GetModulesResponse struct { - Module []string `protobuf:"bytes,1,rep,name=module" json:"module,omitempty"` - XXX_unrecognized []byte `json:"-"` + Module []string `protobuf:"bytes,1,rep,name=module" json:"module,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *GetModulesResponse) Reset() { *m = GetModulesResponse{} } -func (m *GetModulesResponse) String() string { return proto.CompactTextString(m) } -func (*GetModulesResponse) ProtoMessage() {} -func (*GetModulesResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} } +func (m *GetModulesResponse) Reset() { *m = GetModulesResponse{} } +func (m *GetModulesResponse) String() string { return proto.CompactTextString(m) } +func (*GetModulesResponse) ProtoMessage() {} +func (*GetModulesResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_modules_service_9cd3bffe4e91c59a, []int{2} +} +func (m *GetModulesResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GetModulesResponse.Unmarshal(m, b) +} +func (m *GetModulesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GetModulesResponse.Marshal(b, m, deterministic) +} +func (dst *GetModulesResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetModulesResponse.Merge(dst, src) +} +func (m *GetModulesResponse) XXX_Size() int { + return xxx_messageInfo_GetModulesResponse.Size(m) +} +func (m *GetModulesResponse) XXX_DiscardUnknown() { + xxx_messageInfo_GetModulesResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_GetModulesResponse proto.InternalMessageInfo func (m *GetModulesResponse) GetModule() []string { if m != nil { @@ -127,14 +165,35 @@ func (m *GetModulesResponse) GetModule() []string { } type GetVersionsRequest struct { - Module *string `protobuf:"bytes,1,opt,name=module" json:"module,omitempty"` - XXX_unrecognized []byte `json:"-"` + Module *string `protobuf:"bytes,1,opt,name=module" json:"module,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *GetVersionsRequest) Reset() { *m = GetVersionsRequest{} } -func (m *GetVersionsRequest) String() string { return proto.CompactTextString(m) } -func (*GetVersionsRequest) ProtoMessage() {} -func (*GetVersionsRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} } +func (m *GetVersionsRequest) Reset() { *m = GetVersionsRequest{} } +func (m *GetVersionsRequest) String() string { return proto.CompactTextString(m) } +func (*GetVersionsRequest) ProtoMessage() {} +func (*GetVersionsRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_modules_service_9cd3bffe4e91c59a, []int{3} +} +func (m *GetVersionsRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GetVersionsRequest.Unmarshal(m, b) +} +func (m *GetVersionsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GetVersionsRequest.Marshal(b, m, deterministic) +} +func (dst *GetVersionsRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetVersionsRequest.Merge(dst, src) +} +func (m *GetVersionsRequest) XXX_Size() int { + return xxx_messageInfo_GetVersionsRequest.Size(m) +} +func (m *GetVersionsRequest) XXX_DiscardUnknown() { + xxx_messageInfo_GetVersionsRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_GetVersionsRequest proto.InternalMessageInfo func (m *GetVersionsRequest) GetModule() string { if m != nil && m.Module != nil { @@ -144,14 +203,35 @@ func (m *GetVersionsRequest) GetModule() string { } type GetVersionsResponse struct { - Version []string `protobuf:"bytes,1,rep,name=version" json:"version,omitempty"` - XXX_unrecognized []byte `json:"-"` + Version []string `protobuf:"bytes,1,rep,name=version" json:"version,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *GetVersionsResponse) Reset() { *m = GetVersionsResponse{} } -func (m *GetVersionsResponse) String() string { return proto.CompactTextString(m) } -func (*GetVersionsResponse) ProtoMessage() {} -func (*GetVersionsResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{4} } +func (m *GetVersionsResponse) Reset() { *m = GetVersionsResponse{} } +func (m *GetVersionsResponse) String() string { return proto.CompactTextString(m) } +func (*GetVersionsResponse) ProtoMessage() {} +func (*GetVersionsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_modules_service_9cd3bffe4e91c59a, []int{4} +} +func (m *GetVersionsResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GetVersionsResponse.Unmarshal(m, b) +} +func (m *GetVersionsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GetVersionsResponse.Marshal(b, m, deterministic) +} +func (dst *GetVersionsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetVersionsResponse.Merge(dst, src) +} +func (m *GetVersionsResponse) XXX_Size() int { + return xxx_messageInfo_GetVersionsResponse.Size(m) +} +func (m *GetVersionsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_GetVersionsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_GetVersionsResponse proto.InternalMessageInfo func (m *GetVersionsResponse) GetVersion() []string { if m != nil { @@ -161,14 +241,35 @@ func (m *GetVersionsResponse) GetVersion() []string { } type GetDefaultVersionRequest struct { - Module *string `protobuf:"bytes,1,opt,name=module" json:"module,omitempty"` - XXX_unrecognized []byte `json:"-"` + Module *string `protobuf:"bytes,1,opt,name=module" json:"module,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *GetDefaultVersionRequest) Reset() { *m = GetDefaultVersionRequest{} } -func (m *GetDefaultVersionRequest) String() string { return proto.CompactTextString(m) } -func (*GetDefaultVersionRequest) ProtoMessage() {} -func (*GetDefaultVersionRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{5} } +func (m *GetDefaultVersionRequest) Reset() { *m = GetDefaultVersionRequest{} } +func (m *GetDefaultVersionRequest) String() string { return proto.CompactTextString(m) } +func (*GetDefaultVersionRequest) ProtoMessage() {} +func (*GetDefaultVersionRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_modules_service_9cd3bffe4e91c59a, []int{5} +} +func (m *GetDefaultVersionRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GetDefaultVersionRequest.Unmarshal(m, b) +} +func (m *GetDefaultVersionRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GetDefaultVersionRequest.Marshal(b, m, deterministic) +} +func (dst *GetDefaultVersionRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetDefaultVersionRequest.Merge(dst, src) +} +func (m *GetDefaultVersionRequest) XXX_Size() int { + return xxx_messageInfo_GetDefaultVersionRequest.Size(m) +} +func (m *GetDefaultVersionRequest) XXX_DiscardUnknown() { + xxx_messageInfo_GetDefaultVersionRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_GetDefaultVersionRequest proto.InternalMessageInfo func (m *GetDefaultVersionRequest) GetModule() string { if m != nil && m.Module != nil { @@ -178,14 +279,35 @@ func (m *GetDefaultVersionRequest) GetModule() string { } type GetDefaultVersionResponse struct { - Version *string `protobuf:"bytes,1,req,name=version" json:"version,omitempty"` - XXX_unrecognized []byte `json:"-"` + Version *string `protobuf:"bytes,1,req,name=version" json:"version,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *GetDefaultVersionResponse) Reset() { *m = GetDefaultVersionResponse{} } -func (m *GetDefaultVersionResponse) String() string { return proto.CompactTextString(m) } -func (*GetDefaultVersionResponse) ProtoMessage() {} -func (*GetDefaultVersionResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{6} } +func (m *GetDefaultVersionResponse) Reset() { *m = GetDefaultVersionResponse{} } +func (m *GetDefaultVersionResponse) String() string { return proto.CompactTextString(m) } +func (*GetDefaultVersionResponse) ProtoMessage() {} +func (*GetDefaultVersionResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_modules_service_9cd3bffe4e91c59a, []int{6} +} +func (m *GetDefaultVersionResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GetDefaultVersionResponse.Unmarshal(m, b) +} +func (m *GetDefaultVersionResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GetDefaultVersionResponse.Marshal(b, m, deterministic) +} +func (dst *GetDefaultVersionResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetDefaultVersionResponse.Merge(dst, src) +} +func (m *GetDefaultVersionResponse) XXX_Size() int { + return xxx_messageInfo_GetDefaultVersionResponse.Size(m) +} +func (m *GetDefaultVersionResponse) XXX_DiscardUnknown() { + xxx_messageInfo_GetDefaultVersionResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_GetDefaultVersionResponse proto.InternalMessageInfo func (m *GetDefaultVersionResponse) GetVersion() string { if m != nil && m.Version != nil { @@ -195,15 +317,36 @@ func (m *GetDefaultVersionResponse) GetVersion() string { } type GetNumInstancesRequest struct { - Module *string `protobuf:"bytes,1,opt,name=module" json:"module,omitempty"` - Version *string `protobuf:"bytes,2,opt,name=version" json:"version,omitempty"` - XXX_unrecognized []byte `json:"-"` + Module *string `protobuf:"bytes,1,opt,name=module" json:"module,omitempty"` + Version *string `protobuf:"bytes,2,opt,name=version" json:"version,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *GetNumInstancesRequest) Reset() { *m = GetNumInstancesRequest{} } -func (m *GetNumInstancesRequest) String() string { return proto.CompactTextString(m) } -func (*GetNumInstancesRequest) ProtoMessage() {} -func (*GetNumInstancesRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{7} } +func (m *GetNumInstancesRequest) Reset() { *m = GetNumInstancesRequest{} } +func (m *GetNumInstancesRequest) String() string { return proto.CompactTextString(m) } +func (*GetNumInstancesRequest) ProtoMessage() {} +func (*GetNumInstancesRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_modules_service_9cd3bffe4e91c59a, []int{7} +} +func (m *GetNumInstancesRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GetNumInstancesRequest.Unmarshal(m, b) +} +func (m *GetNumInstancesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GetNumInstancesRequest.Marshal(b, m, deterministic) +} +func (dst *GetNumInstancesRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetNumInstancesRequest.Merge(dst, src) +} +func (m *GetNumInstancesRequest) XXX_Size() int { + return xxx_messageInfo_GetNumInstancesRequest.Size(m) +} +func (m *GetNumInstancesRequest) XXX_DiscardUnknown() { + xxx_messageInfo_GetNumInstancesRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_GetNumInstancesRequest proto.InternalMessageInfo func (m *GetNumInstancesRequest) GetModule() string { if m != nil && m.Module != nil { @@ -220,14 +363,35 @@ func (m *GetNumInstancesRequest) GetVersion() string { } type GetNumInstancesResponse struct { - Instances *int64 `protobuf:"varint,1,req,name=instances" json:"instances,omitempty"` - XXX_unrecognized []byte `json:"-"` + Instances *int64 `protobuf:"varint,1,req,name=instances" json:"instances,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *GetNumInstancesResponse) Reset() { *m = GetNumInstancesResponse{} } -func (m *GetNumInstancesResponse) String() string { return proto.CompactTextString(m) } -func (*GetNumInstancesResponse) ProtoMessage() {} -func (*GetNumInstancesResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{8} } +func (m *GetNumInstancesResponse) Reset() { *m = GetNumInstancesResponse{} } +func (m *GetNumInstancesResponse) String() string { return proto.CompactTextString(m) } +func (*GetNumInstancesResponse) ProtoMessage() {} +func (*GetNumInstancesResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_modules_service_9cd3bffe4e91c59a, []int{8} +} +func (m *GetNumInstancesResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GetNumInstancesResponse.Unmarshal(m, b) +} +func (m *GetNumInstancesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GetNumInstancesResponse.Marshal(b, m, deterministic) +} +func (dst *GetNumInstancesResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetNumInstancesResponse.Merge(dst, src) +} +func (m *GetNumInstancesResponse) XXX_Size() int { + return xxx_messageInfo_GetNumInstancesResponse.Size(m) +} +func (m *GetNumInstancesResponse) XXX_DiscardUnknown() { + xxx_messageInfo_GetNumInstancesResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_GetNumInstancesResponse proto.InternalMessageInfo func (m *GetNumInstancesResponse) GetInstances() int64 { if m != nil && m.Instances != nil { @@ -237,16 +401,37 @@ func (m *GetNumInstancesResponse) GetInstances() int64 { } type SetNumInstancesRequest struct { - Module *string `protobuf:"bytes,1,opt,name=module" json:"module,omitempty"` - Version *string `protobuf:"bytes,2,opt,name=version" json:"version,omitempty"` - Instances *int64 `protobuf:"varint,3,req,name=instances" json:"instances,omitempty"` - XXX_unrecognized []byte `json:"-"` + Module *string `protobuf:"bytes,1,opt,name=module" json:"module,omitempty"` + Version *string `protobuf:"bytes,2,opt,name=version" json:"version,omitempty"` + Instances *int64 `protobuf:"varint,3,req,name=instances" json:"instances,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *SetNumInstancesRequest) Reset() { *m = SetNumInstancesRequest{} } -func (m *SetNumInstancesRequest) String() string { return proto.CompactTextString(m) } -func (*SetNumInstancesRequest) ProtoMessage() {} -func (*SetNumInstancesRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{9} } +func (m *SetNumInstancesRequest) Reset() { *m = SetNumInstancesRequest{} } +func (m *SetNumInstancesRequest) String() string { return proto.CompactTextString(m) } +func (*SetNumInstancesRequest) ProtoMessage() {} +func (*SetNumInstancesRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_modules_service_9cd3bffe4e91c59a, []int{9} +} +func (m *SetNumInstancesRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_SetNumInstancesRequest.Unmarshal(m, b) +} +func (m *SetNumInstancesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_SetNumInstancesRequest.Marshal(b, m, deterministic) +} +func (dst *SetNumInstancesRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_SetNumInstancesRequest.Merge(dst, src) +} +func (m *SetNumInstancesRequest) XXX_Size() int { + return xxx_messageInfo_SetNumInstancesRequest.Size(m) +} +func (m *SetNumInstancesRequest) XXX_DiscardUnknown() { + xxx_messageInfo_SetNumInstancesRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_SetNumInstancesRequest proto.InternalMessageInfo func (m *SetNumInstancesRequest) GetModule() string { if m != nil && m.Module != nil { @@ -270,24 +455,66 @@ func (m *SetNumInstancesRequest) GetInstances() int64 { } type SetNumInstancesResponse struct { - XXX_unrecognized []byte `json:"-"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *SetNumInstancesResponse) Reset() { *m = SetNumInstancesResponse{} } -func (m *SetNumInstancesResponse) String() string { return proto.CompactTextString(m) } -func (*SetNumInstancesResponse) ProtoMessage() {} -func (*SetNumInstancesResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{10} } +func (m *SetNumInstancesResponse) Reset() { *m = SetNumInstancesResponse{} } +func (m *SetNumInstancesResponse) String() string { return proto.CompactTextString(m) } +func (*SetNumInstancesResponse) ProtoMessage() {} +func (*SetNumInstancesResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_modules_service_9cd3bffe4e91c59a, []int{10} +} +func (m *SetNumInstancesResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_SetNumInstancesResponse.Unmarshal(m, b) +} +func (m *SetNumInstancesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_SetNumInstancesResponse.Marshal(b, m, deterministic) +} +func (dst *SetNumInstancesResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_SetNumInstancesResponse.Merge(dst, src) +} +func (m *SetNumInstancesResponse) XXX_Size() int { + return xxx_messageInfo_SetNumInstancesResponse.Size(m) +} +func (m *SetNumInstancesResponse) XXX_DiscardUnknown() { + xxx_messageInfo_SetNumInstancesResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_SetNumInstancesResponse proto.InternalMessageInfo type StartModuleRequest struct { - Module *string `protobuf:"bytes,1,req,name=module" json:"module,omitempty"` - Version *string `protobuf:"bytes,2,req,name=version" json:"version,omitempty"` - XXX_unrecognized []byte `json:"-"` + Module *string `protobuf:"bytes,1,req,name=module" json:"module,omitempty"` + Version *string `protobuf:"bytes,2,req,name=version" json:"version,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *StartModuleRequest) Reset() { *m = StartModuleRequest{} } -func (m *StartModuleRequest) String() string { return proto.CompactTextString(m) } -func (*StartModuleRequest) ProtoMessage() {} -func (*StartModuleRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{11} } +func (m *StartModuleRequest) Reset() { *m = StartModuleRequest{} } +func (m *StartModuleRequest) String() string { return proto.CompactTextString(m) } +func (*StartModuleRequest) ProtoMessage() {} +func (*StartModuleRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_modules_service_9cd3bffe4e91c59a, []int{11} +} +func (m *StartModuleRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_StartModuleRequest.Unmarshal(m, b) +} +func (m *StartModuleRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_StartModuleRequest.Marshal(b, m, deterministic) +} +func (dst *StartModuleRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_StartModuleRequest.Merge(dst, src) +} +func (m *StartModuleRequest) XXX_Size() int { + return xxx_messageInfo_StartModuleRequest.Size(m) +} +func (m *StartModuleRequest) XXX_DiscardUnknown() { + xxx_messageInfo_StartModuleRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_StartModuleRequest proto.InternalMessageInfo func (m *StartModuleRequest) GetModule() string { if m != nil && m.Module != nil { @@ -304,24 +531,66 @@ func (m *StartModuleRequest) GetVersion() string { } type StartModuleResponse struct { - XXX_unrecognized []byte `json:"-"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *StartModuleResponse) Reset() { *m = StartModuleResponse{} } -func (m *StartModuleResponse) String() string { return proto.CompactTextString(m) } -func (*StartModuleResponse) ProtoMessage() {} -func (*StartModuleResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{12} } +func (m *StartModuleResponse) Reset() { *m = StartModuleResponse{} } +func (m *StartModuleResponse) String() string { return proto.CompactTextString(m) } +func (*StartModuleResponse) ProtoMessage() {} +func (*StartModuleResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_modules_service_9cd3bffe4e91c59a, []int{12} +} +func (m *StartModuleResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_StartModuleResponse.Unmarshal(m, b) +} +func (m *StartModuleResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_StartModuleResponse.Marshal(b, m, deterministic) +} +func (dst *StartModuleResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_StartModuleResponse.Merge(dst, src) +} +func (m *StartModuleResponse) XXX_Size() int { + return xxx_messageInfo_StartModuleResponse.Size(m) +} +func (m *StartModuleResponse) XXX_DiscardUnknown() { + xxx_messageInfo_StartModuleResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_StartModuleResponse proto.InternalMessageInfo type StopModuleRequest struct { - Module *string `protobuf:"bytes,1,opt,name=module" json:"module,omitempty"` - Version *string `protobuf:"bytes,2,opt,name=version" json:"version,omitempty"` - XXX_unrecognized []byte `json:"-"` + Module *string `protobuf:"bytes,1,opt,name=module" json:"module,omitempty"` + Version *string `protobuf:"bytes,2,opt,name=version" json:"version,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *StopModuleRequest) Reset() { *m = StopModuleRequest{} } -func (m *StopModuleRequest) String() string { return proto.CompactTextString(m) } -func (*StopModuleRequest) ProtoMessage() {} -func (*StopModuleRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{13} } +func (m *StopModuleRequest) Reset() { *m = StopModuleRequest{} } +func (m *StopModuleRequest) String() string { return proto.CompactTextString(m) } +func (*StopModuleRequest) ProtoMessage() {} +func (*StopModuleRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_modules_service_9cd3bffe4e91c59a, []int{13} +} +func (m *StopModuleRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_StopModuleRequest.Unmarshal(m, b) +} +func (m *StopModuleRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_StopModuleRequest.Marshal(b, m, deterministic) +} +func (dst *StopModuleRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_StopModuleRequest.Merge(dst, src) +} +func (m *StopModuleRequest) XXX_Size() int { + return xxx_messageInfo_StopModuleRequest.Size(m) +} +func (m *StopModuleRequest) XXX_DiscardUnknown() { + xxx_messageInfo_StopModuleRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_StopModuleRequest proto.InternalMessageInfo func (m *StopModuleRequest) GetModule() string { if m != nil && m.Module != nil { @@ -338,25 +607,67 @@ func (m *StopModuleRequest) GetVersion() string { } type StopModuleResponse struct { - XXX_unrecognized []byte `json:"-"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *StopModuleResponse) Reset() { *m = StopModuleResponse{} } -func (m *StopModuleResponse) String() string { return proto.CompactTextString(m) } -func (*StopModuleResponse) ProtoMessage() {} -func (*StopModuleResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{14} } +func (m *StopModuleResponse) Reset() { *m = StopModuleResponse{} } +func (m *StopModuleResponse) String() string { return proto.CompactTextString(m) } +func (*StopModuleResponse) ProtoMessage() {} +func (*StopModuleResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_modules_service_9cd3bffe4e91c59a, []int{14} +} +func (m *StopModuleResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_StopModuleResponse.Unmarshal(m, b) +} +func (m *StopModuleResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_StopModuleResponse.Marshal(b, m, deterministic) +} +func (dst *StopModuleResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_StopModuleResponse.Merge(dst, src) +} +func (m *StopModuleResponse) XXX_Size() int { + return xxx_messageInfo_StopModuleResponse.Size(m) +} +func (m *StopModuleResponse) XXX_DiscardUnknown() { + xxx_messageInfo_StopModuleResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_StopModuleResponse proto.InternalMessageInfo type GetHostnameRequest struct { - Module *string `protobuf:"bytes,1,opt,name=module" json:"module,omitempty"` - Version *string `protobuf:"bytes,2,opt,name=version" json:"version,omitempty"` - Instance *string `protobuf:"bytes,3,opt,name=instance" json:"instance,omitempty"` - XXX_unrecognized []byte `json:"-"` + Module *string `protobuf:"bytes,1,opt,name=module" json:"module,omitempty"` + Version *string `protobuf:"bytes,2,opt,name=version" json:"version,omitempty"` + Instance *string `protobuf:"bytes,3,opt,name=instance" json:"instance,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *GetHostnameRequest) Reset() { *m = GetHostnameRequest{} } -func (m *GetHostnameRequest) String() string { return proto.CompactTextString(m) } -func (*GetHostnameRequest) ProtoMessage() {} -func (*GetHostnameRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{15} } +func (m *GetHostnameRequest) Reset() { *m = GetHostnameRequest{} } +func (m *GetHostnameRequest) String() string { return proto.CompactTextString(m) } +func (*GetHostnameRequest) ProtoMessage() {} +func (*GetHostnameRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_modules_service_9cd3bffe4e91c59a, []int{15} +} +func (m *GetHostnameRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GetHostnameRequest.Unmarshal(m, b) +} +func (m *GetHostnameRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GetHostnameRequest.Marshal(b, m, deterministic) +} +func (dst *GetHostnameRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetHostnameRequest.Merge(dst, src) +} +func (m *GetHostnameRequest) XXX_Size() int { + return xxx_messageInfo_GetHostnameRequest.Size(m) +} +func (m *GetHostnameRequest) XXX_DiscardUnknown() { + xxx_messageInfo_GetHostnameRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_GetHostnameRequest proto.InternalMessageInfo func (m *GetHostnameRequest) GetModule() string { if m != nil && m.Module != nil { @@ -380,14 +691,35 @@ func (m *GetHostnameRequest) GetInstance() string { } type GetHostnameResponse struct { - Hostname *string `protobuf:"bytes,1,req,name=hostname" json:"hostname,omitempty"` - XXX_unrecognized []byte `json:"-"` + Hostname *string `protobuf:"bytes,1,req,name=hostname" json:"hostname,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *GetHostnameResponse) Reset() { *m = GetHostnameResponse{} } -func (m *GetHostnameResponse) String() string { return proto.CompactTextString(m) } -func (*GetHostnameResponse) ProtoMessage() {} -func (*GetHostnameResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{16} } +func (m *GetHostnameResponse) Reset() { *m = GetHostnameResponse{} } +func (m *GetHostnameResponse) String() string { return proto.CompactTextString(m) } +func (*GetHostnameResponse) ProtoMessage() {} +func (*GetHostnameResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_modules_service_9cd3bffe4e91c59a, []int{16} +} +func (m *GetHostnameResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GetHostnameResponse.Unmarshal(m, b) +} +func (m *GetHostnameResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GetHostnameResponse.Marshal(b, m, deterministic) +} +func (dst *GetHostnameResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetHostnameResponse.Merge(dst, src) +} +func (m *GetHostnameResponse) XXX_Size() int { + return xxx_messageInfo_GetHostnameResponse.Size(m) +} +func (m *GetHostnameResponse) XXX_DiscardUnknown() { + xxx_messageInfo_GetHostnameResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_GetHostnameResponse proto.InternalMessageInfo func (m *GetHostnameResponse) GetHostname() string { if m != nil && m.Hostname != nil { @@ -417,10 +749,10 @@ func init() { } func init() { - proto.RegisterFile("google.golang.org/appengine/internal/modules/modules_service.proto", fileDescriptor0) + proto.RegisterFile("google.golang.org/appengine/internal/modules/modules_service.proto", fileDescriptor_modules_service_9cd3bffe4e91c59a) } -var fileDescriptor0 = []byte{ +var fileDescriptor_modules_service_9cd3bffe4e91c59a = []byte{ // 457 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x94, 0xc1, 0x6f, 0xd3, 0x30, 0x14, 0xc6, 0x69, 0x02, 0xdb, 0xf2, 0x0e, 0x90, 0x3a, 0x5b, 0xd7, 0x4d, 0x1c, 0x50, 0x4e, 0x1c, diff --git a/vendor/google.golang.org/appengine/internal/remote_api/remote_api.pb.go b/vendor/google.golang.org/appengine/internal/remote_api/remote_api.pb.go index 172aebe8..8d782a38 100644 --- a/vendor/google.golang.org/appengine/internal/remote_api/remote_api.pb.go +++ b/vendor/google.golang.org/appengine/internal/remote_api/remote_api.pb.go @@ -1,18 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // source: google.golang.org/appengine/internal/remote_api/remote_api.proto -/* -Package remote_api is a generated protocol buffer package. - -It is generated from these files: - google.golang.org/appengine/internal/remote_api/remote_api.proto - -It has these top-level messages: - Request - ApplicationError - RpcError - Response -*/ package remote_api import proto "github.com/golang/protobuf/proto" @@ -95,20 +83,43 @@ func (x *RpcError_ErrorCode) UnmarshalJSON(data []byte) error { *x = RpcError_ErrorCode(value) return nil } -func (RpcError_ErrorCode) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{2, 0} } - -type Request struct { - ServiceName *string `protobuf:"bytes,2,req,name=service_name,json=serviceName" json:"service_name,omitempty"` - Method *string `protobuf:"bytes,3,req,name=method" json:"method,omitempty"` - Request []byte `protobuf:"bytes,4,req,name=request" json:"request,omitempty"` - RequestId *string `protobuf:"bytes,5,opt,name=request_id,json=requestId" json:"request_id,omitempty"` - XXX_unrecognized []byte `json:"-"` +func (RpcError_ErrorCode) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_remote_api_1978114ec33a273d, []int{2, 0} } -func (m *Request) Reset() { *m = Request{} } -func (m *Request) String() string { return proto.CompactTextString(m) } -func (*Request) ProtoMessage() {} -func (*Request) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} } +type Request struct { + ServiceName *string `protobuf:"bytes,2,req,name=service_name,json=serviceName" json:"service_name,omitempty"` + Method *string `protobuf:"bytes,3,req,name=method" json:"method,omitempty"` + Request []byte `protobuf:"bytes,4,req,name=request" json:"request,omitempty"` + RequestId *string `protobuf:"bytes,5,opt,name=request_id,json=requestId" json:"request_id,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Request) Reset() { *m = Request{} } +func (m *Request) String() string { return proto.CompactTextString(m) } +func (*Request) ProtoMessage() {} +func (*Request) Descriptor() ([]byte, []int) { + return fileDescriptor_remote_api_1978114ec33a273d, []int{0} +} +func (m *Request) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Request.Unmarshal(m, b) +} +func (m *Request) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Request.Marshal(b, m, deterministic) +} +func (dst *Request) XXX_Merge(src proto.Message) { + xxx_messageInfo_Request.Merge(dst, src) +} +func (m *Request) XXX_Size() int { + return xxx_messageInfo_Request.Size(m) +} +func (m *Request) XXX_DiscardUnknown() { + xxx_messageInfo_Request.DiscardUnknown(m) +} + +var xxx_messageInfo_Request proto.InternalMessageInfo func (m *Request) GetServiceName() string { if m != nil && m.ServiceName != nil { @@ -139,15 +150,36 @@ func (m *Request) GetRequestId() string { } type ApplicationError struct { - Code *int32 `protobuf:"varint,1,req,name=code" json:"code,omitempty"` - Detail *string `protobuf:"bytes,2,req,name=detail" json:"detail,omitempty"` - XXX_unrecognized []byte `json:"-"` + Code *int32 `protobuf:"varint,1,req,name=code" json:"code,omitempty"` + Detail *string `protobuf:"bytes,2,req,name=detail" json:"detail,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *ApplicationError) Reset() { *m = ApplicationError{} } -func (m *ApplicationError) String() string { return proto.CompactTextString(m) } -func (*ApplicationError) ProtoMessage() {} -func (*ApplicationError) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} } +func (m *ApplicationError) Reset() { *m = ApplicationError{} } +func (m *ApplicationError) String() string { return proto.CompactTextString(m) } +func (*ApplicationError) ProtoMessage() {} +func (*ApplicationError) Descriptor() ([]byte, []int) { + return fileDescriptor_remote_api_1978114ec33a273d, []int{1} +} +func (m *ApplicationError) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ApplicationError.Unmarshal(m, b) +} +func (m *ApplicationError) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ApplicationError.Marshal(b, m, deterministic) +} +func (dst *ApplicationError) XXX_Merge(src proto.Message) { + xxx_messageInfo_ApplicationError.Merge(dst, src) +} +func (m *ApplicationError) XXX_Size() int { + return xxx_messageInfo_ApplicationError.Size(m) +} +func (m *ApplicationError) XXX_DiscardUnknown() { + xxx_messageInfo_ApplicationError.DiscardUnknown(m) +} + +var xxx_messageInfo_ApplicationError proto.InternalMessageInfo func (m *ApplicationError) GetCode() int32 { if m != nil && m.Code != nil { @@ -164,15 +196,36 @@ func (m *ApplicationError) GetDetail() string { } type RpcError struct { - Code *int32 `protobuf:"varint,1,req,name=code" json:"code,omitempty"` - Detail *string `protobuf:"bytes,2,opt,name=detail" json:"detail,omitempty"` - XXX_unrecognized []byte `json:"-"` + Code *int32 `protobuf:"varint,1,req,name=code" json:"code,omitempty"` + Detail *string `protobuf:"bytes,2,opt,name=detail" json:"detail,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *RpcError) Reset() { *m = RpcError{} } -func (m *RpcError) String() string { return proto.CompactTextString(m) } -func (*RpcError) ProtoMessage() {} -func (*RpcError) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} } +func (m *RpcError) Reset() { *m = RpcError{} } +func (m *RpcError) String() string { return proto.CompactTextString(m) } +func (*RpcError) ProtoMessage() {} +func (*RpcError) Descriptor() ([]byte, []int) { + return fileDescriptor_remote_api_1978114ec33a273d, []int{2} +} +func (m *RpcError) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_RpcError.Unmarshal(m, b) +} +func (m *RpcError) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_RpcError.Marshal(b, m, deterministic) +} +func (dst *RpcError) XXX_Merge(src proto.Message) { + xxx_messageInfo_RpcError.Merge(dst, src) +} +func (m *RpcError) XXX_Size() int { + return xxx_messageInfo_RpcError.Size(m) +} +func (m *RpcError) XXX_DiscardUnknown() { + xxx_messageInfo_RpcError.DiscardUnknown(m) +} + +var xxx_messageInfo_RpcError proto.InternalMessageInfo func (m *RpcError) GetCode() int32 { if m != nil && m.Code != nil { @@ -189,18 +242,39 @@ func (m *RpcError) GetDetail() string { } type Response struct { - Response []byte `protobuf:"bytes,1,opt,name=response" json:"response,omitempty"` - Exception []byte `protobuf:"bytes,2,opt,name=exception" json:"exception,omitempty"` - ApplicationError *ApplicationError `protobuf:"bytes,3,opt,name=application_error,json=applicationError" json:"application_error,omitempty"` - JavaException []byte `protobuf:"bytes,4,opt,name=java_exception,json=javaException" json:"java_exception,omitempty"` - RpcError *RpcError `protobuf:"bytes,5,opt,name=rpc_error,json=rpcError" json:"rpc_error,omitempty"` - XXX_unrecognized []byte `json:"-"` + Response []byte `protobuf:"bytes,1,opt,name=response" json:"response,omitempty"` + Exception []byte `protobuf:"bytes,2,opt,name=exception" json:"exception,omitempty"` + ApplicationError *ApplicationError `protobuf:"bytes,3,opt,name=application_error,json=applicationError" json:"application_error,omitempty"` + JavaException []byte `protobuf:"bytes,4,opt,name=java_exception,json=javaException" json:"java_exception,omitempty"` + RpcError *RpcError `protobuf:"bytes,5,opt,name=rpc_error,json=rpcError" json:"rpc_error,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *Response) Reset() { *m = Response{} } -func (m *Response) String() string { return proto.CompactTextString(m) } -func (*Response) ProtoMessage() {} -func (*Response) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} } +func (m *Response) Reset() { *m = Response{} } +func (m *Response) String() string { return proto.CompactTextString(m) } +func (*Response) ProtoMessage() {} +func (*Response) Descriptor() ([]byte, []int) { + return fileDescriptor_remote_api_1978114ec33a273d, []int{3} +} +func (m *Response) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Response.Unmarshal(m, b) +} +func (m *Response) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Response.Marshal(b, m, deterministic) +} +func (dst *Response) XXX_Merge(src proto.Message) { + xxx_messageInfo_Response.Merge(dst, src) +} +func (m *Response) XXX_Size() int { + return xxx_messageInfo_Response.Size(m) +} +func (m *Response) XXX_DiscardUnknown() { + xxx_messageInfo_Response.DiscardUnknown(m) +} + +var xxx_messageInfo_Response proto.InternalMessageInfo func (m *Response) GetResponse() []byte { if m != nil { @@ -245,10 +319,10 @@ func init() { } func init() { - proto.RegisterFile("google.golang.org/appengine/internal/remote_api/remote_api.proto", fileDescriptor0) + proto.RegisterFile("google.golang.org/appengine/internal/remote_api/remote_api.proto", fileDescriptor_remote_api_1978114ec33a273d) } -var fileDescriptor0 = []byte{ +var fileDescriptor_remote_api_1978114ec33a273d = []byte{ // 531 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x93, 0x51, 0x6e, 0xd3, 0x40, 0x10, 0x86, 0xb1, 0x9b, 0x34, 0xf1, 0xc4, 0x2d, 0xdb, 0xa5, 0x14, 0x0b, 0x15, 0x29, 0x44, 0x42, diff --git a/vendor/google.golang.org/appengine/internal/urlfetch/urlfetch_service.pb.go b/vendor/google.golang.org/appengine/internal/urlfetch/urlfetch_service.pb.go index 7c96c9d4..5f727750 100644 --- a/vendor/google.golang.org/appengine/internal/urlfetch/urlfetch_service.pb.go +++ b/vendor/google.golang.org/appengine/internal/urlfetch/urlfetch_service.pb.go @@ -1,17 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // source: google.golang.org/appengine/internal/urlfetch/urlfetch_service.proto -/* -Package urlfetch is a generated protocol buffer package. - -It is generated from these files: - google.golang.org/appengine/internal/urlfetch/urlfetch_service.proto - -It has these top-level messages: - URLFetchServiceError - URLFetchRequest - URLFetchResponse -*/ package urlfetch import proto "github.com/golang/protobuf/proto" @@ -95,7 +84,7 @@ func (x *URLFetchServiceError_ErrorCode) UnmarshalJSON(data []byte) error { return nil } func (URLFetchServiceError_ErrorCode) EnumDescriptor() ([]byte, []int) { - return fileDescriptor0, []int{0, 0} + return fileDescriptor_urlfetch_service_b245a7065f33bced, []int{0, 0} } type URLFetchRequest_RequestMethod int32 @@ -143,17 +132,38 @@ func (x *URLFetchRequest_RequestMethod) UnmarshalJSON(data []byte) error { return nil } func (URLFetchRequest_RequestMethod) EnumDescriptor() ([]byte, []int) { - return fileDescriptor0, []int{1, 0} + return fileDescriptor_urlfetch_service_b245a7065f33bced, []int{1, 0} } type URLFetchServiceError struct { - XXX_unrecognized []byte `json:"-"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *URLFetchServiceError) Reset() { *m = URLFetchServiceError{} } -func (m *URLFetchServiceError) String() string { return proto.CompactTextString(m) } -func (*URLFetchServiceError) ProtoMessage() {} -func (*URLFetchServiceError) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} } +func (m *URLFetchServiceError) Reset() { *m = URLFetchServiceError{} } +func (m *URLFetchServiceError) String() string { return proto.CompactTextString(m) } +func (*URLFetchServiceError) ProtoMessage() {} +func (*URLFetchServiceError) Descriptor() ([]byte, []int) { + return fileDescriptor_urlfetch_service_b245a7065f33bced, []int{0} +} +func (m *URLFetchServiceError) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_URLFetchServiceError.Unmarshal(m, b) +} +func (m *URLFetchServiceError) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_URLFetchServiceError.Marshal(b, m, deterministic) +} +func (dst *URLFetchServiceError) XXX_Merge(src proto.Message) { + xxx_messageInfo_URLFetchServiceError.Merge(dst, src) +} +func (m *URLFetchServiceError) XXX_Size() int { + return xxx_messageInfo_URLFetchServiceError.Size(m) +} +func (m *URLFetchServiceError) XXX_DiscardUnknown() { + xxx_messageInfo_URLFetchServiceError.DiscardUnknown(m) +} + +var xxx_messageInfo_URLFetchServiceError proto.InternalMessageInfo type URLFetchRequest struct { Method *URLFetchRequest_RequestMethod `protobuf:"varint,1,req,name=Method,enum=appengine.URLFetchRequest_RequestMethod" json:"Method,omitempty"` @@ -163,13 +173,34 @@ type URLFetchRequest struct { FollowRedirects *bool `protobuf:"varint,7,opt,name=FollowRedirects,def=1" json:"FollowRedirects,omitempty"` Deadline *float64 `protobuf:"fixed64,8,opt,name=Deadline" json:"Deadline,omitempty"` MustValidateServerCertificate *bool `protobuf:"varint,9,opt,name=MustValidateServerCertificate,def=1" json:"MustValidateServerCertificate,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *URLFetchRequest) Reset() { *m = URLFetchRequest{} } -func (m *URLFetchRequest) String() string { return proto.CompactTextString(m) } -func (*URLFetchRequest) ProtoMessage() {} -func (*URLFetchRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} } +func (m *URLFetchRequest) Reset() { *m = URLFetchRequest{} } +func (m *URLFetchRequest) String() string { return proto.CompactTextString(m) } +func (*URLFetchRequest) ProtoMessage() {} +func (*URLFetchRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_urlfetch_service_b245a7065f33bced, []int{1} +} +func (m *URLFetchRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_URLFetchRequest.Unmarshal(m, b) +} +func (m *URLFetchRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_URLFetchRequest.Marshal(b, m, deterministic) +} +func (dst *URLFetchRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_URLFetchRequest.Merge(dst, src) +} +func (m *URLFetchRequest) XXX_Size() int { + return xxx_messageInfo_URLFetchRequest.Size(m) +} +func (m *URLFetchRequest) XXX_DiscardUnknown() { + xxx_messageInfo_URLFetchRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_URLFetchRequest proto.InternalMessageInfo const Default_URLFetchRequest_FollowRedirects bool = true const Default_URLFetchRequest_MustValidateServerCertificate bool = true @@ -224,15 +255,36 @@ func (m *URLFetchRequest) GetMustValidateServerCertificate() bool { } type URLFetchRequest_Header struct { - Key *string `protobuf:"bytes,4,req,name=Key" json:"Key,omitempty"` - Value *string `protobuf:"bytes,5,req,name=Value" json:"Value,omitempty"` - XXX_unrecognized []byte `json:"-"` + Key *string `protobuf:"bytes,4,req,name=Key" json:"Key,omitempty"` + Value *string `protobuf:"bytes,5,req,name=Value" json:"Value,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *URLFetchRequest_Header) Reset() { *m = URLFetchRequest_Header{} } -func (m *URLFetchRequest_Header) String() string { return proto.CompactTextString(m) } -func (*URLFetchRequest_Header) ProtoMessage() {} -func (*URLFetchRequest_Header) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1, 0} } +func (m *URLFetchRequest_Header) Reset() { *m = URLFetchRequest_Header{} } +func (m *URLFetchRequest_Header) String() string { return proto.CompactTextString(m) } +func (*URLFetchRequest_Header) ProtoMessage() {} +func (*URLFetchRequest_Header) Descriptor() ([]byte, []int) { + return fileDescriptor_urlfetch_service_b245a7065f33bced, []int{1, 0} +} +func (m *URLFetchRequest_Header) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_URLFetchRequest_Header.Unmarshal(m, b) +} +func (m *URLFetchRequest_Header) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_URLFetchRequest_Header.Marshal(b, m, deterministic) +} +func (dst *URLFetchRequest_Header) XXX_Merge(src proto.Message) { + xxx_messageInfo_URLFetchRequest_Header.Merge(dst, src) +} +func (m *URLFetchRequest_Header) XXX_Size() int { + return xxx_messageInfo_URLFetchRequest_Header.Size(m) +} +func (m *URLFetchRequest_Header) XXX_DiscardUnknown() { + xxx_messageInfo_URLFetchRequest_Header.DiscardUnknown(m) +} + +var xxx_messageInfo_URLFetchRequest_Header proto.InternalMessageInfo func (m *URLFetchRequest_Header) GetKey() string { if m != nil && m.Key != nil { @@ -259,13 +311,34 @@ type URLFetchResponse struct { ApiCpuMilliseconds *int64 `protobuf:"varint,10,opt,name=ApiCpuMilliseconds,def=0" json:"ApiCpuMilliseconds,omitempty"` ApiBytesSent *int64 `protobuf:"varint,11,opt,name=ApiBytesSent,def=0" json:"ApiBytesSent,omitempty"` ApiBytesReceived *int64 `protobuf:"varint,12,opt,name=ApiBytesReceived,def=0" json:"ApiBytesReceived,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *URLFetchResponse) Reset() { *m = URLFetchResponse{} } -func (m *URLFetchResponse) String() string { return proto.CompactTextString(m) } -func (*URLFetchResponse) ProtoMessage() {} -func (*URLFetchResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} } +func (m *URLFetchResponse) Reset() { *m = URLFetchResponse{} } +func (m *URLFetchResponse) String() string { return proto.CompactTextString(m) } +func (*URLFetchResponse) ProtoMessage() {} +func (*URLFetchResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_urlfetch_service_b245a7065f33bced, []int{2} +} +func (m *URLFetchResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_URLFetchResponse.Unmarshal(m, b) +} +func (m *URLFetchResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_URLFetchResponse.Marshal(b, m, deterministic) +} +func (dst *URLFetchResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_URLFetchResponse.Merge(dst, src) +} +func (m *URLFetchResponse) XXX_Size() int { + return xxx_messageInfo_URLFetchResponse.Size(m) +} +func (m *URLFetchResponse) XXX_DiscardUnknown() { + xxx_messageInfo_URLFetchResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_URLFetchResponse proto.InternalMessageInfo const Default_URLFetchResponse_ContentWasTruncated bool = false const Default_URLFetchResponse_ApiCpuMilliseconds int64 = 0 @@ -343,15 +416,36 @@ func (m *URLFetchResponse) GetApiBytesReceived() int64 { } type URLFetchResponse_Header struct { - Key *string `protobuf:"bytes,4,req,name=Key" json:"Key,omitempty"` - Value *string `protobuf:"bytes,5,req,name=Value" json:"Value,omitempty"` - XXX_unrecognized []byte `json:"-"` + Key *string `protobuf:"bytes,4,req,name=Key" json:"Key,omitempty"` + Value *string `protobuf:"bytes,5,req,name=Value" json:"Value,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *URLFetchResponse_Header) Reset() { *m = URLFetchResponse_Header{} } -func (m *URLFetchResponse_Header) String() string { return proto.CompactTextString(m) } -func (*URLFetchResponse_Header) ProtoMessage() {} -func (*URLFetchResponse_Header) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2, 0} } +func (m *URLFetchResponse_Header) Reset() { *m = URLFetchResponse_Header{} } +func (m *URLFetchResponse_Header) String() string { return proto.CompactTextString(m) } +func (*URLFetchResponse_Header) ProtoMessage() {} +func (*URLFetchResponse_Header) Descriptor() ([]byte, []int) { + return fileDescriptor_urlfetch_service_b245a7065f33bced, []int{2, 0} +} +func (m *URLFetchResponse_Header) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_URLFetchResponse_Header.Unmarshal(m, b) +} +func (m *URLFetchResponse_Header) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_URLFetchResponse_Header.Marshal(b, m, deterministic) +} +func (dst *URLFetchResponse_Header) XXX_Merge(src proto.Message) { + xxx_messageInfo_URLFetchResponse_Header.Merge(dst, src) +} +func (m *URLFetchResponse_Header) XXX_Size() int { + return xxx_messageInfo_URLFetchResponse_Header.Size(m) +} +func (m *URLFetchResponse_Header) XXX_DiscardUnknown() { + xxx_messageInfo_URLFetchResponse_Header.DiscardUnknown(m) +} + +var xxx_messageInfo_URLFetchResponse_Header proto.InternalMessageInfo func (m *URLFetchResponse_Header) GetKey() string { if m != nil && m.Key != nil { @@ -376,10 +470,10 @@ func init() { } func init() { - proto.RegisterFile("google.golang.org/appengine/internal/urlfetch/urlfetch_service.proto", fileDescriptor0) + proto.RegisterFile("google.golang.org/appengine/internal/urlfetch/urlfetch_service.proto", fileDescriptor_urlfetch_service_b245a7065f33bced) } -var fileDescriptor0 = []byte{ +var fileDescriptor_urlfetch_service_b245a7065f33bced = []byte{ // 770 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x54, 0xdd, 0x6e, 0xe3, 0x54, 0x10, 0xc6, 0x76, 0x7e, 0xa7, 0x5d, 0x7a, 0x76, 0xb6, 0x45, 0x66, 0xb5, 0xa0, 0x10, 0x09, 0x29,