mirror of
https://github.com/restic/restic.git
synced 2025-12-14 12:01:49 +00:00
Update vendored dependencies
This commit is contained in:
96
vendor/google.golang.org/api/fitness/v1/fitness-api.json
generated
vendored
96
vendor/google.golang.org/api/fitness/v1/fitness-api.json
generated
vendored
@@ -1,11 +1,11 @@
|
||||
{
|
||||
"kind": "discovery#restDescription",
|
||||
"etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/PSZLmkjt_9IWTJ6ZQ-VpYeFyZ2w\"",
|
||||
"etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/Iezg2N-GRRgP6nxERqABDosZ2Tk\"",
|
||||
"discoveryVersion": "v1",
|
||||
"id": "fitness:v1",
|
||||
"name": "fitness",
|
||||
"version": "v1",
|
||||
"revision": "20170731",
|
||||
"revision": "20170830",
|
||||
"title": "Fitness",
|
||||
"description": "Stores and accesses user data in the fitness store from apps on any platform.",
|
||||
"ownerDomain": "google.com",
|
||||
@@ -20,7 +20,7 @@
|
||||
"basePath": "/fitness/v1/users/",
|
||||
"rootUrl": "https://www.googleapis.com/",
|
||||
"servicePath": "fitness/v1/users/",
|
||||
"batchPath": "batch",
|
||||
"batchPath": "batch/fitness/v1",
|
||||
"parameters": {
|
||||
"alt": {
|
||||
"type": "string",
|
||||
@@ -763,6 +763,34 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"ListDataPointChangesResponse": {
|
||||
"id": "ListDataPointChangesResponse",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"dataSourceId": {
|
||||
"type": "string",
|
||||
"description": "The data stream ID of the data source with data point changes."
|
||||
},
|
||||
"deletedDataPoint": {
|
||||
"type": "array",
|
||||
"description": "Data points that have been removed and will not be included in any other request for dataset contents.",
|
||||
"items": {
|
||||
"$ref": "DataPoint"
|
||||
}
|
||||
},
|
||||
"insertedDataPoint": {
|
||||
"type": "array",
|
||||
"description": "Data points listed.",
|
||||
"items": {
|
||||
"$ref": "DataPoint"
|
||||
}
|
||||
},
|
||||
"nextPageToken": {
|
||||
"type": "string",
|
||||
"description": "The continuation token, which is used to page through large result sets. Provide this value in a subsequent request to return the next page of results."
|
||||
}
|
||||
}
|
||||
},
|
||||
"ListDataSourcesResponse": {
|
||||
"id": "ListDataSourcesResponse",
|
||||
"type": "object",
|
||||
@@ -1189,6 +1217,68 @@
|
||||
}
|
||||
},
|
||||
"resources": {
|
||||
"dataPointChanges": {
|
||||
"methods": {
|
||||
"list": {
|
||||
"id": "fitness.users.dataSources.dataPointChanges.list",
|
||||
"path": "{userId}/dataSources/{dataSourceId}/dataPointChanges",
|
||||
"httpMethod": "GET",
|
||||
"description": "results ordered by descending end_time",
|
||||
"parameters": {
|
||||
"dataSourceId": {
|
||||
"type": "string",
|
||||
"description": "The data stream ID of the data source that created the dataset.",
|
||||
"required": true,
|
||||
"location": "path"
|
||||
},
|
||||
"limit": {
|
||||
"type": "integer",
|
||||
"description": "If specified, no more than this many data point changes will be included in the response. The default is 500 data point changes.",
|
||||
"format": "int32",
|
||||
"location": "query"
|
||||
},
|
||||
"pageToken": {
|
||||
"type": "string",
|
||||
"description": "The continuation token, which is used to page through large result sets. To get the next page of results, set this parameter to the value of nextPageToken from the previous response.",
|
||||
"location": "query"
|
||||
},
|
||||
"userId": {
|
||||
"type": "string",
|
||||
"description": "List data points for the person identified. Use \"me\" to indicate the authenticated user. Only \"me\" is supported at this time.",
|
||||
"required": true,
|
||||
"location": "path"
|
||||
}
|
||||
},
|
||||
"parameterOrder": [
|
||||
"userId",
|
||||
"dataSourceId"
|
||||
],
|
||||
"response": {
|
||||
"$ref": "ListDataPointChangesResponse"
|
||||
},
|
||||
"scopes": [
|
||||
"https://www.googleapis.com/auth/fitness.activity.read",
|
||||
"https://www.googleapis.com/auth/fitness.activity.write",
|
||||
"https://www.googleapis.com/auth/fitness.blood_glucose.read",
|
||||
"https://www.googleapis.com/auth/fitness.blood_glucose.write",
|
||||
"https://www.googleapis.com/auth/fitness.blood_pressure.read",
|
||||
"https://www.googleapis.com/auth/fitness.blood_pressure.write",
|
||||
"https://www.googleapis.com/auth/fitness.body.read",
|
||||
"https://www.googleapis.com/auth/fitness.body.write",
|
||||
"https://www.googleapis.com/auth/fitness.body_temperature.read",
|
||||
"https://www.googleapis.com/auth/fitness.body_temperature.write",
|
||||
"https://www.googleapis.com/auth/fitness.location.read",
|
||||
"https://www.googleapis.com/auth/fitness.location.write",
|
||||
"https://www.googleapis.com/auth/fitness.nutrition.read",
|
||||
"https://www.googleapis.com/auth/fitness.nutrition.write",
|
||||
"https://www.googleapis.com/auth/fitness.oxygen_saturation.read",
|
||||
"https://www.googleapis.com/auth/fitness.oxygen_saturation.write",
|
||||
"https://www.googleapis.com/auth/fitness.reproductive_health.read",
|
||||
"https://www.googleapis.com/auth/fitness.reproductive_health.write"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"datasets": {
|
||||
"methods": {
|
||||
"delete": {
|
||||
|
||||
269
vendor/google.golang.org/api/fitness/v1/fitness-gen.go
generated
vendored
269
vendor/google.golang.org/api/fitness/v1/fitness-gen.go
generated
vendored
@@ -146,6 +146,7 @@ type UsersService struct {
|
||||
|
||||
func NewUsersDataSourcesService(s *Service) *UsersDataSourcesService {
|
||||
rs := &UsersDataSourcesService{s: s}
|
||||
rs.DataPointChanges = NewUsersDataSourcesDataPointChangesService(s)
|
||||
rs.Datasets = NewUsersDataSourcesDatasetsService(s)
|
||||
return rs
|
||||
}
|
||||
@@ -153,9 +154,20 @@ func NewUsersDataSourcesService(s *Service) *UsersDataSourcesService {
|
||||
type UsersDataSourcesService struct {
|
||||
s *Service
|
||||
|
||||
DataPointChanges *UsersDataSourcesDataPointChangesService
|
||||
|
||||
Datasets *UsersDataSourcesDatasetsService
|
||||
}
|
||||
|
||||
func NewUsersDataSourcesDataPointChangesService(s *Service) *UsersDataSourcesDataPointChangesService {
|
||||
rs := &UsersDataSourcesDataPointChangesService{s: s}
|
||||
return rs
|
||||
}
|
||||
|
||||
type UsersDataSourcesDataPointChangesService struct {
|
||||
s *Service
|
||||
}
|
||||
|
||||
func NewUsersDataSourcesDatasetsService(s *Service) *UsersDataSourcesDatasetsService {
|
||||
rs := &UsersDataSourcesDatasetsService{s: s}
|
||||
return rs
|
||||
@@ -981,6 +993,50 @@ func (s *Device) MarshalJSON() ([]byte, error) {
|
||||
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
|
||||
}
|
||||
|
||||
type ListDataPointChangesResponse struct {
|
||||
// DataSourceId: The data stream ID of the data source with data point
|
||||
// changes.
|
||||
DataSourceId string `json:"dataSourceId,omitempty"`
|
||||
|
||||
// DeletedDataPoint: Data points that have been removed and will not be
|
||||
// included in any other request for dataset contents.
|
||||
DeletedDataPoint []*DataPoint `json:"deletedDataPoint,omitempty"`
|
||||
|
||||
// InsertedDataPoint: Data points listed.
|
||||
InsertedDataPoint []*DataPoint `json:"insertedDataPoint,omitempty"`
|
||||
|
||||
// NextPageToken: The continuation token, which is used to page through
|
||||
// large result sets. Provide this value in a subsequent request to
|
||||
// return the next page of results.
|
||||
NextPageToken string `json:"nextPageToken,omitempty"`
|
||||
|
||||
// ServerResponse contains the HTTP response code and headers from the
|
||||
// server.
|
||||
googleapi.ServerResponse `json:"-"`
|
||||
|
||||
// ForceSendFields is a list of field names (e.g. "DataSourceId") to
|
||||
// unconditionally include in API requests. By default, fields with
|
||||
// empty values are omitted from API requests. However, any non-pointer,
|
||||
// non-interface field appearing in ForceSendFields will be sent to the
|
||||
// server regardless of whether the field is empty or not. This may be
|
||||
// used to include empty fields in Patch requests.
|
||||
ForceSendFields []string `json:"-"`
|
||||
|
||||
// NullFields is a list of field names (e.g. "DataSourceId") to include
|
||||
// in API requests with the JSON null value. By default, fields with
|
||||
// empty values are omitted from API requests. However, any field with
|
||||
// an empty value appearing in NullFields will be sent to the server as
|
||||
// null. It is an error if a field in this list has a non-empty value.
|
||||
// This may be used to include null fields in Patch requests.
|
||||
NullFields []string `json:"-"`
|
||||
}
|
||||
|
||||
func (s *ListDataPointChangesResponse) MarshalJSON() ([]byte, error) {
|
||||
type noMethod ListDataPointChangesResponse
|
||||
raw := noMethod(*s)
|
||||
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
|
||||
}
|
||||
|
||||
type ListDataSourcesResponse struct {
|
||||
// DataSource: A previously created data source.
|
||||
DataSource []*DataSource `json:"dataSource,omitempty"`
|
||||
@@ -2197,6 +2253,219 @@ func (c *UsersDataSourcesUpdateCall) Do(opts ...googleapi.CallOption) (*DataSour
|
||||
|
||||
}
|
||||
|
||||
// method id "fitness.users.dataSources.dataPointChanges.list":
|
||||
|
||||
type UsersDataSourcesDataPointChangesListCall struct {
|
||||
s *Service
|
||||
userId string
|
||||
dataSourceId string
|
||||
urlParams_ gensupport.URLParams
|
||||
ifNoneMatch_ string
|
||||
ctx_ context.Context
|
||||
header_ http.Header
|
||||
}
|
||||
|
||||
// List: results ordered by descending end_time
|
||||
func (r *UsersDataSourcesDataPointChangesService) List(userId string, dataSourceId string) *UsersDataSourcesDataPointChangesListCall {
|
||||
c := &UsersDataSourcesDataPointChangesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
|
||||
c.userId = userId
|
||||
c.dataSourceId = dataSourceId
|
||||
return c
|
||||
}
|
||||
|
||||
// Limit sets the optional parameter "limit": If specified, no more than
|
||||
// this many data point changes will be included in the response. The
|
||||
// default is 500 data point changes.
|
||||
func (c *UsersDataSourcesDataPointChangesListCall) Limit(limit int64) *UsersDataSourcesDataPointChangesListCall {
|
||||
c.urlParams_.Set("limit", fmt.Sprint(limit))
|
||||
return c
|
||||
}
|
||||
|
||||
// PageToken sets the optional parameter "pageToken": The continuation
|
||||
// token, which is used to page through large result sets. To get the
|
||||
// next page of results, set this parameter to the value of
|
||||
// nextPageToken from the previous response.
|
||||
func (c *UsersDataSourcesDataPointChangesListCall) PageToken(pageToken string) *UsersDataSourcesDataPointChangesListCall {
|
||||
c.urlParams_.Set("pageToken", pageToken)
|
||||
return c
|
||||
}
|
||||
|
||||
// Fields allows partial responses to be retrieved. See
|
||||
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
|
||||
// for more information.
|
||||
func (c *UsersDataSourcesDataPointChangesListCall) Fields(s ...googleapi.Field) *UsersDataSourcesDataPointChangesListCall {
|
||||
c.urlParams_.Set("fields", googleapi.CombineFields(s))
|
||||
return c
|
||||
}
|
||||
|
||||
// IfNoneMatch sets the optional parameter which makes the operation
|
||||
// fail if the object's ETag matches the given value. This is useful for
|
||||
// getting updates only after the object has changed since the last
|
||||
// request. Use googleapi.IsNotModified to check whether the response
|
||||
// error from Do is the result of In-None-Match.
|
||||
func (c *UsersDataSourcesDataPointChangesListCall) IfNoneMatch(entityTag string) *UsersDataSourcesDataPointChangesListCall {
|
||||
c.ifNoneMatch_ = entityTag
|
||||
return c
|
||||
}
|
||||
|
||||
// Context sets the context to be used in this call's Do method. Any
|
||||
// pending HTTP request will be aborted if the provided context is
|
||||
// canceled.
|
||||
func (c *UsersDataSourcesDataPointChangesListCall) Context(ctx context.Context) *UsersDataSourcesDataPointChangesListCall {
|
||||
c.ctx_ = ctx
|
||||
return c
|
||||
}
|
||||
|
||||
// Header returns an http.Header that can be modified by the caller to
|
||||
// add HTTP headers to the request.
|
||||
func (c *UsersDataSourcesDataPointChangesListCall) Header() http.Header {
|
||||
if c.header_ == nil {
|
||||
c.header_ = make(http.Header)
|
||||
}
|
||||
return c.header_
|
||||
}
|
||||
|
||||
func (c *UsersDataSourcesDataPointChangesListCall) doRequest(alt string) (*http.Response, error) {
|
||||
reqHeaders := make(http.Header)
|
||||
for k, v := range c.header_ {
|
||||
reqHeaders[k] = v
|
||||
}
|
||||
reqHeaders.Set("User-Agent", c.s.userAgent())
|
||||
if c.ifNoneMatch_ != "" {
|
||||
reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
|
||||
}
|
||||
var body io.Reader = nil
|
||||
c.urlParams_.Set("alt", alt)
|
||||
urls := googleapi.ResolveRelative(c.s.BasePath, "{userId}/dataSources/{dataSourceId}/dataPointChanges")
|
||||
urls += "?" + c.urlParams_.Encode()
|
||||
req, _ := http.NewRequest("GET", urls, body)
|
||||
req.Header = reqHeaders
|
||||
googleapi.Expand(req.URL, map[string]string{
|
||||
"userId": c.userId,
|
||||
"dataSourceId": c.dataSourceId,
|
||||
})
|
||||
return gensupport.SendRequest(c.ctx_, c.s.client, req)
|
||||
}
|
||||
|
||||
// Do executes the "fitness.users.dataSources.dataPointChanges.list" call.
|
||||
// Exactly one of *ListDataPointChangesResponse or error will be
|
||||
// non-nil. Any non-2xx status code is an error. Response headers are in
|
||||
// either *ListDataPointChangesResponse.ServerResponse.Header or (if a
|
||||
// response was returned at all) in error.(*googleapi.Error).Header. Use
|
||||
// googleapi.IsNotModified to check whether the returned error was
|
||||
// because http.StatusNotModified was returned.
|
||||
func (c *UsersDataSourcesDataPointChangesListCall) Do(opts ...googleapi.CallOption) (*ListDataPointChangesResponse, error) {
|
||||
gensupport.SetOptions(c.urlParams_, opts...)
|
||||
res, err := c.doRequest("json")
|
||||
if res != nil && res.StatusCode == http.StatusNotModified {
|
||||
if res.Body != nil {
|
||||
res.Body.Close()
|
||||
}
|
||||
return nil, &googleapi.Error{
|
||||
Code: res.StatusCode,
|
||||
Header: res.Header,
|
||||
}
|
||||
}
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
defer googleapi.CloseBody(res)
|
||||
if err := googleapi.CheckResponse(res); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
ret := &ListDataPointChangesResponse{
|
||||
ServerResponse: googleapi.ServerResponse{
|
||||
Header: res.Header,
|
||||
HTTPStatusCode: res.StatusCode,
|
||||
},
|
||||
}
|
||||
target := &ret
|
||||
if err := json.NewDecoder(res.Body).Decode(target); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return ret, nil
|
||||
// {
|
||||
// "description": "results ordered by descending end_time",
|
||||
// "httpMethod": "GET",
|
||||
// "id": "fitness.users.dataSources.dataPointChanges.list",
|
||||
// "parameterOrder": [
|
||||
// "userId",
|
||||
// "dataSourceId"
|
||||
// ],
|
||||
// "parameters": {
|
||||
// "dataSourceId": {
|
||||
// "description": "The data stream ID of the data source that created the dataset.",
|
||||
// "location": "path",
|
||||
// "required": true,
|
||||
// "type": "string"
|
||||
// },
|
||||
// "limit": {
|
||||
// "description": "If specified, no more than this many data point changes will be included in the response. The default is 500 data point changes.",
|
||||
// "format": "int32",
|
||||
// "location": "query",
|
||||
// "type": "integer"
|
||||
// },
|
||||
// "pageToken": {
|
||||
// "description": "The continuation token, which is used to page through large result sets. To get the next page of results, set this parameter to the value of nextPageToken from the previous response.",
|
||||
// "location": "query",
|
||||
// "type": "string"
|
||||
// },
|
||||
// "userId": {
|
||||
// "description": "List data points for the person identified. Use \"me\" to indicate the authenticated user. Only \"me\" is supported at this time.",
|
||||
// "location": "path",
|
||||
// "required": true,
|
||||
// "type": "string"
|
||||
// }
|
||||
// },
|
||||
// "path": "{userId}/dataSources/{dataSourceId}/dataPointChanges",
|
||||
// "response": {
|
||||
// "$ref": "ListDataPointChangesResponse"
|
||||
// },
|
||||
// "scopes": [
|
||||
// "https://www.googleapis.com/auth/fitness.activity.read",
|
||||
// "https://www.googleapis.com/auth/fitness.activity.write",
|
||||
// "https://www.googleapis.com/auth/fitness.blood_glucose.read",
|
||||
// "https://www.googleapis.com/auth/fitness.blood_glucose.write",
|
||||
// "https://www.googleapis.com/auth/fitness.blood_pressure.read",
|
||||
// "https://www.googleapis.com/auth/fitness.blood_pressure.write",
|
||||
// "https://www.googleapis.com/auth/fitness.body.read",
|
||||
// "https://www.googleapis.com/auth/fitness.body.write",
|
||||
// "https://www.googleapis.com/auth/fitness.body_temperature.read",
|
||||
// "https://www.googleapis.com/auth/fitness.body_temperature.write",
|
||||
// "https://www.googleapis.com/auth/fitness.location.read",
|
||||
// "https://www.googleapis.com/auth/fitness.location.write",
|
||||
// "https://www.googleapis.com/auth/fitness.nutrition.read",
|
||||
// "https://www.googleapis.com/auth/fitness.nutrition.write",
|
||||
// "https://www.googleapis.com/auth/fitness.oxygen_saturation.read",
|
||||
// "https://www.googleapis.com/auth/fitness.oxygen_saturation.write",
|
||||
// "https://www.googleapis.com/auth/fitness.reproductive_health.read",
|
||||
// "https://www.googleapis.com/auth/fitness.reproductive_health.write"
|
||||
// ]
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
// Pages invokes f for each page of results.
|
||||
// A non-nil error returned from f will halt the iteration.
|
||||
// The provided context supersedes any context provided to the Context method.
|
||||
func (c *UsersDataSourcesDataPointChangesListCall) Pages(ctx context.Context, f func(*ListDataPointChangesResponse) error) error {
|
||||
c.ctx_ = ctx
|
||||
defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
|
||||
for {
|
||||
x, err := c.Do()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if err := f(x); err != nil {
|
||||
return err
|
||||
}
|
||||
if x.NextPageToken == "" {
|
||||
return nil
|
||||
}
|
||||
c.PageToken(x.NextPageToken)
|
||||
}
|
||||
}
|
||||
|
||||
// method id "fitness.users.dataSources.datasets.delete":
|
||||
|
||||
type UsersDataSourcesDatasetsDeleteCall struct {
|
||||
|
||||
Reference in New Issue
Block a user