vendor: update all dependencies

This commit is contained in:
Nick Craig-Wood
2018-03-19 15:51:38 +00:00
parent 940df88eb2
commit d64789528d
4309 changed files with 1327230 additions and 1001070 deletions
+358 -358
View File
@@ -1,366 +1,366 @@
{
"kind": "discovery#restDescription",
"etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/kYN47VW3boRYzE7pkj4HK3FyEC0\"",
"discoveryVersion": "v1",
"id": "analytics:v2.4",
"name": "analytics",
"version": "v2.4",
"revision": "20170807",
"title": "Google Analytics API",
"description": "Views and manages your Google Analytics data.",
"ownerDomain": "google.com",
"ownerName": "Google",
"icons": {
"x16": "https://www.google.com/images/icons/product/analytics-16.png",
"x32": "https://www.google.com/images/icons/product/analytics-32.png"
},
"documentationLink": "https://developers.google.com/analytics/",
"protocol": "rest",
"baseUrl": "https://www.googleapis.com/analytics/v2.4/",
"basePath": "/analytics/v2.4/",
"rootUrl": "https://www.googleapis.com/",
"servicePath": "analytics/v2.4/",
"batchPath": "batch/analytics/v2.4",
"parameters": {
"alt": {
"type": "string",
"description": "Data format for the response.",
"default": "atom",
"enum": [
"atom"
],
"enumDescriptions": [
"Responses with Content-Type of application/atom+xml"
],
"location": "query"
},
"fields": {
"type": "string",
"description": "Selector specifying which fields to include in a partial response.",
"location": "query"
},
"key": {
"type": "string",
"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.",
"location": "query"
},
"oauth_token": {
"type": "string",
"description": "OAuth 2.0 token for the current user.",
"location": "query"
},
"prettyPrint": {
"type": "boolean",
"description": "Returns response with indentations and line breaks.",
"default": "false",
"location": "query"
},
"quotaUser": {
"type": "string",
"description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.",
"location": "query"
},
"userIp": {
"type": "string",
"description": "IP address of the site where the request originates. Use this if you want to enforce per-user limits.",
"location": "query"
}
},
"auth": {
"oauth2": {
"scopes": {
"https://www.googleapis.com/auth/analytics": {
"description": "View and manage your Google Analytics data"
},
"https://www.googleapis.com/auth/analytics.readonly": {
"description": "View your Google Analytics data"
"auth": {
"oauth2": {
"scopes": {
"https://www.googleapis.com/auth/analytics": {
"description": "View and manage your Google Analytics data"
},
"https://www.googleapis.com/auth/analytics.readonly": {
"description": "View your Google Analytics data"
}
}
}
}
}
},
"resources": {
"data": {
"methods": {
"get": {
"id": "analytics.data.get",
"path": "data",
"httpMethod": "GET",
"description": "Returns Analytics report data for a view (profile).",
"parameters": {
"dimensions": {
"type": "string",
"description": "A comma-separated list of Analytics dimensions. E.g., 'ga:browser,ga:city'.",
"pattern": "(ga:.+)?",
"location": "query"
},
"end-date": {
"type": "string",
"description": "End date for fetching report data. All requests should specify an end date formatted as YYYY-MM-DD.",
"required": true,
"pattern": "[0-9]{4}-[0-9]{2}-[0-9]{2}",
"location": "query"
},
"filters": {
"type": "string",
"description": "A comma-separated list of dimension or metric filters to be applied to the report data.",
"pattern": "ga:.+",
"location": "query"
},
"ids": {
"type": "string",
"description": "Unique table ID for retrieving report data. Table ID is of the form ga:XXXX, where XXXX is the Analytics view (profile) ID.",
"required": true,
"pattern": "ga:[0-9]+",
"location": "query"
},
"max-results": {
"type": "integer",
"description": "The maximum number of entries to include in this feed.",
"format": "int32",
"location": "query"
},
"metrics": {
"type": "string",
"description": "A comma-separated list of Analytics metrics. E.g., 'ga:sessions,ga:pageviews'. At least one metric must be specified to retrieve a valid Analytics report.",
"required": true,
"pattern": "ga:.+",
"location": "query"
},
"segment": {
"type": "string",
"description": "An Analytics advanced segment to be applied to the report data.",
"location": "query"
},
"sort": {
"type": "string",
"description": "A comma-separated list of dimensions or metrics that determine the sort order for the report data.",
"pattern": "(-)?ga:.+",
"location": "query"
},
"start-date": {
"type": "string",
"description": "Start date for fetching report data. All requests should specify a start date formatted as YYYY-MM-DD.",
"required": true,
"pattern": "[0-9]{4}-[0-9]{2}-[0-9]{2}",
"location": "query"
},
"start-index": {
"type": "integer",
"description": "An index of the first entity to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter.",
"format": "int32",
"minimum": "1",
"location": "query"
}
},
"parameterOrder": [
"ids",
"start-date",
"end-date",
"metrics"
],
"scopes": [
"https://www.googleapis.com/auth/analytics",
"https://www.googleapis.com/auth/analytics.readonly"
]
}
}
},
"management": {
"resources": {
"accounts": {
"methods": {
"list": {
"id": "analytics.management.accounts.list",
"path": "management/accounts",
"httpMethod": "GET",
"description": "Lists all accounts to which the user has access.",
"parameters": {
"max-results": {
"type": "integer",
"description": "The maximum number of accounts to include in this response.",
"format": "int32",
"location": "query"
},
"start-index": {
"type": "integer",
"description": "An index of the first account to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter.",
"format": "int32",
"minimum": "1",
"location": "query"
}
},
"scopes": [
"https://www.googleapis.com/auth/analytics",
"https://www.googleapis.com/auth/analytics.readonly"
]
}
}
"basePath": "/analytics/v2.4/",
"baseUrl": "https://www.googleapis.com/analytics/v2.4/",
"batchPath": "batch/analytics/v2.4",
"description": "Views and manages your Google Analytics data.",
"discoveryVersion": "v1",
"documentationLink": "https://developers.google.com/analytics/",
"etag": "\"-iA1DTNe4s-I6JZXPt1t1Ypy8IU/ulqmidM-fMam4LKTNGEvE0WurA4\"",
"icons": {
"x16": "https://www.google.com/images/icons/product/analytics-16.png",
"x32": "https://www.google.com/images/icons/product/analytics-32.png"
},
"id": "analytics:v2.4",
"kind": "discovery#restDescription",
"name": "analytics",
"ownerDomain": "google.com",
"ownerName": "Google",
"parameters": {
"alt": {
"default": "atom",
"description": "Data format for the response.",
"enum": [
"atom"
],
"enumDescriptions": [
"Responses with Content-Type of application/atom+xml"
],
"location": "query",
"type": "string"
},
"goals": {
"methods": {
"list": {
"id": "analytics.management.goals.list",
"path": "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/goals",
"httpMethod": "GET",
"description": "Lists goals to which the user has access.",
"parameters": {
"accountId": {
"type": "string",
"description": "Account ID to retrieve goals for. Can either be a specific account ID or '~all', which refers to all the accounts that user has access to.",
"required": true,
"location": "path"
},
"max-results": {
"type": "integer",
"description": "The maximum number of goals to include in this response.",
"format": "int32",
"location": "query"
},
"profileId": {
"type": "string",
"description": "View (Profile) ID to retrieve goals for. Can either be a specific view (profile) ID or '~all', which refers to all the views (profiles) that user has access to.",
"required": true,
"location": "path"
},
"start-index": {
"type": "integer",
"description": "An index of the first goal to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter.",
"format": "int32",
"minimum": "1",
"location": "query"
},
"webPropertyId": {
"type": "string",
"description": "Web property ID to retrieve goals for. Can either be a specific web property ID or '~all', which refers to all the web properties that user has access to.",
"required": true,
"location": "path"
}
},
"parameterOrder": [
"accountId",
"webPropertyId",
"profileId"
],
"scopes": [
"https://www.googleapis.com/auth/analytics",
"https://www.googleapis.com/auth/analytics.readonly"
]
}
}
"fields": {
"description": "Selector specifying which fields to include in a partial response.",
"location": "query",
"type": "string"
},
"profiles": {
"methods": {
"list": {
"id": "analytics.management.profiles.list",
"path": "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles",
"httpMethod": "GET",
"description": "Lists views (profiles) to which the user has access.",
"parameters": {
"accountId": {
"type": "string",
"description": "Account ID for the views (profiles) to retrieve. Can either be a specific account ID or '~all', which refers to all the accounts to which the user has access.",
"required": true,
"location": "path"
},
"max-results": {
"type": "integer",
"description": "The maximum number of views (profiles) to include in this response.",
"format": "int32",
"location": "query"
},
"start-index": {
"type": "integer",
"description": "An index of the first entity to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter.",
"format": "int32",
"minimum": "1",
"location": "query"
},
"webPropertyId": {
"type": "string",
"description": "Web property ID for the views (profiles) to retrieve. Can either be a specific web property ID or '~all', which refers to all the web properties to which the user has access.",
"required": true,
"location": "path"
}
},
"parameterOrder": [
"accountId",
"webPropertyId"
],
"scopes": [
"https://www.googleapis.com/auth/analytics",
"https://www.googleapis.com/auth/analytics.readonly"
]
}
}
"key": {
"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.",
"location": "query",
"type": "string"
},
"segments": {
"methods": {
"list": {
"id": "analytics.management.segments.list",
"path": "management/segments",
"httpMethod": "GET",
"description": "Lists advanced segments to which the user has access.",
"parameters": {
"max-results": {
"type": "integer",
"description": "The maximum number of advanced segments to include in this response.",
"format": "int32",
"location": "query"
},
"start-index": {
"type": "integer",
"description": "An index of the first advanced segment to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter.",
"format": "int32",
"minimum": "1",
"location": "query"
}
},
"scopes": [
"https://www.googleapis.com/auth/analytics",
"https://www.googleapis.com/auth/analytics.readonly"
]
}
}
"oauth_token": {
"description": "OAuth 2.0 token for the current user.",
"location": "query",
"type": "string"
},
"webproperties": {
"methods": {
"list": {
"id": "analytics.management.webproperties.list",
"path": "management/accounts/{accountId}/webproperties",
"httpMethod": "GET",
"description": "Lists web properties to which the user has access.",
"parameters": {
"accountId": {
"type": "string",
"description": "Account ID to retrieve web properties for. Can either be a specific account ID or '~all', which refers to all the accounts that user has access to.",
"required": true,
"location": "path"
},
"max-results": {
"type": "integer",
"description": "The maximum number of web properties to include in this response.",
"format": "int32",
"location": "query"
},
"start-index": {
"type": "integer",
"description": "An index of the first entity to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter.",
"format": "int32",
"minimum": "1",
"location": "query"
}
},
"parameterOrder": [
"accountId"
],
"scopes": [
"https://www.googleapis.com/auth/analytics",
"https://www.googleapis.com/auth/analytics.readonly"
]
}
}
"prettyPrint": {
"default": "false",
"description": "Returns response with indentations and line breaks.",
"location": "query",
"type": "boolean"
},
"quotaUser": {
"description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.",
"location": "query",
"type": "string"
},
"userIp": {
"description": "IP address of the site where the request originates. Use this if you want to enforce per-user limits.",
"location": "query",
"type": "string"
}
}
}
}
}
},
"protocol": "rest",
"resources": {
"data": {
"methods": {
"get": {
"description": "Returns Analytics report data for a view (profile).",
"httpMethod": "GET",
"id": "analytics.data.get",
"parameterOrder": [
"ids",
"start-date",
"end-date",
"metrics"
],
"parameters": {
"dimensions": {
"description": "A comma-separated list of Analytics dimensions. E.g., 'ga:browser,ga:city'.",
"location": "query",
"pattern": "(ga:.+)?",
"type": "string"
},
"end-date": {
"description": "End date for fetching report data. All requests should specify an end date formatted as YYYY-MM-DD.",
"location": "query",
"pattern": "[0-9]{4}-[0-9]{2}-[0-9]{2}",
"required": true,
"type": "string"
},
"filters": {
"description": "A comma-separated list of dimension or metric filters to be applied to the report data.",
"location": "query",
"pattern": "ga:.+",
"type": "string"
},
"ids": {
"description": "Unique table ID for retrieving report data. Table ID is of the form ga:XXXX, where XXXX is the Analytics view (profile) ID.",
"location": "query",
"pattern": "ga:[0-9]+",
"required": true,
"type": "string"
},
"max-results": {
"description": "The maximum number of entries to include in this feed.",
"format": "int32",
"location": "query",
"type": "integer"
},
"metrics": {
"description": "A comma-separated list of Analytics metrics. E.g., 'ga:sessions,ga:pageviews'. At least one metric must be specified to retrieve a valid Analytics report.",
"location": "query",
"pattern": "ga:.+",
"required": true,
"type": "string"
},
"segment": {
"description": "An Analytics advanced segment to be applied to the report data.",
"location": "query",
"type": "string"
},
"sort": {
"description": "A comma-separated list of dimensions or metrics that determine the sort order for the report data.",
"location": "query",
"pattern": "(-)?ga:.+",
"type": "string"
},
"start-date": {
"description": "Start date for fetching report data. All requests should specify a start date formatted as YYYY-MM-DD.",
"location": "query",
"pattern": "[0-9]{4}-[0-9]{2}-[0-9]{2}",
"required": true,
"type": "string"
},
"start-index": {
"description": "An index of the first entity to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter.",
"format": "int32",
"location": "query",
"minimum": "1",
"type": "integer"
}
},
"path": "data",
"scopes": [
"https://www.googleapis.com/auth/analytics",
"https://www.googleapis.com/auth/analytics.readonly"
]
}
}
},
"management": {
"resources": {
"accounts": {
"methods": {
"list": {
"description": "Lists all accounts to which the user has access.",
"httpMethod": "GET",
"id": "analytics.management.accounts.list",
"parameters": {
"max-results": {
"description": "The maximum number of accounts to include in this response.",
"format": "int32",
"location": "query",
"type": "integer"
},
"start-index": {
"description": "An index of the first account to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter.",
"format": "int32",
"location": "query",
"minimum": "1",
"type": "integer"
}
},
"path": "management/accounts",
"scopes": [
"https://www.googleapis.com/auth/analytics",
"https://www.googleapis.com/auth/analytics.readonly"
]
}
}
},
"goals": {
"methods": {
"list": {
"description": "Lists goals to which the user has access.",
"httpMethod": "GET",
"id": "analytics.management.goals.list",
"parameterOrder": [
"accountId",
"webPropertyId",
"profileId"
],
"parameters": {
"accountId": {
"description": "Account ID to retrieve goals for. Can either be a specific account ID or '~all', which refers to all the accounts that user has access to.",
"location": "path",
"required": true,
"type": "string"
},
"max-results": {
"description": "The maximum number of goals to include in this response.",
"format": "int32",
"location": "query",
"type": "integer"
},
"profileId": {
"description": "View (Profile) ID to retrieve goals for. Can either be a specific view (profile) ID or '~all', which refers to all the views (profiles) that user has access to.",
"location": "path",
"required": true,
"type": "string"
},
"start-index": {
"description": "An index of the first goal to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter.",
"format": "int32",
"location": "query",
"minimum": "1",
"type": "integer"
},
"webPropertyId": {
"description": "Web property ID to retrieve goals for. Can either be a specific web property ID or '~all', which refers to all the web properties that user has access to.",
"location": "path",
"required": true,
"type": "string"
}
},
"path": "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/goals",
"scopes": [
"https://www.googleapis.com/auth/analytics",
"https://www.googleapis.com/auth/analytics.readonly"
]
}
}
},
"profiles": {
"methods": {
"list": {
"description": "Lists views (profiles) to which the user has access.",
"httpMethod": "GET",
"id": "analytics.management.profiles.list",
"parameterOrder": [
"accountId",
"webPropertyId"
],
"parameters": {
"accountId": {
"description": "Account ID for the views (profiles) to retrieve. Can either be a specific account ID or '~all', which refers to all the accounts to which the user has access.",
"location": "path",
"required": true,
"type": "string"
},
"max-results": {
"description": "The maximum number of views (profiles) to include in this response.",
"format": "int32",
"location": "query",
"type": "integer"
},
"start-index": {
"description": "An index of the first entity to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter.",
"format": "int32",
"location": "query",
"minimum": "1",
"type": "integer"
},
"webPropertyId": {
"description": "Web property ID for the views (profiles) to retrieve. Can either be a specific web property ID or '~all', which refers to all the web properties to which the user has access.",
"location": "path",
"required": true,
"type": "string"
}
},
"path": "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles",
"scopes": [
"https://www.googleapis.com/auth/analytics",
"https://www.googleapis.com/auth/analytics.readonly"
]
}
}
},
"segments": {
"methods": {
"list": {
"description": "Lists advanced segments to which the user has access.",
"httpMethod": "GET",
"id": "analytics.management.segments.list",
"parameters": {
"max-results": {
"description": "The maximum number of advanced segments to include in this response.",
"format": "int32",
"location": "query",
"type": "integer"
},
"start-index": {
"description": "An index of the first advanced segment to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter.",
"format": "int32",
"location": "query",
"minimum": "1",
"type": "integer"
}
},
"path": "management/segments",
"scopes": [
"https://www.googleapis.com/auth/analytics",
"https://www.googleapis.com/auth/analytics.readonly"
]
}
}
},
"webproperties": {
"methods": {
"list": {
"description": "Lists web properties to which the user has access.",
"httpMethod": "GET",
"id": "analytics.management.webproperties.list",
"parameterOrder": [
"accountId"
],
"parameters": {
"accountId": {
"description": "Account ID to retrieve web properties for. Can either be a specific account ID or '~all', which refers to all the accounts that user has access to.",
"location": "path",
"required": true,
"type": "string"
},
"max-results": {
"description": "The maximum number of web properties to include in this response.",
"format": "int32",
"location": "query",
"type": "integer"
},
"start-index": {
"description": "An index of the first entity to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter.",
"format": "int32",
"location": "query",
"minimum": "1",
"type": "integer"
}
},
"path": "management/accounts/{accountId}/webproperties",
"scopes": [
"https://www.googleapis.com/auth/analytics",
"https://www.googleapis.com/auth/analytics.readonly"
]
}
}
}
}
}
},
"revision": "20171211",
"rootUrl": "https://www.googleapis.com/",
"servicePath": "analytics/v2.4/",
"title": "Google Analytics API",
"version": "v2.4"
}
File diff suppressed because it is too large Load Diff
+282 -1
View File
@@ -718,6 +718,169 @@ func (s *AccountTicket) MarshalJSON() ([]byte, error) {
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// AccountTreeRequest: JSON template for an Analytics account tree
// requests. The account tree request is used in the provisioning api to
// create an account, property, and view (profile). It contains the
// basic information required to make these fields.
type AccountTreeRequest struct {
AccountName string `json:"accountName,omitempty"`
AccountSettings *AccountTreeRequestAccountSettings `json:"accountSettings,omitempty"`
// Kind: Resource type for account ticket.
Kind string `json:"kind,omitempty"`
ProfileName string `json:"profileName,omitempty"`
Timezone string `json:"timezone,omitempty"`
WebpropertyName string `json:"webpropertyName,omitempty"`
WebsiteUrl string `json:"websiteUrl,omitempty"`
// ForceSendFields is a list of field names (e.g. "AccountName") 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. "AccountName") 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 *AccountTreeRequest) MarshalJSON() ([]byte, error) {
type NoMethod AccountTreeRequest
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
type AccountTreeRequestAccountSettings struct {
AdmobReporting bool `json:"admobReporting,omitempty"`
SharingWithGoogleAnySales bool `json:"sharingWithGoogleAnySales,omitempty"`
SharingWithGoogleProducts bool `json:"sharingWithGoogleProducts,omitempty"`
SharingWithGoogleSales bool `json:"sharingWithGoogleSales,omitempty"`
SharingWithGoogleSupport bool `json:"sharingWithGoogleSupport,omitempty"`
SharingWithOthers bool `json:"sharingWithOthers,omitempty"`
// ForceSendFields is a list of field names (e.g. "AdmobReporting") 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. "AdmobReporting") 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 *AccountTreeRequestAccountSettings) MarshalJSON() ([]byte, error) {
type NoMethod AccountTreeRequestAccountSettings
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// AccountTreeResponse: JSON template for an Analytics account tree
// response. The account tree response is used in the provisioning api
// to return the result of creating an account, property, and view
// (profile).
type AccountTreeResponse struct {
// Account: The account created.
Account *Account `json:"account,omitempty"`
AccountSettings *AccountTreeResponseAccountSettings `json:"accountSettings,omitempty"`
// Kind: Resource type for account ticket.
Kind string `json:"kind,omitempty"`
// Profile: View (Profile) for the account.
Profile *Profile `json:"profile,omitempty"`
// Webproperty: Web property for the account.
Webproperty *Webproperty `json:"webproperty,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "Account") 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. "Account") 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 *AccountTreeResponse) MarshalJSON() ([]byte, error) {
type NoMethod AccountTreeResponse
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
type AccountTreeResponseAccountSettings struct {
AdmobReporting bool `json:"admobReporting,omitempty"`
SharingWithGoogleAnySales bool `json:"sharingWithGoogleAnySales,omitempty"`
SharingWithGoogleProducts bool `json:"sharingWithGoogleProducts,omitempty"`
SharingWithGoogleSales bool `json:"sharingWithGoogleSales,omitempty"`
SharingWithGoogleSupport bool `json:"sharingWithGoogleSupport,omitempty"`
SharingWithOthers bool `json:"sharingWithOthers,omitempty"`
// ForceSendFields is a list of field names (e.g. "AdmobReporting") 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. "AdmobReporting") 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 *AccountTreeResponseAccountSettings) MarshalJSON() ([]byte, error) {
type NoMethod AccountTreeResponseAccountSettings
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// Accounts: An account collection provides a list of Analytics accounts
// to which a user has access. The account collection is the entry point
// to all management information. Each resource in the collection
@@ -16443,11 +16606,12 @@ func (c *ManagementUploadsUploadDataCall) doRequest(alt string) (*http.Response,
body = new(bytes.Buffer)
reqHeaders.Set("Content-Type", "application/json")
}
body, cleanup := c.mediaInfo_.UploadRequest(reqHeaders, body)
body, getBody, cleanup := c.mediaInfo_.UploadRequest(reqHeaders, body)
defer cleanup()
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("POST", urls, body)
req.Header = reqHeaders
gensupport.SetGetBody(req, getBody)
googleapi.Expand(req.URL, map[string]string{
"accountId": c.accountId,
"webPropertyId": c.webPropertyId,
@@ -19054,3 +19218,120 @@ func (c *ProvisioningCreateAccountTicketCall) Do(opts ...googleapi.CallOption) (
// }
}
// method id "analytics.provisioning.createAccountTree":
type ProvisioningCreateAccountTreeCall struct {
s *Service
accounttreerequest *AccountTreeRequest
urlParams_ gensupport.URLParams
ctx_ context.Context
header_ http.Header
}
// CreateAccountTree: Provision account.
func (r *ProvisioningService) CreateAccountTree(accounttreerequest *AccountTreeRequest) *ProvisioningCreateAccountTreeCall {
c := &ProvisioningCreateAccountTreeCall{s: r.s, urlParams_: make(gensupport.URLParams)}
c.accounttreerequest = accounttreerequest
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 *ProvisioningCreateAccountTreeCall) Fields(s ...googleapi.Field) *ProvisioningCreateAccountTreeCall {
c.urlParams_.Set("fields", googleapi.CombineFields(s))
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 *ProvisioningCreateAccountTreeCall) Context(ctx context.Context) *ProvisioningCreateAccountTreeCall {
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 *ProvisioningCreateAccountTreeCall) Header() http.Header {
if c.header_ == nil {
c.header_ = make(http.Header)
}
return c.header_
}
func (c *ProvisioningCreateAccountTreeCall) 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())
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.accounttreerequest)
if err != nil {
return nil, err
}
reqHeaders.Set("Content-Type", "application/json")
c.urlParams_.Set("alt", alt)
urls := googleapi.ResolveRelative(c.s.BasePath, "provisioning/createAccountTree")
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("POST", urls, body)
req.Header = reqHeaders
return gensupport.SendRequest(c.ctx_, c.s.client, req)
}
// Do executes the "analytics.provisioning.createAccountTree" call.
// Exactly one of *AccountTreeResponse or error will be non-nil. Any
// non-2xx status code is an error. Response headers are in either
// *AccountTreeResponse.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 *ProvisioningCreateAccountTreeCall) Do(opts ...googleapi.CallOption) (*AccountTreeResponse, 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 := &AccountTreeResponse{
ServerResponse: googleapi.ServerResponse{
Header: res.Header,
HTTPStatusCode: res.StatusCode,
},
}
target := &ret
if err := gensupport.DecodeResponse(target, res); err != nil {
return nil, err
}
return ret, nil
// {
// "description": "Provision account.",
// "httpMethod": "POST",
// "id": "analytics.provisioning.createAccountTree",
// "path": "provisioning/createAccountTree",
// "request": {
// "$ref": "AccountTreeRequest"
// },
// "response": {
// "$ref": "AccountTreeResponse"
// },
// "scopes": [
// "https://www.googleapis.com/auth/analytics.provision"
// ]
// }
}