all: remove unsupported experimental libraries There are a number of libraries that are no longer listed in our discovery documents [1]. This indicates that the backend team no longer intends on supporting the clients generated from it. In some cases it's also indicative of an API being turned down. We can't remove the packages marked stable (v1, v2, etc) but we can remove those marked unstable (v1beta1, v2alpha, etc). This CL does so. Relevant issue: #310 1: https://www.googleapis.com/discovery/v1/apis Change-Id: If6edc6b03afebdef28e503b04dd2c2a73621e3bb Reviewed-on: https://code-review.googlesource.com/c/35751 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
diff --git a/cloudmonitoring/v2beta2/cloudmonitoring-api.json b/cloudmonitoring/v2beta2/cloudmonitoring-api.json deleted file mode 100644 index 16d7b4f..0000000 --- a/cloudmonitoring/v2beta2/cloudmonitoring-api.json +++ /dev/null
@@ -1,839 +0,0 @@ -{ - "kind": "discovery#restDescription", - "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/NOsFjtPY9zRzc3K9F8mQGuDeSj0\"", - "discoveryVersion": "v1", - "id": "cloudmonitoring:v2beta2", - "name": "cloudmonitoring", - "canonicalName": "Cloud Monitoring", - "version": "v2beta2", - "revision": "20170501", - "title": "Cloud Monitoring API", - "description": "Accesses Google Cloud Monitoring data.", - "ownerDomain": "google.com", - "ownerName": "Google", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/monitoring/v2beta2/", - "protocol": "rest", - "baseUrl": "https://www.googleapis.com/cloudmonitoring/v2beta2/projects/", - "basePath": "/cloudmonitoring/v2beta2/projects/", - "rootUrl": "https://www.googleapis.com/", - "servicePath": "cloudmonitoring/v2beta2/projects/", - "batchPath": "batch/cloudmonitoring/v2beta2", - "parameters": { - "alt": { - "type": "string", - "description": "Data format for the response.", - "default": "json", - "enum": [ - "json" - ], - "enumDescriptions": [ - "Responses with Content-Type of application/json" - ], - "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": "true", - "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/cloud-platform": { - "description": "View and manage your data across Google Cloud Platform services" - }, - "https://www.googleapis.com/auth/monitoring": { - "description": "View and write monitoring data for all of your Google and third-party Cloud and API projects" - } - } - } - }, - "schemas": { - "DeleteMetricDescriptorResponse": { - "id": "DeleteMetricDescriptorResponse", - "type": "object", - "description": "The response of cloudmonitoring.metricDescriptors.delete.", - "properties": { - "kind": { - "type": "string", - "description": "Identifies what kind of resource this is. Value: the fixed string \"cloudmonitoring#deleteMetricDescriptorResponse\".", - "default": "cloudmonitoring#deleteMetricDescriptorResponse" - } - } - }, - "ListMetricDescriptorsRequest": { - "id": "ListMetricDescriptorsRequest", - "type": "object", - "description": "The request of cloudmonitoring.metricDescriptors.list.", - "properties": { - "kind": { - "type": "string", - "description": "Identifies what kind of resource this is. Value: the fixed string \"cloudmonitoring#listMetricDescriptorsRequest\".", - "default": "cloudmonitoring#listMetricDescriptorsRequest" - } - } - }, - "ListMetricDescriptorsResponse": { - "id": "ListMetricDescriptorsResponse", - "type": "object", - "description": "The response of cloudmonitoring.metricDescriptors.list.", - "properties": { - "kind": { - "type": "string", - "description": "Identifies what kind of resource this is. Value: the fixed string \"cloudmonitoring#listMetricDescriptorsResponse\".", - "default": "cloudmonitoring#listMetricDescriptorsResponse" - }, - "metrics": { - "type": "array", - "description": "The returned metric descriptors.", - "items": { - "$ref": "MetricDescriptor" - } - }, - "nextPageToken": { - "type": "string", - "description": "Pagination token. If present, indicates that additional results are available for retrieval. To access the results past the pagination limit, pass this value to the pageToken query parameter." - } - } - }, - "ListTimeseriesDescriptorsRequest": { - "id": "ListTimeseriesDescriptorsRequest", - "type": "object", - "description": "The request of cloudmonitoring.timeseriesDescriptors.list", - "properties": { - "kind": { - "type": "string", - "description": "Identifies what kind of resource this is. Value: the fixed string \"cloudmonitoring#listTimeseriesDescriptorsRequest\".", - "default": "cloudmonitoring#listTimeseriesDescriptorsRequest" - } - } - }, - "ListTimeseriesDescriptorsResponse": { - "id": "ListTimeseriesDescriptorsResponse", - "type": "object", - "description": "The response of cloudmonitoring.timeseriesDescriptors.list", - "properties": { - "kind": { - "type": "string", - "description": "Identifies what kind of resource this is. Value: the fixed string \"cloudmonitoring#listTimeseriesDescriptorsResponse\".", - "default": "cloudmonitoring#listTimeseriesDescriptorsResponse" - }, - "nextPageToken": { - "type": "string", - "description": "Pagination token. If present, indicates that additional results are available for retrieval. To access the results past the pagination limit, set this value to the pageToken query parameter." - }, - "oldest": { - "type": "string", - "description": "The oldest timestamp of the interval of this query, as an RFC 3339 string.", - "format": "date-time" - }, - "timeseries": { - "type": "array", - "description": "The returned time series descriptors.", - "items": { - "$ref": "TimeseriesDescriptor" - } - }, - "youngest": { - "type": "string", - "description": "The youngest timestamp of the interval of this query, as an RFC 3339 string.", - "format": "date-time" - } - } - }, - "ListTimeseriesRequest": { - "id": "ListTimeseriesRequest", - "type": "object", - "description": "The request of cloudmonitoring.timeseries.list", - "properties": { - "kind": { - "type": "string", - "description": "Identifies what kind of resource this is. Value: the fixed string \"cloudmonitoring#listTimeseriesRequest\".", - "default": "cloudmonitoring#listTimeseriesRequest" - } - } - }, - "ListTimeseriesResponse": { - "id": "ListTimeseriesResponse", - "type": "object", - "description": "The response of cloudmonitoring.timeseries.list", - "properties": { - "kind": { - "type": "string", - "description": "Identifies what kind of resource this is. Value: the fixed string \"cloudmonitoring#listTimeseriesResponse\".", - "default": "cloudmonitoring#listTimeseriesResponse" - }, - "nextPageToken": { - "type": "string", - "description": "Pagination token. If present, indicates that additional results are available for retrieval. To access the results past the pagination limit, set the pageToken query parameter to this value. All of the points of a time series will be returned before returning any point of the subsequent time series." - }, - "oldest": { - "type": "string", - "description": "The oldest timestamp of the interval of this query as an RFC 3339 string.", - "format": "date-time" - }, - "timeseries": { - "type": "array", - "description": "The returned time series.", - "items": { - "$ref": "Timeseries" - } - }, - "youngest": { - "type": "string", - "description": "The youngest timestamp of the interval of this query as an RFC 3339 string.", - "format": "date-time" - } - } - }, - "MetricDescriptor": { - "id": "MetricDescriptor", - "type": "object", - "description": "A metricDescriptor defines the name, label keys, and data type of a particular metric.", - "properties": { - "description": { - "type": "string", - "description": "Description of this metric." - }, - "labels": { - "type": "array", - "description": "Labels defined for this metric.", - "items": { - "$ref": "MetricDescriptorLabelDescriptor" - } - }, - "name": { - "type": "string", - "description": "The name of this metric." - }, - "project": { - "type": "string", - "description": "The project ID to which the metric belongs." - }, - "typeDescriptor": { - "$ref": "MetricDescriptorTypeDescriptor", - "description": "Type description for this metric." - } - } - }, - "MetricDescriptorLabelDescriptor": { - "id": "MetricDescriptorLabelDescriptor", - "type": "object", - "description": "A label in a metric is a description of this metric, including the key of this description (what the description is), and the value for this description.", - "properties": { - "description": { - "type": "string", - "description": "Label description." - }, - "key": { - "type": "string", - "description": "Label key." - } - } - }, - "MetricDescriptorTypeDescriptor": { - "id": "MetricDescriptorTypeDescriptor", - "type": "object", - "description": "A type in a metric contains information about how the metric is collected and what its data points look like.", - "properties": { - "metricType": { - "type": "string", - "description": "The method of collecting data for the metric. See Metric types." - }, - "valueType": { - "type": "string", - "description": "The data type of of individual points in the metric's time series. See Metric value types." - } - } - }, - "Point": { - "id": "Point", - "type": "object", - "description": "Point is a single point in a time series. It consists of a start time, an end time, and a value.", - "properties": { - "boolValue": { - "type": "boolean", - "description": "The value of this data point. Either \"true\" or \"false\"." - }, - "distributionValue": { - "$ref": "PointDistribution", - "description": "The value of this data point as a distribution. A distribution value can contain a list of buckets and/or an underflowBucket and an overflowBucket. The values of these points can be used to create a histogram." - }, - "doubleValue": { - "type": "number", - "description": "The value of this data point as a double-precision floating-point number.", - "format": "double" - }, - "end": { - "type": "string", - "description": "The interval [start, end] is the time period to which the point's value applies. For gauge metrics, whose values are instantaneous measurements, this interval should be empty (start should equal end). For cumulative metrics (of which deltas and rates are special cases), the interval should be non-empty. Both start and end are RFC 3339 strings.", - "format": "date-time" - }, - "int64Value": { - "type": "string", - "description": "The value of this data point as a 64-bit integer.", - "format": "int64" - }, - "start": { - "type": "string", - "description": "The interval [start, end] is the time period to which the point's value applies. For gauge metrics, whose values are instantaneous measurements, this interval should be empty (start should equal end). For cumulative metrics (of which deltas and rates are special cases), the interval should be non-empty. Both start and end are RFC 3339 strings.", - "format": "date-time" - }, - "stringValue": { - "type": "string", - "description": "The value of this data point in string format." - } - } - }, - "PointDistribution": { - "id": "PointDistribution", - "type": "object", - "description": "Distribution data point value type. When writing distribution points, try to be consistent with the boundaries of your buckets. If you must modify the bucket boundaries, then do so by merging, partitioning, or appending rather than skewing them.", - "properties": { - "buckets": { - "type": "array", - "description": "The finite buckets.", - "items": { - "$ref": "PointDistributionBucket" - } - }, - "overflowBucket": { - "$ref": "PointDistributionOverflowBucket", - "description": "The overflow bucket." - }, - "underflowBucket": { - "$ref": "PointDistributionUnderflowBucket", - "description": "The underflow bucket." - } - } - }, - "PointDistributionBucket": { - "id": "PointDistributionBucket", - "type": "object", - "description": "The histogram's bucket. Buckets that form the histogram of a distribution value. If the upper bound of a bucket, say U1, does not equal the lower bound of the next bucket, say L2, this means that there is no event in [U1, L2).", - "properties": { - "count": { - "type": "string", - "description": "The number of events whose values are in the interval defined by this bucket.", - "format": "int64" - }, - "lowerBound": { - "type": "number", - "description": "The lower bound of the value interval of this bucket (inclusive).", - "format": "double" - }, - "upperBound": { - "type": "number", - "description": "The upper bound of the value interval of this bucket (exclusive).", - "format": "double" - } - } - }, - "PointDistributionOverflowBucket": { - "id": "PointDistributionOverflowBucket", - "type": "object", - "description": "The overflow bucket is a special bucket that does not have the upperBound field; it includes all of the events that are no less than its lower bound.", - "properties": { - "count": { - "type": "string", - "description": "The number of events whose values are in the interval defined by this bucket.", - "format": "int64" - }, - "lowerBound": { - "type": "number", - "description": "The lower bound of the value interval of this bucket (inclusive).", - "format": "double" - } - } - }, - "PointDistributionUnderflowBucket": { - "id": "PointDistributionUnderflowBucket", - "type": "object", - "description": "The underflow bucket is a special bucket that does not have the lowerBound field; it includes all of the events that are less than its upper bound.", - "properties": { - "count": { - "type": "string", - "description": "The number of events whose values are in the interval defined by this bucket.", - "format": "int64" - }, - "upperBound": { - "type": "number", - "description": "The upper bound of the value interval of this bucket (exclusive).", - "format": "double" - } - } - }, - "Timeseries": { - "id": "Timeseries", - "type": "object", - "description": "The monitoring data is organized as metrics and stored as data points that are recorded over time. Each data point represents information like the CPU utilization of your virtual machine. A historical record of these data points is called a time series.", - "properties": { - "points": { - "type": "array", - "description": "The data points of this time series. The points are listed in order of their end timestamp, from younger to older.", - "items": { - "$ref": "Point" - } - }, - "timeseriesDesc": { - "$ref": "TimeseriesDescriptor", - "description": "The descriptor of this time series." - } - } - }, - "TimeseriesDescriptor": { - "id": "TimeseriesDescriptor", - "type": "object", - "description": "TimeseriesDescriptor identifies a single time series.", - "properties": { - "labels": { - "type": "object", - "description": "The label's name.", - "additionalProperties": { - "type": "string", - "description": "The label's name." - } - }, - "metric": { - "type": "string", - "description": "The name of the metric." - }, - "project": { - "type": "string", - "description": "The Developers Console project number to which this time series belongs." - } - } - }, - "TimeseriesDescriptorLabel": { - "id": "TimeseriesDescriptorLabel", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "The label's name." - }, - "value": { - "type": "string", - "description": "The label's value." - } - } - }, - "TimeseriesPoint": { - "id": "TimeseriesPoint", - "type": "object", - "description": "When writing time series, TimeseriesPoint should be used instead of Timeseries, to enforce single point for each time series in the timeseries.write request.", - "properties": { - "point": { - "$ref": "Point", - "description": "The data point in this time series snapshot." - }, - "timeseriesDesc": { - "$ref": "TimeseriesDescriptor", - "description": "The descriptor of this time series." - } - } - }, - "WriteTimeseriesRequest": { - "id": "WriteTimeseriesRequest", - "type": "object", - "description": "The request of cloudmonitoring.timeseries.write", - "properties": { - "commonLabels": { - "type": "object", - "description": "The label's name.", - "additionalProperties": { - "type": "string", - "description": "The label's name." - } - }, - "timeseries": { - "type": "array", - "description": "Provide time series specific labels and the data points for each time series. The labels in timeseries and the common_labels should form a complete list of labels that required by the metric.", - "items": { - "$ref": "TimeseriesPoint" - } - } - } - }, - "WriteTimeseriesResponse": { - "id": "WriteTimeseriesResponse", - "type": "object", - "description": "The response of cloudmonitoring.timeseries.write", - "properties": { - "kind": { - "type": "string", - "description": "Identifies what kind of resource this is. Value: the fixed string \"cloudmonitoring#writeTimeseriesResponse\".", - "default": "cloudmonitoring#writeTimeseriesResponse" - } - } - } - }, - "resources": { - "metricDescriptors": { - "methods": { - "create": { - "id": "cloudmonitoring.metricDescriptors.create", - "path": "{project}/metricDescriptors", - "httpMethod": "POST", - "description": "Create a new metric.", - "parameters": { - "project": { - "type": "string", - "description": "The project id. The value can be the numeric project ID or string-based project name.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "project" - ], - "request": { - "$ref": "MetricDescriptor" - }, - "response": { - "$ref": "MetricDescriptor" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/monitoring" - ] - }, - "delete": { - "id": "cloudmonitoring.metricDescriptors.delete", - "path": "{project}/metricDescriptors/{metric}", - "httpMethod": "DELETE", - "description": "Delete an existing metric.", - "parameters": { - "metric": { - "type": "string", - "description": "Name of the metric.", - "required": true, - "location": "path" - }, - "project": { - "type": "string", - "description": "The project ID to which the metric belongs.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "project", - "metric" - ], - "response": { - "$ref": "DeleteMetricDescriptorResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/monitoring" - ] - }, - "list": { - "id": "cloudmonitoring.metricDescriptors.list", - "path": "{project}/metricDescriptors", - "httpMethod": "GET", - "description": "List metric descriptors that match the query. If the query is not set, then all of the metric descriptors will be returned. Large responses will be paginated, use the nextPageToken returned in the response to request subsequent pages of results by setting the pageToken query parameter to the value of the nextPageToken.", - "parameters": { - "count": { - "type": "integer", - "description": "Maximum number of metric descriptors per page. Used for pagination. If not specified, count = 100.", - "default": "100", - "format": "int32", - "minimum": "1", - "maximum": "1000", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "The pagination token, which is used to page through large result sets. Set this value to the value of the nextPageToken to retrieve the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "The project id. The value can be the numeric project ID or string-based project name.", - "required": true, - "location": "path" - }, - "query": { - "type": "string", - "description": "The query used to search against existing metrics. Separate keywords with a space; the service joins all keywords with AND, meaning that all keywords must match for a metric to be returned. If this field is omitted, all metrics are returned. If an empty string is passed with this field, no metrics are returned.", - "location": "query" - } - }, - "parameterOrder": [ - "project" - ], - "request": { - "$ref": "ListMetricDescriptorsRequest" - }, - "response": { - "$ref": "ListMetricDescriptorsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/monitoring" - ] - } - } - }, - "timeseries": { - "methods": { - "list": { - "id": "cloudmonitoring.timeseries.list", - "path": "{project}/timeseries/{metric}", - "httpMethod": "GET", - "description": "List the data points of the time series that match the metric and labels values and that have data points in the interval. Large responses are paginated; use the nextPageToken returned in the response to request subsequent pages of results by setting the pageToken query parameter to the value of the nextPageToken.", - "parameters": { - "aggregator": { - "type": "string", - "description": "The aggregation function that will reduce the data points in each window to a single point. This parameter is only valid for non-cumulative metrics with a value type of INT64 or DOUBLE.", - "enum": [ - "max", - "mean", - "min", - "sum" - ], - "enumDescriptions": [ - "", - "", - "", - "" - ], - "location": "query" - }, - "count": { - "type": "integer", - "description": "Maximum number of data points per page, which is used for pagination of results.", - "default": "6000", - "format": "int32", - "minimum": "1", - "maximum": "12000", - "location": "query" - }, - "labels": { - "type": "string", - "description": "A collection of labels for the matching time series, which are represented as: \n- key==value: key equals the value \n- key=~value: key regex matches the value \n- key!=value: key does not equal the value \n- key!~value: key regex does not match the value For example, to list all of the time series descriptors for the region us-central1, you could specify:\nlabel=cloud.googleapis.com%2Flocation=~us-central1.*", - "pattern": "(.+?)(==|=~|!=|!~)(.+)", - "repeated": true, - "location": "query" - }, - "metric": { - "type": "string", - "description": "Metric names are protocol-free URLs as listed in the Supported Metrics page. For example, compute.googleapis.com/instance/disk/read_ops_count.", - "required": true, - "location": "path" - }, - "oldest": { - "type": "string", - "description": "Start of the time interval (exclusive), which is expressed as an RFC 3339 timestamp. If neither oldest nor timespan is specified, the default time interval will be (youngest - 4 hours, youngest]", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "The pagination token, which is used to page through large result sets. Set this value to the value of the nextPageToken to retrieve the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "The project ID to which this time series belongs. The value can be the numeric project ID or string-based project name.", - "required": true, - "location": "path" - }, - "timespan": { - "type": "string", - "description": "Length of the time interval to query, which is an alternative way to declare the interval: (youngest - timespan, youngest]. The timespan and oldest parameters should not be used together. Units: \n- s: second \n- m: minute \n- h: hour \n- d: day \n- w: week Examples: 2s, 3m, 4w. Only one unit is allowed, for example: 2w3d is not allowed; you should use 17d instead.\n\nIf neither oldest nor timespan is specified, the default time interval will be (youngest - 4 hours, youngest].", - "pattern": "[0-9]+[smhdw]?", - "location": "query" - }, - "window": { - "type": "string", - "description": "The sampling window. At most one data point will be returned for each window in the requested time interval. This parameter is only valid for non-cumulative metric types. Units: \n- m: minute \n- h: hour \n- d: day \n- w: week Examples: 3m, 4w. Only one unit is allowed, for example: 2w3d is not allowed; you should use 17d instead.", - "pattern": "[0-9]+[mhdw]?", - "location": "query" - }, - "youngest": { - "type": "string", - "description": "End of the time interval (inclusive), which is expressed as an RFC 3339 timestamp.", - "required": true, - "location": "query" - } - }, - "parameterOrder": [ - "project", - "metric", - "youngest" - ], - "request": { - "$ref": "ListTimeseriesRequest" - }, - "response": { - "$ref": "ListTimeseriesResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/monitoring" - ] - }, - "write": { - "id": "cloudmonitoring.timeseries.write", - "path": "{project}/timeseries:write", - "httpMethod": "POST", - "description": "Put data points to one or more time series for one or more metrics. If a time series does not exist, a new time series will be created. It is not allowed to write a time series point that is older than the existing youngest point of that time series. Points that are older than the existing youngest point of that time series will be discarded silently. Therefore, users should make sure that points of a time series are written sequentially in the order of their end time.", - "parameters": { - "project": { - "type": "string", - "description": "The project ID. The value can be the numeric project ID or string-based project name.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "project" - ], - "request": { - "$ref": "WriteTimeseriesRequest" - }, - "response": { - "$ref": "WriteTimeseriesResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/monitoring" - ] - } - } - }, - "timeseriesDescriptors": { - "methods": { - "list": { - "id": "cloudmonitoring.timeseriesDescriptors.list", - "path": "{project}/timeseriesDescriptors/{metric}", - "httpMethod": "GET", - "description": "List the descriptors of the time series that match the metric and labels values and that have data points in the interval. Large responses are paginated; use the nextPageToken returned in the response to request subsequent pages of results by setting the pageToken query parameter to the value of the nextPageToken.", - "parameters": { - "aggregator": { - "type": "string", - "description": "The aggregation function that will reduce the data points in each window to a single point. This parameter is only valid for non-cumulative metrics with a value type of INT64 or DOUBLE.", - "enum": [ - "max", - "mean", - "min", - "sum" - ], - "enumDescriptions": [ - "", - "", - "", - "" - ], - "location": "query" - }, - "count": { - "type": "integer", - "description": "Maximum number of time series descriptors per page. Used for pagination. If not specified, count = 100.", - "default": "100", - "format": "int32", - "minimum": "1", - "maximum": "1000", - "location": "query" - }, - "labels": { - "type": "string", - "description": "A collection of labels for the matching time series, which are represented as: \n- key==value: key equals the value \n- key=~value: key regex matches the value \n- key!=value: key does not equal the value \n- key!~value: key regex does not match the value For example, to list all of the time series descriptors for the region us-central1, you could specify:\nlabel=cloud.googleapis.com%2Flocation=~us-central1.*", - "pattern": "(.+?)(==|=~|!=|!~)(.+)", - "repeated": true, - "location": "query" - }, - "metric": { - "type": "string", - "description": "Metric names are protocol-free URLs as listed in the Supported Metrics page. For example, compute.googleapis.com/instance/disk/read_ops_count.", - "required": true, - "location": "path" - }, - "oldest": { - "type": "string", - "description": "Start of the time interval (exclusive), which is expressed as an RFC 3339 timestamp. If neither oldest nor timespan is specified, the default time interval will be (youngest - 4 hours, youngest]", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "The pagination token, which is used to page through large result sets. Set this value to the value of the nextPageToken to retrieve the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "The project ID to which this time series belongs. The value can be the numeric project ID or string-based project name.", - "required": true, - "location": "path" - }, - "timespan": { - "type": "string", - "description": "Length of the time interval to query, which is an alternative way to declare the interval: (youngest - timespan, youngest]. The timespan and oldest parameters should not be used together. Units: \n- s: second \n- m: minute \n- h: hour \n- d: day \n- w: week Examples: 2s, 3m, 4w. Only one unit is allowed, for example: 2w3d is not allowed; you should use 17d instead.\n\nIf neither oldest nor timespan is specified, the default time interval will be (youngest - 4 hours, youngest].", - "pattern": "[0-9]+[smhdw]?", - "location": "query" - }, - "window": { - "type": "string", - "description": "The sampling window. At most one data point will be returned for each window in the requested time interval. This parameter is only valid for non-cumulative metric types. Units: \n- m: minute \n- h: hour \n- d: day \n- w: week Examples: 3m, 4w. Only one unit is allowed, for example: 2w3d is not allowed; you should use 17d instead.", - "pattern": "[0-9]+[mhdw]?", - "location": "query" - }, - "youngest": { - "type": "string", - "description": "End of the time interval (inclusive), which is expressed as an RFC 3339 timestamp.", - "required": true, - "location": "query" - } - }, - "parameterOrder": [ - "project", - "metric", - "youngest" - ], - "request": { - "$ref": "ListTimeseriesDescriptorsRequest" - }, - "response": { - "$ref": "ListTimeseriesDescriptorsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/monitoring" - ] - } - } - } - } -}
diff --git a/cloudmonitoring/v2beta2/cloudmonitoring-gen.go b/cloudmonitoring/v2beta2/cloudmonitoring-gen.go deleted file mode 100644 index d71fa55..0000000 --- a/cloudmonitoring/v2beta2/cloudmonitoring-gen.go +++ /dev/null
@@ -1,2246 +0,0 @@ -// Package cloudmonitoring provides access to the Cloud Monitoring API. -// -// See https://cloud.google.com/monitoring/v2beta2/ -// -// Usage example: -// -// import "google.golang.org/api/cloudmonitoring/v2beta2" -// ... -// cloudmonitoringService, err := cloudmonitoring.New(oauthHttpClient) -package cloudmonitoring // import "google.golang.org/api/cloudmonitoring/v2beta2" - -import ( - "bytes" - "context" - "encoding/json" - "errors" - "fmt" - "io" - "net/http" - "net/url" - "strconv" - "strings" - - gensupport "google.golang.org/api/gensupport" - googleapi "google.golang.org/api/googleapi" -) - -// Always reference these packages, just in case the auto-generated code -// below doesn't. -var _ = bytes.NewBuffer -var _ = strconv.Itoa -var _ = fmt.Sprintf -var _ = json.NewDecoder -var _ = io.Copy -var _ = url.Parse -var _ = gensupport.MarshalJSON -var _ = googleapi.Version -var _ = errors.New -var _ = strings.Replace -var _ = context.Canceled - -const apiId = "cloudmonitoring:v2beta2" -const apiName = "cloudmonitoring" -const apiVersion = "v2beta2" -const basePath = "https://www.googleapis.com/cloudmonitoring/v2beta2/projects/" - -// OAuth2 scopes used by this API. -const ( - // View and manage your data across Google Cloud Platform services - CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform" - - // View and write monitoring data for all of your Google and third-party - // Cloud and API projects - MonitoringScope = "https://www.googleapis.com/auth/monitoring" -) - -func New(client *http.Client) (*Service, error) { - if client == nil { - return nil, errors.New("client is nil") - } - s := &Service{client: client, BasePath: basePath} - s.MetricDescriptors = NewMetricDescriptorsService(s) - s.Timeseries = NewTimeseriesService(s) - s.TimeseriesDescriptors = NewTimeseriesDescriptorsService(s) - return s, nil -} - -type Service struct { - client *http.Client - BasePath string // API endpoint base URL - UserAgent string // optional additional User-Agent fragment - - MetricDescriptors *MetricDescriptorsService - - Timeseries *TimeseriesService - - TimeseriesDescriptors *TimeseriesDescriptorsService -} - -func (s *Service) userAgent() string { - if s.UserAgent == "" { - return googleapi.UserAgent - } - return googleapi.UserAgent + " " + s.UserAgent -} - -func NewMetricDescriptorsService(s *Service) *MetricDescriptorsService { - rs := &MetricDescriptorsService{s: s} - return rs -} - -type MetricDescriptorsService struct { - s *Service -} - -func NewTimeseriesService(s *Service) *TimeseriesService { - rs := &TimeseriesService{s: s} - return rs -} - -type TimeseriesService struct { - s *Service -} - -func NewTimeseriesDescriptorsService(s *Service) *TimeseriesDescriptorsService { - rs := &TimeseriesDescriptorsService{s: s} - return rs -} - -type TimeseriesDescriptorsService struct { - s *Service -} - -// DeleteMetricDescriptorResponse: The response of -// cloudmonitoring.metricDescriptors.delete. -type DeleteMetricDescriptorResponse struct { - // Kind: Identifies what kind of resource this is. Value: the fixed - // string "cloudmonitoring#deleteMetricDescriptorResponse". - Kind string `json:"kind,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Kind") 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. "Kind") 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 *DeleteMetricDescriptorResponse) MarshalJSON() ([]byte, error) { - type NoMethod DeleteMetricDescriptorResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// ListMetricDescriptorsRequest: The request of -// cloudmonitoring.metricDescriptors.list. -type ListMetricDescriptorsRequest struct { - // Kind: Identifies what kind of resource this is. Value: the fixed - // string "cloudmonitoring#listMetricDescriptorsRequest". - Kind string `json:"kind,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Kind") 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. "Kind") 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 *ListMetricDescriptorsRequest) MarshalJSON() ([]byte, error) { - type NoMethod ListMetricDescriptorsRequest - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// ListMetricDescriptorsResponse: The response of -// cloudmonitoring.metricDescriptors.list. -type ListMetricDescriptorsResponse struct { - // Kind: Identifies what kind of resource this is. Value: the fixed - // string "cloudmonitoring#listMetricDescriptorsResponse". - Kind string `json:"kind,omitempty"` - - // Metrics: The returned metric descriptors. - Metrics []*MetricDescriptor `json:"metrics,omitempty"` - - // NextPageToken: Pagination token. If present, indicates that - // additional results are available for retrieval. To access the results - // past the pagination limit, pass this value to the pageToken query - // parameter. - 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. "Kind") 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. "Kind") 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 *ListMetricDescriptorsResponse) MarshalJSON() ([]byte, error) { - type NoMethod ListMetricDescriptorsResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// ListTimeseriesDescriptorsRequest: The request of -// cloudmonitoring.timeseriesDescriptors.list -type ListTimeseriesDescriptorsRequest struct { - // Kind: Identifies what kind of resource this is. Value: the fixed - // string "cloudmonitoring#listTimeseriesDescriptorsRequest". - Kind string `json:"kind,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Kind") 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. "Kind") 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 *ListTimeseriesDescriptorsRequest) MarshalJSON() ([]byte, error) { - type NoMethod ListTimeseriesDescriptorsRequest - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// ListTimeseriesDescriptorsResponse: The response of -// cloudmonitoring.timeseriesDescriptors.list -type ListTimeseriesDescriptorsResponse struct { - // Kind: Identifies what kind of resource this is. Value: the fixed - // string "cloudmonitoring#listTimeseriesDescriptorsResponse". - Kind string `json:"kind,omitempty"` - - // NextPageToken: Pagination token. If present, indicates that - // additional results are available for retrieval. To access the results - // past the pagination limit, set this value to the pageToken query - // parameter. - NextPageToken string `json:"nextPageToken,omitempty"` - - // Oldest: The oldest timestamp of the interval of this query, as an RFC - // 3339 string. - Oldest string `json:"oldest,omitempty"` - - // Timeseries: The returned time series descriptors. - Timeseries []*TimeseriesDescriptor `json:"timeseries,omitempty"` - - // Youngest: The youngest timestamp of the interval of this query, as an - // RFC 3339 string. - Youngest string `json:"youngest,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Kind") 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. "Kind") 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 *ListTimeseriesDescriptorsResponse) MarshalJSON() ([]byte, error) { - type NoMethod ListTimeseriesDescriptorsResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// ListTimeseriesRequest: The request of cloudmonitoring.timeseries.list -type ListTimeseriesRequest struct { - // Kind: Identifies what kind of resource this is. Value: the fixed - // string "cloudmonitoring#listTimeseriesRequest". - Kind string `json:"kind,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Kind") 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. "Kind") 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 *ListTimeseriesRequest) MarshalJSON() ([]byte, error) { - type NoMethod ListTimeseriesRequest - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// ListTimeseriesResponse: The response of -// cloudmonitoring.timeseries.list -type ListTimeseriesResponse struct { - // Kind: Identifies what kind of resource this is. Value: the fixed - // string "cloudmonitoring#listTimeseriesResponse". - Kind string `json:"kind,omitempty"` - - // NextPageToken: Pagination token. If present, indicates that - // additional results are available for retrieval. To access the results - // past the pagination limit, set the pageToken query parameter to this - // value. All of the points of a time series will be returned before - // returning any point of the subsequent time series. - NextPageToken string `json:"nextPageToken,omitempty"` - - // Oldest: The oldest timestamp of the interval of this query as an RFC - // 3339 string. - Oldest string `json:"oldest,omitempty"` - - // Timeseries: The returned time series. - Timeseries []*Timeseries `json:"timeseries,omitempty"` - - // Youngest: The youngest timestamp of the interval of this query as an - // RFC 3339 string. - Youngest string `json:"youngest,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Kind") 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. "Kind") 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 *ListTimeseriesResponse) MarshalJSON() ([]byte, error) { - type NoMethod ListTimeseriesResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// MetricDescriptor: A metricDescriptor defines the name, label keys, -// and data type of a particular metric. -type MetricDescriptor struct { - // Description: Description of this metric. - Description string `json:"description,omitempty"` - - // Labels: Labels defined for this metric. - Labels []*MetricDescriptorLabelDescriptor `json:"labels,omitempty"` - - // Name: The name of this metric. - Name string `json:"name,omitempty"` - - // Project: The project ID to which the metric belongs. - Project string `json:"project,omitempty"` - - // TypeDescriptor: Type description for this metric. - TypeDescriptor *MetricDescriptorTypeDescriptor `json:"typeDescriptor,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Description") 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. "Description") 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 *MetricDescriptor) MarshalJSON() ([]byte, error) { - type NoMethod MetricDescriptor - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// MetricDescriptorLabelDescriptor: A label in a metric is a description -// of this metric, including the key of this description (what the -// description is), and the value for this description. -type MetricDescriptorLabelDescriptor struct { - // Description: Label description. - Description string `json:"description,omitempty"` - - // Key: Label key. - Key string `json:"key,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Description") 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. "Description") 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 *MetricDescriptorLabelDescriptor) MarshalJSON() ([]byte, error) { - type NoMethod MetricDescriptorLabelDescriptor - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// MetricDescriptorTypeDescriptor: A type in a metric contains -// information about how the metric is collected and what its data -// points look like. -type MetricDescriptorTypeDescriptor struct { - // MetricType: The method of collecting data for the metric. See Metric - // types. - MetricType string `json:"metricType,omitempty"` - - // ValueType: The data type of of individual points in the metric's time - // series. See Metric value types. - ValueType string `json:"valueType,omitempty"` - - // ForceSendFields is a list of field names (e.g. "MetricType") 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. "MetricType") 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 *MetricDescriptorTypeDescriptor) MarshalJSON() ([]byte, error) { - type NoMethod MetricDescriptorTypeDescriptor - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// Point: Point is a single point in a time series. It consists of a -// start time, an end time, and a value. -type Point struct { - // BoolValue: The value of this data point. Either "true" or "false". - BoolValue *bool `json:"boolValue,omitempty"` - - // DistributionValue: The value of this data point as a distribution. A - // distribution value can contain a list of buckets and/or an - // underflowBucket and an overflowBucket. The values of these points can - // be used to create a histogram. - DistributionValue *PointDistribution `json:"distributionValue,omitempty"` - - // DoubleValue: The value of this data point as a double-precision - // floating-point number. - DoubleValue *float64 `json:"doubleValue,omitempty"` - - // End: The interval [start, end] is the time period to which the - // point's value applies. For gauge metrics, whose values are - // instantaneous measurements, this interval should be empty (start - // should equal end). For cumulative metrics (of which deltas and rates - // are special cases), the interval should be non-empty. Both start and - // end are RFC 3339 strings. - End string `json:"end,omitempty"` - - // Int64Value: The value of this data point as a 64-bit integer. - Int64Value *int64 `json:"int64Value,omitempty,string"` - - // Start: The interval [start, end] is the time period to which the - // point's value applies. For gauge metrics, whose values are - // instantaneous measurements, this interval should be empty (start - // should equal end). For cumulative metrics (of which deltas and rates - // are special cases), the interval should be non-empty. Both start and - // end are RFC 3339 strings. - Start string `json:"start,omitempty"` - - // StringValue: The value of this data point in string format. - StringValue *string `json:"stringValue,omitempty"` - - // ForceSendFields is a list of field names (e.g. "BoolValue") 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. "BoolValue") 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 *Point) MarshalJSON() ([]byte, error) { - type NoMethod Point - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *Point) UnmarshalJSON(data []byte) error { - type NoMethod Point - var s1 struct { - DoubleValue *gensupport.JSONFloat64 `json:"doubleValue"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - if s1.DoubleValue != nil { - s.DoubleValue = (*float64)(s1.DoubleValue) - } - return nil -} - -// PointDistribution: Distribution data point value type. When writing -// distribution points, try to be consistent with the boundaries of your -// buckets. If you must modify the bucket boundaries, then do so by -// merging, partitioning, or appending rather than skewing them. -type PointDistribution struct { - // Buckets: The finite buckets. - Buckets []*PointDistributionBucket `json:"buckets,omitempty"` - - // OverflowBucket: The overflow bucket. - OverflowBucket *PointDistributionOverflowBucket `json:"overflowBucket,omitempty"` - - // UnderflowBucket: The underflow bucket. - UnderflowBucket *PointDistributionUnderflowBucket `json:"underflowBucket,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Buckets") 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. "Buckets") 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 *PointDistribution) MarshalJSON() ([]byte, error) { - type NoMethod PointDistribution - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// PointDistributionBucket: The histogram's bucket. Buckets that form -// the histogram of a distribution value. If the upper bound of a -// bucket, say U1, does not equal the lower bound of the next bucket, -// say L2, this means that there is no event in [U1, L2). -type PointDistributionBucket struct { - // Count: The number of events whose values are in the interval defined - // by this bucket. - Count int64 `json:"count,omitempty,string"` - - // LowerBound: The lower bound of the value interval of this bucket - // (inclusive). - LowerBound float64 `json:"lowerBound,omitempty"` - - // UpperBound: The upper bound of the value interval of this bucket - // (exclusive). - UpperBound float64 `json:"upperBound,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Count") 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. "Count") 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 *PointDistributionBucket) MarshalJSON() ([]byte, error) { - type NoMethod PointDistributionBucket - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *PointDistributionBucket) UnmarshalJSON(data []byte) error { - type NoMethod PointDistributionBucket - var s1 struct { - LowerBound gensupport.JSONFloat64 `json:"lowerBound"` - UpperBound gensupport.JSONFloat64 `json:"upperBound"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.LowerBound = float64(s1.LowerBound) - s.UpperBound = float64(s1.UpperBound) - return nil -} - -// PointDistributionOverflowBucket: The overflow bucket is a special -// bucket that does not have the upperBound field; it includes all of -// the events that are no less than its lower bound. -type PointDistributionOverflowBucket struct { - // Count: The number of events whose values are in the interval defined - // by this bucket. - Count int64 `json:"count,omitempty,string"` - - // LowerBound: The lower bound of the value interval of this bucket - // (inclusive). - LowerBound float64 `json:"lowerBound,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Count") 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. "Count") 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 *PointDistributionOverflowBucket) MarshalJSON() ([]byte, error) { - type NoMethod PointDistributionOverflowBucket - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *PointDistributionOverflowBucket) UnmarshalJSON(data []byte) error { - type NoMethod PointDistributionOverflowBucket - var s1 struct { - LowerBound gensupport.JSONFloat64 `json:"lowerBound"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.LowerBound = float64(s1.LowerBound) - return nil -} - -// PointDistributionUnderflowBucket: The underflow bucket is a special -// bucket that does not have the lowerBound field; it includes all of -// the events that are less than its upper bound. -type PointDistributionUnderflowBucket struct { - // Count: The number of events whose values are in the interval defined - // by this bucket. - Count int64 `json:"count,omitempty,string"` - - // UpperBound: The upper bound of the value interval of this bucket - // (exclusive). - UpperBound float64 `json:"upperBound,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Count") 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. "Count") 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 *PointDistributionUnderflowBucket) MarshalJSON() ([]byte, error) { - type NoMethod PointDistributionUnderflowBucket - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *PointDistributionUnderflowBucket) UnmarshalJSON(data []byte) error { - type NoMethod PointDistributionUnderflowBucket - var s1 struct { - UpperBound gensupport.JSONFloat64 `json:"upperBound"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.UpperBound = float64(s1.UpperBound) - return nil -} - -// Timeseries: The monitoring data is organized as metrics and stored as -// data points that are recorded over time. Each data point represents -// information like the CPU utilization of your virtual machine. A -// historical record of these data points is called a time series. -type Timeseries struct { - // Points: The data points of this time series. The points are listed in - // order of their end timestamp, from younger to older. - Points []*Point `json:"points,omitempty"` - - // TimeseriesDesc: The descriptor of this time series. - TimeseriesDesc *TimeseriesDescriptor `json:"timeseriesDesc,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Points") 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. "Points") 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 *Timeseries) MarshalJSON() ([]byte, error) { - type NoMethod Timeseries - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// TimeseriesDescriptor: TimeseriesDescriptor identifies a single time -// series. -type TimeseriesDescriptor struct { - // Labels: The label's name. - Labels map[string]string `json:"labels,omitempty"` - - // Metric: The name of the metric. - Metric string `json:"metric,omitempty"` - - // Project: The Developers Console project number to which this time - // series belongs. - Project string `json:"project,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Labels") 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. "Labels") 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 *TimeseriesDescriptor) MarshalJSON() ([]byte, error) { - type NoMethod TimeseriesDescriptor - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type TimeseriesDescriptorLabel struct { - // Key: The label's name. - Key string `json:"key,omitempty"` - - // Value: The label's value. - Value string `json:"value,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Key") 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. "Key") 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 *TimeseriesDescriptorLabel) MarshalJSON() ([]byte, error) { - type NoMethod TimeseriesDescriptorLabel - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// TimeseriesPoint: When writing time series, TimeseriesPoint should be -// used instead of Timeseries, to enforce single point for each time -// series in the timeseries.write request. -type TimeseriesPoint struct { - // Point: The data point in this time series snapshot. - Point *Point `json:"point,omitempty"` - - // TimeseriesDesc: The descriptor of this time series. - TimeseriesDesc *TimeseriesDescriptor `json:"timeseriesDesc,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Point") 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. "Point") 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 *TimeseriesPoint) MarshalJSON() ([]byte, error) { - type NoMethod TimeseriesPoint - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// WriteTimeseriesRequest: The request of -// cloudmonitoring.timeseries.write -type WriteTimeseriesRequest struct { - // CommonLabels: The label's name. - CommonLabels map[string]string `json:"commonLabels,omitempty"` - - // Timeseries: Provide time series specific labels and the data points - // for each time series. The labels in timeseries and the common_labels - // should form a complete list of labels that required by the metric. - Timeseries []*TimeseriesPoint `json:"timeseries,omitempty"` - - // ForceSendFields is a list of field names (e.g. "CommonLabels") 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. "CommonLabels") 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 *WriteTimeseriesRequest) MarshalJSON() ([]byte, error) { - type NoMethod WriteTimeseriesRequest - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// WriteTimeseriesResponse: The response of -// cloudmonitoring.timeseries.write -type WriteTimeseriesResponse struct { - // Kind: Identifies what kind of resource this is. Value: the fixed - // string "cloudmonitoring#writeTimeseriesResponse". - Kind string `json:"kind,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Kind") 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. "Kind") 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 *WriteTimeseriesResponse) MarshalJSON() ([]byte, error) { - type NoMethod WriteTimeseriesResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// method id "cloudmonitoring.metricDescriptors.create": - -type MetricDescriptorsCreateCall struct { - s *Service - project string - metricdescriptor *MetricDescriptor - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Create: Create a new metric. -func (r *MetricDescriptorsService) Create(project string, metricdescriptor *MetricDescriptor) *MetricDescriptorsCreateCall { - c := &MetricDescriptorsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.metricdescriptor = metricdescriptor - 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 *MetricDescriptorsCreateCall) Fields(s ...googleapi.Field) *MetricDescriptorsCreateCall { - 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 *MetricDescriptorsCreateCall) Context(ctx context.Context) *MetricDescriptorsCreateCall { - 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 *MetricDescriptorsCreateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *MetricDescriptorsCreateCall) 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.metricdescriptor) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/metricDescriptors") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "cloudmonitoring.metricDescriptors.create" call. -// Exactly one of *MetricDescriptor or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *MetricDescriptor.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 *MetricDescriptorsCreateCall) Do(opts ...googleapi.CallOption) (*MetricDescriptor, 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 := &MetricDescriptor{ - 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": "Create a new metric.", - // "httpMethod": "POST", - // "id": "cloudmonitoring.metricDescriptors.create", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "project": { - // "description": "The project id. The value can be the numeric project ID or string-based project name.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/metricDescriptors", - // "request": { - // "$ref": "MetricDescriptor" - // }, - // "response": { - // "$ref": "MetricDescriptor" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/monitoring" - // ] - // } - -} - -// method id "cloudmonitoring.metricDescriptors.delete": - -type MetricDescriptorsDeleteCall struct { - s *Service - project string - metric string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Delete an existing metric. -func (r *MetricDescriptorsService) Delete(project string, metric string) *MetricDescriptorsDeleteCall { - c := &MetricDescriptorsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.metric = metric - 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 *MetricDescriptorsDeleteCall) Fields(s ...googleapi.Field) *MetricDescriptorsDeleteCall { - 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 *MetricDescriptorsDeleteCall) Context(ctx context.Context) *MetricDescriptorsDeleteCall { - 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 *MetricDescriptorsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *MetricDescriptorsDeleteCall) 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 - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/metricDescriptors/{metric}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("DELETE", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "metric": c.metric, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "cloudmonitoring.metricDescriptors.delete" call. -// Exactly one of *DeleteMetricDescriptorResponse or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *DeleteMetricDescriptorResponse.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 *MetricDescriptorsDeleteCall) Do(opts ...googleapi.CallOption) (*DeleteMetricDescriptorResponse, 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 := &DeleteMetricDescriptorResponse{ - 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": "Delete an existing metric.", - // "httpMethod": "DELETE", - // "id": "cloudmonitoring.metricDescriptors.delete", - // "parameterOrder": [ - // "project", - // "metric" - // ], - // "parameters": { - // "metric": { - // "description": "Name of the metric.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "The project ID to which the metric belongs.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/metricDescriptors/{metric}", - // "response": { - // "$ref": "DeleteMetricDescriptorResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/monitoring" - // ] - // } - -} - -// method id "cloudmonitoring.metricDescriptors.list": - -type MetricDescriptorsListCall struct { - s *Service - project string - listmetricdescriptorsrequest *ListMetricDescriptorsRequest - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: List metric descriptors that match the query. If the query is -// not set, then all of the metric descriptors will be returned. Large -// responses will be paginated, use the nextPageToken returned in the -// response to request subsequent pages of results by setting the -// pageToken query parameter to the value of the nextPageToken. -func (r *MetricDescriptorsService) List(project string, listmetricdescriptorsrequest *ListMetricDescriptorsRequest) *MetricDescriptorsListCall { - c := &MetricDescriptorsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.listmetricdescriptorsrequest = listmetricdescriptorsrequest - return c -} - -// Count sets the optional parameter "count": Maximum number of metric -// descriptors per page. Used for pagination. If not specified, count = -// 100. -func (c *MetricDescriptorsListCall) Count(count int64) *MetricDescriptorsListCall { - c.urlParams_.Set("count", fmt.Sprint(count)) - return c -} - -// PageToken sets the optional parameter "pageToken": The pagination -// token, which is used to page through large result sets. Set this -// value to the value of the nextPageToken to retrieve the next page of -// results. -func (c *MetricDescriptorsListCall) PageToken(pageToken string) *MetricDescriptorsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Query sets the optional parameter "query": The query used to search -// against existing metrics. Separate keywords with a space; the service -// joins all keywords with AND, meaning that all keywords must match for -// a metric to be returned. If this field is omitted, all metrics are -// returned. If an empty string is passed with this field, no metrics -// are returned. -func (c *MetricDescriptorsListCall) Query(query string) *MetricDescriptorsListCall { - c.urlParams_.Set("query", query) - 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 *MetricDescriptorsListCall) Fields(s ...googleapi.Field) *MetricDescriptorsListCall { - 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 *MetricDescriptorsListCall) IfNoneMatch(entityTag string) *MetricDescriptorsListCall { - 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 *MetricDescriptorsListCall) Context(ctx context.Context) *MetricDescriptorsListCall { - 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 *MetricDescriptorsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *MetricDescriptorsListCall) 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, "{project}/metricDescriptors") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "cloudmonitoring.metricDescriptors.list" call. -// Exactly one of *ListMetricDescriptorsResponse or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *ListMetricDescriptorsResponse.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 *MetricDescriptorsListCall) Do(opts ...googleapi.CallOption) (*ListMetricDescriptorsResponse, 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 := &ListMetricDescriptorsResponse{ - 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": "List metric descriptors that match the query. If the query is not set, then all of the metric descriptors will be returned. Large responses will be paginated, use the nextPageToken returned in the response to request subsequent pages of results by setting the pageToken query parameter to the value of the nextPageToken.", - // "httpMethod": "GET", - // "id": "cloudmonitoring.metricDescriptors.list", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "count": { - // "default": "100", - // "description": "Maximum number of metric descriptors per page. Used for pagination. If not specified, count = 100.", - // "format": "int32", - // "location": "query", - // "maximum": "1000", - // "minimum": "1", - // "type": "integer" - // }, - // "pageToken": { - // "description": "The pagination token, which is used to page through large result sets. Set this value to the value of the nextPageToken to retrieve the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "The project id. The value can be the numeric project ID or string-based project name.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "query": { - // "description": "The query used to search against existing metrics. Separate keywords with a space; the service joins all keywords with AND, meaning that all keywords must match for a metric to be returned. If this field is omitted, all metrics are returned. If an empty string is passed with this field, no metrics are returned.", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/metricDescriptors", - // "request": { - // "$ref": "ListMetricDescriptorsRequest" - // }, - // "response": { - // "$ref": "ListMetricDescriptorsResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/monitoring" - // ] - // } - -} - -// 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 *MetricDescriptorsListCall) Pages(ctx context.Context, f func(*ListMetricDescriptorsResponse) 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 "cloudmonitoring.timeseries.list": - -type TimeseriesListCall struct { - s *Service - project string - metric string - listtimeseriesrequest *ListTimeseriesRequest - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: List the data points of the time series that match the metric -// and labels values and that have data points in the interval. Large -// responses are paginated; use the nextPageToken returned in the -// response to request subsequent pages of results by setting the -// pageToken query parameter to the value of the nextPageToken. -func (r *TimeseriesService) List(project string, metric string, youngest string, listtimeseriesrequest *ListTimeseriesRequest) *TimeseriesListCall { - c := &TimeseriesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.metric = metric - c.urlParams_.Set("youngest", youngest) - c.listtimeseriesrequest = listtimeseriesrequest - return c -} - -// Aggregator sets the optional parameter "aggregator": The aggregation -// function that will reduce the data points in each window to a single -// point. This parameter is only valid for non-cumulative metrics with a -// value type of INT64 or DOUBLE. -// -// Possible values: -// "max" -// "mean" -// "min" -// "sum" -func (c *TimeseriesListCall) Aggregator(aggregator string) *TimeseriesListCall { - c.urlParams_.Set("aggregator", aggregator) - return c -} - -// Count sets the optional parameter "count": Maximum number of data -// points per page, which is used for pagination of results. -func (c *TimeseriesListCall) Count(count int64) *TimeseriesListCall { - c.urlParams_.Set("count", fmt.Sprint(count)) - return c -} - -// Labels sets the optional parameter "labels": A collection of labels -// for the matching time series, which are represented as: -// - key==value: key equals the value -// - key=~value: key regex matches the value -// - key!=value: key does not equal the value -// - key!~value: key regex does not match the value For example, to -// list all of the time series descriptors for the region us-central1, -// you could -// specify: -// label=cloud.googleapis.com%2Flocation=~us-central1.* -func (c *TimeseriesListCall) Labels(labels ...string) *TimeseriesListCall { - c.urlParams_.SetMulti("labels", append([]string{}, labels...)) - return c -} - -// Oldest sets the optional parameter "oldest": Start of the time -// interval (exclusive), which is expressed as an RFC 3339 timestamp. If -// neither oldest nor timespan is specified, the default time interval -// will be (youngest - 4 hours, youngest] -func (c *TimeseriesListCall) Oldest(oldest string) *TimeseriesListCall { - c.urlParams_.Set("oldest", oldest) - return c -} - -// PageToken sets the optional parameter "pageToken": The pagination -// token, which is used to page through large result sets. Set this -// value to the value of the nextPageToken to retrieve the next page of -// results. -func (c *TimeseriesListCall) PageToken(pageToken string) *TimeseriesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Timespan sets the optional parameter "timespan": Length of the time -// interval to query, which is an alternative way to declare the -// interval: (youngest - timespan, youngest]. The timespan and oldest -// parameters should not be used together. Units: -// - s: second -// - m: minute -// - h: hour -// - d: day -// - w: week Examples: 2s, 3m, 4w. Only one unit is allowed, for -// example: 2w3d is not allowed; you should use 17d instead. -// -// If neither oldest nor timespan is specified, the default time -// interval will be (youngest - 4 hours, youngest]. -func (c *TimeseriesListCall) Timespan(timespan string) *TimeseriesListCall { - c.urlParams_.Set("timespan", timespan) - return c -} - -// Window sets the optional parameter "window": The sampling window. At -// most one data point will be returned for each window in the requested -// time interval. This parameter is only valid for non-cumulative metric -// types. Units: -// - m: minute -// - h: hour -// - d: day -// - w: week Examples: 3m, 4w. Only one unit is allowed, for example: -// 2w3d is not allowed; you should use 17d instead. -func (c *TimeseriesListCall) Window(window string) *TimeseriesListCall { - c.urlParams_.Set("window", window) - 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 *TimeseriesListCall) Fields(s ...googleapi.Field) *TimeseriesListCall { - 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 *TimeseriesListCall) IfNoneMatch(entityTag string) *TimeseriesListCall { - 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 *TimeseriesListCall) Context(ctx context.Context) *TimeseriesListCall { - 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 *TimeseriesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TimeseriesListCall) 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, "{project}/timeseries/{metric}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "metric": c.metric, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "cloudmonitoring.timeseries.list" call. -// Exactly one of *ListTimeseriesResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *ListTimeseriesResponse.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 *TimeseriesListCall) Do(opts ...googleapi.CallOption) (*ListTimeseriesResponse, 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 := &ListTimeseriesResponse{ - 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": "List the data points of the time series that match the metric and labels values and that have data points in the interval. Large responses are paginated; use the nextPageToken returned in the response to request subsequent pages of results by setting the pageToken query parameter to the value of the nextPageToken.", - // "httpMethod": "GET", - // "id": "cloudmonitoring.timeseries.list", - // "parameterOrder": [ - // "project", - // "metric", - // "youngest" - // ], - // "parameters": { - // "aggregator": { - // "description": "The aggregation function that will reduce the data points in each window to a single point. This parameter is only valid for non-cumulative metrics with a value type of INT64 or DOUBLE.", - // "enum": [ - // "max", - // "mean", - // "min", - // "sum" - // ], - // "enumDescriptions": [ - // "", - // "", - // "", - // "" - // ], - // "location": "query", - // "type": "string" - // }, - // "count": { - // "default": "6000", - // "description": "Maximum number of data points per page, which is used for pagination of results.", - // "format": "int32", - // "location": "query", - // "maximum": "12000", - // "minimum": "1", - // "type": "integer" - // }, - // "labels": { - // "description": "A collection of labels for the matching time series, which are represented as: \n- key==value: key equals the value \n- key=~value: key regex matches the value \n- key!=value: key does not equal the value \n- key!~value: key regex does not match the value For example, to list all of the time series descriptors for the region us-central1, you could specify:\nlabel=cloud.googleapis.com%2Flocation=~us-central1.*", - // "location": "query", - // "pattern": "(.+?)(==|=~|!=|!~)(.+)", - // "repeated": true, - // "type": "string" - // }, - // "metric": { - // "description": "Metric names are protocol-free URLs as listed in the Supported Metrics page. For example, compute.googleapis.com/instance/disk/read_ops_count.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "oldest": { - // "description": "Start of the time interval (exclusive), which is expressed as an RFC 3339 timestamp. If neither oldest nor timespan is specified, the default time interval will be (youngest - 4 hours, youngest]", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "The pagination token, which is used to page through large result sets. Set this value to the value of the nextPageToken to retrieve the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "The project ID to which this time series belongs. The value can be the numeric project ID or string-based project name.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "timespan": { - // "description": "Length of the time interval to query, which is an alternative way to declare the interval: (youngest - timespan, youngest]. The timespan and oldest parameters should not be used together. Units: \n- s: second \n- m: minute \n- h: hour \n- d: day \n- w: week Examples: 2s, 3m, 4w. Only one unit is allowed, for example: 2w3d is not allowed; you should use 17d instead.\n\nIf neither oldest nor timespan is specified, the default time interval will be (youngest - 4 hours, youngest].", - // "location": "query", - // "pattern": "[0-9]+[smhdw]?", - // "type": "string" - // }, - // "window": { - // "description": "The sampling window. At most one data point will be returned for each window in the requested time interval. This parameter is only valid for non-cumulative metric types. Units: \n- m: minute \n- h: hour \n- d: day \n- w: week Examples: 3m, 4w. Only one unit is allowed, for example: 2w3d is not allowed; you should use 17d instead.", - // "location": "query", - // "pattern": "[0-9]+[mhdw]?", - // "type": "string" - // }, - // "youngest": { - // "description": "End of the time interval (inclusive), which is expressed as an RFC 3339 timestamp.", - // "location": "query", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/timeseries/{metric}", - // "request": { - // "$ref": "ListTimeseriesRequest" - // }, - // "response": { - // "$ref": "ListTimeseriesResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/monitoring" - // ] - // } - -} - -// 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 *TimeseriesListCall) Pages(ctx context.Context, f func(*ListTimeseriesResponse) 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 "cloudmonitoring.timeseries.write": - -type TimeseriesWriteCall struct { - s *Service - project string - writetimeseriesrequest *WriteTimeseriesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Write: Put data points to one or more time series for one or more -// metrics. If a time series does not exist, a new time series will be -// created. It is not allowed to write a time series point that is older -// than the existing youngest point of that time series. Points that are -// older than the existing youngest point of that time series will be -// discarded silently. Therefore, users should make sure that points of -// a time series are written sequentially in the order of their end -// time. -func (r *TimeseriesService) Write(project string, writetimeseriesrequest *WriteTimeseriesRequest) *TimeseriesWriteCall { - c := &TimeseriesWriteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.writetimeseriesrequest = writetimeseriesrequest - 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 *TimeseriesWriteCall) Fields(s ...googleapi.Field) *TimeseriesWriteCall { - 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 *TimeseriesWriteCall) Context(ctx context.Context) *TimeseriesWriteCall { - 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 *TimeseriesWriteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TimeseriesWriteCall) 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.writetimeseriesrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/timeseries:write") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "cloudmonitoring.timeseries.write" call. -// Exactly one of *WriteTimeseriesResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *WriteTimeseriesResponse.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 *TimeseriesWriteCall) Do(opts ...googleapi.CallOption) (*WriteTimeseriesResponse, 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 := &WriteTimeseriesResponse{ - 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": "Put data points to one or more time series for one or more metrics. If a time series does not exist, a new time series will be created. It is not allowed to write a time series point that is older than the existing youngest point of that time series. Points that are older than the existing youngest point of that time series will be discarded silently. Therefore, users should make sure that points of a time series are written sequentially in the order of their end time.", - // "httpMethod": "POST", - // "id": "cloudmonitoring.timeseries.write", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "project": { - // "description": "The project ID. The value can be the numeric project ID or string-based project name.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/timeseries:write", - // "request": { - // "$ref": "WriteTimeseriesRequest" - // }, - // "response": { - // "$ref": "WriteTimeseriesResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/monitoring" - // ] - // } - -} - -// method id "cloudmonitoring.timeseriesDescriptors.list": - -type TimeseriesDescriptorsListCall struct { - s *Service - project string - metric string - listtimeseriesdescriptorsrequest *ListTimeseriesDescriptorsRequest - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: List the descriptors of the time series that match the metric -// and labels values and that have data points in the interval. Large -// responses are paginated; use the nextPageToken returned in the -// response to request subsequent pages of results by setting the -// pageToken query parameter to the value of the nextPageToken. -func (r *TimeseriesDescriptorsService) List(project string, metric string, youngest string, listtimeseriesdescriptorsrequest *ListTimeseriesDescriptorsRequest) *TimeseriesDescriptorsListCall { - c := &TimeseriesDescriptorsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.metric = metric - c.urlParams_.Set("youngest", youngest) - c.listtimeseriesdescriptorsrequest = listtimeseriesdescriptorsrequest - return c -} - -// Aggregator sets the optional parameter "aggregator": The aggregation -// function that will reduce the data points in each window to a single -// point. This parameter is only valid for non-cumulative metrics with a -// value type of INT64 or DOUBLE. -// -// Possible values: -// "max" -// "mean" -// "min" -// "sum" -func (c *TimeseriesDescriptorsListCall) Aggregator(aggregator string) *TimeseriesDescriptorsListCall { - c.urlParams_.Set("aggregator", aggregator) - return c -} - -// Count sets the optional parameter "count": Maximum number of time -// series descriptors per page. Used for pagination. If not specified, -// count = 100. -func (c *TimeseriesDescriptorsListCall) Count(count int64) *TimeseriesDescriptorsListCall { - c.urlParams_.Set("count", fmt.Sprint(count)) - return c -} - -// Labels sets the optional parameter "labels": A collection of labels -// for the matching time series, which are represented as: -// - key==value: key equals the value -// - key=~value: key regex matches the value -// - key!=value: key does not equal the value -// - key!~value: key regex does not match the value For example, to -// list all of the time series descriptors for the region us-central1, -// you could -// specify: -// label=cloud.googleapis.com%2Flocation=~us-central1.* -func (c *TimeseriesDescriptorsListCall) Labels(labels ...string) *TimeseriesDescriptorsListCall { - c.urlParams_.SetMulti("labels", append([]string{}, labels...)) - return c -} - -// Oldest sets the optional parameter "oldest": Start of the time -// interval (exclusive), which is expressed as an RFC 3339 timestamp. If -// neither oldest nor timespan is specified, the default time interval -// will be (youngest - 4 hours, youngest] -func (c *TimeseriesDescriptorsListCall) Oldest(oldest string) *TimeseriesDescriptorsListCall { - c.urlParams_.Set("oldest", oldest) - return c -} - -// PageToken sets the optional parameter "pageToken": The pagination -// token, which is used to page through large result sets. Set this -// value to the value of the nextPageToken to retrieve the next page of -// results. -func (c *TimeseriesDescriptorsListCall) PageToken(pageToken string) *TimeseriesDescriptorsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Timespan sets the optional parameter "timespan": Length of the time -// interval to query, which is an alternative way to declare the -// interval: (youngest - timespan, youngest]. The timespan and oldest -// parameters should not be used together. Units: -// - s: second -// - m: minute -// - h: hour -// - d: day -// - w: week Examples: 2s, 3m, 4w. Only one unit is allowed, for -// example: 2w3d is not allowed; you should use 17d instead. -// -// If neither oldest nor timespan is specified, the default time -// interval will be (youngest - 4 hours, youngest]. -func (c *TimeseriesDescriptorsListCall) Timespan(timespan string) *TimeseriesDescriptorsListCall { - c.urlParams_.Set("timespan", timespan) - return c -} - -// Window sets the optional parameter "window": The sampling window. At -// most one data point will be returned for each window in the requested -// time interval. This parameter is only valid for non-cumulative metric -// types. Units: -// - m: minute -// - h: hour -// - d: day -// - w: week Examples: 3m, 4w. Only one unit is allowed, for example: -// 2w3d is not allowed; you should use 17d instead. -func (c *TimeseriesDescriptorsListCall) Window(window string) *TimeseriesDescriptorsListCall { - c.urlParams_.Set("window", window) - 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 *TimeseriesDescriptorsListCall) Fields(s ...googleapi.Field) *TimeseriesDescriptorsListCall { - 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 *TimeseriesDescriptorsListCall) IfNoneMatch(entityTag string) *TimeseriesDescriptorsListCall { - 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 *TimeseriesDescriptorsListCall) Context(ctx context.Context) *TimeseriesDescriptorsListCall { - 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 *TimeseriesDescriptorsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TimeseriesDescriptorsListCall) 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, "{project}/timeseriesDescriptors/{metric}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "metric": c.metric, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "cloudmonitoring.timeseriesDescriptors.list" call. -// Exactly one of *ListTimeseriesDescriptorsResponse or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *ListTimeseriesDescriptorsResponse.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 *TimeseriesDescriptorsListCall) Do(opts ...googleapi.CallOption) (*ListTimeseriesDescriptorsResponse, 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 := &ListTimeseriesDescriptorsResponse{ - 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": "List the descriptors of the time series that match the metric and labels values and that have data points in the interval. Large responses are paginated; use the nextPageToken returned in the response to request subsequent pages of results by setting the pageToken query parameter to the value of the nextPageToken.", - // "httpMethod": "GET", - // "id": "cloudmonitoring.timeseriesDescriptors.list", - // "parameterOrder": [ - // "project", - // "metric", - // "youngest" - // ], - // "parameters": { - // "aggregator": { - // "description": "The aggregation function that will reduce the data points in each window to a single point. This parameter is only valid for non-cumulative metrics with a value type of INT64 or DOUBLE.", - // "enum": [ - // "max", - // "mean", - // "min", - // "sum" - // ], - // "enumDescriptions": [ - // "", - // "", - // "", - // "" - // ], - // "location": "query", - // "type": "string" - // }, - // "count": { - // "default": "100", - // "description": "Maximum number of time series descriptors per page. Used for pagination. If not specified, count = 100.", - // "format": "int32", - // "location": "query", - // "maximum": "1000", - // "minimum": "1", - // "type": "integer" - // }, - // "labels": { - // "description": "A collection of labels for the matching time series, which are represented as: \n- key==value: key equals the value \n- key=~value: key regex matches the value \n- key!=value: key does not equal the value \n- key!~value: key regex does not match the value For example, to list all of the time series descriptors for the region us-central1, you could specify:\nlabel=cloud.googleapis.com%2Flocation=~us-central1.*", - // "location": "query", - // "pattern": "(.+?)(==|=~|!=|!~)(.+)", - // "repeated": true, - // "type": "string" - // }, - // "metric": { - // "description": "Metric names are protocol-free URLs as listed in the Supported Metrics page. For example, compute.googleapis.com/instance/disk/read_ops_count.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "oldest": { - // "description": "Start of the time interval (exclusive), which is expressed as an RFC 3339 timestamp. If neither oldest nor timespan is specified, the default time interval will be (youngest - 4 hours, youngest]", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "The pagination token, which is used to page through large result sets. Set this value to the value of the nextPageToken to retrieve the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "The project ID to which this time series belongs. The value can be the numeric project ID or string-based project name.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "timespan": { - // "description": "Length of the time interval to query, which is an alternative way to declare the interval: (youngest - timespan, youngest]. The timespan and oldest parameters should not be used together. Units: \n- s: second \n- m: minute \n- h: hour \n- d: day \n- w: week Examples: 2s, 3m, 4w. Only one unit is allowed, for example: 2w3d is not allowed; you should use 17d instead.\n\nIf neither oldest nor timespan is specified, the default time interval will be (youngest - 4 hours, youngest].", - // "location": "query", - // "pattern": "[0-9]+[smhdw]?", - // "type": "string" - // }, - // "window": { - // "description": "The sampling window. At most one data point will be returned for each window in the requested time interval. This parameter is only valid for non-cumulative metric types. Units: \n- m: minute \n- h: hour \n- d: day \n- w: week Examples: 3m, 4w. Only one unit is allowed, for example: 2w3d is not allowed; you should use 17d instead.", - // "location": "query", - // "pattern": "[0-9]+[mhdw]?", - // "type": "string" - // }, - // "youngest": { - // "description": "End of the time interval (inclusive), which is expressed as an RFC 3339 timestamp.", - // "location": "query", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/timeseriesDescriptors/{metric}", - // "request": { - // "$ref": "ListTimeseriesDescriptorsRequest" - // }, - // "response": { - // "$ref": "ListTimeseriesDescriptorsResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/monitoring" - // ] - // } - -} - -// 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 *TimeseriesDescriptorsListCall) Pages(ctx context.Context, f func(*ListTimeseriesDescriptorsResponse) 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) - } -}
diff --git a/clouduseraccounts/v0.alpha/clouduseraccounts-api.json b/clouduseraccounts/v0.alpha/clouduseraccounts-api.json deleted file mode 100644 index 7680f8c..0000000 --- a/clouduseraccounts/v0.alpha/clouduseraccounts-api.json +++ /dev/null
@@ -1,1853 +0,0 @@ -{ - "auth": { - "oauth2": { - "scopes": { - "https://www.googleapis.com/auth/cloud-platform": { - "description": "View and manage your data across Google Cloud Platform services" - }, - "https://www.googleapis.com/auth/cloud-platform.read-only": { - "description": "View your data across Google Cloud Platform services" - }, - "https://www.googleapis.com/auth/cloud.useraccounts": { - "description": "Manage your Google Cloud User Accounts" - }, - "https://www.googleapis.com/auth/cloud.useraccounts.readonly": { - "description": "View your Google Cloud User Accounts" - } - } - } - }, - "basePath": "/clouduseraccounts/alpha/projects/", - "baseUrl": "https://www.googleapis.com/clouduseraccounts/alpha/projects/", - "batchPath": "batch/clouduseraccounts/alpha", - "canonicalName": "Cloud User Accounts", - "description": "Creates and manages users and groups for accessing Google Compute Engine virtual machines.", - "discoveryVersion": "v1", - "documentationLink": "https://cloud.google.com/compute/docs/access/user-accounts/api/latest/", - "etag": "\"-iA1DTNe4s-I6JZXPt1t1Ypy8IU/lOQeocShB0dxGwrtxzB56jZ95Xk\"", - "icons": { - "x16": "https://www.google.com/images/icons/product/compute_engine-16.png", - "x32": "https://www.google.com/images/icons/product/compute_engine-32.png" - }, - "id": "clouduseraccounts:alpha", - "kind": "discovery#restDescription", - "name": "clouduseraccounts", - "ownerDomain": "google.com", - "ownerName": "Google", - "parameters": { - "alt": { - "default": "json", - "description": "Data format for the response.", - "enum": [ - "json" - ], - "enumDescriptions": [ - "Responses with Content-Type of application/json" - ], - "location": "query", - "type": "string" - }, - "fields": { - "description": "Selector specifying which fields to include in a partial response.", - "location": "query", - "type": "string" - }, - "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" - }, - "oauth_token": { - "description": "OAuth 2.0 token for the current user.", - "location": "query", - "type": "string" - }, - "prettyPrint": { - "default": "true", - "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": { - "globalAccountsOperations": { - "methods": { - "delete": { - "description": "Deletes the specified operation resource.", - "httpMethod": "DELETE", - "id": "clouduseraccounts.globalAccountsOperations.delete", - "parameterOrder": [ - "project", - "operation" - ], - "parameters": { - "operation": { - "description": "Name of the Operations resource to delete.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - } - }, - "path": "{project}/global/operations/{operation}", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud.useraccounts" - ] - }, - "get": { - "description": "Retrieves the specified operation resource.", - "httpMethod": "GET", - "id": "clouduseraccounts.globalAccountsOperations.get", - "parameterOrder": [ - "project", - "operation" - ], - "parameters": { - "operation": { - "description": "Name of the Operations resource to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - } - }, - "path": "{project}/global/operations/{operation}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only", - "https://www.googleapis.com/auth/cloud.useraccounts", - "https://www.googleapis.com/auth/cloud.useraccounts.readonly" - ] - }, - "list": { - "description": "Retrieves the list of operation resources contained within the specified project.", - "httpMethod": "GET", - "id": "clouduseraccounts.globalAccountsOperations.list", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", - "format": "uint32", - "location": "query", - "maximum": "500", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - } - }, - "path": "{project}/global/operations", - "response": { - "$ref": "OperationList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only", - "https://www.googleapis.com/auth/cloud.useraccounts", - "https://www.googleapis.com/auth/cloud.useraccounts.readonly" - ] - } - } - }, - "groups": { - "methods": { - "addMember": { - "description": "Adds users to the specified group.", - "httpMethod": "POST", - "id": "clouduseraccounts.groups.addMember", - "parameterOrder": [ - "project", - "groupName" - ], - "parameters": { - "groupName": { - "description": "Name of the group for this request.", - "location": "path", - "pattern": "[a-z][-a-z0-9_]{0,31}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - } - }, - "path": "{project}/global/groups/{groupName}/addMember", - "request": { - "$ref": "GroupsAddMemberRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud.useraccounts" - ] - }, - "delete": { - "description": "Deletes the specified Group resource.", - "httpMethod": "DELETE", - "id": "clouduseraccounts.groups.delete", - "parameterOrder": [ - "project", - "groupName" - ], - "parameters": { - "groupName": { - "description": "Name of the Group resource to delete.", - "location": "path", - "pattern": "[a-z][-a-z0-9_]{0,31}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - } - }, - "path": "{project}/global/groups/{groupName}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud.useraccounts" - ] - }, - "get": { - "description": "Returns the specified Group resource.", - "httpMethod": "GET", - "id": "clouduseraccounts.groups.get", - "parameterOrder": [ - "project", - "groupName" - ], - "parameters": { - "groupName": { - "description": "Name of the Group resource to return.", - "location": "path", - "pattern": "[a-z][-a-z0-9_]{0,31}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - } - }, - "path": "{project}/global/groups/{groupName}", - "response": { - "$ref": "Group" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only", - "https://www.googleapis.com/auth/cloud.useraccounts", - "https://www.googleapis.com/auth/cloud.useraccounts.readonly" - ] - }, - "getIamPolicy": { - "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.", - "httpMethod": "GET", - "id": "clouduseraccounts.groups.getIamPolicy", - "parameterOrder": [ - "project", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "{project}/global/groups/{resource}/getIamPolicy", - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only", - "https://www.googleapis.com/auth/cloud.useraccounts", - "https://www.googleapis.com/auth/cloud.useraccounts.readonly" - ] - }, - "insert": { - "description": "Creates a Group resource in the specified project using the data included in the request.", - "httpMethod": "POST", - "id": "clouduseraccounts.groups.insert", - "parameterOrder": [ - "project" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - } - }, - "path": "{project}/global/groups", - "request": { - "$ref": "Group" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud.useraccounts" - ] - }, - "list": { - "description": "Retrieves the list of groups contained within the specified project.", - "httpMethod": "GET", - "id": "clouduseraccounts.groups.list", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", - "format": "uint32", - "location": "query", - "maximum": "500", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - } - }, - "path": "{project}/global/groups", - "response": { - "$ref": "GroupList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only", - "https://www.googleapis.com/auth/cloud.useraccounts", - "https://www.googleapis.com/auth/cloud.useraccounts.readonly" - ] - }, - "removeMember": { - "description": "Removes users from the specified group.", - "httpMethod": "POST", - "id": "clouduseraccounts.groups.removeMember", - "parameterOrder": [ - "project", - "groupName" - ], - "parameters": { - "groupName": { - "description": "Name of the group for this request.", - "location": "path", - "pattern": "[a-z][-a-z0-9_]{0,31}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - } - }, - "path": "{project}/global/groups/{groupName}/removeMember", - "request": { - "$ref": "GroupsRemoveMemberRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud.useraccounts" - ] - }, - "setIamPolicy": { - "description": "Sets the access control policy on the specified resource. Replaces any existing policy.", - "httpMethod": "POST", - "id": "clouduseraccounts.groups.setIamPolicy", - "parameterOrder": [ - "project", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "{project}/global/groups/{resource}/setIamPolicy", - "request": { - "$ref": "Policy" - }, - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only", - "https://www.googleapis.com/auth/cloud.useraccounts", - "https://www.googleapis.com/auth/cloud.useraccounts.readonly" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", - "httpMethod": "POST", - "id": "clouduseraccounts.groups.testIamPermissions", - "parameterOrder": [ - "project", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "{project}/global/groups/{resource}/testIamPermissions", - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only", - "https://www.googleapis.com/auth/cloud.useraccounts", - "https://www.googleapis.com/auth/cloud.useraccounts.readonly" - ] - } - } - }, - "linux": { - "methods": { - "getAuthorizedKeysView": { - "description": "Returns a list of authorized public keys for a specific user account.", - "httpMethod": "POST", - "id": "clouduseraccounts.linux.getAuthorizedKeysView", - "parameterOrder": [ - "project", - "zone", - "user", - "instance" - ], - "parameters": { - "instance": { - "description": "The fully-qualified URL of the virtual machine requesting the view.", - "location": "query", - "required": true, - "type": "string" - }, - "login": { - "description": "Whether the view was requested as part of a user-initiated login.", - "location": "query", - "type": "boolean" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "user": { - "description": "The user account for which you want to get a list of authorized public keys.", - "location": "path", - "pattern": "[a-z][-a-z0-9_]{0,31}", - "required": true, - "type": "string" - }, - "zone": { - "description": "Name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "{project}/zones/{zone}/authorizedKeysView/{user}", - "response": { - "$ref": "LinuxGetAuthorizedKeysViewResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only", - "https://www.googleapis.com/auth/cloud.useraccounts", - "https://www.googleapis.com/auth/cloud.useraccounts.readonly" - ] - }, - "getLinuxAccountViews": { - "description": "Retrieves a list of user accounts for an instance within a specific project.", - "httpMethod": "POST", - "id": "clouduseraccounts.linux.getLinuxAccountViews", - "parameterOrder": [ - "project", - "zone", - "instance" - ], - "parameters": { - "filter": { - "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query", - "type": "string" - }, - "instance": { - "description": "The fully-qualified URL of the virtual machine requesting the views.", - "location": "query", - "required": true, - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", - "format": "uint32", - "location": "query", - "maximum": "500", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "zone": { - "description": "Name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "{project}/zones/{zone}/linuxAccountViews", - "response": { - "$ref": "LinuxGetLinuxAccountViewsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only", - "https://www.googleapis.com/auth/cloud.useraccounts", - "https://www.googleapis.com/auth/cloud.useraccounts.readonly" - ] - } - } - }, - "users": { - "methods": { - "addPublicKey": { - "description": "Adds a public key to the specified User resource with the data included in the request.", - "httpMethod": "POST", - "id": "clouduseraccounts.users.addPublicKey", - "parameterOrder": [ - "project", - "user" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "user": { - "description": "Name of the user for this request.", - "location": "path", - "pattern": "[a-z][-a-z0-9_]{0,31}", - "required": true, - "type": "string" - } - }, - "path": "{project}/global/users/{user}/addPublicKey", - "request": { - "$ref": "PublicKey" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud.useraccounts" - ] - }, - "delete": { - "description": "Deletes the specified User resource.", - "httpMethod": "DELETE", - "id": "clouduseraccounts.users.delete", - "parameterOrder": [ - "project", - "user" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "user": { - "description": "Name of the user resource to delete.", - "location": "path", - "pattern": "[a-z][-a-z0-9_]{0,31}", - "required": true, - "type": "string" - } - }, - "path": "{project}/global/users/{user}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud.useraccounts" - ] - }, - "get": { - "description": "Returns the specified User resource.", - "httpMethod": "GET", - "id": "clouduseraccounts.users.get", - "parameterOrder": [ - "project", - "user" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "user": { - "description": "Name of the user resource to return.", - "location": "path", - "pattern": "[a-z][-a-z0-9_]{0,31}", - "required": true, - "type": "string" - } - }, - "path": "{project}/global/users/{user}", - "response": { - "$ref": "User" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only", - "https://www.googleapis.com/auth/cloud.useraccounts", - "https://www.googleapis.com/auth/cloud.useraccounts.readonly" - ] - }, - "getIamPolicy": { - "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.", - "httpMethod": "GET", - "id": "clouduseraccounts.users.getIamPolicy", - "parameterOrder": [ - "project", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "{project}/global/users/{resource}/getIamPolicy", - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only", - "https://www.googleapis.com/auth/cloud.useraccounts", - "https://www.googleapis.com/auth/cloud.useraccounts.readonly" - ] - }, - "insert": { - "description": "Creates a User resource in the specified project using the data included in the request.", - "httpMethod": "POST", - "id": "clouduseraccounts.users.insert", - "parameterOrder": [ - "project" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - } - }, - "path": "{project}/global/users", - "request": { - "$ref": "User" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud.useraccounts" - ] - }, - "list": { - "description": "Retrieves a list of users contained within the specified project.", - "httpMethod": "GET", - "id": "clouduseraccounts.users.list", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", - "format": "uint32", - "location": "query", - "maximum": "500", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - } - }, - "path": "{project}/global/users", - "response": { - "$ref": "UserList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only", - "https://www.googleapis.com/auth/cloud.useraccounts", - "https://www.googleapis.com/auth/cloud.useraccounts.readonly" - ] - }, - "removePublicKey": { - "description": "Removes the specified public key from the user.", - "httpMethod": "POST", - "id": "clouduseraccounts.users.removePublicKey", - "parameterOrder": [ - "project", - "user", - "fingerprint" - ], - "parameters": { - "fingerprint": { - "description": "The fingerprint of the public key to delete. Public keys are identified by their fingerprint, which is defined by RFC4716 to be the MD5 digest of the public key.", - "location": "query", - "pattern": "[a-f0-9]{32}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "user": { - "description": "Name of the user for this request.", - "location": "path", - "pattern": "[a-z][-a-z0-9_]{0,31}", - "required": true, - "type": "string" - } - }, - "path": "{project}/global/users/{user}/removePublicKey", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud.useraccounts" - ] - }, - "setIamPolicy": { - "description": "Sets the access control policy on the specified resource. Replaces any existing policy.", - "httpMethod": "POST", - "id": "clouduseraccounts.users.setIamPolicy", - "parameterOrder": [ - "project", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "{project}/global/users/{resource}/setIamPolicy", - "request": { - "$ref": "Policy" - }, - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only", - "https://www.googleapis.com/auth/cloud.useraccounts", - "https://www.googleapis.com/auth/cloud.useraccounts.readonly" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", - "httpMethod": "POST", - "id": "clouduseraccounts.users.testIamPermissions", - "parameterOrder": [ - "project", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "{project}/global/users/{resource}/testIamPermissions", - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only", - "https://www.googleapis.com/auth/cloud.useraccounts", - "https://www.googleapis.com/auth/cloud.useraccounts.readonly" - ] - } - } - } - }, - "revision": "20160316", - "rootUrl": "https://www.googleapis.com/", - "schemas": { - "AuditConfig": { - "description": "Enables \"data access\" audit logging for a service and specifies a list of members that are log-exempted.", - "id": "AuditConfig", - "properties": { - "exemptedMembers": { - "description": "Specifies the identities that are exempted from \"data access\" audit logging for the `service` specified above. Follows the same format of Binding.members.", - "items": { - "type": "string" - }, - "type": "array" - }, - "service": { - "description": "Specifies a service that will be enabled for \"data access\" audit logging. For example, `resourcemanager`, `storage`, `compute`. `allServices` is a special value that covers all services.", - "type": "string" - } - }, - "type": "object" - }, - "AuthorizedKeysView": { - "description": "A list of authorized public keys for a user account.", - "id": "AuthorizedKeysView", - "properties": { - "keys": { - "description": "[Output Only] The list of authorized public keys in SSH format.", - "items": { - "type": "string" - }, - "type": "array" - }, - "sudoer": { - "description": "[Output Only] Whether the user has the ability to elevate on the instance that requested the authorized keys.", - "type": "boolean" - } - }, - "type": "object" - }, - "Binding": { - "description": "Associates `members` with a `role`.", - "id": "Binding", - "properties": { - "members": { - "description": "Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values:\n\n* `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.\n\n* `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.\n\n* `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@gmail.com` or `joe@example.com`.\n\n* `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.\n\n* `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.\n\n* `domain:{domain}`: A Google Apps domain name that represents all the users of that domain. For example, `google.com` or `example.com`.", - "items": { - "type": "string" - }, - "type": "array" - }, - "role": { - "description": "Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.", - "type": "string" - } - }, - "type": "object" - }, - "Condition": { - "description": "A condition to be met.", - "id": "Condition", - "properties": { - "iam": { - "description": "Trusted attributes supplied by the IAM system.", - "enum": [ - "ATTRIBUTION", - "AUTHORITY", - "NO_ATTR" - ], - "enumDescriptions": [ - "", - "", - "" - ], - "type": "string" - }, - "op": { - "description": "An operator to apply the subject with.", - "enum": [ - "DISCHARGED", - "EQUALS", - "IN", - "NOT_EQUALS", - "NOT_IN", - "NO_OP" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "" - ], - "type": "string" - }, - "svc": { - "description": "Trusted attributes discharged by the service.", - "type": "string" - }, - "sys": { - "description": "Trusted attributes supplied by any service that owns resources and uses the IAM system for access control.", - "enum": [ - "IP", - "NAME", - "NO_ATTR", - "REGION", - "SERVICE" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "" - ], - "type": "string" - }, - "value": { - "description": "The object of the condition. Exactly one of these must be set.", - "type": "string" - }, - "values": { - "description": "The objects of the condition. This is mutually exclusive with 'value'.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "Group": { - "description": "A Group resource.", - "id": "Group", - "properties": { - "creationTimestamp": { - "description": "[Output Only] Creation timestamp in RFC3339 text format.", - "type": "string" - }, - "description": { - "description": "An optional textual description of the resource; provided by the client when the resource is created.", - "type": "string" - }, - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "format": "uint64", - "type": "string" - }, - "kind": { - "default": "clouduseraccounts#group", - "description": "[Output Only] Type of the resource. Always clouduseraccounts#group for groups.", - "type": "string" - }, - "members": { - "description": "[Output Only] A list of URLs to User resources who belong to the group. Users may only be members of groups in the same project.", - "items": { - "type": "string" - }, - "type": "array" - }, - "name": { - "annotations": { - "required": [ - "clouduseraccounts.groups.insert" - ] - }, - "description": "Name of the resource; provided by the client when the resource is created.", - "pattern": "[a-z][-a-z0-9_]{0,31}", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server defined URL for the resource.", - "type": "string" - } - }, - "type": "object" - }, - "GroupList": { - "id": "GroupList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "[Output Only] A list of Group resources.", - "items": { - "$ref": "Group" - }, - "type": "array" - }, - "kind": { - "default": "clouduseraccounts#groupList", - "description": "[Output Only] Type of resource. Always clouduseraccounts#groupList for lists of groups.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] A token used to continue a truncated list request.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server defined URL for this resource.", - "type": "string" - } - }, - "type": "object" - }, - "GroupsAddMemberRequest": { - "id": "GroupsAddMemberRequest", - "properties": { - "users": { - "description": "Fully-qualified URLs of the User resources to add.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "GroupsRemoveMemberRequest": { - "id": "GroupsRemoveMemberRequest", - "properties": { - "users": { - "description": "Fully-qualified URLs of the User resources to remove.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "LinuxAccountViews": { - "description": "A list of all Linux accounts for this project. This API is only used by Compute Engine virtual machines to get information about user accounts for a project or instance. Linux resources are read-only views into users and groups managed by the Compute Engine Accounts API.", - "id": "LinuxAccountViews", - "properties": { - "groupViews": { - "description": "[Output Only] A list of all groups within a project.", - "items": { - "$ref": "LinuxGroupView" - }, - "type": "array" - }, - "kind": { - "default": "clouduseraccounts#linuxAccountViews", - "description": "[Output Only] Type of the resource. Always clouduseraccounts#linuxAccountViews for Linux resources.", - "type": "string" - }, - "userViews": { - "description": "[Output Only] A list of all users within a project.", - "items": { - "$ref": "LinuxUserView" - }, - "type": "array" - } - }, - "type": "object" - }, - "LinuxGetAuthorizedKeysViewResponse": { - "id": "LinuxGetAuthorizedKeysViewResponse", - "properties": { - "resource": { - "$ref": "AuthorizedKeysView", - "description": "[Output Only] A list of authorized public keys for a user." - } - }, - "type": "object" - }, - "LinuxGetLinuxAccountViewsResponse": { - "id": "LinuxGetLinuxAccountViewsResponse", - "properties": { - "resource": { - "$ref": "LinuxAccountViews", - "description": "[Output Only] A list of authorized user accounts and groups." - } - }, - "type": "object" - }, - "LinuxGroupView": { - "description": "A detailed view of a Linux group.", - "id": "LinuxGroupView", - "properties": { - "gid": { - "description": "[Output Only] The Group ID.", - "format": "uint32", - "type": "integer" - }, - "groupName": { - "description": "[Output Only] Group name.", - "type": "string" - }, - "members": { - "description": "[Output Only] List of user accounts that belong to the group.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "LinuxUserView": { - "description": "A detailed view of a Linux user account.", - "id": "LinuxUserView", - "properties": { - "gecos": { - "description": "[Output Only] The GECOS (user information) entry for this account.", - "type": "string" - }, - "gid": { - "description": "[Output Only] User's default group ID.", - "format": "uint32", - "type": "integer" - }, - "homeDirectory": { - "description": "[Output Only] The path to the home directory for this account.", - "type": "string" - }, - "shell": { - "description": "[Output Only] The path to the login shell for this account.", - "type": "string" - }, - "uid": { - "description": "[Output Only] User ID.", - "format": "uint32", - "type": "integer" - }, - "username": { - "description": "[Output Only] The username of the account.", - "type": "string" - } - }, - "type": "object" - }, - "LogConfig": { - "description": "Specifies what kind of log the caller must write", - "id": "LogConfig", - "properties": { - "counter": { - "$ref": "LogConfigCounterOptions", - "description": "Counter options." - } - }, - "type": "object" - }, - "LogConfigCounterOptions": { - "description": "Options for counters", - "id": "LogConfigCounterOptions", - "properties": { - "field": { - "description": "The field value to attribute.", - "type": "string" - }, - "metric": { - "description": "The metric to update.", - "type": "string" - } - }, - "type": "object" - }, - "Operation": { - "description": "An Operation resource, used to manage asynchronous API requests.", - "id": "Operation", - "properties": { - "clientOperationId": { - "description": "[Output Only] Reserved for future use.", - "type": "string" - }, - "creationTimestamp": { - "description": "[Output Only] Creation timestamp in RFC3339 text format.", - "type": "string" - }, - "description": { - "description": "[Output Only] A textual description of the operation, which is set when the operation is created.", - "type": "string" - }, - "endTime": { - "description": "[Output Only] The time that this operation was completed. This value is in RFC3339 text format.", - "type": "string" - }, - "error": { - "description": "[Output Only] If errors are generated during processing of the operation, this field will be populated.", - "properties": { - "errors": { - "description": "[Output Only] The array of errors encountered while processing this operation.", - "items": { - "properties": { - "code": { - "description": "[Output Only] The error type identifier for this error.", - "type": "string" - }, - "location": { - "description": "[Output Only] Indicates the field in the request that caused the error. This property is optional.", - "type": "string" - }, - "message": { - "description": "[Output Only] An optional, human-readable error message.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - } - }, - "type": "object" - }, - "httpErrorMessage": { - "description": "[Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.", - "type": "string" - }, - "httpErrorStatusCode": { - "description": "[Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a 404 means the resource was not found.", - "format": "int32", - "type": "integer" - }, - "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", - "format": "uint64", - "type": "string" - }, - "insertTime": { - "description": "[Output Only] The time that this operation was requested. This value is in RFC3339 text format.", - "type": "string" - }, - "kind": { - "default": "clouduseraccounts#operation", - "description": "[Output Only] Type of the resource. Always compute#operation for Operation resources.", - "type": "string" - }, - "name": { - "description": "[Output Only] Name of the resource.", - "type": "string" - }, - "operationType": { - "description": "[Output Only] The type of operation, such as insert, update, or delete, and so on.", - "type": "string" - }, - "progress": { - "description": "[Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.", - "format": "int32", - "type": "integer" - }, - "region": { - "description": "[Output Only] The URL of the region where the operation resides. Only available when performing regional operations.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for the resource.", - "type": "string" - }, - "startTime": { - "description": "[Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.", - "type": "string" - }, - "status": { - "description": "[Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.", - "enum": [ - "DONE", - "PENDING", - "RUNNING" - ], - "enumDescriptions": [ - "", - "", - "" - ], - "type": "string" - }, - "statusMessage": { - "description": "[Output Only] An optional textual description of the current status of the operation.", - "type": "string" - }, - "targetId": { - "description": "[Output Only] The unique target ID, which identifies a specific incarnation of the target resource.", - "format": "uint64", - "type": "string" - }, - "targetLink": { - "description": "[Output Only] The URL of the resource that the operation modifies.", - "type": "string" - }, - "user": { - "description": "[Output Only] User who requested the operation, for example: user@example.com.", - "type": "string" - }, - "warnings": { - "description": "[Output Only] If warning messages are generated during processing of the operation, this field will be populated.", - "items": { - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "INJECTED_KERNELS_DEPRECATED", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_NOT_DELETED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNREACHABLE" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "" - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "zone": { - "description": "[Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.", - "type": "string" - } - }, - "type": "object" - }, - "OperationList": { - "description": "Contains a list of Operation resources.", - "id": "OperationList", - "properties": { - "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", - "type": "string" - }, - "items": { - "description": "[Output Only] A list of Operation resources.", - "items": { - "$ref": "Operation" - }, - "type": "array" - }, - "kind": { - "default": "clouduseraccounts#operationList", - "description": "[Output Only] Type of resource. Always compute#operations for Operations resource.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - } - }, - "type": "object" - }, - "Policy": { - "description": "Defines an Identity and Access Management (IAM) policy. It is used to specify access control policies for Cloud Platform resources.\n\n\n\nA `Policy` consists of a list of `bindings`. A `Binding` binds a list of `members` to a `role`, where the members can be user accounts, Google groups, Google domains, and service accounts. A `role` is a named list of permissions defined by IAM.\n\n**Example**\n\n{ \"bindings\": [ { \"role\": \"roles/owner\", \"members\": [ \"user:mike@example.com\", \"group:admins@example.com\", \"domain:google.com\", \"serviceAccount:my-other-app@appspot.gserviceaccount.com\", ] }, { \"role\": \"roles/viewer\", \"members\": [\"user:sean@example.com\"] } ] }\n\nFor a description of IAM and its features, see the [IAM developer's guide](https://cloud.google.com/iam).", - "id": "Policy", - "properties": { - "auditConfigs": { - "description": "Specifies audit logging configs for \"data access\". \"data access\": generally refers to data reads/writes and admin reads. \"admin activity\": generally refers to admin writes.\n\nNote: `AuditConfig` doesn't apply to \"admin activity\", which always enables audit logging.", - "items": { - "$ref": "AuditConfig" - }, - "type": "array" - }, - "bindings": { - "description": "Associates a list of `members` to a `role`. Multiple `bindings` must not be specified for the same `role`. `bindings` with no members will result in an error.", - "items": { - "$ref": "Binding" - }, - "type": "array" - }, - "etag": { - "description": "`etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy.\n\nIf no `etag` is provided in the call to `setIamPolicy`, then the existing policy is overwritten blindly.", - "format": "byte", - "type": "string" - }, - "iamOwned": { - "description": "", - "type": "boolean" - }, - "rules": { - "description": "If more than one rule is specified, the rules are applied in the following manner: - All matching LOG rules are always applied. - If any DENY/DENY_WITH_LOG rule matches, permission is denied. Logging will be applied if one or more matching rule requires logging. - Otherwise, if any ALLOW/ALLOW_WITH_LOG rule matches, permission is granted. Logging will be applied if one or more matching rule requires logging. - Otherwise, if no rule applies, permission is denied.", - "items": { - "$ref": "Rule" - }, - "type": "array" - }, - "version": { - "description": "Version of the `Policy`. The default version is 0.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "PublicKey": { - "description": "A public key for authenticating to guests.", - "id": "PublicKey", - "properties": { - "creationTimestamp": { - "description": "[Output Only] Creation timestamp in RFC3339 text format.", - "type": "string" - }, - "description": { - "description": "An optional textual description of the resource; provided by the client when the resource is created.", - "type": "string" - }, - "expirationTimestamp": { - "description": "Optional expiration timestamp. If provided, the timestamp must be in RFC3339 text format. If not provided, the public key never expires.", - "type": "string" - }, - "fingerprint": { - "description": "[Output Only] The fingerprint of the key is defined by RFC4716 to be the MD5 digest of the public key.", - "type": "string" - }, - "key": { - "description": "Public key text in SSH format, defined by RFC4253 section 6.6.", - "type": "string" - } - }, - "type": "object" - }, - "Rule": { - "description": "A rule to be applied in a Policy.", - "id": "Rule", - "properties": { - "action": { - "description": "Required", - "enum": [ - "ALLOW", - "ALLOW_WITH_LOG", - "DENY", - "DENY_WITH_LOG", - "LOG", - "NO_ACTION" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "" - ], - "type": "string" - }, - "conditions": { - "description": "Additional restrictions that must be met", - "items": { - "$ref": "Condition" - }, - "type": "array" - }, - "description": { - "description": "Human-readable description of the rule.", - "type": "string" - }, - "ins": { - "description": "The rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is in this set of entries.", - "items": { - "type": "string" - }, - "type": "array" - }, - "logConfigs": { - "description": "The config returned to callers of tech.iam.IAM.CheckPolicy for any entries that match the LOG action.", - "items": { - "$ref": "LogConfig" - }, - "type": "array" - }, - "notIns": { - "description": "The rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is not in this set of entries.", - "items": { - "type": "string" - }, - "type": "array" - }, - "permissions": { - "description": "A permission is a string of form '..' (e.g., 'storage.buckets.list'). A value of '*' matches all permissions, and a verb part of '*' (e.g., 'storage.buckets.*') matches all verbs.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "TestPermissionsRequest": { - "id": "TestPermissionsRequest", - "properties": { - "permissions": { - "description": "The set of permissions to check for the 'resource'. Permissions with wildcards (such as '*' or 'storage.*') are not allowed.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "TestPermissionsResponse": { - "id": "TestPermissionsResponse", - "properties": { - "permissions": { - "description": "A subset of `TestPermissionsRequest.permissions` that the caller is allowed.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "User": { - "description": "A User resource.", - "id": "User", - "properties": { - "creationTimestamp": { - "description": "[Output Only] Creation timestamp in RFC3339 text format.", - "type": "string" - }, - "description": { - "description": "An optional textual description of the resource; provided by the client when the resource is created.", - "type": "string" - }, - "groups": { - "description": "[Output Only] A list of URLs to Group resources who contain the user. Users are only members of groups in the same project.", - "items": { - "type": "string" - }, - "type": "array" - }, - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "format": "uint64", - "type": "string" - }, - "kind": { - "default": "clouduseraccounts#user", - "description": "[Output Only] Type of the resource. Always clouduseraccounts#user for users.", - "type": "string" - }, - "name": { - "annotations": { - "required": [ - "clouduseraccounts.users.insert" - ] - }, - "description": "Name of the resource; provided by the client when the resource is created.", - "pattern": "[a-z][-a-z0-9_]{0,31}", - "type": "string" - }, - "owner": { - "annotations": { - "required": [ - "clouduseraccounts.users.insert" - ] - }, - "description": "Email address of account's owner. This account will be validated to make sure it exists. The email can belong to any domain, but it must be tied to a Google account.", - "type": "string" - }, - "publicKeys": { - "description": "[Output Only] Public keys that this user may use to login.", - "items": { - "$ref": "PublicKey" - }, - "type": "array" - }, - "selfLink": { - "description": "[Output Only] Server defined URL for the resource.", - "type": "string" - } - }, - "type": "object" - }, - "UserList": { - "id": "UserList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "[Output Only] A list of User resources.", - "items": { - "$ref": "User" - }, - "type": "array" - }, - "kind": { - "default": "clouduseraccounts#userList", - "description": "[Output Only] Type of resource. Always clouduseraccounts#userList for lists of users.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] A token used to continue a truncated list request.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server defined URL for this resource.", - "type": "string" - } - }, - "type": "object" - } - }, - "servicePath": "clouduseraccounts/alpha/projects/", - "title": "Cloud User Accounts API", - "version": "alpha" -} \ No newline at end of file
diff --git a/clouduseraccounts/v0.alpha/clouduseraccounts-gen.go b/clouduseraccounts/v0.alpha/clouduseraccounts-gen.go deleted file mode 100644 index de87f84..0000000 --- a/clouduseraccounts/v0.alpha/clouduseraccounts-gen.go +++ /dev/null
@@ -1,5199 +0,0 @@ -// Package clouduseraccounts provides access to the Cloud User Accounts API. -// -// See https://cloud.google.com/compute/docs/access/user-accounts/api/latest/ -// -// Usage example: -// -// import "google.golang.org/api/clouduseraccounts/v0.alpha" -// ... -// clouduseraccountsService, err := clouduseraccounts.New(oauthHttpClient) -package clouduseraccounts // import "google.golang.org/api/clouduseraccounts/v0.alpha" - -import ( - "bytes" - "context" - "encoding/json" - "errors" - "fmt" - "io" - "net/http" - "net/url" - "strconv" - "strings" - - gensupport "google.golang.org/api/gensupport" - googleapi "google.golang.org/api/googleapi" -) - -// Always reference these packages, just in case the auto-generated code -// below doesn't. -var _ = bytes.NewBuffer -var _ = strconv.Itoa -var _ = fmt.Sprintf -var _ = json.NewDecoder -var _ = io.Copy -var _ = url.Parse -var _ = gensupport.MarshalJSON -var _ = googleapi.Version -var _ = errors.New -var _ = strings.Replace -var _ = context.Canceled - -const apiId = "clouduseraccounts:alpha" -const apiName = "clouduseraccounts" -const apiVersion = "alpha" -const basePath = "https://www.googleapis.com/clouduseraccounts/alpha/projects/" - -// OAuth2 scopes used by this API. -const ( - // View and manage your data across Google Cloud Platform services - CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform" - - // View your data across Google Cloud Platform services - CloudPlatformReadOnlyScope = "https://www.googleapis.com/auth/cloud-platform.read-only" - - // Manage your Google Cloud User Accounts - CloudUseraccountsScope = "https://www.googleapis.com/auth/cloud.useraccounts" - - // View your Google Cloud User Accounts - CloudUseraccountsReadonlyScope = "https://www.googleapis.com/auth/cloud.useraccounts.readonly" -) - -func New(client *http.Client) (*Service, error) { - if client == nil { - return nil, errors.New("client is nil") - } - s := &Service{client: client, BasePath: basePath} - s.GlobalAccountsOperations = NewGlobalAccountsOperationsService(s) - s.Groups = NewGroupsService(s) - s.Linux = NewLinuxService(s) - s.Users = NewUsersService(s) - return s, nil -} - -type Service struct { - client *http.Client - BasePath string // API endpoint base URL - UserAgent string // optional additional User-Agent fragment - - GlobalAccountsOperations *GlobalAccountsOperationsService - - Groups *GroupsService - - Linux *LinuxService - - Users *UsersService -} - -func (s *Service) userAgent() string { - if s.UserAgent == "" { - return googleapi.UserAgent - } - return googleapi.UserAgent + " " + s.UserAgent -} - -func NewGlobalAccountsOperationsService(s *Service) *GlobalAccountsOperationsService { - rs := &GlobalAccountsOperationsService{s: s} - return rs -} - -type GlobalAccountsOperationsService struct { - s *Service -} - -func NewGroupsService(s *Service) *GroupsService { - rs := &GroupsService{s: s} - return rs -} - -type GroupsService struct { - s *Service -} - -func NewLinuxService(s *Service) *LinuxService { - rs := &LinuxService{s: s} - return rs -} - -type LinuxService struct { - s *Service -} - -func NewUsersService(s *Service) *UsersService { - rs := &UsersService{s: s} - return rs -} - -type UsersService struct { - s *Service -} - -// AuditConfig: Enables "data access" audit logging for a service and -// specifies a list of members that are log-exempted. -type AuditConfig struct { - // ExemptedMembers: Specifies the identities that are exempted from - // "data access" audit logging for the `service` specified above. - // Follows the same format of Binding.members. - ExemptedMembers []string `json:"exemptedMembers,omitempty"` - - // Service: Specifies a service that will be enabled for "data access" - // audit logging. For example, `resourcemanager`, `storage`, `compute`. - // `allServices` is a special value that covers all services. - Service string `json:"service,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ExemptedMembers") 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. "ExemptedMembers") 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 *AuditConfig) MarshalJSON() ([]byte, error) { - type NoMethod AuditConfig - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// AuthorizedKeysView: A list of authorized public keys for a user -// account. -type AuthorizedKeysView struct { - // Keys: [Output Only] The list of authorized public keys in SSH format. - Keys []string `json:"keys,omitempty"` - - // Sudoer: [Output Only] Whether the user has the ability to elevate on - // the instance that requested the authorized keys. - Sudoer bool `json:"sudoer,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Keys") 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. "Keys") 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 *AuthorizedKeysView) MarshalJSON() ([]byte, error) { - type NoMethod AuthorizedKeysView - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// Binding: Associates `members` with a `role`. -type Binding struct { - // Members: Specifies the identities requesting access for a Cloud - // Platform resource. `members` can have the following values: - // - // * `allUsers`: A special identifier that represents anyone who is on - // the internet; with or without a Google account. - // - // * `allAuthenticatedUsers`: A special identifier that represents - // anyone who is authenticated with a Google account or a service - // account. - // - // * `user:{emailid}`: An email address that represents a specific - // Google account. For example, `alice@gmail.com` or - // `joe@example.com`. - // - // * `serviceAccount:{emailid}`: An email address that represents a - // service account. For example, - // `my-other-app@appspot.gserviceaccount.com`. - // - // * `group:{emailid}`: An email address that represents a Google group. - // For example, `admins@example.com`. - // - // * `domain:{domain}`: A Google Apps domain name that represents all - // the users of that domain. For example, `google.com` or `example.com`. - Members []string `json:"members,omitempty"` - - // Role: Role that is assigned to `members`. For example, - // `roles/viewer`, `roles/editor`, or `roles/owner`. - Role string `json:"role,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Members") 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. "Members") 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 *Binding) MarshalJSON() ([]byte, error) { - type NoMethod Binding - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// Condition: A condition to be met. -type Condition struct { - // Iam: Trusted attributes supplied by the IAM system. - // - // Possible values: - // "ATTRIBUTION" - // "AUTHORITY" - // "NO_ATTR" - Iam string `json:"iam,omitempty"` - - // Op: An operator to apply the subject with. - // - // Possible values: - // "DISCHARGED" - // "EQUALS" - // "IN" - // "NOT_EQUALS" - // "NOT_IN" - // "NO_OP" - Op string `json:"op,omitempty"` - - // Svc: Trusted attributes discharged by the service. - Svc string `json:"svc,omitempty"` - - // Sys: Trusted attributes supplied by any service that owns resources - // and uses the IAM system for access control. - // - // Possible values: - // "IP" - // "NAME" - // "NO_ATTR" - // "REGION" - // "SERVICE" - Sys string `json:"sys,omitempty"` - - // Value: The object of the condition. Exactly one of these must be set. - Value string `json:"value,omitempty"` - - // Values: The objects of the condition. This is mutually exclusive with - // 'value'. - Values []string `json:"values,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Iam") 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. "Iam") 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 *Condition) MarshalJSON() ([]byte, error) { - type NoMethod Condition - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// Group: A Group resource. -type Group struct { - // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text - // format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - - // Description: An optional textual description of the resource; - // provided by the client when the resource is created. - Description string `json:"description,omitempty"` - - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id uint64 `json:"id,omitempty,string"` - - // Kind: [Output Only] Type of the resource. Always - // clouduseraccounts#group for groups. - Kind string `json:"kind,omitempty"` - - // Members: [Output Only] A list of URLs to User resources who belong to - // the group. Users may only be members of groups in the same project. - Members []string `json:"members,omitempty"` - - // Name: Name of the resource; provided by the client when the resource - // is created. - Name string `json:"name,omitempty"` - - // SelfLink: [Output Only] Server defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "CreationTimestamp") - // 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. "CreationTimestamp") 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 *Group) MarshalJSON() ([]byte, error) { - type NoMethod Group - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type GroupList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: [Output Only] A list of Group resources. - Items []*Group `json:"items,omitempty"` - - // Kind: [Output Only] Type of resource. Always - // clouduseraccounts#groupList for lists of groups. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] A token used to continue a truncated - // list request. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") 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. "Id") 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 *GroupList) MarshalJSON() ([]byte, error) { - type NoMethod GroupList - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type GroupsAddMemberRequest struct { - // Users: Fully-qualified URLs of the User resources to add. - Users []string `json:"users,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Users") 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. "Users") 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 *GroupsAddMemberRequest) MarshalJSON() ([]byte, error) { - type NoMethod GroupsAddMemberRequest - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type GroupsRemoveMemberRequest struct { - // Users: Fully-qualified URLs of the User resources to remove. - Users []string `json:"users,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Users") 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. "Users") 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 *GroupsRemoveMemberRequest) MarshalJSON() ([]byte, error) { - type NoMethod GroupsRemoveMemberRequest - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// LinuxAccountViews: A list of all Linux accounts for this project. -// This API is only used by Compute Engine virtual machines to get -// information about user accounts for a project or instance. Linux -// resources are read-only views into users and groups managed by the -// Compute Engine Accounts API. -type LinuxAccountViews struct { - // GroupViews: [Output Only] A list of all groups within a project. - GroupViews []*LinuxGroupView `json:"groupViews,omitempty"` - - // Kind: [Output Only] Type of the resource. Always - // clouduseraccounts#linuxAccountViews for Linux resources. - Kind string `json:"kind,omitempty"` - - // UserViews: [Output Only] A list of all users within a project. - UserViews []*LinuxUserView `json:"userViews,omitempty"` - - // ForceSendFields is a list of field names (e.g. "GroupViews") 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. "GroupViews") 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 *LinuxAccountViews) MarshalJSON() ([]byte, error) { - type NoMethod LinuxAccountViews - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type LinuxGetAuthorizedKeysViewResponse struct { - // Resource: [Output Only] A list of authorized public keys for a user. - Resource *AuthorizedKeysView `json:"resource,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Resource") 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. "Resource") 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 *LinuxGetAuthorizedKeysViewResponse) MarshalJSON() ([]byte, error) { - type NoMethod LinuxGetAuthorizedKeysViewResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type LinuxGetLinuxAccountViewsResponse struct { - // Resource: [Output Only] A list of authorized user accounts and - // groups. - Resource *LinuxAccountViews `json:"resource,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Resource") 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. "Resource") 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 *LinuxGetLinuxAccountViewsResponse) MarshalJSON() ([]byte, error) { - type NoMethod LinuxGetLinuxAccountViewsResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// LinuxGroupView: A detailed view of a Linux group. -type LinuxGroupView struct { - // Gid: [Output Only] The Group ID. - Gid int64 `json:"gid,omitempty"` - - // GroupName: [Output Only] Group name. - GroupName string `json:"groupName,omitempty"` - - // Members: [Output Only] List of user accounts that belong to the - // group. - Members []string `json:"members,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Gid") 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. "Gid") 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 *LinuxGroupView) MarshalJSON() ([]byte, error) { - type NoMethod LinuxGroupView - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// LinuxUserView: A detailed view of a Linux user account. -type LinuxUserView struct { - // Gecos: [Output Only] The GECOS (user information) entry for this - // account. - Gecos string `json:"gecos,omitempty"` - - // Gid: [Output Only] User's default group ID. - Gid int64 `json:"gid,omitempty"` - - // HomeDirectory: [Output Only] The path to the home directory for this - // account. - HomeDirectory string `json:"homeDirectory,omitempty"` - - // Shell: [Output Only] The path to the login shell for this account. - Shell string `json:"shell,omitempty"` - - // Uid: [Output Only] User ID. - Uid int64 `json:"uid,omitempty"` - - // Username: [Output Only] The username of the account. - Username string `json:"username,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Gecos") 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. "Gecos") 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 *LinuxUserView) MarshalJSON() ([]byte, error) { - type NoMethod LinuxUserView - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// LogConfig: Specifies what kind of log the caller must write -type LogConfig struct { - // Counter: Counter options. - Counter *LogConfigCounterOptions `json:"counter,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Counter") 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. "Counter") 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 *LogConfig) MarshalJSON() ([]byte, error) { - type NoMethod LogConfig - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// LogConfigCounterOptions: Options for counters -type LogConfigCounterOptions struct { - // Field: The field value to attribute. - Field string `json:"field,omitempty"` - - // Metric: The metric to update. - Metric string `json:"metric,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Field") 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. "Field") 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 *LogConfigCounterOptions) MarshalJSON() ([]byte, error) { - type NoMethod LogConfigCounterOptions - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// Operation: An Operation resource, used to manage asynchronous API -// requests. -type Operation struct { - // ClientOperationId: [Output Only] Reserved for future use. - ClientOperationId string `json:"clientOperationId,omitempty"` - - // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text - // format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - - // Description: [Output Only] A textual description of the operation, - // which is set when the operation is created. - Description string `json:"description,omitempty"` - - // EndTime: [Output Only] The time that this operation was completed. - // This value is in RFC3339 text format. - EndTime string `json:"endTime,omitempty"` - - // Error: [Output Only] If errors are generated during processing of the - // operation, this field will be populated. - Error *OperationError `json:"error,omitempty"` - - // HttpErrorMessage: [Output Only] If the operation fails, this field - // contains the HTTP error message that was returned, such as NOT FOUND. - HttpErrorMessage string `json:"httpErrorMessage,omitempty"` - - // HttpErrorStatusCode: [Output Only] If the operation fails, this field - // contains the HTTP error status code that was returned. For example, a - // 404 means the resource was not found. - HttpErrorStatusCode int64 `json:"httpErrorStatusCode,omitempty"` - - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. - Id uint64 `json:"id,omitempty,string"` - - // InsertTime: [Output Only] The time that this operation was requested. - // This value is in RFC3339 text format. - InsertTime string `json:"insertTime,omitempty"` - - // Kind: [Output Only] Type of the resource. Always compute#operation - // for Operation resources. - Kind string `json:"kind,omitempty"` - - // Name: [Output Only] Name of the resource. - Name string `json:"name,omitempty"` - - // OperationType: [Output Only] The type of operation, such as insert, - // update, or delete, and so on. - OperationType string `json:"operationType,omitempty"` - - // Progress: [Output Only] An optional progress indicator that ranges - // from 0 to 100. There is no requirement that this be linear or support - // any granularity of operations. This should not be used to guess when - // the operation will be complete. This number should monotonically - // increase as the operation progresses. - Progress int64 `json:"progress,omitempty"` - - // Region: [Output Only] The URL of the region where the operation - // resides. Only available when performing regional operations. - Region string `json:"region,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - - // StartTime: [Output Only] The time that this operation was started by - // the server. This value is in RFC3339 text format. - StartTime string `json:"startTime,omitempty"` - - // Status: [Output Only] The status of the operation, which can be one - // of the following: PENDING, RUNNING, or DONE. - // - // Possible values: - // "DONE" - // "PENDING" - // "RUNNING" - Status string `json:"status,omitempty"` - - // StatusMessage: [Output Only] An optional textual description of the - // current status of the operation. - StatusMessage string `json:"statusMessage,omitempty"` - - // TargetId: [Output Only] The unique target ID, which identifies a - // specific incarnation of the target resource. - TargetId uint64 `json:"targetId,omitempty,string"` - - // TargetLink: [Output Only] The URL of the resource that the operation - // modifies. - TargetLink string `json:"targetLink,omitempty"` - - // User: [Output Only] User who requested the operation, for example: - // user@example.com. - User string `json:"user,omitempty"` - - // Warnings: [Output Only] If warning messages are generated during - // processing of the operation, this field will be populated. - Warnings []*OperationWarnings `json:"warnings,omitempty"` - - // Zone: [Output Only] The URL of the zone where the operation resides. - // Only available when performing per-zone operations. - Zone string `json:"zone,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "ClientOperationId") - // 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. "ClientOperationId") 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 *Operation) MarshalJSON() ([]byte, error) { - type NoMethod Operation - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// OperationError: [Output Only] If errors are generated during -// processing of the operation, this field will be populated. -type OperationError struct { - // Errors: [Output Only] The array of errors encountered while - // processing this operation. - Errors []*OperationErrorErrors `json:"errors,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Errors") 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. "Errors") 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 *OperationError) MarshalJSON() ([]byte, error) { - type NoMethod OperationError - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type OperationErrorErrors struct { - // Code: [Output Only] The error type identifier for this error. - Code string `json:"code,omitempty"` - - // Location: [Output Only] Indicates the field in the request that - // caused the error. This property is optional. - Location string `json:"location,omitempty"` - - // Message: [Output Only] An optional, human-readable error message. - Message string `json:"message,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Code") 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. "Code") 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 *OperationErrorErrors) MarshalJSON() ([]byte, error) { - type NoMethod OperationErrorErrors - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type OperationWarnings struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in - // the response. - // - // Possible values: - // "CLEANUP_FAILED" - // "DEPRECATED_RESOURCE_USED" - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - // "INJECTED_KERNELS_DEPRECATED" - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - // "NEXT_HOP_CANNOT_IP_FORWARD" - // "NEXT_HOP_INSTANCE_NOT_FOUND" - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - // "NEXT_HOP_NOT_RUNNING" - // "NOT_CRITICAL_ERROR" - // "NO_RESULTS_ON_PAGE" - // "REQUIRED_TOS_AGREEMENT" - // "RESOURCE_NOT_DELETED" - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - // "UNREACHABLE" - Code string `json:"code,omitempty"` - - // Data: [Output Only] Metadata about this warning in key: value format. - // For example: - // "data": [ { "key": "scope", "value": "zones/us-east1-d" } - Data []*OperationWarningsData `json:"data,omitempty"` - - // Message: [Output Only] A human-readable description of the warning - // code. - Message string `json:"message,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Code") 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. "Code") 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 *OperationWarnings) MarshalJSON() ([]byte, error) { - type NoMethod OperationWarnings - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type OperationWarningsData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being returned. For example, for warnings where there are no results - // in a list request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP - // forwarding). - Key string `json:"key,omitempty"` - - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Key") 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. "Key") 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 *OperationWarningsData) MarshalJSON() ([]byte, error) { - type NoMethod OperationWarningsData - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// OperationList: Contains a list of Operation resources. -type OperationList struct { - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. - Id string `json:"id,omitempty"` - - // Items: [Output Only] A list of Operation resources. - Items []*Operation `json:"items,omitempty"` - - // Kind: [Output Only] Type of resource. Always compute#operations for - // Operations resource. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") 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. "Id") 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 *OperationList) MarshalJSON() ([]byte, error) { - type NoMethod OperationList - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// Policy: Defines an Identity and Access Management (IAM) policy. It is -// used to specify access control policies for Cloud Platform -// resources. -// -// -// -// A `Policy` consists of a list of `bindings`. A `Binding` binds a list -// of `members` to a `role`, where the members can be user accounts, -// Google groups, Google domains, and service accounts. A `role` is a -// named list of permissions defined by IAM. -// -// **Example** -// -// { "bindings": [ { "role": "roles/owner", "members": [ -// "user:mike@example.com", "group:admins@example.com", -// "domain:google.com", -// "serviceAccount:my-other-app@appspot.gserviceaccount.com", ] }, { -// "role": "roles/viewer", "members": ["user:sean@example.com"] } ] -// } -// -// For a description of IAM and its features, see the [IAM developer's -// guide](https://cloud.google.com/iam). -type Policy struct { - // AuditConfigs: Specifies audit logging configs for "data access". - // "data access": generally refers to data reads/writes and admin reads. - // "admin activity": generally refers to admin writes. - // - // Note: `AuditConfig` doesn't apply to "admin activity", which always - // enables audit logging. - AuditConfigs []*AuditConfig `json:"auditConfigs,omitempty"` - - // Bindings: Associates a list of `members` to a `role`. Multiple - // `bindings` must not be specified for the same `role`. `bindings` with - // no members will result in an error. - Bindings []*Binding `json:"bindings,omitempty"` - - // Etag: `etag` is used for optimistic concurrency control as a way to - // help prevent simultaneous updates of a policy from overwriting each - // other. It is strongly suggested that systems make use of the `etag` - // in the read-modify-write cycle to perform policy updates in order to - // avoid race conditions: An `etag` is returned in the response to - // `getIamPolicy`, and systems are expected to put that etag in the - // request to `setIamPolicy` to ensure that their change will be applied - // to the same version of the policy. - // - // If no `etag` is provided in the call to `setIamPolicy`, then the - // existing policy is overwritten blindly. - Etag string `json:"etag,omitempty"` - - IamOwned bool `json:"iamOwned,omitempty"` - - // Rules: If more than one rule is specified, the rules are applied in - // the following manner: - All matching LOG rules are always applied. - - // If any DENY/DENY_WITH_LOG rule matches, permission is denied. Logging - // will be applied if one or more matching rule requires logging. - - // Otherwise, if any ALLOW/ALLOW_WITH_LOG rule matches, permission is - // granted. Logging will be applied if one or more matching rule - // requires logging. - Otherwise, if no rule applies, permission is - // denied. - Rules []*Rule `json:"rules,omitempty"` - - // Version: Version of the `Policy`. The default version is 0. - Version int64 `json:"version,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "AuditConfigs") 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. "AuditConfigs") 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 *Policy) MarshalJSON() ([]byte, error) { - type NoMethod Policy - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// PublicKey: A public key for authenticating to guests. -type PublicKey struct { - // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text - // format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - - // Description: An optional textual description of the resource; - // provided by the client when the resource is created. - Description string `json:"description,omitempty"` - - // ExpirationTimestamp: Optional expiration timestamp. If provided, the - // timestamp must be in RFC3339 text format. If not provided, the public - // key never expires. - ExpirationTimestamp string `json:"expirationTimestamp,omitempty"` - - // Fingerprint: [Output Only] The fingerprint of the key is defined by - // RFC4716 to be the MD5 digest of the public key. - Fingerprint string `json:"fingerprint,omitempty"` - - // Key: Public key text in SSH format, defined by RFC4253 section 6.6. - Key string `json:"key,omitempty"` - - // ForceSendFields is a list of field names (e.g. "CreationTimestamp") - // 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. "CreationTimestamp") 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 *PublicKey) MarshalJSON() ([]byte, error) { - type NoMethod PublicKey - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// Rule: A rule to be applied in a Policy. -type Rule struct { - // Action: Required - // - // Possible values: - // "ALLOW" - // "ALLOW_WITH_LOG" - // "DENY" - // "DENY_WITH_LOG" - // "LOG" - // "NO_ACTION" - Action string `json:"action,omitempty"` - - // Conditions: Additional restrictions that must be met - Conditions []*Condition `json:"conditions,omitempty"` - - // Description: Human-readable description of the rule. - Description string `json:"description,omitempty"` - - // Ins: The rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is in this - // set of entries. - Ins []string `json:"ins,omitempty"` - - // LogConfigs: The config returned to callers of - // tech.iam.IAM.CheckPolicy for any entries that match the LOG action. - LogConfigs []*LogConfig `json:"logConfigs,omitempty"` - - // NotIns: The rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is not - // in this set of entries. - NotIns []string `json:"notIns,omitempty"` - - // Permissions: A permission is a string of form '..' (e.g., - // 'storage.buckets.list'). A value of '*' matches all permissions, and - // a verb part of '*' (e.g., 'storage.buckets.*') matches all verbs. - Permissions []string `json:"permissions,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Action") 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. "Action") 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 *Rule) MarshalJSON() ([]byte, error) { - type NoMethod Rule - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type TestPermissionsRequest struct { - // Permissions: The set of permissions to check for the 'resource'. - // Permissions with wildcards (such as '*' or 'storage.*') are not - // allowed. - Permissions []string `json:"permissions,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Permissions") 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. "Permissions") 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 *TestPermissionsRequest) MarshalJSON() ([]byte, error) { - type NoMethod TestPermissionsRequest - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type TestPermissionsResponse struct { - // Permissions: A subset of `TestPermissionsRequest.permissions` that - // the caller is allowed. - Permissions []string `json:"permissions,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Permissions") 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. "Permissions") 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 *TestPermissionsResponse) MarshalJSON() ([]byte, error) { - type NoMethod TestPermissionsResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// User: A User resource. -type User struct { - // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text - // format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - - // Description: An optional textual description of the resource; - // provided by the client when the resource is created. - Description string `json:"description,omitempty"` - - // Groups: [Output Only] A list of URLs to Group resources who contain - // the user. Users are only members of groups in the same project. - Groups []string `json:"groups,omitempty"` - - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id uint64 `json:"id,omitempty,string"` - - // Kind: [Output Only] Type of the resource. Always - // clouduseraccounts#user for users. - Kind string `json:"kind,omitempty"` - - // Name: Name of the resource; provided by the client when the resource - // is created. - Name string `json:"name,omitempty"` - - // Owner: Email address of account's owner. This account will be - // validated to make sure it exists. The email can belong to any domain, - // but it must be tied to a Google account. - Owner string `json:"owner,omitempty"` - - // PublicKeys: [Output Only] Public keys that this user may use to - // login. - PublicKeys []*PublicKey `json:"publicKeys,omitempty"` - - // SelfLink: [Output Only] Server defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "CreationTimestamp") - // 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. "CreationTimestamp") 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 *User) MarshalJSON() ([]byte, error) { - type NoMethod User - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type UserList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: [Output Only] A list of User resources. - Items []*User `json:"items,omitempty"` - - // Kind: [Output Only] Type of resource. Always - // clouduseraccounts#userList for lists of users. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] A token used to continue a truncated - // list request. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") 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. "Id") 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 *UserList) MarshalJSON() ([]byte, error) { - type NoMethod UserList - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// method id "clouduseraccounts.globalAccountsOperations.delete": - -type GlobalAccountsOperationsDeleteCall struct { - s *Service - project string - operation string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified operation resource. -func (r *GlobalAccountsOperationsService) Delete(project string, operation string) *GlobalAccountsOperationsDeleteCall { - c := &GlobalAccountsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.operation = operation - 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 *GlobalAccountsOperationsDeleteCall) Fields(s ...googleapi.Field) *GlobalAccountsOperationsDeleteCall { - 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 *GlobalAccountsOperationsDeleteCall) Context(ctx context.Context) *GlobalAccountsOperationsDeleteCall { - 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 *GlobalAccountsOperationsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GlobalAccountsOperationsDeleteCall) 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 - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/operations/{operation}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("DELETE", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "operation": c.operation, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "clouduseraccounts.globalAccountsOperations.delete" call. -func (c *GlobalAccountsOperationsDeleteCall) Do(opts ...googleapi.CallOption) error { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if err != nil { - return err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return err - } - return nil - // { - // "description": "Deletes the specified operation resource.", - // "httpMethod": "DELETE", - // "id": "clouduseraccounts.globalAccountsOperations.delete", - // "parameterOrder": [ - // "project", - // "operation" - // ], - // "parameters": { - // "operation": { - // "description": "Name of the Operations resource to delete.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/operations/{operation}", - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/cloud.useraccounts" - // ] - // } - -} - -// method id "clouduseraccounts.globalAccountsOperations.get": - -type GlobalAccountsOperationsGetCall struct { - s *Service - project string - operation string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Retrieves the specified operation resource. -func (r *GlobalAccountsOperationsService) Get(project string, operation string) *GlobalAccountsOperationsGetCall { - c := &GlobalAccountsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.operation = operation - 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 *GlobalAccountsOperationsGetCall) Fields(s ...googleapi.Field) *GlobalAccountsOperationsGetCall { - 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 *GlobalAccountsOperationsGetCall) IfNoneMatch(entityTag string) *GlobalAccountsOperationsGetCall { - 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 *GlobalAccountsOperationsGetCall) Context(ctx context.Context) *GlobalAccountsOperationsGetCall { - 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 *GlobalAccountsOperationsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GlobalAccountsOperationsGetCall) 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, "{project}/global/operations/{operation}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "operation": c.operation, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "clouduseraccounts.globalAccountsOperations.get" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.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 *GlobalAccountsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, 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 := &Operation{ - 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": "Retrieves the specified operation resource.", - // "httpMethod": "GET", - // "id": "clouduseraccounts.globalAccountsOperations.get", - // "parameterOrder": [ - // "project", - // "operation" - // ], - // "parameters": { - // "operation": { - // "description": "Name of the Operations resource to return.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/operations/{operation}", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/cloud-platform.read-only", - // "https://www.googleapis.com/auth/cloud.useraccounts", - // "https://www.googleapis.com/auth/cloud.useraccounts.readonly" - // ] - // } - -} - -// method id "clouduseraccounts.globalAccountsOperations.list": - -type GlobalAccountsOperationsListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of operation resources contained within the -// specified project. -func (r *GlobalAccountsOperationsService) List(project string) *GlobalAccountsOperationsListCall { - c := &GlobalAccountsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": Sets a filter expression -// for filtering listed resources, in the form filter={expression}. Your -// {expression} must be in the format: field_name comparison_string -// literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use filter=name ne -// example-instance. -// -// Compute Engine Beta API Only: If you use filtering in the Beta API, -// you can also filter on nested fields. For example, you could filter -// on instances that have set the scheduling.automaticRestart field to -// true. In particular, use filtering on nested fields to take advantage -// of instance labels to organize and filter results based on label -// values. -// -// The Beta API also supports filtering on multiple expressions by -// providing each separate expression within parentheses. For example, -// (scheduling.automaticRestart eq true) (zone eq us-central1-f). -// Multiple expressions are treated as AND expressions, meaning that -// resources must match all expressions to pass the filters. -func (c *GlobalAccountsOperationsListCall) Filter(filter string) *GlobalAccountsOperationsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. -func (c *GlobalAccountsOperationsListCall) MaxResults(maxResults int64) *GlobalAccountsOperationsListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *GlobalAccountsOperationsListCall) OrderBy(orderBy string) *GlobalAccountsOperationsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *GlobalAccountsOperationsListCall) PageToken(pageToken string) *GlobalAccountsOperationsListCall { - 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 *GlobalAccountsOperationsListCall) Fields(s ...googleapi.Field) *GlobalAccountsOperationsListCall { - 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 *GlobalAccountsOperationsListCall) IfNoneMatch(entityTag string) *GlobalAccountsOperationsListCall { - 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 *GlobalAccountsOperationsListCall) Context(ctx context.Context) *GlobalAccountsOperationsListCall { - 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 *GlobalAccountsOperationsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GlobalAccountsOperationsListCall) 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, "{project}/global/operations") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "clouduseraccounts.globalAccountsOperations.list" call. -// Exactly one of *OperationList or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *OperationList.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 *GlobalAccountsOperationsListCall) Do(opts ...googleapi.CallOption) (*OperationList, 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 := &OperationList{ - 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": "Retrieves the list of operation resources contained within the specified project.", - // "httpMethod": "GET", - // "id": "clouduseraccounts.globalAccountsOperations.list", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", - // "format": "uint32", - // "location": "query", - // "maximum": "500", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/operations", - // "response": { - // "$ref": "OperationList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/cloud-platform.read-only", - // "https://www.googleapis.com/auth/cloud.useraccounts", - // "https://www.googleapis.com/auth/cloud.useraccounts.readonly" - // ] - // } - -} - -// 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 *GlobalAccountsOperationsListCall) Pages(ctx context.Context, f func(*OperationList) 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 "clouduseraccounts.groups.addMember": - -type GroupsAddMemberCall struct { - s *Service - project string - groupName string - groupsaddmemberrequest *GroupsAddMemberRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// AddMember: Adds users to the specified group. -func (r *GroupsService) AddMember(project string, groupName string, groupsaddmemberrequest *GroupsAddMemberRequest) *GroupsAddMemberCall { - c := &GroupsAddMemberCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.groupName = groupName - c.groupsaddmemberrequest = groupsaddmemberrequest - 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 *GroupsAddMemberCall) Fields(s ...googleapi.Field) *GroupsAddMemberCall { - 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 *GroupsAddMemberCall) Context(ctx context.Context) *GroupsAddMemberCall { - 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 *GroupsAddMemberCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GroupsAddMemberCall) 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.groupsaddmemberrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/groups/{groupName}/addMember") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "groupName": c.groupName, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "clouduseraccounts.groups.addMember" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.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 *GroupsAddMemberCall) Do(opts ...googleapi.CallOption) (*Operation, 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 := &Operation{ - 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": "Adds users to the specified group.", - // "httpMethod": "POST", - // "id": "clouduseraccounts.groups.addMember", - // "parameterOrder": [ - // "project", - // "groupName" - // ], - // "parameters": { - // "groupName": { - // "description": "Name of the group for this request.", - // "location": "path", - // "pattern": "[a-z][-a-z0-9_]{0,31}", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/groups/{groupName}/addMember", - // "request": { - // "$ref": "GroupsAddMemberRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/cloud.useraccounts" - // ] - // } - -} - -// method id "clouduseraccounts.groups.delete": - -type GroupsDeleteCall struct { - s *Service - project string - groupName string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified Group resource. -func (r *GroupsService) Delete(project string, groupName string) *GroupsDeleteCall { - c := &GroupsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.groupName = groupName - 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 *GroupsDeleteCall) Fields(s ...googleapi.Field) *GroupsDeleteCall { - 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 *GroupsDeleteCall) Context(ctx context.Context) *GroupsDeleteCall { - 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 *GroupsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GroupsDeleteCall) 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 - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/groups/{groupName}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("DELETE", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "groupName": c.groupName, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "clouduseraccounts.groups.delete" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.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 *GroupsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, 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 := &Operation{ - 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": "Deletes the specified Group resource.", - // "httpMethod": "DELETE", - // "id": "clouduseraccounts.groups.delete", - // "parameterOrder": [ - // "project", - // "groupName" - // ], - // "parameters": { - // "groupName": { - // "description": "Name of the Group resource to delete.", - // "location": "path", - // "pattern": "[a-z][-a-z0-9_]{0,31}", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/groups/{groupName}", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/cloud.useraccounts" - // ] - // } - -} - -// method id "clouduseraccounts.groups.get": - -type GroupsGetCall struct { - s *Service - project string - groupName string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified Group resource. -func (r *GroupsService) Get(project string, groupName string) *GroupsGetCall { - c := &GroupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.groupName = groupName - 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 *GroupsGetCall) Fields(s ...googleapi.Field) *GroupsGetCall { - 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 *GroupsGetCall) IfNoneMatch(entityTag string) *GroupsGetCall { - 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 *GroupsGetCall) Context(ctx context.Context) *GroupsGetCall { - 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 *GroupsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GroupsGetCall) 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, "{project}/global/groups/{groupName}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "groupName": c.groupName, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "clouduseraccounts.groups.get" call. -// Exactly one of *Group or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Group.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 *GroupsGetCall) Do(opts ...googleapi.CallOption) (*Group, 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 := &Group{ - 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": "Returns the specified Group resource.", - // "httpMethod": "GET", - // "id": "clouduseraccounts.groups.get", - // "parameterOrder": [ - // "project", - // "groupName" - // ], - // "parameters": { - // "groupName": { - // "description": "Name of the Group resource to return.", - // "location": "path", - // "pattern": "[a-z][-a-z0-9_]{0,31}", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/groups/{groupName}", - // "response": { - // "$ref": "Group" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/cloud-platform.read-only", - // "https://www.googleapis.com/auth/cloud.useraccounts", - // "https://www.googleapis.com/auth/cloud.useraccounts.readonly" - // ] - // } - -} - -// method id "clouduseraccounts.groups.getIamPolicy": - -type GroupsGetIamPolicyCall struct { - s *Service - project string - resource string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetIamPolicy: Gets the access control policy for a resource. May be -// empty if no such policy or resource exists. -func (r *GroupsService) GetIamPolicy(project string, resource string) *GroupsGetIamPolicyCall { - c := &GroupsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - 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 *GroupsGetIamPolicyCall) Fields(s ...googleapi.Field) *GroupsGetIamPolicyCall { - 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 *GroupsGetIamPolicyCall) IfNoneMatch(entityTag string) *GroupsGetIamPolicyCall { - 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 *GroupsGetIamPolicyCall) Context(ctx context.Context) *GroupsGetIamPolicyCall { - 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 *GroupsGetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GroupsGetIamPolicyCall) 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, "{project}/global/groups/{resource}/getIamPolicy") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "resource": c.resource, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "clouduseraccounts.groups.getIamPolicy" call. -// Exactly one of *Policy or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Policy.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 *GroupsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, 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 := &Policy{ - 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": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.", - // "httpMethod": "GET", - // "id": "clouduseraccounts.groups.getIamPolicy", - // "parameterOrder": [ - // "project", - // "resource" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "resource": { - // "description": "Name of the resource for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/groups/{resource}/getIamPolicy", - // "response": { - // "$ref": "Policy" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/cloud-platform.read-only", - // "https://www.googleapis.com/auth/cloud.useraccounts", - // "https://www.googleapis.com/auth/cloud.useraccounts.readonly" - // ] - // } - -} - -// method id "clouduseraccounts.groups.insert": - -type GroupsInsertCall struct { - s *Service - project string - group *Group - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a Group resource in the specified project using the -// data included in the request. -func (r *GroupsService) Insert(project string, group *Group) *GroupsInsertCall { - c := &GroupsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.group = group - 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 *GroupsInsertCall) Fields(s ...googleapi.Field) *GroupsInsertCall { - 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 *GroupsInsertCall) Context(ctx context.Context) *GroupsInsertCall { - 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 *GroupsInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GroupsInsertCall) 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.group) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/groups") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "clouduseraccounts.groups.insert" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.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 *GroupsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, 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 := &Operation{ - 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": "Creates a Group resource in the specified project using the data included in the request.", - // "httpMethod": "POST", - // "id": "clouduseraccounts.groups.insert", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/groups", - // "request": { - // "$ref": "Group" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/cloud.useraccounts" - // ] - // } - -} - -// method id "clouduseraccounts.groups.list": - -type GroupsListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of groups contained within the specified -// project. -func (r *GroupsService) List(project string) *GroupsListCall { - c := &GroupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": Sets a filter expression -// for filtering listed resources, in the form filter={expression}. Your -// {expression} must be in the format: field_name comparison_string -// literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use filter=name ne -// example-instance. -// -// Compute Engine Beta API Only: If you use filtering in the Beta API, -// you can also filter on nested fields. For example, you could filter -// on instances that have set the scheduling.automaticRestart field to -// true. In particular, use filtering on nested fields to take advantage -// of instance labels to organize and filter results based on label -// values. -// -// The Beta API also supports filtering on multiple expressions by -// providing each separate expression within parentheses. For example, -// (scheduling.automaticRestart eq true) (zone eq us-central1-f). -// Multiple expressions are treated as AND expressions, meaning that -// resources must match all expressions to pass the filters. -func (c *GroupsListCall) Filter(filter string) *GroupsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. -func (c *GroupsListCall) MaxResults(maxResults int64) *GroupsListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *GroupsListCall) OrderBy(orderBy string) *GroupsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *GroupsListCall) PageToken(pageToken string) *GroupsListCall { - 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 *GroupsListCall) Fields(s ...googleapi.Field) *GroupsListCall { - 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 *GroupsListCall) IfNoneMatch(entityTag string) *GroupsListCall { - 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 *GroupsListCall) Context(ctx context.Context) *GroupsListCall { - 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 *GroupsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GroupsListCall) 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, "{project}/global/groups") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "clouduseraccounts.groups.list" call. -// Exactly one of *GroupList or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *GroupList.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 *GroupsListCall) Do(opts ...googleapi.CallOption) (*GroupList, 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 := &GroupList{ - 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": "Retrieves the list of groups contained within the specified project.", - // "httpMethod": "GET", - // "id": "clouduseraccounts.groups.list", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", - // "format": "uint32", - // "location": "query", - // "maximum": "500", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/groups", - // "response": { - // "$ref": "GroupList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/cloud-platform.read-only", - // "https://www.googleapis.com/auth/cloud.useraccounts", - // "https://www.googleapis.com/auth/cloud.useraccounts.readonly" - // ] - // } - -} - -// 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 *GroupsListCall) Pages(ctx context.Context, f func(*GroupList) 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 "clouduseraccounts.groups.removeMember": - -type GroupsRemoveMemberCall struct { - s *Service - project string - groupName string - groupsremovememberrequest *GroupsRemoveMemberRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// RemoveMember: Removes users from the specified group. -func (r *GroupsService) RemoveMember(project string, groupName string, groupsremovememberrequest *GroupsRemoveMemberRequest) *GroupsRemoveMemberCall { - c := &GroupsRemoveMemberCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.groupName = groupName - c.groupsremovememberrequest = groupsremovememberrequest - 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 *GroupsRemoveMemberCall) Fields(s ...googleapi.Field) *GroupsRemoveMemberCall { - 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 *GroupsRemoveMemberCall) Context(ctx context.Context) *GroupsRemoveMemberCall { - 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 *GroupsRemoveMemberCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GroupsRemoveMemberCall) 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.groupsremovememberrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/groups/{groupName}/removeMember") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "groupName": c.groupName, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "clouduseraccounts.groups.removeMember" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.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 *GroupsRemoveMemberCall) Do(opts ...googleapi.CallOption) (*Operation, 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 := &Operation{ - 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": "Removes users from the specified group.", - // "httpMethod": "POST", - // "id": "clouduseraccounts.groups.removeMember", - // "parameterOrder": [ - // "project", - // "groupName" - // ], - // "parameters": { - // "groupName": { - // "description": "Name of the group for this request.", - // "location": "path", - // "pattern": "[a-z][-a-z0-9_]{0,31}", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/groups/{groupName}/removeMember", - // "request": { - // "$ref": "GroupsRemoveMemberRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/cloud.useraccounts" - // ] - // } - -} - -// method id "clouduseraccounts.groups.setIamPolicy": - -type GroupsSetIamPolicyCall struct { - s *Service - project string - resource string - policy *Policy - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetIamPolicy: Sets the access control policy on the specified -// resource. Replaces any existing policy. -func (r *GroupsService) SetIamPolicy(project string, resource string, policy *Policy) *GroupsSetIamPolicyCall { - c := &GroupsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - c.policy = policy - 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 *GroupsSetIamPolicyCall) Fields(s ...googleapi.Field) *GroupsSetIamPolicyCall { - 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 *GroupsSetIamPolicyCall) Context(ctx context.Context) *GroupsSetIamPolicyCall { - 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 *GroupsSetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GroupsSetIamPolicyCall) 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.policy) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/groups/{resource}/setIamPolicy") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "resource": c.resource, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "clouduseraccounts.groups.setIamPolicy" call. -// Exactly one of *Policy or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Policy.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 *GroupsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, 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 := &Policy{ - 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": "Sets the access control policy on the specified resource. Replaces any existing policy.", - // "httpMethod": "POST", - // "id": "clouduseraccounts.groups.setIamPolicy", - // "parameterOrder": [ - // "project", - // "resource" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "resource": { - // "description": "Name of the resource for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/groups/{resource}/setIamPolicy", - // "request": { - // "$ref": "Policy" - // }, - // "response": { - // "$ref": "Policy" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/cloud-platform.read-only", - // "https://www.googleapis.com/auth/cloud.useraccounts", - // "https://www.googleapis.com/auth/cloud.useraccounts.readonly" - // ] - // } - -} - -// method id "clouduseraccounts.groups.testIamPermissions": - -type GroupsTestIamPermissionsCall struct { - s *Service - project string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the -// specified resource. -func (r *GroupsService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *GroupsTestIamPermissionsCall { - c := &GroupsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - 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 *GroupsTestIamPermissionsCall) Fields(s ...googleapi.Field) *GroupsTestIamPermissionsCall { - 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 *GroupsTestIamPermissionsCall) Context(ctx context.Context) *GroupsTestIamPermissionsCall { - 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 *GroupsTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GroupsTestIamPermissionsCall) 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.testpermissionsrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/groups/{resource}/testIamPermissions") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "resource": c.resource, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "clouduseraccounts.groups.testIamPermissions" call. -// Exactly one of *TestPermissionsResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *GroupsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ - 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": "Returns permissions that a caller has on the specified resource.", - // "httpMethod": "POST", - // "id": "clouduseraccounts.groups.testIamPermissions", - // "parameterOrder": [ - // "project", - // "resource" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "resource": { - // "description": "Name of the resource for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/groups/{resource}/testIamPermissions", - // "request": { - // "$ref": "TestPermissionsRequest" - // }, - // "response": { - // "$ref": "TestPermissionsResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/cloud-platform.read-only", - // "https://www.googleapis.com/auth/cloud.useraccounts", - // "https://www.googleapis.com/auth/cloud.useraccounts.readonly" - // ] - // } - -} - -// method id "clouduseraccounts.linux.getAuthorizedKeysView": - -type LinuxGetAuthorizedKeysViewCall struct { - s *Service - project string - zone string - user string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// GetAuthorizedKeysView: Returns a list of authorized public keys for a -// specific user account. -func (r *LinuxService) GetAuthorizedKeysView(project string, zone string, user string, instance string) *LinuxGetAuthorizedKeysViewCall { - c := &LinuxGetAuthorizedKeysViewCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.user = user - c.urlParams_.Set("instance", instance) - return c -} - -// Login sets the optional parameter "login": Whether the view was -// requested as part of a user-initiated login. -func (c *LinuxGetAuthorizedKeysViewCall) Login(login bool) *LinuxGetAuthorizedKeysViewCall { - c.urlParams_.Set("login", fmt.Sprint(login)) - 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 *LinuxGetAuthorizedKeysViewCall) Fields(s ...googleapi.Field) *LinuxGetAuthorizedKeysViewCall { - 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 *LinuxGetAuthorizedKeysViewCall) Context(ctx context.Context) *LinuxGetAuthorizedKeysViewCall { - 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 *LinuxGetAuthorizedKeysViewCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *LinuxGetAuthorizedKeysViewCall) 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 - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/authorizedKeysView/{user}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "user": c.user, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "clouduseraccounts.linux.getAuthorizedKeysView" call. -// Exactly one of *LinuxGetAuthorizedKeysViewResponse or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *LinuxGetAuthorizedKeysViewResponse.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 *LinuxGetAuthorizedKeysViewCall) Do(opts ...googleapi.CallOption) (*LinuxGetAuthorizedKeysViewResponse, 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 := &LinuxGetAuthorizedKeysViewResponse{ - 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": "Returns a list of authorized public keys for a specific user account.", - // "httpMethod": "POST", - // "id": "clouduseraccounts.linux.getAuthorizedKeysView", - // "parameterOrder": [ - // "project", - // "zone", - // "user", - // "instance" - // ], - // "parameters": { - // "instance": { - // "description": "The fully-qualified URL of the virtual machine requesting the view.", - // "location": "query", - // "required": true, - // "type": "string" - // }, - // "login": { - // "description": "Whether the view was requested as part of a user-initiated login.", - // "location": "query", - // "type": "boolean" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "user": { - // "description": "The user account for which you want to get a list of authorized public keys.", - // "location": "path", - // "pattern": "[a-z][-a-z0-9_]{0,31}", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "Name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/authorizedKeysView/{user}", - // "response": { - // "$ref": "LinuxGetAuthorizedKeysViewResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/cloud-platform.read-only", - // "https://www.googleapis.com/auth/cloud.useraccounts", - // "https://www.googleapis.com/auth/cloud.useraccounts.readonly" - // ] - // } - -} - -// method id "clouduseraccounts.linux.getLinuxAccountViews": - -type LinuxGetLinuxAccountViewsCall struct { - s *Service - project string - zone string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// GetLinuxAccountViews: Retrieves a list of user accounts for an -// instance within a specific project. -func (r *LinuxService) GetLinuxAccountViews(project string, zone string, instance string) *LinuxGetLinuxAccountViewsCall { - c := &LinuxGetLinuxAccountViewsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.urlParams_.Set("instance", instance) - return c -} - -// Filter sets the optional parameter "filter": Sets a filter expression -// for filtering listed resources, in the form filter={expression}. Your -// {expression} must be in the format: field_name comparison_string -// literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use filter=name ne -// example-instance. -// -// Compute Engine Beta API Only: If you use filtering in the Beta API, -// you can also filter on nested fields. For example, you could filter -// on instances that have set the scheduling.automaticRestart field to -// true. In particular, use filtering on nested fields to take advantage -// of instance labels to organize and filter results based on label -// values. -// -// The Beta API also supports filtering on multiple expressions by -// providing each separate expression within parentheses. For example, -// (scheduling.automaticRestart eq true) (zone eq us-central1-f). -// Multiple expressions are treated as AND expressions, meaning that -// resources must match all expressions to pass the filters. -func (c *LinuxGetLinuxAccountViewsCall) Filter(filter string) *LinuxGetLinuxAccountViewsCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. -func (c *LinuxGetLinuxAccountViewsCall) MaxResults(maxResults int64) *LinuxGetLinuxAccountViewsCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *LinuxGetLinuxAccountViewsCall) OrderBy(orderBy string) *LinuxGetLinuxAccountViewsCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *LinuxGetLinuxAccountViewsCall) PageToken(pageToken string) *LinuxGetLinuxAccountViewsCall { - 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 *LinuxGetLinuxAccountViewsCall) Fields(s ...googleapi.Field) *LinuxGetLinuxAccountViewsCall { - 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 *LinuxGetLinuxAccountViewsCall) Context(ctx context.Context) *LinuxGetLinuxAccountViewsCall { - 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 *LinuxGetLinuxAccountViewsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *LinuxGetLinuxAccountViewsCall) 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 - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/linuxAccountViews") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "clouduseraccounts.linux.getLinuxAccountViews" call. -// Exactly one of *LinuxGetLinuxAccountViewsResponse or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *LinuxGetLinuxAccountViewsResponse.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 *LinuxGetLinuxAccountViewsCall) Do(opts ...googleapi.CallOption) (*LinuxGetLinuxAccountViewsResponse, 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 := &LinuxGetLinuxAccountViewsResponse{ - 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": "Retrieves a list of user accounts for an instance within a specific project.", - // "httpMethod": "POST", - // "id": "clouduseraccounts.linux.getLinuxAccountViews", - // "parameterOrder": [ - // "project", - // "zone", - // "instance" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "instance": { - // "description": "The fully-qualified URL of the virtual machine requesting the views.", - // "location": "query", - // "required": true, - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", - // "format": "uint32", - // "location": "query", - // "maximum": "500", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "Name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/linuxAccountViews", - // "response": { - // "$ref": "LinuxGetLinuxAccountViewsResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/cloud-platform.read-only", - // "https://www.googleapis.com/auth/cloud.useraccounts", - // "https://www.googleapis.com/auth/cloud.useraccounts.readonly" - // ] - // } - -} - -// method id "clouduseraccounts.users.addPublicKey": - -type UsersAddPublicKeyCall struct { - s *Service - project string - user string - publickey *PublicKey - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// AddPublicKey: Adds a public key to the specified User resource with -// the data included in the request. -func (r *UsersService) AddPublicKey(project string, user string, publickey *PublicKey) *UsersAddPublicKeyCall { - c := &UsersAddPublicKeyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.user = user - c.publickey = publickey - 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 *UsersAddPublicKeyCall) Fields(s ...googleapi.Field) *UsersAddPublicKeyCall { - 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 *UsersAddPublicKeyCall) Context(ctx context.Context) *UsersAddPublicKeyCall { - 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 *UsersAddPublicKeyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *UsersAddPublicKeyCall) 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.publickey) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/users/{user}/addPublicKey") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "user": c.user, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "clouduseraccounts.users.addPublicKey" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.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 *UsersAddPublicKeyCall) Do(opts ...googleapi.CallOption) (*Operation, 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 := &Operation{ - 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": "Adds a public key to the specified User resource with the data included in the request.", - // "httpMethod": "POST", - // "id": "clouduseraccounts.users.addPublicKey", - // "parameterOrder": [ - // "project", - // "user" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "user": { - // "description": "Name of the user for this request.", - // "location": "path", - // "pattern": "[a-z][-a-z0-9_]{0,31}", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/users/{user}/addPublicKey", - // "request": { - // "$ref": "PublicKey" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/cloud.useraccounts" - // ] - // } - -} - -// method id "clouduseraccounts.users.delete": - -type UsersDeleteCall struct { - s *Service - project string - user string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified User resource. -func (r *UsersService) Delete(project string, user string) *UsersDeleteCall { - c := &UsersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.user = user - 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 *UsersDeleteCall) Fields(s ...googleapi.Field) *UsersDeleteCall { - 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 *UsersDeleteCall) Context(ctx context.Context) *UsersDeleteCall { - 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 *UsersDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *UsersDeleteCall) 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 - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/users/{user}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("DELETE", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "user": c.user, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "clouduseraccounts.users.delete" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.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 *UsersDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, 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 := &Operation{ - 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": "Deletes the specified User resource.", - // "httpMethod": "DELETE", - // "id": "clouduseraccounts.users.delete", - // "parameterOrder": [ - // "project", - // "user" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "user": { - // "description": "Name of the user resource to delete.", - // "location": "path", - // "pattern": "[a-z][-a-z0-9_]{0,31}", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/users/{user}", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/cloud.useraccounts" - // ] - // } - -} - -// method id "clouduseraccounts.users.get": - -type UsersGetCall struct { - s *Service - project string - user string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified User resource. -func (r *UsersService) Get(project string, user string) *UsersGetCall { - c := &UsersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.user = user - 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 *UsersGetCall) Fields(s ...googleapi.Field) *UsersGetCall { - 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 *UsersGetCall) IfNoneMatch(entityTag string) *UsersGetCall { - 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 *UsersGetCall) Context(ctx context.Context) *UsersGetCall { - 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 *UsersGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *UsersGetCall) 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, "{project}/global/users/{user}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "user": c.user, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "clouduseraccounts.users.get" call. -// Exactly one of *User or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *User.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 *UsersGetCall) Do(opts ...googleapi.CallOption) (*User, 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 := &User{ - 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": "Returns the specified User resource.", - // "httpMethod": "GET", - // "id": "clouduseraccounts.users.get", - // "parameterOrder": [ - // "project", - // "user" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "user": { - // "description": "Name of the user resource to return.", - // "location": "path", - // "pattern": "[a-z][-a-z0-9_]{0,31}", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/users/{user}", - // "response": { - // "$ref": "User" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/cloud-platform.read-only", - // "https://www.googleapis.com/auth/cloud.useraccounts", - // "https://www.googleapis.com/auth/cloud.useraccounts.readonly" - // ] - // } - -} - -// method id "clouduseraccounts.users.getIamPolicy": - -type UsersGetIamPolicyCall struct { - s *Service - project string - resource string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetIamPolicy: Gets the access control policy for a resource. May be -// empty if no such policy or resource exists. -func (r *UsersService) GetIamPolicy(project string, resource string) *UsersGetIamPolicyCall { - c := &UsersGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - 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 *UsersGetIamPolicyCall) Fields(s ...googleapi.Field) *UsersGetIamPolicyCall { - 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 *UsersGetIamPolicyCall) IfNoneMatch(entityTag string) *UsersGetIamPolicyCall { - 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 *UsersGetIamPolicyCall) Context(ctx context.Context) *UsersGetIamPolicyCall { - 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 *UsersGetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *UsersGetIamPolicyCall) 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, "{project}/global/users/{resource}/getIamPolicy") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "resource": c.resource, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "clouduseraccounts.users.getIamPolicy" call. -// Exactly one of *Policy or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Policy.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 *UsersGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, 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 := &Policy{ - 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": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.", - // "httpMethod": "GET", - // "id": "clouduseraccounts.users.getIamPolicy", - // "parameterOrder": [ - // "project", - // "resource" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "resource": { - // "description": "Name of the resource for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/users/{resource}/getIamPolicy", - // "response": { - // "$ref": "Policy" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/cloud-platform.read-only", - // "https://www.googleapis.com/auth/cloud.useraccounts", - // "https://www.googleapis.com/auth/cloud.useraccounts.readonly" - // ] - // } - -} - -// method id "clouduseraccounts.users.insert": - -type UsersInsertCall struct { - s *Service - project string - user *User - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a User resource in the specified project using the -// data included in the request. -func (r *UsersService) Insert(project string, user *User) *UsersInsertCall { - c := &UsersInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.user = user - 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 *UsersInsertCall) Fields(s ...googleapi.Field) *UsersInsertCall { - 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 *UsersInsertCall) Context(ctx context.Context) *UsersInsertCall { - 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 *UsersInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *UsersInsertCall) 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.user) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/users") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "clouduseraccounts.users.insert" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.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 *UsersInsertCall) Do(opts ...googleapi.CallOption) (*Operation, 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 := &Operation{ - 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": "Creates a User resource in the specified project using the data included in the request.", - // "httpMethod": "POST", - // "id": "clouduseraccounts.users.insert", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/users", - // "request": { - // "$ref": "User" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/cloud.useraccounts" - // ] - // } - -} - -// method id "clouduseraccounts.users.list": - -type UsersListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves a list of users contained within the specified -// project. -func (r *UsersService) List(project string) *UsersListCall { - c := &UsersListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": Sets a filter expression -// for filtering listed resources, in the form filter={expression}. Your -// {expression} must be in the format: field_name comparison_string -// literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use filter=name ne -// example-instance. -// -// Compute Engine Beta API Only: If you use filtering in the Beta API, -// you can also filter on nested fields. For example, you could filter -// on instances that have set the scheduling.automaticRestart field to -// true. In particular, use filtering on nested fields to take advantage -// of instance labels to organize and filter results based on label -// values. -// -// The Beta API also supports filtering on multiple expressions by -// providing each separate expression within parentheses. For example, -// (scheduling.automaticRestart eq true) (zone eq us-central1-f). -// Multiple expressions are treated as AND expressions, meaning that -// resources must match all expressions to pass the filters. -func (c *UsersListCall) Filter(filter string) *UsersListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. -func (c *UsersListCall) MaxResults(maxResults int64) *UsersListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *UsersListCall) OrderBy(orderBy string) *UsersListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *UsersListCall) PageToken(pageToken string) *UsersListCall { - 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 *UsersListCall) Fields(s ...googleapi.Field) *UsersListCall { - 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 *UsersListCall) IfNoneMatch(entityTag string) *UsersListCall { - 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 *UsersListCall) Context(ctx context.Context) *UsersListCall { - 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 *UsersListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *UsersListCall) 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, "{project}/global/users") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "clouduseraccounts.users.list" call. -// Exactly one of *UserList or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *UserList.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 *UsersListCall) Do(opts ...googleapi.CallOption) (*UserList, 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 := &UserList{ - 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": "Retrieves a list of users contained within the specified project.", - // "httpMethod": "GET", - // "id": "clouduseraccounts.users.list", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", - // "format": "uint32", - // "location": "query", - // "maximum": "500", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/users", - // "response": { - // "$ref": "UserList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/cloud-platform.read-only", - // "https://www.googleapis.com/auth/cloud.useraccounts", - // "https://www.googleapis.com/auth/cloud.useraccounts.readonly" - // ] - // } - -} - -// 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 *UsersListCall) Pages(ctx context.Context, f func(*UserList) 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 "clouduseraccounts.users.removePublicKey": - -type UsersRemovePublicKeyCall struct { - s *Service - project string - user string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// RemovePublicKey: Removes the specified public key from the user. -func (r *UsersService) RemovePublicKey(project string, user string, fingerprint string) *UsersRemovePublicKeyCall { - c := &UsersRemovePublicKeyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.user = user - c.urlParams_.Set("fingerprint", fingerprint) - 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 *UsersRemovePublicKeyCall) Fields(s ...googleapi.Field) *UsersRemovePublicKeyCall { - 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 *UsersRemovePublicKeyCall) Context(ctx context.Context) *UsersRemovePublicKeyCall { - 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 *UsersRemovePublicKeyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *UsersRemovePublicKeyCall) 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 - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/users/{user}/removePublicKey") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "user": c.user, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "clouduseraccounts.users.removePublicKey" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.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 *UsersRemovePublicKeyCall) Do(opts ...googleapi.CallOption) (*Operation, 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 := &Operation{ - 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": "Removes the specified public key from the user.", - // "httpMethod": "POST", - // "id": "clouduseraccounts.users.removePublicKey", - // "parameterOrder": [ - // "project", - // "user", - // "fingerprint" - // ], - // "parameters": { - // "fingerprint": { - // "description": "The fingerprint of the public key to delete. Public keys are identified by their fingerprint, which is defined by RFC4716 to be the MD5 digest of the public key.", - // "location": "query", - // "pattern": "[a-f0-9]{32}", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "user": { - // "description": "Name of the user for this request.", - // "location": "path", - // "pattern": "[a-z][-a-z0-9_]{0,31}", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/users/{user}/removePublicKey", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/cloud.useraccounts" - // ] - // } - -} - -// method id "clouduseraccounts.users.setIamPolicy": - -type UsersSetIamPolicyCall struct { - s *Service - project string - resource string - policy *Policy - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetIamPolicy: Sets the access control policy on the specified -// resource. Replaces any existing policy. -func (r *UsersService) SetIamPolicy(project string, resource string, policy *Policy) *UsersSetIamPolicyCall { - c := &UsersSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - c.policy = policy - 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 *UsersSetIamPolicyCall) Fields(s ...googleapi.Field) *UsersSetIamPolicyCall { - 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 *UsersSetIamPolicyCall) Context(ctx context.Context) *UsersSetIamPolicyCall { - 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 *UsersSetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *UsersSetIamPolicyCall) 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.policy) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/users/{resource}/setIamPolicy") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "resource": c.resource, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "clouduseraccounts.users.setIamPolicy" call. -// Exactly one of *Policy or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Policy.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 *UsersSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, 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 := &Policy{ - 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": "Sets the access control policy on the specified resource. Replaces any existing policy.", - // "httpMethod": "POST", - // "id": "clouduseraccounts.users.setIamPolicy", - // "parameterOrder": [ - // "project", - // "resource" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "resource": { - // "description": "Name of the resource for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/users/{resource}/setIamPolicy", - // "request": { - // "$ref": "Policy" - // }, - // "response": { - // "$ref": "Policy" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/cloud-platform.read-only", - // "https://www.googleapis.com/auth/cloud.useraccounts", - // "https://www.googleapis.com/auth/cloud.useraccounts.readonly" - // ] - // } - -} - -// method id "clouduseraccounts.users.testIamPermissions": - -type UsersTestIamPermissionsCall struct { - s *Service - project string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the -// specified resource. -func (r *UsersService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *UsersTestIamPermissionsCall { - c := &UsersTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - 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 *UsersTestIamPermissionsCall) Fields(s ...googleapi.Field) *UsersTestIamPermissionsCall { - 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 *UsersTestIamPermissionsCall) Context(ctx context.Context) *UsersTestIamPermissionsCall { - 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 *UsersTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *UsersTestIamPermissionsCall) 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.testpermissionsrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/users/{resource}/testIamPermissions") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "resource": c.resource, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "clouduseraccounts.users.testIamPermissions" call. -// Exactly one of *TestPermissionsResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *UsersTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ - 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": "Returns permissions that a caller has on the specified resource.", - // "httpMethod": "POST", - // "id": "clouduseraccounts.users.testIamPermissions", - // "parameterOrder": [ - // "project", - // "resource" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "resource": { - // "description": "Name of the resource for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/users/{resource}/testIamPermissions", - // "request": { - // "$ref": "TestPermissionsRequest" - // }, - // "response": { - // "$ref": "TestPermissionsResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/cloud-platform.read-only", - // "https://www.googleapis.com/auth/cloud.useraccounts", - // "https://www.googleapis.com/auth/cloud.useraccounts.readonly" - // ] - // } - -}
diff --git a/clouduseraccounts/v0.beta/clouduseraccounts-api.json b/clouduseraccounts/v0.beta/clouduseraccounts-api.json deleted file mode 100644 index 097a4f7..0000000 --- a/clouduseraccounts/v0.beta/clouduseraccounts-api.json +++ /dev/null
@@ -1,1361 +0,0 @@ -{ - "auth": { - "oauth2": { - "scopes": { - "https://www.googleapis.com/auth/cloud-platform": { - "description": "View and manage your data across Google Cloud Platform services" - }, - "https://www.googleapis.com/auth/cloud-platform.read-only": { - "description": "View your data across Google Cloud Platform services" - }, - "https://www.googleapis.com/auth/cloud.useraccounts": { - "description": "Manage your Google Cloud User Accounts" - }, - "https://www.googleapis.com/auth/cloud.useraccounts.readonly": { - "description": "View your Google Cloud User Accounts" - } - } - } - }, - "basePath": "/clouduseraccounts/beta/projects/", - "baseUrl": "https://www.googleapis.com/clouduseraccounts/beta/projects/", - "batchPath": "batch/clouduseraccounts/beta", - "canonicalName": "Cloud User Accounts", - "description": "Creates and manages users and groups for accessing Google Compute Engine virtual machines.", - "discoveryVersion": "v1", - "documentationLink": "https://cloud.google.com/compute/docs/access/user-accounts/api/latest/", - "etag": "\"-iA1DTNe4s-I6JZXPt1t1Ypy8IU/-BiORd5nMN3AbHTR5Pi2H1JslEk\"", - "icons": { - "x16": "https://www.google.com/images/icons/product/compute_engine-16.png", - "x32": "https://www.google.com/images/icons/product/compute_engine-32.png" - }, - "id": "clouduseraccounts:beta", - "kind": "discovery#restDescription", - "name": "clouduseraccounts", - "ownerDomain": "google.com", - "ownerName": "Google", - "parameters": { - "alt": { - "default": "json", - "description": "Data format for the response.", - "enum": [ - "json" - ], - "enumDescriptions": [ - "Responses with Content-Type of application/json" - ], - "location": "query", - "type": "string" - }, - "fields": { - "description": "Selector specifying which fields to include in a partial response.", - "location": "query", - "type": "string" - }, - "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" - }, - "oauth_token": { - "description": "OAuth 2.0 token for the current user.", - "location": "query", - "type": "string" - }, - "prettyPrint": { - "default": "true", - "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": { - "globalAccountsOperations": { - "methods": { - "delete": { - "description": "Deletes the specified operation resource.", - "httpMethod": "DELETE", - "id": "clouduseraccounts.globalAccountsOperations.delete", - "parameterOrder": [ - "project", - "operation" - ], - "parameters": { - "operation": { - "description": "Name of the Operations resource to delete.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - } - }, - "path": "{project}/global/operations/{operation}", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud.useraccounts" - ] - }, - "get": { - "description": "Retrieves the specified operation resource.", - "httpMethod": "GET", - "id": "clouduseraccounts.globalAccountsOperations.get", - "parameterOrder": [ - "project", - "operation" - ], - "parameters": { - "operation": { - "description": "Name of the Operations resource to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - } - }, - "path": "{project}/global/operations/{operation}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only", - "https://www.googleapis.com/auth/cloud.useraccounts", - "https://www.googleapis.com/auth/cloud.useraccounts.readonly" - ] - }, - "list": { - "description": "Retrieves the list of operation resources contained within the specified project.", - "httpMethod": "GET", - "id": "clouduseraccounts.globalAccountsOperations.list", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", - "format": "uint32", - "location": "query", - "maximum": "500", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - } - }, - "path": "{project}/global/operations", - "response": { - "$ref": "OperationList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only", - "https://www.googleapis.com/auth/cloud.useraccounts", - "https://www.googleapis.com/auth/cloud.useraccounts.readonly" - ] - } - } - }, - "groups": { - "methods": { - "addMember": { - "description": "Adds users to the specified group.", - "httpMethod": "POST", - "id": "clouduseraccounts.groups.addMember", - "parameterOrder": [ - "project", - "groupName" - ], - "parameters": { - "groupName": { - "description": "Name of the group for this request.", - "location": "path", - "pattern": "[a-z][-a-z0-9_]{0,31}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - } - }, - "path": "{project}/global/groups/{groupName}/addMember", - "request": { - "$ref": "GroupsAddMemberRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud.useraccounts" - ] - }, - "delete": { - "description": "Deletes the specified Group resource.", - "httpMethod": "DELETE", - "id": "clouduseraccounts.groups.delete", - "parameterOrder": [ - "project", - "groupName" - ], - "parameters": { - "groupName": { - "description": "Name of the Group resource to delete.", - "location": "path", - "pattern": "[a-z][-a-z0-9_]{0,31}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - } - }, - "path": "{project}/global/groups/{groupName}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud.useraccounts" - ] - }, - "get": { - "description": "Returns the specified Group resource.", - "httpMethod": "GET", - "id": "clouduseraccounts.groups.get", - "parameterOrder": [ - "project", - "groupName" - ], - "parameters": { - "groupName": { - "description": "Name of the Group resource to return.", - "location": "path", - "pattern": "[a-z][-a-z0-9_]{0,31}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - } - }, - "path": "{project}/global/groups/{groupName}", - "response": { - "$ref": "Group" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only", - "https://www.googleapis.com/auth/cloud.useraccounts", - "https://www.googleapis.com/auth/cloud.useraccounts.readonly" - ] - }, - "insert": { - "description": "Creates a Group resource in the specified project using the data included in the request.", - "httpMethod": "POST", - "id": "clouduseraccounts.groups.insert", - "parameterOrder": [ - "project" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - } - }, - "path": "{project}/global/groups", - "request": { - "$ref": "Group" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud.useraccounts" - ] - }, - "list": { - "description": "Retrieves the list of groups contained within the specified project.", - "httpMethod": "GET", - "id": "clouduseraccounts.groups.list", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", - "format": "uint32", - "location": "query", - "maximum": "500", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - } - }, - "path": "{project}/global/groups", - "response": { - "$ref": "GroupList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only", - "https://www.googleapis.com/auth/cloud.useraccounts", - "https://www.googleapis.com/auth/cloud.useraccounts.readonly" - ] - }, - "removeMember": { - "description": "Removes users from the specified group.", - "httpMethod": "POST", - "id": "clouduseraccounts.groups.removeMember", - "parameterOrder": [ - "project", - "groupName" - ], - "parameters": { - "groupName": { - "description": "Name of the group for this request.", - "location": "path", - "pattern": "[a-z][-a-z0-9_]{0,31}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - } - }, - "path": "{project}/global/groups/{groupName}/removeMember", - "request": { - "$ref": "GroupsRemoveMemberRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud.useraccounts" - ] - } - } - }, - "linux": { - "methods": { - "getAuthorizedKeysView": { - "description": "Returns a list of authorized public keys for a specific user account.", - "httpMethod": "POST", - "id": "clouduseraccounts.linux.getAuthorizedKeysView", - "parameterOrder": [ - "project", - "zone", - "user", - "instance" - ], - "parameters": { - "instance": { - "description": "The fully-qualified URL of the virtual machine requesting the view.", - "location": "query", - "required": true, - "type": "string" - }, - "login": { - "description": "Whether the view was requested as part of a user-initiated login.", - "location": "query", - "type": "boolean" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "user": { - "description": "The user account for which you want to get a list of authorized public keys.", - "location": "path", - "pattern": "[a-z][-a-z0-9_]{0,31}", - "required": true, - "type": "string" - }, - "zone": { - "description": "Name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "{project}/zones/{zone}/authorizedKeysView/{user}", - "response": { - "$ref": "LinuxGetAuthorizedKeysViewResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only", - "https://www.googleapis.com/auth/cloud.useraccounts", - "https://www.googleapis.com/auth/cloud.useraccounts.readonly" - ] - }, - "getLinuxAccountViews": { - "description": "Retrieves a list of user accounts for an instance within a specific project.", - "httpMethod": "POST", - "id": "clouduseraccounts.linux.getLinuxAccountViews", - "parameterOrder": [ - "project", - "zone", - "instance" - ], - "parameters": { - "filter": { - "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query", - "type": "string" - }, - "instance": { - "description": "The fully-qualified URL of the virtual machine requesting the views.", - "location": "query", - "required": true, - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", - "format": "uint32", - "location": "query", - "maximum": "500", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "zone": { - "description": "Name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "{project}/zones/{zone}/linuxAccountViews", - "response": { - "$ref": "LinuxGetLinuxAccountViewsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only", - "https://www.googleapis.com/auth/cloud.useraccounts", - "https://www.googleapis.com/auth/cloud.useraccounts.readonly" - ] - } - } - }, - "users": { - "methods": { - "addPublicKey": { - "description": "Adds a public key to the specified User resource with the data included in the request.", - "httpMethod": "POST", - "id": "clouduseraccounts.users.addPublicKey", - "parameterOrder": [ - "project", - "user" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "user": { - "description": "Name of the user for this request.", - "location": "path", - "pattern": "[a-z][-a-z0-9_]{0,31}", - "required": true, - "type": "string" - } - }, - "path": "{project}/global/users/{user}/addPublicKey", - "request": { - "$ref": "PublicKey" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud.useraccounts" - ] - }, - "delete": { - "description": "Deletes the specified User resource.", - "httpMethod": "DELETE", - "id": "clouduseraccounts.users.delete", - "parameterOrder": [ - "project", - "user" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "user": { - "description": "Name of the user resource to delete.", - "location": "path", - "pattern": "[a-z][-a-z0-9_]{0,31}", - "required": true, - "type": "string" - } - }, - "path": "{project}/global/users/{user}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud.useraccounts" - ] - }, - "get": { - "description": "Returns the specified User resource.", - "httpMethod": "GET", - "id": "clouduseraccounts.users.get", - "parameterOrder": [ - "project", - "user" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "user": { - "description": "Name of the user resource to return.", - "location": "path", - "pattern": "[a-z][-a-z0-9_]{0,31}", - "required": true, - "type": "string" - } - }, - "path": "{project}/global/users/{user}", - "response": { - "$ref": "User" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only", - "https://www.googleapis.com/auth/cloud.useraccounts", - "https://www.googleapis.com/auth/cloud.useraccounts.readonly" - ] - }, - "insert": { - "description": "Creates a User resource in the specified project using the data included in the request.", - "httpMethod": "POST", - "id": "clouduseraccounts.users.insert", - "parameterOrder": [ - "project" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - } - }, - "path": "{project}/global/users", - "request": { - "$ref": "User" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud.useraccounts" - ] - }, - "list": { - "description": "Retrieves a list of users contained within the specified project.", - "httpMethod": "GET", - "id": "clouduseraccounts.users.list", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", - "format": "uint32", - "location": "query", - "maximum": "500", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - } - }, - "path": "{project}/global/users", - "response": { - "$ref": "UserList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only", - "https://www.googleapis.com/auth/cloud.useraccounts", - "https://www.googleapis.com/auth/cloud.useraccounts.readonly" - ] - }, - "removePublicKey": { - "description": "Removes the specified public key from the user.", - "httpMethod": "POST", - "id": "clouduseraccounts.users.removePublicKey", - "parameterOrder": [ - "project", - "user", - "fingerprint" - ], - "parameters": { - "fingerprint": { - "description": "The fingerprint of the public key to delete. Public keys are identified by their fingerprint, which is defined by RFC4716 to be the MD5 digest of the public key.", - "location": "query", - "pattern": "[a-f0-9]{32}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "user": { - "description": "Name of the user for this request.", - "location": "path", - "pattern": "[a-z][-a-z0-9_]{0,31}", - "required": true, - "type": "string" - } - }, - "path": "{project}/global/users/{user}/removePublicKey", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud.useraccounts" - ] - } - } - } - }, - "revision": "20160316", - "rootUrl": "https://www.googleapis.com/", - "schemas": { - "AuthorizedKeysView": { - "description": "A list of authorized public keys for a user account.", - "id": "AuthorizedKeysView", - "properties": { - "keys": { - "description": "[Output Only] The list of authorized public keys in SSH format.", - "items": { - "type": "string" - }, - "type": "array" - }, - "sudoer": { - "description": "[Output Only] Whether the user has the ability to elevate on the instance that requested the authorized keys.", - "type": "boolean" - } - }, - "type": "object" - }, - "Group": { - "description": "A Group resource.", - "id": "Group", - "properties": { - "creationTimestamp": { - "description": "[Output Only] Creation timestamp in RFC3339 text format.", - "type": "string" - }, - "description": { - "description": "An optional textual description of the resource; provided by the client when the resource is created.", - "type": "string" - }, - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "format": "uint64", - "type": "string" - }, - "kind": { - "default": "clouduseraccounts#group", - "description": "[Output Only] Type of the resource. Always clouduseraccounts#group for groups.", - "type": "string" - }, - "members": { - "description": "[Output Only] A list of URLs to User resources who belong to the group. Users may only be members of groups in the same project.", - "items": { - "type": "string" - }, - "type": "array" - }, - "name": { - "annotations": { - "required": [ - "clouduseraccounts.groups.insert" - ] - }, - "description": "Name of the resource; provided by the client when the resource is created.", - "pattern": "[a-z][-a-z0-9_]{0,31}", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server defined URL for the resource.", - "type": "string" - } - }, - "type": "object" - }, - "GroupList": { - "id": "GroupList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "[Output Only] A list of Group resources.", - "items": { - "$ref": "Group" - }, - "type": "array" - }, - "kind": { - "default": "clouduseraccounts#groupList", - "description": "[Output Only] Type of resource. Always clouduseraccounts#groupList for lists of groups.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] A token used to continue a truncated list request.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server defined URL for this resource.", - "type": "string" - } - }, - "type": "object" - }, - "GroupsAddMemberRequest": { - "id": "GroupsAddMemberRequest", - "properties": { - "users": { - "description": "Fully-qualified URLs of the User resources to add.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "GroupsRemoveMemberRequest": { - "id": "GroupsRemoveMemberRequest", - "properties": { - "users": { - "description": "Fully-qualified URLs of the User resources to remove.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "LinuxAccountViews": { - "description": "A list of all Linux accounts for this project. This API is only used by Compute Engine virtual machines to get information about user accounts for a project or instance. Linux resources are read-only views into users and groups managed by the Compute Engine Accounts API.", - "id": "LinuxAccountViews", - "properties": { - "groupViews": { - "description": "[Output Only] A list of all groups within a project.", - "items": { - "$ref": "LinuxGroupView" - }, - "type": "array" - }, - "kind": { - "default": "clouduseraccounts#linuxAccountViews", - "description": "[Output Only] Type of the resource. Always clouduseraccounts#linuxAccountViews for Linux resources.", - "type": "string" - }, - "userViews": { - "description": "[Output Only] A list of all users within a project.", - "items": { - "$ref": "LinuxUserView" - }, - "type": "array" - } - }, - "type": "object" - }, - "LinuxGetAuthorizedKeysViewResponse": { - "id": "LinuxGetAuthorizedKeysViewResponse", - "properties": { - "resource": { - "$ref": "AuthorizedKeysView", - "description": "[Output Only] A list of authorized public keys for a user." - } - }, - "type": "object" - }, - "LinuxGetLinuxAccountViewsResponse": { - "id": "LinuxGetLinuxAccountViewsResponse", - "properties": { - "resource": { - "$ref": "LinuxAccountViews", - "description": "[Output Only] A list of authorized user accounts and groups." - } - }, - "type": "object" - }, - "LinuxGroupView": { - "description": "A detailed view of a Linux group.", - "id": "LinuxGroupView", - "properties": { - "gid": { - "description": "[Output Only] The Group ID.", - "format": "uint32", - "type": "integer" - }, - "groupName": { - "description": "[Output Only] Group name.", - "type": "string" - }, - "members": { - "description": "[Output Only] List of user accounts that belong to the group.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "LinuxUserView": { - "description": "A detailed view of a Linux user account.", - "id": "LinuxUserView", - "properties": { - "gecos": { - "description": "[Output Only] The GECOS (user information) entry for this account.", - "type": "string" - }, - "gid": { - "description": "[Output Only] User's default group ID.", - "format": "uint32", - "type": "integer" - }, - "homeDirectory": { - "description": "[Output Only] The path to the home directory for this account.", - "type": "string" - }, - "shell": { - "description": "[Output Only] The path to the login shell for this account.", - "type": "string" - }, - "uid": { - "description": "[Output Only] User ID.", - "format": "uint32", - "type": "integer" - }, - "username": { - "description": "[Output Only] The username of the account.", - "type": "string" - } - }, - "type": "object" - }, - "Operation": { - "description": "An Operation resource, used to manage asynchronous API requests.", - "id": "Operation", - "properties": { - "clientOperationId": { - "description": "[Output Only] Reserved for future use.", - "type": "string" - }, - "creationTimestamp": { - "description": "[Output Only] Creation timestamp in RFC3339 text format.", - "type": "string" - }, - "description": { - "description": "[Output Only] A textual description of the operation, which is set when the operation is created.", - "type": "string" - }, - "endTime": { - "description": "[Output Only] The time that this operation was completed. This value is in RFC3339 text format.", - "type": "string" - }, - "error": { - "description": "[Output Only] If errors are generated during processing of the operation, this field will be populated.", - "properties": { - "errors": { - "description": "[Output Only] The array of errors encountered while processing this operation.", - "items": { - "properties": { - "code": { - "description": "[Output Only] The error type identifier for this error.", - "type": "string" - }, - "location": { - "description": "[Output Only] Indicates the field in the request that caused the error. This property is optional.", - "type": "string" - }, - "message": { - "description": "[Output Only] An optional, human-readable error message.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - } - }, - "type": "object" - }, - "httpErrorMessage": { - "description": "[Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.", - "type": "string" - }, - "httpErrorStatusCode": { - "description": "[Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a 404 means the resource was not found.", - "format": "int32", - "type": "integer" - }, - "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", - "format": "uint64", - "type": "string" - }, - "insertTime": { - "description": "[Output Only] The time that this operation was requested. This value is in RFC3339 text format.", - "type": "string" - }, - "kind": { - "default": "clouduseraccounts#operation", - "description": "[Output Only] Type of the resource. Always compute#operation for Operation resources.", - "type": "string" - }, - "name": { - "description": "[Output Only] Name of the resource.", - "type": "string" - }, - "operationType": { - "description": "[Output Only] The type of operation, such as insert, update, or delete, and so on.", - "type": "string" - }, - "progress": { - "description": "[Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.", - "format": "int32", - "type": "integer" - }, - "region": { - "description": "[Output Only] The URL of the region where the operation resides. Only available when performing regional operations.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for the resource.", - "type": "string" - }, - "startTime": { - "description": "[Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.", - "type": "string" - }, - "status": { - "description": "[Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.", - "enum": [ - "DONE", - "PENDING", - "RUNNING" - ], - "enumDescriptions": [ - "", - "", - "" - ], - "type": "string" - }, - "statusMessage": { - "description": "[Output Only] An optional textual description of the current status of the operation.", - "type": "string" - }, - "targetId": { - "description": "[Output Only] The unique target ID, which identifies a specific incarnation of the target resource.", - "format": "uint64", - "type": "string" - }, - "targetLink": { - "description": "[Output Only] The URL of the resource that the operation modifies.", - "type": "string" - }, - "user": { - "description": "[Output Only] User who requested the operation, for example: user@example.com.", - "type": "string" - }, - "warnings": { - "description": "[Output Only] If warning messages are generated during processing of the operation, this field will be populated.", - "items": { - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "INJECTED_KERNELS_DEPRECATED", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_NOT_DELETED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNREACHABLE" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "" - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "zone": { - "description": "[Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.", - "type": "string" - } - }, - "type": "object" - }, - "OperationList": { - "description": "Contains a list of Operation resources.", - "id": "OperationList", - "properties": { - "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", - "type": "string" - }, - "items": { - "description": "[Output Only] A list of Operation resources.", - "items": { - "$ref": "Operation" - }, - "type": "array" - }, - "kind": { - "default": "clouduseraccounts#operationList", - "description": "[Output Only] Type of resource. Always compute#operations for Operations resource.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - } - }, - "type": "object" - }, - "PublicKey": { - "description": "A public key for authenticating to guests.", - "id": "PublicKey", - "properties": { - "creationTimestamp": { - "description": "[Output Only] Creation timestamp in RFC3339 text format.", - "type": "string" - }, - "description": { - "description": "An optional textual description of the resource; provided by the client when the resource is created.", - "type": "string" - }, - "expirationTimestamp": { - "description": "Optional expiration timestamp. If provided, the timestamp must be in RFC3339 text format. If not provided, the public key never expires.", - "type": "string" - }, - "fingerprint": { - "description": "[Output Only] The fingerprint of the key is defined by RFC4716 to be the MD5 digest of the public key.", - "type": "string" - }, - "key": { - "description": "Public key text in SSH format, defined by RFC4253 section 6.6.", - "type": "string" - } - }, - "type": "object" - }, - "User": { - "description": "A User resource.", - "id": "User", - "properties": { - "creationTimestamp": { - "description": "[Output Only] Creation timestamp in RFC3339 text format.", - "type": "string" - }, - "description": { - "description": "An optional textual description of the resource; provided by the client when the resource is created.", - "type": "string" - }, - "groups": { - "description": "[Output Only] A list of URLs to Group resources who contain the user. Users are only members of groups in the same project.", - "items": { - "type": "string" - }, - "type": "array" - }, - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "format": "uint64", - "type": "string" - }, - "kind": { - "default": "clouduseraccounts#user", - "description": "[Output Only] Type of the resource. Always clouduseraccounts#user for users.", - "type": "string" - }, - "name": { - "annotations": { - "required": [ - "clouduseraccounts.users.insert" - ] - }, - "description": "Name of the resource; provided by the client when the resource is created.", - "pattern": "[a-z][-a-z0-9_]{0,31}", - "type": "string" - }, - "owner": { - "annotations": { - "required": [ - "clouduseraccounts.users.insert" - ] - }, - "description": "Email address of account's owner. This account will be validated to make sure it exists. The email can belong to any domain, but it must be tied to a Google account.", - "type": "string" - }, - "publicKeys": { - "description": "[Output Only] Public keys that this user may use to login.", - "items": { - "$ref": "PublicKey" - }, - "type": "array" - }, - "selfLink": { - "description": "[Output Only] Server defined URL for the resource.", - "type": "string" - } - }, - "type": "object" - }, - "UserList": { - "id": "UserList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "[Output Only] A list of User resources.", - "items": { - "$ref": "User" - }, - "type": "array" - }, - "kind": { - "default": "clouduseraccounts#userList", - "description": "[Output Only] Type of resource. Always clouduseraccounts#userList for lists of users.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] A token used to continue a truncated list request.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server defined URL for this resource.", - "type": "string" - } - }, - "type": "object" - } - }, - "servicePath": "clouduseraccounts/beta/projects/", - "title": "Cloud User Accounts API", - "version": "beta" -} \ No newline at end of file
diff --git a/clouduseraccounts/v0.beta/clouduseraccounts-gen.go b/clouduseraccounts/v0.beta/clouduseraccounts-gen.go deleted file mode 100644 index 7f5552f..0000000 --- a/clouduseraccounts/v0.beta/clouduseraccounts-gen.go +++ /dev/null
@@ -1,3871 +0,0 @@ -// Package clouduseraccounts provides access to the Cloud User Accounts API. -// -// See https://cloud.google.com/compute/docs/access/user-accounts/api/latest/ -// -// Usage example: -// -// import "google.golang.org/api/clouduseraccounts/v0.beta" -// ... -// clouduseraccountsService, err := clouduseraccounts.New(oauthHttpClient) -package clouduseraccounts // import "google.golang.org/api/clouduseraccounts/v0.beta" - -import ( - "bytes" - "context" - "encoding/json" - "errors" - "fmt" - "io" - "net/http" - "net/url" - "strconv" - "strings" - - gensupport "google.golang.org/api/gensupport" - googleapi "google.golang.org/api/googleapi" -) - -// Always reference these packages, just in case the auto-generated code -// below doesn't. -var _ = bytes.NewBuffer -var _ = strconv.Itoa -var _ = fmt.Sprintf -var _ = json.NewDecoder -var _ = io.Copy -var _ = url.Parse -var _ = gensupport.MarshalJSON -var _ = googleapi.Version -var _ = errors.New -var _ = strings.Replace -var _ = context.Canceled - -const apiId = "clouduseraccounts:beta" -const apiName = "clouduseraccounts" -const apiVersion = "beta" -const basePath = "https://www.googleapis.com/clouduseraccounts/beta/projects/" - -// OAuth2 scopes used by this API. -const ( - // View and manage your data across Google Cloud Platform services - CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform" - - // View your data across Google Cloud Platform services - CloudPlatformReadOnlyScope = "https://www.googleapis.com/auth/cloud-platform.read-only" - - // Manage your Google Cloud User Accounts - CloudUseraccountsScope = "https://www.googleapis.com/auth/cloud.useraccounts" - - // View your Google Cloud User Accounts - CloudUseraccountsReadonlyScope = "https://www.googleapis.com/auth/cloud.useraccounts.readonly" -) - -func New(client *http.Client) (*Service, error) { - if client == nil { - return nil, errors.New("client is nil") - } - s := &Service{client: client, BasePath: basePath} - s.GlobalAccountsOperations = NewGlobalAccountsOperationsService(s) - s.Groups = NewGroupsService(s) - s.Linux = NewLinuxService(s) - s.Users = NewUsersService(s) - return s, nil -} - -type Service struct { - client *http.Client - BasePath string // API endpoint base URL - UserAgent string // optional additional User-Agent fragment - - GlobalAccountsOperations *GlobalAccountsOperationsService - - Groups *GroupsService - - Linux *LinuxService - - Users *UsersService -} - -func (s *Service) userAgent() string { - if s.UserAgent == "" { - return googleapi.UserAgent - } - return googleapi.UserAgent + " " + s.UserAgent -} - -func NewGlobalAccountsOperationsService(s *Service) *GlobalAccountsOperationsService { - rs := &GlobalAccountsOperationsService{s: s} - return rs -} - -type GlobalAccountsOperationsService struct { - s *Service -} - -func NewGroupsService(s *Service) *GroupsService { - rs := &GroupsService{s: s} - return rs -} - -type GroupsService struct { - s *Service -} - -func NewLinuxService(s *Service) *LinuxService { - rs := &LinuxService{s: s} - return rs -} - -type LinuxService struct { - s *Service -} - -func NewUsersService(s *Service) *UsersService { - rs := &UsersService{s: s} - return rs -} - -type UsersService struct { - s *Service -} - -// AuthorizedKeysView: A list of authorized public keys for a user -// account. -type AuthorizedKeysView struct { - // Keys: [Output Only] The list of authorized public keys in SSH format. - Keys []string `json:"keys,omitempty"` - - // Sudoer: [Output Only] Whether the user has the ability to elevate on - // the instance that requested the authorized keys. - Sudoer bool `json:"sudoer,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Keys") 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. "Keys") 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 *AuthorizedKeysView) MarshalJSON() ([]byte, error) { - type NoMethod AuthorizedKeysView - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// Group: A Group resource. -type Group struct { - // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text - // format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - - // Description: An optional textual description of the resource; - // provided by the client when the resource is created. - Description string `json:"description,omitempty"` - - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id uint64 `json:"id,omitempty,string"` - - // Kind: [Output Only] Type of the resource. Always - // clouduseraccounts#group for groups. - Kind string `json:"kind,omitempty"` - - // Members: [Output Only] A list of URLs to User resources who belong to - // the group. Users may only be members of groups in the same project. - Members []string `json:"members,omitempty"` - - // Name: Name of the resource; provided by the client when the resource - // is created. - Name string `json:"name,omitempty"` - - // SelfLink: [Output Only] Server defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "CreationTimestamp") - // 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. "CreationTimestamp") 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 *Group) MarshalJSON() ([]byte, error) { - type NoMethod Group - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type GroupList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: [Output Only] A list of Group resources. - Items []*Group `json:"items,omitempty"` - - // Kind: [Output Only] Type of resource. Always - // clouduseraccounts#groupList for lists of groups. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] A token used to continue a truncated - // list request. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") 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. "Id") 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 *GroupList) MarshalJSON() ([]byte, error) { - type NoMethod GroupList - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type GroupsAddMemberRequest struct { - // Users: Fully-qualified URLs of the User resources to add. - Users []string `json:"users,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Users") 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. "Users") 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 *GroupsAddMemberRequest) MarshalJSON() ([]byte, error) { - type NoMethod GroupsAddMemberRequest - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type GroupsRemoveMemberRequest struct { - // Users: Fully-qualified URLs of the User resources to remove. - Users []string `json:"users,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Users") 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. "Users") 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 *GroupsRemoveMemberRequest) MarshalJSON() ([]byte, error) { - type NoMethod GroupsRemoveMemberRequest - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// LinuxAccountViews: A list of all Linux accounts for this project. -// This API is only used by Compute Engine virtual machines to get -// information about user accounts for a project or instance. Linux -// resources are read-only views into users and groups managed by the -// Compute Engine Accounts API. -type LinuxAccountViews struct { - // GroupViews: [Output Only] A list of all groups within a project. - GroupViews []*LinuxGroupView `json:"groupViews,omitempty"` - - // Kind: [Output Only] Type of the resource. Always - // clouduseraccounts#linuxAccountViews for Linux resources. - Kind string `json:"kind,omitempty"` - - // UserViews: [Output Only] A list of all users within a project. - UserViews []*LinuxUserView `json:"userViews,omitempty"` - - // ForceSendFields is a list of field names (e.g. "GroupViews") 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. "GroupViews") 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 *LinuxAccountViews) MarshalJSON() ([]byte, error) { - type NoMethod LinuxAccountViews - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type LinuxGetAuthorizedKeysViewResponse struct { - // Resource: [Output Only] A list of authorized public keys for a user. - Resource *AuthorizedKeysView `json:"resource,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Resource") 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. "Resource") 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 *LinuxGetAuthorizedKeysViewResponse) MarshalJSON() ([]byte, error) { - type NoMethod LinuxGetAuthorizedKeysViewResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type LinuxGetLinuxAccountViewsResponse struct { - // Resource: [Output Only] A list of authorized user accounts and - // groups. - Resource *LinuxAccountViews `json:"resource,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Resource") 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. "Resource") 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 *LinuxGetLinuxAccountViewsResponse) MarshalJSON() ([]byte, error) { - type NoMethod LinuxGetLinuxAccountViewsResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// LinuxGroupView: A detailed view of a Linux group. -type LinuxGroupView struct { - // Gid: [Output Only] The Group ID. - Gid int64 `json:"gid,omitempty"` - - // GroupName: [Output Only] Group name. - GroupName string `json:"groupName,omitempty"` - - // Members: [Output Only] List of user accounts that belong to the - // group. - Members []string `json:"members,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Gid") 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. "Gid") 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 *LinuxGroupView) MarshalJSON() ([]byte, error) { - type NoMethod LinuxGroupView - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// LinuxUserView: A detailed view of a Linux user account. -type LinuxUserView struct { - // Gecos: [Output Only] The GECOS (user information) entry for this - // account. - Gecos string `json:"gecos,omitempty"` - - // Gid: [Output Only] User's default group ID. - Gid int64 `json:"gid,omitempty"` - - // HomeDirectory: [Output Only] The path to the home directory for this - // account. - HomeDirectory string `json:"homeDirectory,omitempty"` - - // Shell: [Output Only] The path to the login shell for this account. - Shell string `json:"shell,omitempty"` - - // Uid: [Output Only] User ID. - Uid int64 `json:"uid,omitempty"` - - // Username: [Output Only] The username of the account. - Username string `json:"username,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Gecos") 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. "Gecos") 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 *LinuxUserView) MarshalJSON() ([]byte, error) { - type NoMethod LinuxUserView - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// Operation: An Operation resource, used to manage asynchronous API -// requests. -type Operation struct { - // ClientOperationId: [Output Only] Reserved for future use. - ClientOperationId string `json:"clientOperationId,omitempty"` - - // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text - // format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - - // Description: [Output Only] A textual description of the operation, - // which is set when the operation is created. - Description string `json:"description,omitempty"` - - // EndTime: [Output Only] The time that this operation was completed. - // This value is in RFC3339 text format. - EndTime string `json:"endTime,omitempty"` - - // Error: [Output Only] If errors are generated during processing of the - // operation, this field will be populated. - Error *OperationError `json:"error,omitempty"` - - // HttpErrorMessage: [Output Only] If the operation fails, this field - // contains the HTTP error message that was returned, such as NOT FOUND. - HttpErrorMessage string `json:"httpErrorMessage,omitempty"` - - // HttpErrorStatusCode: [Output Only] If the operation fails, this field - // contains the HTTP error status code that was returned. For example, a - // 404 means the resource was not found. - HttpErrorStatusCode int64 `json:"httpErrorStatusCode,omitempty"` - - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. - Id uint64 `json:"id,omitempty,string"` - - // InsertTime: [Output Only] The time that this operation was requested. - // This value is in RFC3339 text format. - InsertTime string `json:"insertTime,omitempty"` - - // Kind: [Output Only] Type of the resource. Always compute#operation - // for Operation resources. - Kind string `json:"kind,omitempty"` - - // Name: [Output Only] Name of the resource. - Name string `json:"name,omitempty"` - - // OperationType: [Output Only] The type of operation, such as insert, - // update, or delete, and so on. - OperationType string `json:"operationType,omitempty"` - - // Progress: [Output Only] An optional progress indicator that ranges - // from 0 to 100. There is no requirement that this be linear or support - // any granularity of operations. This should not be used to guess when - // the operation will be complete. This number should monotonically - // increase as the operation progresses. - Progress int64 `json:"progress,omitempty"` - - // Region: [Output Only] The URL of the region where the operation - // resides. Only available when performing regional operations. - Region string `json:"region,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - - // StartTime: [Output Only] The time that this operation was started by - // the server. This value is in RFC3339 text format. - StartTime string `json:"startTime,omitempty"` - - // Status: [Output Only] The status of the operation, which can be one - // of the following: PENDING, RUNNING, or DONE. - // - // Possible values: - // "DONE" - // "PENDING" - // "RUNNING" - Status string `json:"status,omitempty"` - - // StatusMessage: [Output Only] An optional textual description of the - // current status of the operation. - StatusMessage string `json:"statusMessage,omitempty"` - - // TargetId: [Output Only] The unique target ID, which identifies a - // specific incarnation of the target resource. - TargetId uint64 `json:"targetId,omitempty,string"` - - // TargetLink: [Output Only] The URL of the resource that the operation - // modifies. - TargetLink string `json:"targetLink,omitempty"` - - // User: [Output Only] User who requested the operation, for example: - // user@example.com. - User string `json:"user,omitempty"` - - // Warnings: [Output Only] If warning messages are generated during - // processing of the operation, this field will be populated. - Warnings []*OperationWarnings `json:"warnings,omitempty"` - - // Zone: [Output Only] The URL of the zone where the operation resides. - // Only available when performing per-zone operations. - Zone string `json:"zone,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "ClientOperationId") - // 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. "ClientOperationId") 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 *Operation) MarshalJSON() ([]byte, error) { - type NoMethod Operation - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// OperationError: [Output Only] If errors are generated during -// processing of the operation, this field will be populated. -type OperationError struct { - // Errors: [Output Only] The array of errors encountered while - // processing this operation. - Errors []*OperationErrorErrors `json:"errors,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Errors") 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. "Errors") 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 *OperationError) MarshalJSON() ([]byte, error) { - type NoMethod OperationError - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type OperationErrorErrors struct { - // Code: [Output Only] The error type identifier for this error. - Code string `json:"code,omitempty"` - - // Location: [Output Only] Indicates the field in the request that - // caused the error. This property is optional. - Location string `json:"location,omitempty"` - - // Message: [Output Only] An optional, human-readable error message. - Message string `json:"message,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Code") 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. "Code") 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 *OperationErrorErrors) MarshalJSON() ([]byte, error) { - type NoMethod OperationErrorErrors - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type OperationWarnings struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in - // the response. - // - // Possible values: - // "CLEANUP_FAILED" - // "DEPRECATED_RESOURCE_USED" - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - // "INJECTED_KERNELS_DEPRECATED" - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - // "NEXT_HOP_CANNOT_IP_FORWARD" - // "NEXT_HOP_INSTANCE_NOT_FOUND" - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - // "NEXT_HOP_NOT_RUNNING" - // "NOT_CRITICAL_ERROR" - // "NO_RESULTS_ON_PAGE" - // "REQUIRED_TOS_AGREEMENT" - // "RESOURCE_NOT_DELETED" - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - // "UNREACHABLE" - Code string `json:"code,omitempty"` - - // Data: [Output Only] Metadata about this warning in key: value format. - // For example: - // "data": [ { "key": "scope", "value": "zones/us-east1-d" } - Data []*OperationWarningsData `json:"data,omitempty"` - - // Message: [Output Only] A human-readable description of the warning - // code. - Message string `json:"message,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Code") 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. "Code") 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 *OperationWarnings) MarshalJSON() ([]byte, error) { - type NoMethod OperationWarnings - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type OperationWarningsData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being returned. For example, for warnings where there are no results - // in a list request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP - // forwarding). - Key string `json:"key,omitempty"` - - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Key") 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. "Key") 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 *OperationWarningsData) MarshalJSON() ([]byte, error) { - type NoMethod OperationWarningsData - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// OperationList: Contains a list of Operation resources. -type OperationList struct { - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. - Id string `json:"id,omitempty"` - - // Items: [Output Only] A list of Operation resources. - Items []*Operation `json:"items,omitempty"` - - // Kind: [Output Only] Type of resource. Always compute#operations for - // Operations resource. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") 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. "Id") 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 *OperationList) MarshalJSON() ([]byte, error) { - type NoMethod OperationList - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// PublicKey: A public key for authenticating to guests. -type PublicKey struct { - // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text - // format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - - // Description: An optional textual description of the resource; - // provided by the client when the resource is created. - Description string `json:"description,omitempty"` - - // ExpirationTimestamp: Optional expiration timestamp. If provided, the - // timestamp must be in RFC3339 text format. If not provided, the public - // key never expires. - ExpirationTimestamp string `json:"expirationTimestamp,omitempty"` - - // Fingerprint: [Output Only] The fingerprint of the key is defined by - // RFC4716 to be the MD5 digest of the public key. - Fingerprint string `json:"fingerprint,omitempty"` - - // Key: Public key text in SSH format, defined by RFC4253 section 6.6. - Key string `json:"key,omitempty"` - - // ForceSendFields is a list of field names (e.g. "CreationTimestamp") - // 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. "CreationTimestamp") 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 *PublicKey) MarshalJSON() ([]byte, error) { - type NoMethod PublicKey - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// User: A User resource. -type User struct { - // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text - // format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - - // Description: An optional textual description of the resource; - // provided by the client when the resource is created. - Description string `json:"description,omitempty"` - - // Groups: [Output Only] A list of URLs to Group resources who contain - // the user. Users are only members of groups in the same project. - Groups []string `json:"groups,omitempty"` - - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id uint64 `json:"id,omitempty,string"` - - // Kind: [Output Only] Type of the resource. Always - // clouduseraccounts#user for users. - Kind string `json:"kind,omitempty"` - - // Name: Name of the resource; provided by the client when the resource - // is created. - Name string `json:"name,omitempty"` - - // Owner: Email address of account's owner. This account will be - // validated to make sure it exists. The email can belong to any domain, - // but it must be tied to a Google account. - Owner string `json:"owner,omitempty"` - - // PublicKeys: [Output Only] Public keys that this user may use to - // login. - PublicKeys []*PublicKey `json:"publicKeys,omitempty"` - - // SelfLink: [Output Only] Server defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "CreationTimestamp") - // 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. "CreationTimestamp") 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 *User) MarshalJSON() ([]byte, error) { - type NoMethod User - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type UserList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: [Output Only] A list of User resources. - Items []*User `json:"items,omitempty"` - - // Kind: [Output Only] Type of resource. Always - // clouduseraccounts#userList for lists of users. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] A token used to continue a truncated - // list request. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") 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. "Id") 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 *UserList) MarshalJSON() ([]byte, error) { - type NoMethod UserList - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// method id "clouduseraccounts.globalAccountsOperations.delete": - -type GlobalAccountsOperationsDeleteCall struct { - s *Service - project string - operation string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified operation resource. -func (r *GlobalAccountsOperationsService) Delete(project string, operation string) *GlobalAccountsOperationsDeleteCall { - c := &GlobalAccountsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.operation = operation - 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 *GlobalAccountsOperationsDeleteCall) Fields(s ...googleapi.Field) *GlobalAccountsOperationsDeleteCall { - 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 *GlobalAccountsOperationsDeleteCall) Context(ctx context.Context) *GlobalAccountsOperationsDeleteCall { - 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 *GlobalAccountsOperationsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GlobalAccountsOperationsDeleteCall) 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 - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/operations/{operation}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("DELETE", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "operation": c.operation, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "clouduseraccounts.globalAccountsOperations.delete" call. -func (c *GlobalAccountsOperationsDeleteCall) Do(opts ...googleapi.CallOption) error { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if err != nil { - return err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return err - } - return nil - // { - // "description": "Deletes the specified operation resource.", - // "httpMethod": "DELETE", - // "id": "clouduseraccounts.globalAccountsOperations.delete", - // "parameterOrder": [ - // "project", - // "operation" - // ], - // "parameters": { - // "operation": { - // "description": "Name of the Operations resource to delete.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/operations/{operation}", - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/cloud.useraccounts" - // ] - // } - -} - -// method id "clouduseraccounts.globalAccountsOperations.get": - -type GlobalAccountsOperationsGetCall struct { - s *Service - project string - operation string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Retrieves the specified operation resource. -func (r *GlobalAccountsOperationsService) Get(project string, operation string) *GlobalAccountsOperationsGetCall { - c := &GlobalAccountsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.operation = operation - 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 *GlobalAccountsOperationsGetCall) Fields(s ...googleapi.Field) *GlobalAccountsOperationsGetCall { - 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 *GlobalAccountsOperationsGetCall) IfNoneMatch(entityTag string) *GlobalAccountsOperationsGetCall { - 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 *GlobalAccountsOperationsGetCall) Context(ctx context.Context) *GlobalAccountsOperationsGetCall { - 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 *GlobalAccountsOperationsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GlobalAccountsOperationsGetCall) 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, "{project}/global/operations/{operation}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "operation": c.operation, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "clouduseraccounts.globalAccountsOperations.get" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.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 *GlobalAccountsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, 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 := &Operation{ - 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": "Retrieves the specified operation resource.", - // "httpMethod": "GET", - // "id": "clouduseraccounts.globalAccountsOperations.get", - // "parameterOrder": [ - // "project", - // "operation" - // ], - // "parameters": { - // "operation": { - // "description": "Name of the Operations resource to return.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/operations/{operation}", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/cloud-platform.read-only", - // "https://www.googleapis.com/auth/cloud.useraccounts", - // "https://www.googleapis.com/auth/cloud.useraccounts.readonly" - // ] - // } - -} - -// method id "clouduseraccounts.globalAccountsOperations.list": - -type GlobalAccountsOperationsListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of operation resources contained within the -// specified project. -func (r *GlobalAccountsOperationsService) List(project string) *GlobalAccountsOperationsListCall { - c := &GlobalAccountsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": Sets a filter expression -// for filtering listed resources, in the form filter={expression}. Your -// {expression} must be in the format: field_name comparison_string -// literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use filter=name ne -// example-instance. -// -// Compute Engine Beta API Only: If you use filtering in the Beta API, -// you can also filter on nested fields. For example, you could filter -// on instances that have set the scheduling.automaticRestart field to -// true. In particular, use filtering on nested fields to take advantage -// of instance labels to organize and filter results based on label -// values. -// -// The Beta API also supports filtering on multiple expressions by -// providing each separate expression within parentheses. For example, -// (scheduling.automaticRestart eq true) (zone eq us-central1-f). -// Multiple expressions are treated as AND expressions, meaning that -// resources must match all expressions to pass the filters. -func (c *GlobalAccountsOperationsListCall) Filter(filter string) *GlobalAccountsOperationsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. -func (c *GlobalAccountsOperationsListCall) MaxResults(maxResults int64) *GlobalAccountsOperationsListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *GlobalAccountsOperationsListCall) OrderBy(orderBy string) *GlobalAccountsOperationsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *GlobalAccountsOperationsListCall) PageToken(pageToken string) *GlobalAccountsOperationsListCall { - 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 *GlobalAccountsOperationsListCall) Fields(s ...googleapi.Field) *GlobalAccountsOperationsListCall { - 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 *GlobalAccountsOperationsListCall) IfNoneMatch(entityTag string) *GlobalAccountsOperationsListCall { - 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 *GlobalAccountsOperationsListCall) Context(ctx context.Context) *GlobalAccountsOperationsListCall { - 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 *GlobalAccountsOperationsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GlobalAccountsOperationsListCall) 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, "{project}/global/operations") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "clouduseraccounts.globalAccountsOperations.list" call. -// Exactly one of *OperationList or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *OperationList.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 *GlobalAccountsOperationsListCall) Do(opts ...googleapi.CallOption) (*OperationList, 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 := &OperationList{ - 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": "Retrieves the list of operation resources contained within the specified project.", - // "httpMethod": "GET", - // "id": "clouduseraccounts.globalAccountsOperations.list", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", - // "format": "uint32", - // "location": "query", - // "maximum": "500", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/operations", - // "response": { - // "$ref": "OperationList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/cloud-platform.read-only", - // "https://www.googleapis.com/auth/cloud.useraccounts", - // "https://www.googleapis.com/auth/cloud.useraccounts.readonly" - // ] - // } - -} - -// 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 *GlobalAccountsOperationsListCall) Pages(ctx context.Context, f func(*OperationList) 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 "clouduseraccounts.groups.addMember": - -type GroupsAddMemberCall struct { - s *Service - project string - groupName string - groupsaddmemberrequest *GroupsAddMemberRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// AddMember: Adds users to the specified group. -func (r *GroupsService) AddMember(project string, groupName string, groupsaddmemberrequest *GroupsAddMemberRequest) *GroupsAddMemberCall { - c := &GroupsAddMemberCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.groupName = groupName - c.groupsaddmemberrequest = groupsaddmemberrequest - 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 *GroupsAddMemberCall) Fields(s ...googleapi.Field) *GroupsAddMemberCall { - 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 *GroupsAddMemberCall) Context(ctx context.Context) *GroupsAddMemberCall { - 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 *GroupsAddMemberCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GroupsAddMemberCall) 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.groupsaddmemberrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/groups/{groupName}/addMember") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "groupName": c.groupName, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "clouduseraccounts.groups.addMember" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.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 *GroupsAddMemberCall) Do(opts ...googleapi.CallOption) (*Operation, 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 := &Operation{ - 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": "Adds users to the specified group.", - // "httpMethod": "POST", - // "id": "clouduseraccounts.groups.addMember", - // "parameterOrder": [ - // "project", - // "groupName" - // ], - // "parameters": { - // "groupName": { - // "description": "Name of the group for this request.", - // "location": "path", - // "pattern": "[a-z][-a-z0-9_]{0,31}", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/groups/{groupName}/addMember", - // "request": { - // "$ref": "GroupsAddMemberRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/cloud.useraccounts" - // ] - // } - -} - -// method id "clouduseraccounts.groups.delete": - -type GroupsDeleteCall struct { - s *Service - project string - groupName string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified Group resource. -func (r *GroupsService) Delete(project string, groupName string) *GroupsDeleteCall { - c := &GroupsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.groupName = groupName - 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 *GroupsDeleteCall) Fields(s ...googleapi.Field) *GroupsDeleteCall { - 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 *GroupsDeleteCall) Context(ctx context.Context) *GroupsDeleteCall { - 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 *GroupsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GroupsDeleteCall) 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 - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/groups/{groupName}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("DELETE", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "groupName": c.groupName, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "clouduseraccounts.groups.delete" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.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 *GroupsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, 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 := &Operation{ - 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": "Deletes the specified Group resource.", - // "httpMethod": "DELETE", - // "id": "clouduseraccounts.groups.delete", - // "parameterOrder": [ - // "project", - // "groupName" - // ], - // "parameters": { - // "groupName": { - // "description": "Name of the Group resource to delete.", - // "location": "path", - // "pattern": "[a-z][-a-z0-9_]{0,31}", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/groups/{groupName}", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/cloud.useraccounts" - // ] - // } - -} - -// method id "clouduseraccounts.groups.get": - -type GroupsGetCall struct { - s *Service - project string - groupName string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified Group resource. -func (r *GroupsService) Get(project string, groupName string) *GroupsGetCall { - c := &GroupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.groupName = groupName - 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 *GroupsGetCall) Fields(s ...googleapi.Field) *GroupsGetCall { - 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 *GroupsGetCall) IfNoneMatch(entityTag string) *GroupsGetCall { - 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 *GroupsGetCall) Context(ctx context.Context) *GroupsGetCall { - 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 *GroupsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GroupsGetCall) 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, "{project}/global/groups/{groupName}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "groupName": c.groupName, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "clouduseraccounts.groups.get" call. -// Exactly one of *Group or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Group.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 *GroupsGetCall) Do(opts ...googleapi.CallOption) (*Group, 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 := &Group{ - 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": "Returns the specified Group resource.", - // "httpMethod": "GET", - // "id": "clouduseraccounts.groups.get", - // "parameterOrder": [ - // "project", - // "groupName" - // ], - // "parameters": { - // "groupName": { - // "description": "Name of the Group resource to return.", - // "location": "path", - // "pattern": "[a-z][-a-z0-9_]{0,31}", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/groups/{groupName}", - // "response": { - // "$ref": "Group" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/cloud-platform.read-only", - // "https://www.googleapis.com/auth/cloud.useraccounts", - // "https://www.googleapis.com/auth/cloud.useraccounts.readonly" - // ] - // } - -} - -// method id "clouduseraccounts.groups.insert": - -type GroupsInsertCall struct { - s *Service - project string - group *Group - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a Group resource in the specified project using the -// data included in the request. -func (r *GroupsService) Insert(project string, group *Group) *GroupsInsertCall { - c := &GroupsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.group = group - 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 *GroupsInsertCall) Fields(s ...googleapi.Field) *GroupsInsertCall { - 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 *GroupsInsertCall) Context(ctx context.Context) *GroupsInsertCall { - 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 *GroupsInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GroupsInsertCall) 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.group) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/groups") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "clouduseraccounts.groups.insert" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.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 *GroupsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, 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 := &Operation{ - 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": "Creates a Group resource in the specified project using the data included in the request.", - // "httpMethod": "POST", - // "id": "clouduseraccounts.groups.insert", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/groups", - // "request": { - // "$ref": "Group" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/cloud.useraccounts" - // ] - // } - -} - -// method id "clouduseraccounts.groups.list": - -type GroupsListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of groups contained within the specified -// project. -func (r *GroupsService) List(project string) *GroupsListCall { - c := &GroupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": Sets a filter expression -// for filtering listed resources, in the form filter={expression}. Your -// {expression} must be in the format: field_name comparison_string -// literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use filter=name ne -// example-instance. -// -// Compute Engine Beta API Only: If you use filtering in the Beta API, -// you can also filter on nested fields. For example, you could filter -// on instances that have set the scheduling.automaticRestart field to -// true. In particular, use filtering on nested fields to take advantage -// of instance labels to organize and filter results based on label -// values. -// -// The Beta API also supports filtering on multiple expressions by -// providing each separate expression within parentheses. For example, -// (scheduling.automaticRestart eq true) (zone eq us-central1-f). -// Multiple expressions are treated as AND expressions, meaning that -// resources must match all expressions to pass the filters. -func (c *GroupsListCall) Filter(filter string) *GroupsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. -func (c *GroupsListCall) MaxResults(maxResults int64) *GroupsListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *GroupsListCall) OrderBy(orderBy string) *GroupsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *GroupsListCall) PageToken(pageToken string) *GroupsListCall { - 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 *GroupsListCall) Fields(s ...googleapi.Field) *GroupsListCall { - 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 *GroupsListCall) IfNoneMatch(entityTag string) *GroupsListCall { - 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 *GroupsListCall) Context(ctx context.Context) *GroupsListCall { - 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 *GroupsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GroupsListCall) 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, "{project}/global/groups") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "clouduseraccounts.groups.list" call. -// Exactly one of *GroupList or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *GroupList.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 *GroupsListCall) Do(opts ...googleapi.CallOption) (*GroupList, 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 := &GroupList{ - 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": "Retrieves the list of groups contained within the specified project.", - // "httpMethod": "GET", - // "id": "clouduseraccounts.groups.list", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", - // "format": "uint32", - // "location": "query", - // "maximum": "500", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/groups", - // "response": { - // "$ref": "GroupList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/cloud-platform.read-only", - // "https://www.googleapis.com/auth/cloud.useraccounts", - // "https://www.googleapis.com/auth/cloud.useraccounts.readonly" - // ] - // } - -} - -// 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 *GroupsListCall) Pages(ctx context.Context, f func(*GroupList) 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 "clouduseraccounts.groups.removeMember": - -type GroupsRemoveMemberCall struct { - s *Service - project string - groupName string - groupsremovememberrequest *GroupsRemoveMemberRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// RemoveMember: Removes users from the specified group. -func (r *GroupsService) RemoveMember(project string, groupName string, groupsremovememberrequest *GroupsRemoveMemberRequest) *GroupsRemoveMemberCall { - c := &GroupsRemoveMemberCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.groupName = groupName - c.groupsremovememberrequest = groupsremovememberrequest - 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 *GroupsRemoveMemberCall) Fields(s ...googleapi.Field) *GroupsRemoveMemberCall { - 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 *GroupsRemoveMemberCall) Context(ctx context.Context) *GroupsRemoveMemberCall { - 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 *GroupsRemoveMemberCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GroupsRemoveMemberCall) 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.groupsremovememberrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/groups/{groupName}/removeMember") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "groupName": c.groupName, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "clouduseraccounts.groups.removeMember" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.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 *GroupsRemoveMemberCall) Do(opts ...googleapi.CallOption) (*Operation, 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 := &Operation{ - 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": "Removes users from the specified group.", - // "httpMethod": "POST", - // "id": "clouduseraccounts.groups.removeMember", - // "parameterOrder": [ - // "project", - // "groupName" - // ], - // "parameters": { - // "groupName": { - // "description": "Name of the group for this request.", - // "location": "path", - // "pattern": "[a-z][-a-z0-9_]{0,31}", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/groups/{groupName}/removeMember", - // "request": { - // "$ref": "GroupsRemoveMemberRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/cloud.useraccounts" - // ] - // } - -} - -// method id "clouduseraccounts.linux.getAuthorizedKeysView": - -type LinuxGetAuthorizedKeysViewCall struct { - s *Service - project string - zone string - user string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// GetAuthorizedKeysView: Returns a list of authorized public keys for a -// specific user account. -func (r *LinuxService) GetAuthorizedKeysView(project string, zone string, user string, instance string) *LinuxGetAuthorizedKeysViewCall { - c := &LinuxGetAuthorizedKeysViewCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.user = user - c.urlParams_.Set("instance", instance) - return c -} - -// Login sets the optional parameter "login": Whether the view was -// requested as part of a user-initiated login. -func (c *LinuxGetAuthorizedKeysViewCall) Login(login bool) *LinuxGetAuthorizedKeysViewCall { - c.urlParams_.Set("login", fmt.Sprint(login)) - 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 *LinuxGetAuthorizedKeysViewCall) Fields(s ...googleapi.Field) *LinuxGetAuthorizedKeysViewCall { - 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 *LinuxGetAuthorizedKeysViewCall) Context(ctx context.Context) *LinuxGetAuthorizedKeysViewCall { - 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 *LinuxGetAuthorizedKeysViewCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *LinuxGetAuthorizedKeysViewCall) 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 - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/authorizedKeysView/{user}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "user": c.user, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "clouduseraccounts.linux.getAuthorizedKeysView" call. -// Exactly one of *LinuxGetAuthorizedKeysViewResponse or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *LinuxGetAuthorizedKeysViewResponse.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 *LinuxGetAuthorizedKeysViewCall) Do(opts ...googleapi.CallOption) (*LinuxGetAuthorizedKeysViewResponse, 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 := &LinuxGetAuthorizedKeysViewResponse{ - 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": "Returns a list of authorized public keys for a specific user account.", - // "httpMethod": "POST", - // "id": "clouduseraccounts.linux.getAuthorizedKeysView", - // "parameterOrder": [ - // "project", - // "zone", - // "user", - // "instance" - // ], - // "parameters": { - // "instance": { - // "description": "The fully-qualified URL of the virtual machine requesting the view.", - // "location": "query", - // "required": true, - // "type": "string" - // }, - // "login": { - // "description": "Whether the view was requested as part of a user-initiated login.", - // "location": "query", - // "type": "boolean" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "user": { - // "description": "The user account for which you want to get a list of authorized public keys.", - // "location": "path", - // "pattern": "[a-z][-a-z0-9_]{0,31}", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "Name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/authorizedKeysView/{user}", - // "response": { - // "$ref": "LinuxGetAuthorizedKeysViewResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/cloud-platform.read-only", - // "https://www.googleapis.com/auth/cloud.useraccounts", - // "https://www.googleapis.com/auth/cloud.useraccounts.readonly" - // ] - // } - -} - -// method id "clouduseraccounts.linux.getLinuxAccountViews": - -type LinuxGetLinuxAccountViewsCall struct { - s *Service - project string - zone string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// GetLinuxAccountViews: Retrieves a list of user accounts for an -// instance within a specific project. -func (r *LinuxService) GetLinuxAccountViews(project string, zone string, instance string) *LinuxGetLinuxAccountViewsCall { - c := &LinuxGetLinuxAccountViewsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.urlParams_.Set("instance", instance) - return c -} - -// Filter sets the optional parameter "filter": Sets a filter expression -// for filtering listed resources, in the form filter={expression}. Your -// {expression} must be in the format: field_name comparison_string -// literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use filter=name ne -// example-instance. -// -// Compute Engine Beta API Only: If you use filtering in the Beta API, -// you can also filter on nested fields. For example, you could filter -// on instances that have set the scheduling.automaticRestart field to -// true. In particular, use filtering on nested fields to take advantage -// of instance labels to organize and filter results based on label -// values. -// -// The Beta API also supports filtering on multiple expressions by -// providing each separate expression within parentheses. For example, -// (scheduling.automaticRestart eq true) (zone eq us-central1-f). -// Multiple expressions are treated as AND expressions, meaning that -// resources must match all expressions to pass the filters. -func (c *LinuxGetLinuxAccountViewsCall) Filter(filter string) *LinuxGetLinuxAccountViewsCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. -func (c *LinuxGetLinuxAccountViewsCall) MaxResults(maxResults int64) *LinuxGetLinuxAccountViewsCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *LinuxGetLinuxAccountViewsCall) OrderBy(orderBy string) *LinuxGetLinuxAccountViewsCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *LinuxGetLinuxAccountViewsCall) PageToken(pageToken string) *LinuxGetLinuxAccountViewsCall { - 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 *LinuxGetLinuxAccountViewsCall) Fields(s ...googleapi.Field) *LinuxGetLinuxAccountViewsCall { - 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 *LinuxGetLinuxAccountViewsCall) Context(ctx context.Context) *LinuxGetLinuxAccountViewsCall { - 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 *LinuxGetLinuxAccountViewsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *LinuxGetLinuxAccountViewsCall) 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 - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/linuxAccountViews") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "clouduseraccounts.linux.getLinuxAccountViews" call. -// Exactly one of *LinuxGetLinuxAccountViewsResponse or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *LinuxGetLinuxAccountViewsResponse.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 *LinuxGetLinuxAccountViewsCall) Do(opts ...googleapi.CallOption) (*LinuxGetLinuxAccountViewsResponse, 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 := &LinuxGetLinuxAccountViewsResponse{ - 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": "Retrieves a list of user accounts for an instance within a specific project.", - // "httpMethod": "POST", - // "id": "clouduseraccounts.linux.getLinuxAccountViews", - // "parameterOrder": [ - // "project", - // "zone", - // "instance" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "instance": { - // "description": "The fully-qualified URL of the virtual machine requesting the views.", - // "location": "query", - // "required": true, - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", - // "format": "uint32", - // "location": "query", - // "maximum": "500", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "Name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/linuxAccountViews", - // "response": { - // "$ref": "LinuxGetLinuxAccountViewsResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/cloud-platform.read-only", - // "https://www.googleapis.com/auth/cloud.useraccounts", - // "https://www.googleapis.com/auth/cloud.useraccounts.readonly" - // ] - // } - -} - -// method id "clouduseraccounts.users.addPublicKey": - -type UsersAddPublicKeyCall struct { - s *Service - project string - user string - publickey *PublicKey - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// AddPublicKey: Adds a public key to the specified User resource with -// the data included in the request. -func (r *UsersService) AddPublicKey(project string, user string, publickey *PublicKey) *UsersAddPublicKeyCall { - c := &UsersAddPublicKeyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.user = user - c.publickey = publickey - 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 *UsersAddPublicKeyCall) Fields(s ...googleapi.Field) *UsersAddPublicKeyCall { - 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 *UsersAddPublicKeyCall) Context(ctx context.Context) *UsersAddPublicKeyCall { - 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 *UsersAddPublicKeyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *UsersAddPublicKeyCall) 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.publickey) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/users/{user}/addPublicKey") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "user": c.user, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "clouduseraccounts.users.addPublicKey" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.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 *UsersAddPublicKeyCall) Do(opts ...googleapi.CallOption) (*Operation, 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 := &Operation{ - 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": "Adds a public key to the specified User resource with the data included in the request.", - // "httpMethod": "POST", - // "id": "clouduseraccounts.users.addPublicKey", - // "parameterOrder": [ - // "project", - // "user" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "user": { - // "description": "Name of the user for this request.", - // "location": "path", - // "pattern": "[a-z][-a-z0-9_]{0,31}", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/users/{user}/addPublicKey", - // "request": { - // "$ref": "PublicKey" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/cloud.useraccounts" - // ] - // } - -} - -// method id "clouduseraccounts.users.delete": - -type UsersDeleteCall struct { - s *Service - project string - user string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified User resource. -func (r *UsersService) Delete(project string, user string) *UsersDeleteCall { - c := &UsersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.user = user - 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 *UsersDeleteCall) Fields(s ...googleapi.Field) *UsersDeleteCall { - 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 *UsersDeleteCall) Context(ctx context.Context) *UsersDeleteCall { - 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 *UsersDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *UsersDeleteCall) 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 - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/users/{user}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("DELETE", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "user": c.user, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "clouduseraccounts.users.delete" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.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 *UsersDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, 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 := &Operation{ - 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": "Deletes the specified User resource.", - // "httpMethod": "DELETE", - // "id": "clouduseraccounts.users.delete", - // "parameterOrder": [ - // "project", - // "user" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "user": { - // "description": "Name of the user resource to delete.", - // "location": "path", - // "pattern": "[a-z][-a-z0-9_]{0,31}", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/users/{user}", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/cloud.useraccounts" - // ] - // } - -} - -// method id "clouduseraccounts.users.get": - -type UsersGetCall struct { - s *Service - project string - user string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified User resource. -func (r *UsersService) Get(project string, user string) *UsersGetCall { - c := &UsersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.user = user - 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 *UsersGetCall) Fields(s ...googleapi.Field) *UsersGetCall { - 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 *UsersGetCall) IfNoneMatch(entityTag string) *UsersGetCall { - 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 *UsersGetCall) Context(ctx context.Context) *UsersGetCall { - 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 *UsersGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *UsersGetCall) 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, "{project}/global/users/{user}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "user": c.user, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "clouduseraccounts.users.get" call. -// Exactly one of *User or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *User.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 *UsersGetCall) Do(opts ...googleapi.CallOption) (*User, 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 := &User{ - 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": "Returns the specified User resource.", - // "httpMethod": "GET", - // "id": "clouduseraccounts.users.get", - // "parameterOrder": [ - // "project", - // "user" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "user": { - // "description": "Name of the user resource to return.", - // "location": "path", - // "pattern": "[a-z][-a-z0-9_]{0,31}", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/users/{user}", - // "response": { - // "$ref": "User" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/cloud-platform.read-only", - // "https://www.googleapis.com/auth/cloud.useraccounts", - // "https://www.googleapis.com/auth/cloud.useraccounts.readonly" - // ] - // } - -} - -// method id "clouduseraccounts.users.insert": - -type UsersInsertCall struct { - s *Service - project string - user *User - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a User resource in the specified project using the -// data included in the request. -func (r *UsersService) Insert(project string, user *User) *UsersInsertCall { - c := &UsersInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.user = user - 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 *UsersInsertCall) Fields(s ...googleapi.Field) *UsersInsertCall { - 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 *UsersInsertCall) Context(ctx context.Context) *UsersInsertCall { - 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 *UsersInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *UsersInsertCall) 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.user) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/users") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "clouduseraccounts.users.insert" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.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 *UsersInsertCall) Do(opts ...googleapi.CallOption) (*Operation, 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 := &Operation{ - 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": "Creates a User resource in the specified project using the data included in the request.", - // "httpMethod": "POST", - // "id": "clouduseraccounts.users.insert", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/users", - // "request": { - // "$ref": "User" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/cloud.useraccounts" - // ] - // } - -} - -// method id "clouduseraccounts.users.list": - -type UsersListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves a list of users contained within the specified -// project. -func (r *UsersService) List(project string) *UsersListCall { - c := &UsersListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": Sets a filter expression -// for filtering listed resources, in the form filter={expression}. Your -// {expression} must be in the format: field_name comparison_string -// literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use filter=name ne -// example-instance. -// -// Compute Engine Beta API Only: If you use filtering in the Beta API, -// you can also filter on nested fields. For example, you could filter -// on instances that have set the scheduling.automaticRestart field to -// true. In particular, use filtering on nested fields to take advantage -// of instance labels to organize and filter results based on label -// values. -// -// The Beta API also supports filtering on multiple expressions by -// providing each separate expression within parentheses. For example, -// (scheduling.automaticRestart eq true) (zone eq us-central1-f). -// Multiple expressions are treated as AND expressions, meaning that -// resources must match all expressions to pass the filters. -func (c *UsersListCall) Filter(filter string) *UsersListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. -func (c *UsersListCall) MaxResults(maxResults int64) *UsersListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *UsersListCall) OrderBy(orderBy string) *UsersListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *UsersListCall) PageToken(pageToken string) *UsersListCall { - 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 *UsersListCall) Fields(s ...googleapi.Field) *UsersListCall { - 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 *UsersListCall) IfNoneMatch(entityTag string) *UsersListCall { - 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 *UsersListCall) Context(ctx context.Context) *UsersListCall { - 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 *UsersListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *UsersListCall) 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, "{project}/global/users") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "clouduseraccounts.users.list" call. -// Exactly one of *UserList or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *UserList.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 *UsersListCall) Do(opts ...googleapi.CallOption) (*UserList, 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 := &UserList{ - 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": "Retrieves a list of users contained within the specified project.", - // "httpMethod": "GET", - // "id": "clouduseraccounts.users.list", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", - // "format": "uint32", - // "location": "query", - // "maximum": "500", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/users", - // "response": { - // "$ref": "UserList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/cloud-platform.read-only", - // "https://www.googleapis.com/auth/cloud.useraccounts", - // "https://www.googleapis.com/auth/cloud.useraccounts.readonly" - // ] - // } - -} - -// 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 *UsersListCall) Pages(ctx context.Context, f func(*UserList) 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 "clouduseraccounts.users.removePublicKey": - -type UsersRemovePublicKeyCall struct { - s *Service - project string - user string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// RemovePublicKey: Removes the specified public key from the user. -func (r *UsersService) RemovePublicKey(project string, user string, fingerprint string) *UsersRemovePublicKeyCall { - c := &UsersRemovePublicKeyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.user = user - c.urlParams_.Set("fingerprint", fingerprint) - 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 *UsersRemovePublicKeyCall) Fields(s ...googleapi.Field) *UsersRemovePublicKeyCall { - 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 *UsersRemovePublicKeyCall) Context(ctx context.Context) *UsersRemovePublicKeyCall { - 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 *UsersRemovePublicKeyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *UsersRemovePublicKeyCall) 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 - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/users/{user}/removePublicKey") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "user": c.user, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "clouduseraccounts.users.removePublicKey" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.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 *UsersRemovePublicKeyCall) Do(opts ...googleapi.CallOption) (*Operation, 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 := &Operation{ - 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": "Removes the specified public key from the user.", - // "httpMethod": "POST", - // "id": "clouduseraccounts.users.removePublicKey", - // "parameterOrder": [ - // "project", - // "user", - // "fingerprint" - // ], - // "parameters": { - // "fingerprint": { - // "description": "The fingerprint of the public key to delete. Public keys are identified by their fingerprint, which is defined by RFC4716 to be the MD5 digest of the public key.", - // "location": "query", - // "pattern": "[a-f0-9]{32}", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "user": { - // "description": "Name of the user for this request.", - // "location": "path", - // "pattern": "[a-z][-a-z0-9_]{0,31}", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/users/{user}/removePublicKey", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/cloud.useraccounts" - // ] - // } - -}
diff --git a/clouduseraccounts/vm_alpha/clouduseraccounts-api.json b/clouduseraccounts/vm_alpha/clouduseraccounts-api.json deleted file mode 100644 index 4894e6e..0000000 --- a/clouduseraccounts/vm_alpha/clouduseraccounts-api.json +++ /dev/null
@@ -1,1853 +0,0 @@ -{ - "auth": { - "oauth2": { - "scopes": { - "https://www.googleapis.com/auth/cloud-platform": { - "description": "View and manage your data across Google Cloud Platform services" - }, - "https://www.googleapis.com/auth/cloud-platform.read-only": { - "description": "View your data across Google Cloud Platform services" - }, - "https://www.googleapis.com/auth/cloud.useraccounts": { - "description": "Manage your Google Cloud User Accounts" - }, - "https://www.googleapis.com/auth/cloud.useraccounts.readonly": { - "description": "View your Google Cloud User Accounts" - } - } - } - }, - "basePath": "/clouduseraccounts/vm_alpha/projects/", - "baseUrl": "https://www.googleapis.com/clouduseraccounts/vm_alpha/projects/", - "batchPath": "batch/clouduseraccounts/vm_alpha", - "canonicalName": "Cloud User Accounts", - "description": "Creates and manages users and groups for accessing Google Compute Engine virtual machines.", - "discoveryVersion": "v1", - "documentationLink": "https://cloud.google.com/compute/docs/access/user-accounts/api/latest/", - "etag": "\"-iA1DTNe4s-I6JZXPt1t1Ypy8IU/DmNFUFGhSh7oLg7RNX5k36KX4oA\"", - "icons": { - "x16": "https://www.google.com/images/icons/product/compute_engine-16.png", - "x32": "https://www.google.com/images/icons/product/compute_engine-32.png" - }, - "id": "clouduseraccounts:vm_alpha", - "kind": "discovery#restDescription", - "name": "clouduseraccounts", - "ownerDomain": "google.com", - "ownerName": "Google", - "parameters": { - "alt": { - "default": "json", - "description": "Data format for the response.", - "enum": [ - "json" - ], - "enumDescriptions": [ - "Responses with Content-Type of application/json" - ], - "location": "query", - "type": "string" - }, - "fields": { - "description": "Selector specifying which fields to include in a partial response.", - "location": "query", - "type": "string" - }, - "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" - }, - "oauth_token": { - "description": "OAuth 2.0 token for the current user.", - "location": "query", - "type": "string" - }, - "prettyPrint": { - "default": "true", - "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": { - "globalAccountsOperations": { - "methods": { - "delete": { - "description": "Deletes the specified operation resource.", - "httpMethod": "DELETE", - "id": "clouduseraccounts.globalAccountsOperations.delete", - "parameterOrder": [ - "project", - "operation" - ], - "parameters": { - "operation": { - "description": "Name of the Operations resource to delete.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - } - }, - "path": "{project}/global/operations/{operation}", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud.useraccounts" - ] - }, - "get": { - "description": "Retrieves the specified operation resource.", - "httpMethod": "GET", - "id": "clouduseraccounts.globalAccountsOperations.get", - "parameterOrder": [ - "project", - "operation" - ], - "parameters": { - "operation": { - "description": "Name of the Operations resource to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - } - }, - "path": "{project}/global/operations/{operation}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only", - "https://www.googleapis.com/auth/cloud.useraccounts", - "https://www.googleapis.com/auth/cloud.useraccounts.readonly" - ] - }, - "list": { - "description": "Retrieves the list of operation resources contained within the specified project.", - "httpMethod": "GET", - "id": "clouduseraccounts.globalAccountsOperations.list", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", - "format": "uint32", - "location": "query", - "maximum": "500", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - } - }, - "path": "{project}/global/operations", - "response": { - "$ref": "OperationList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only", - "https://www.googleapis.com/auth/cloud.useraccounts", - "https://www.googleapis.com/auth/cloud.useraccounts.readonly" - ] - } - } - }, - "groups": { - "methods": { - "addMember": { - "description": "Adds users to the specified group.", - "httpMethod": "POST", - "id": "clouduseraccounts.groups.addMember", - "parameterOrder": [ - "project", - "groupName" - ], - "parameters": { - "groupName": { - "description": "Name of the group for this request.", - "location": "path", - "pattern": "[a-z][-a-z0-9_]{0,31}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - } - }, - "path": "{project}/global/groups/{groupName}/addMember", - "request": { - "$ref": "GroupsAddMemberRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud.useraccounts" - ] - }, - "delete": { - "description": "Deletes the specified Group resource.", - "httpMethod": "DELETE", - "id": "clouduseraccounts.groups.delete", - "parameterOrder": [ - "project", - "groupName" - ], - "parameters": { - "groupName": { - "description": "Name of the Group resource to delete.", - "location": "path", - "pattern": "[a-z][-a-z0-9_]{0,31}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - } - }, - "path": "{project}/global/groups/{groupName}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud.useraccounts" - ] - }, - "get": { - "description": "Returns the specified Group resource.", - "httpMethod": "GET", - "id": "clouduseraccounts.groups.get", - "parameterOrder": [ - "project", - "groupName" - ], - "parameters": { - "groupName": { - "description": "Name of the Group resource to return.", - "location": "path", - "pattern": "[a-z][-a-z0-9_]{0,31}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - } - }, - "path": "{project}/global/groups/{groupName}", - "response": { - "$ref": "Group" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only", - "https://www.googleapis.com/auth/cloud.useraccounts", - "https://www.googleapis.com/auth/cloud.useraccounts.readonly" - ] - }, - "getIamPolicy": { - "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.", - "httpMethod": "GET", - "id": "clouduseraccounts.groups.getIamPolicy", - "parameterOrder": [ - "project", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "{project}/global/groups/{resource}/getIamPolicy", - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only", - "https://www.googleapis.com/auth/cloud.useraccounts", - "https://www.googleapis.com/auth/cloud.useraccounts.readonly" - ] - }, - "insert": { - "description": "Creates a Group resource in the specified project using the data included in the request.", - "httpMethod": "POST", - "id": "clouduseraccounts.groups.insert", - "parameterOrder": [ - "project" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - } - }, - "path": "{project}/global/groups", - "request": { - "$ref": "Group" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud.useraccounts" - ] - }, - "list": { - "description": "Retrieves the list of groups contained within the specified project.", - "httpMethod": "GET", - "id": "clouduseraccounts.groups.list", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", - "format": "uint32", - "location": "query", - "maximum": "500", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - } - }, - "path": "{project}/global/groups", - "response": { - "$ref": "GroupList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only", - "https://www.googleapis.com/auth/cloud.useraccounts", - "https://www.googleapis.com/auth/cloud.useraccounts.readonly" - ] - }, - "removeMember": { - "description": "Removes users from the specified group.", - "httpMethod": "POST", - "id": "clouduseraccounts.groups.removeMember", - "parameterOrder": [ - "project", - "groupName" - ], - "parameters": { - "groupName": { - "description": "Name of the group for this request.", - "location": "path", - "pattern": "[a-z][-a-z0-9_]{0,31}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - } - }, - "path": "{project}/global/groups/{groupName}/removeMember", - "request": { - "$ref": "GroupsRemoveMemberRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud.useraccounts" - ] - }, - "setIamPolicy": { - "description": "Sets the access control policy on the specified resource. Replaces any existing policy.", - "httpMethod": "POST", - "id": "clouduseraccounts.groups.setIamPolicy", - "parameterOrder": [ - "project", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "{project}/global/groups/{resource}/setIamPolicy", - "request": { - "$ref": "Policy" - }, - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only", - "https://www.googleapis.com/auth/cloud.useraccounts", - "https://www.googleapis.com/auth/cloud.useraccounts.readonly" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", - "httpMethod": "POST", - "id": "clouduseraccounts.groups.testIamPermissions", - "parameterOrder": [ - "project", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "{project}/global/groups/{resource}/testIamPermissions", - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only", - "https://www.googleapis.com/auth/cloud.useraccounts", - "https://www.googleapis.com/auth/cloud.useraccounts.readonly" - ] - } - } - }, - "linux": { - "methods": { - "getAuthorizedKeysView": { - "description": "Returns a list of authorized public keys for a specific user account.", - "httpMethod": "POST", - "id": "clouduseraccounts.linux.getAuthorizedKeysView", - "parameterOrder": [ - "project", - "zone", - "user", - "instance" - ], - "parameters": { - "instance": { - "description": "The fully-qualified URL of the virtual machine requesting the view.", - "location": "query", - "required": true, - "type": "string" - }, - "login": { - "description": "Whether the view was requested as part of a user-initiated login.", - "location": "query", - "type": "boolean" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "user": { - "description": "The user account for which you want to get a list of authorized public keys.", - "location": "path", - "pattern": "[a-z][-a-z0-9_]{0,31}", - "required": true, - "type": "string" - }, - "zone": { - "description": "Name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "{project}/zones/{zone}/authorizedKeysView/{user}", - "response": { - "$ref": "LinuxGetAuthorizedKeysViewResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only", - "https://www.googleapis.com/auth/cloud.useraccounts", - "https://www.googleapis.com/auth/cloud.useraccounts.readonly" - ] - }, - "getLinuxAccountViews": { - "description": "Retrieves a list of user accounts for an instance within a specific project.", - "httpMethod": "POST", - "id": "clouduseraccounts.linux.getLinuxAccountViews", - "parameterOrder": [ - "project", - "zone", - "instance" - ], - "parameters": { - "filter": { - "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query", - "type": "string" - }, - "instance": { - "description": "The fully-qualified URL of the virtual machine requesting the views.", - "location": "query", - "required": true, - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", - "format": "uint32", - "location": "query", - "maximum": "500", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "zone": { - "description": "Name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "{project}/zones/{zone}/linuxAccountViews", - "response": { - "$ref": "LinuxGetLinuxAccountViewsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only", - "https://www.googleapis.com/auth/cloud.useraccounts", - "https://www.googleapis.com/auth/cloud.useraccounts.readonly" - ] - } - } - }, - "users": { - "methods": { - "addPublicKey": { - "description": "Adds a public key to the specified User resource with the data included in the request.", - "httpMethod": "POST", - "id": "clouduseraccounts.users.addPublicKey", - "parameterOrder": [ - "project", - "user" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "user": { - "description": "Name of the user for this request.", - "location": "path", - "pattern": "[a-z][-a-z0-9_]{0,31}", - "required": true, - "type": "string" - } - }, - "path": "{project}/global/users/{user}/addPublicKey", - "request": { - "$ref": "PublicKey" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud.useraccounts" - ] - }, - "delete": { - "description": "Deletes the specified User resource.", - "httpMethod": "DELETE", - "id": "clouduseraccounts.users.delete", - "parameterOrder": [ - "project", - "user" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "user": { - "description": "Name of the user resource to delete.", - "location": "path", - "pattern": "[a-z][-a-z0-9_]{0,31}", - "required": true, - "type": "string" - } - }, - "path": "{project}/global/users/{user}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud.useraccounts" - ] - }, - "get": { - "description": "Returns the specified User resource.", - "httpMethod": "GET", - "id": "clouduseraccounts.users.get", - "parameterOrder": [ - "project", - "user" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "user": { - "description": "Name of the user resource to return.", - "location": "path", - "pattern": "[a-z][-a-z0-9_]{0,31}", - "required": true, - "type": "string" - } - }, - "path": "{project}/global/users/{user}", - "response": { - "$ref": "User" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only", - "https://www.googleapis.com/auth/cloud.useraccounts", - "https://www.googleapis.com/auth/cloud.useraccounts.readonly" - ] - }, - "getIamPolicy": { - "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.", - "httpMethod": "GET", - "id": "clouduseraccounts.users.getIamPolicy", - "parameterOrder": [ - "project", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "{project}/global/users/{resource}/getIamPolicy", - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only", - "https://www.googleapis.com/auth/cloud.useraccounts", - "https://www.googleapis.com/auth/cloud.useraccounts.readonly" - ] - }, - "insert": { - "description": "Creates a User resource in the specified project using the data included in the request.", - "httpMethod": "POST", - "id": "clouduseraccounts.users.insert", - "parameterOrder": [ - "project" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - } - }, - "path": "{project}/global/users", - "request": { - "$ref": "User" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud.useraccounts" - ] - }, - "list": { - "description": "Retrieves a list of users contained within the specified project.", - "httpMethod": "GET", - "id": "clouduseraccounts.users.list", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", - "format": "uint32", - "location": "query", - "maximum": "500", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - } - }, - "path": "{project}/global/users", - "response": { - "$ref": "UserList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only", - "https://www.googleapis.com/auth/cloud.useraccounts", - "https://www.googleapis.com/auth/cloud.useraccounts.readonly" - ] - }, - "removePublicKey": { - "description": "Removes the specified public key from the user.", - "httpMethod": "POST", - "id": "clouduseraccounts.users.removePublicKey", - "parameterOrder": [ - "project", - "user", - "fingerprint" - ], - "parameters": { - "fingerprint": { - "description": "The fingerprint of the public key to delete. Public keys are identified by their fingerprint, which is defined by RFC4716 to be the MD5 digest of the public key.", - "location": "query", - "pattern": "[a-f0-9]{32}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "user": { - "description": "Name of the user for this request.", - "location": "path", - "pattern": "[a-z][-a-z0-9_]{0,31}", - "required": true, - "type": "string" - } - }, - "path": "{project}/global/users/{user}/removePublicKey", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud.useraccounts" - ] - }, - "setIamPolicy": { - "description": "Sets the access control policy on the specified resource. Replaces any existing policy.", - "httpMethod": "POST", - "id": "clouduseraccounts.users.setIamPolicy", - "parameterOrder": [ - "project", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "{project}/global/users/{resource}/setIamPolicy", - "request": { - "$ref": "Policy" - }, - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only", - "https://www.googleapis.com/auth/cloud.useraccounts", - "https://www.googleapis.com/auth/cloud.useraccounts.readonly" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", - "httpMethod": "POST", - "id": "clouduseraccounts.users.testIamPermissions", - "parameterOrder": [ - "project", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "{project}/global/users/{resource}/testIamPermissions", - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only", - "https://www.googleapis.com/auth/cloud.useraccounts", - "https://www.googleapis.com/auth/cloud.useraccounts.readonly" - ] - } - } - } - }, - "revision": "20160316", - "rootUrl": "https://www.googleapis.com/", - "schemas": { - "AuditConfig": { - "description": "Enables \"data access\" audit logging for a service and specifies a list of members that are log-exempted.", - "id": "AuditConfig", - "properties": { - "exemptedMembers": { - "description": "Specifies the identities that are exempted from \"data access\" audit logging for the `service` specified above. Follows the same format of Binding.members.", - "items": { - "type": "string" - }, - "type": "array" - }, - "service": { - "description": "Specifies a service that will be enabled for \"data access\" audit logging. For example, `resourcemanager`, `storage`, `compute`. `allServices` is a special value that covers all services.", - "type": "string" - } - }, - "type": "object" - }, - "AuthorizedKeysView": { - "description": "A list of authorized public keys for a user account.", - "id": "AuthorizedKeysView", - "properties": { - "keys": { - "description": "[Output Only] The list of authorized public keys in SSH format.", - "items": { - "type": "string" - }, - "type": "array" - }, - "sudoer": { - "description": "[Output Only] Whether the user has the ability to elevate on the instance that requested the authorized keys.", - "type": "boolean" - } - }, - "type": "object" - }, - "Binding": { - "description": "Associates `members` with a `role`.", - "id": "Binding", - "properties": { - "members": { - "description": "Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values:\n\n* `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.\n\n* `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.\n\n* `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@gmail.com` or `joe@example.com`.\n\n* `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.\n\n* `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.\n\n* `domain:{domain}`: A Google Apps domain name that represents all the users of that domain. For example, `google.com` or `example.com`.", - "items": { - "type": "string" - }, - "type": "array" - }, - "role": { - "description": "Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.", - "type": "string" - } - }, - "type": "object" - }, - "Condition": { - "description": "A condition to be met.", - "id": "Condition", - "properties": { - "iam": { - "description": "Trusted attributes supplied by the IAM system.", - "enum": [ - "ATTRIBUTION", - "AUTHORITY", - "NO_ATTR" - ], - "enumDescriptions": [ - "", - "", - "" - ], - "type": "string" - }, - "op": { - "description": "An operator to apply the subject with.", - "enum": [ - "DISCHARGED", - "EQUALS", - "IN", - "NOT_EQUALS", - "NOT_IN", - "NO_OP" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "" - ], - "type": "string" - }, - "svc": { - "description": "Trusted attributes discharged by the service.", - "type": "string" - }, - "sys": { - "description": "Trusted attributes supplied by any service that owns resources and uses the IAM system for access control.", - "enum": [ - "IP", - "NAME", - "NO_ATTR", - "REGION", - "SERVICE" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "" - ], - "type": "string" - }, - "value": { - "description": "The object of the condition. Exactly one of these must be set.", - "type": "string" - }, - "values": { - "description": "The objects of the condition. This is mutually exclusive with 'value'.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "Group": { - "description": "A Group resource.", - "id": "Group", - "properties": { - "creationTimestamp": { - "description": "[Output Only] Creation timestamp in RFC3339 text format.", - "type": "string" - }, - "description": { - "description": "An optional textual description of the resource; provided by the client when the resource is created.", - "type": "string" - }, - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "format": "uint64", - "type": "string" - }, - "kind": { - "default": "clouduseraccounts#group", - "description": "[Output Only] Type of the resource. Always clouduseraccounts#group for groups.", - "type": "string" - }, - "members": { - "description": "[Output Only] A list of URLs to User resources who belong to the group. Users may only be members of groups in the same project.", - "items": { - "type": "string" - }, - "type": "array" - }, - "name": { - "annotations": { - "required": [ - "clouduseraccounts.groups.insert" - ] - }, - "description": "Name of the resource; provided by the client when the resource is created.", - "pattern": "[a-z][-a-z0-9_]{0,31}", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server defined URL for the resource.", - "type": "string" - } - }, - "type": "object" - }, - "GroupList": { - "id": "GroupList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "[Output Only] A list of Group resources.", - "items": { - "$ref": "Group" - }, - "type": "array" - }, - "kind": { - "default": "clouduseraccounts#groupList", - "description": "[Output Only] Type of resource. Always clouduseraccounts#groupList for lists of groups.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] A token used to continue a truncated list request.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server defined URL for this resource.", - "type": "string" - } - }, - "type": "object" - }, - "GroupsAddMemberRequest": { - "id": "GroupsAddMemberRequest", - "properties": { - "users": { - "description": "Fully-qualified URLs of the User resources to add.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "GroupsRemoveMemberRequest": { - "id": "GroupsRemoveMemberRequest", - "properties": { - "users": { - "description": "Fully-qualified URLs of the User resources to remove.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "LinuxAccountViews": { - "description": "A list of all Linux accounts for this project. This API is only used by Compute Engine virtual machines to get information about user accounts for a project or instance. Linux resources are read-only views into users and groups managed by the Compute Engine Accounts API.", - "id": "LinuxAccountViews", - "properties": { - "groupViews": { - "description": "[Output Only] A list of all groups within a project.", - "items": { - "$ref": "LinuxGroupView" - }, - "type": "array" - }, - "kind": { - "default": "clouduseraccounts#linuxAccountViews", - "description": "[Output Only] Type of the resource. Always clouduseraccounts#linuxAccountViews for Linux resources.", - "type": "string" - }, - "userViews": { - "description": "[Output Only] A list of all users within a project.", - "items": { - "$ref": "LinuxUserView" - }, - "type": "array" - } - }, - "type": "object" - }, - "LinuxGetAuthorizedKeysViewResponse": { - "id": "LinuxGetAuthorizedKeysViewResponse", - "properties": { - "resource": { - "$ref": "AuthorizedKeysView", - "description": "[Output Only] A list of authorized public keys for a user." - } - }, - "type": "object" - }, - "LinuxGetLinuxAccountViewsResponse": { - "id": "LinuxGetLinuxAccountViewsResponse", - "properties": { - "resource": { - "$ref": "LinuxAccountViews", - "description": "[Output Only] A list of authorized user accounts and groups." - } - }, - "type": "object" - }, - "LinuxGroupView": { - "description": "A detailed view of a Linux group.", - "id": "LinuxGroupView", - "properties": { - "gid": { - "description": "[Output Only] The Group ID.", - "format": "uint32", - "type": "integer" - }, - "groupName": { - "description": "[Output Only] Group name.", - "type": "string" - }, - "members": { - "description": "[Output Only] List of user accounts that belong to the group.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "LinuxUserView": { - "description": "A detailed view of a Linux user account.", - "id": "LinuxUserView", - "properties": { - "gecos": { - "description": "[Output Only] The GECOS (user information) entry for this account.", - "type": "string" - }, - "gid": { - "description": "[Output Only] User's default group ID.", - "format": "uint32", - "type": "integer" - }, - "homeDirectory": { - "description": "[Output Only] The path to the home directory for this account.", - "type": "string" - }, - "shell": { - "description": "[Output Only] The path to the login shell for this account.", - "type": "string" - }, - "uid": { - "description": "[Output Only] User ID.", - "format": "uint32", - "type": "integer" - }, - "username": { - "description": "[Output Only] The username of the account.", - "type": "string" - } - }, - "type": "object" - }, - "LogConfig": { - "description": "Specifies what kind of log the caller must write", - "id": "LogConfig", - "properties": { - "counter": { - "$ref": "LogConfigCounterOptions", - "description": "Counter options." - } - }, - "type": "object" - }, - "LogConfigCounterOptions": { - "description": "Options for counters", - "id": "LogConfigCounterOptions", - "properties": { - "field": { - "description": "The field value to attribute.", - "type": "string" - }, - "metric": { - "description": "The metric to update.", - "type": "string" - } - }, - "type": "object" - }, - "Operation": { - "description": "An Operation resource, used to manage asynchronous API requests.", - "id": "Operation", - "properties": { - "clientOperationId": { - "description": "[Output Only] Reserved for future use.", - "type": "string" - }, - "creationTimestamp": { - "description": "[Output Only] Creation timestamp in RFC3339 text format.", - "type": "string" - }, - "description": { - "description": "[Output Only] A textual description of the operation, which is set when the operation is created.", - "type": "string" - }, - "endTime": { - "description": "[Output Only] The time that this operation was completed. This value is in RFC3339 text format.", - "type": "string" - }, - "error": { - "description": "[Output Only] If errors are generated during processing of the operation, this field will be populated.", - "properties": { - "errors": { - "description": "[Output Only] The array of errors encountered while processing this operation.", - "items": { - "properties": { - "code": { - "description": "[Output Only] The error type identifier for this error.", - "type": "string" - }, - "location": { - "description": "[Output Only] Indicates the field in the request that caused the error. This property is optional.", - "type": "string" - }, - "message": { - "description": "[Output Only] An optional, human-readable error message.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - } - }, - "type": "object" - }, - "httpErrorMessage": { - "description": "[Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.", - "type": "string" - }, - "httpErrorStatusCode": { - "description": "[Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a 404 means the resource was not found.", - "format": "int32", - "type": "integer" - }, - "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", - "format": "uint64", - "type": "string" - }, - "insertTime": { - "description": "[Output Only] The time that this operation was requested. This value is in RFC3339 text format.", - "type": "string" - }, - "kind": { - "default": "clouduseraccounts#operation", - "description": "[Output Only] Type of the resource. Always compute#operation for Operation resources.", - "type": "string" - }, - "name": { - "description": "[Output Only] Name of the resource.", - "type": "string" - }, - "operationType": { - "description": "[Output Only] The type of operation, such as insert, update, or delete, and so on.", - "type": "string" - }, - "progress": { - "description": "[Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.", - "format": "int32", - "type": "integer" - }, - "region": { - "description": "[Output Only] The URL of the region where the operation resides. Only available when performing regional operations.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for the resource.", - "type": "string" - }, - "startTime": { - "description": "[Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.", - "type": "string" - }, - "status": { - "description": "[Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.", - "enum": [ - "DONE", - "PENDING", - "RUNNING" - ], - "enumDescriptions": [ - "", - "", - "" - ], - "type": "string" - }, - "statusMessage": { - "description": "[Output Only] An optional textual description of the current status of the operation.", - "type": "string" - }, - "targetId": { - "description": "[Output Only] The unique target ID, which identifies a specific incarnation of the target resource.", - "format": "uint64", - "type": "string" - }, - "targetLink": { - "description": "[Output Only] The URL of the resource that the operation modifies.", - "type": "string" - }, - "user": { - "description": "[Output Only] User who requested the operation, for example: user@example.com.", - "type": "string" - }, - "warnings": { - "description": "[Output Only] If warning messages are generated during processing of the operation, this field will be populated.", - "items": { - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "INJECTED_KERNELS_DEPRECATED", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_NOT_DELETED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNREACHABLE" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "" - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "zone": { - "description": "[Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.", - "type": "string" - } - }, - "type": "object" - }, - "OperationList": { - "description": "Contains a list of Operation resources.", - "id": "OperationList", - "properties": { - "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", - "type": "string" - }, - "items": { - "description": "[Output Only] A list of Operation resources.", - "items": { - "$ref": "Operation" - }, - "type": "array" - }, - "kind": { - "default": "clouduseraccounts#operationList", - "description": "[Output Only] Type of resource. Always compute#operations for Operations resource.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - } - }, - "type": "object" - }, - "Policy": { - "description": "Defines an Identity and Access Management (IAM) policy. It is used to specify access control policies for Cloud Platform resources.\n\n\n\nA `Policy` consists of a list of `bindings`. A `Binding` binds a list of `members` to a `role`, where the members can be user accounts, Google groups, Google domains, and service accounts. A `role` is a named list of permissions defined by IAM.\n\n**Example**\n\n{ \"bindings\": [ { \"role\": \"roles/owner\", \"members\": [ \"user:mike@example.com\", \"group:admins@example.com\", \"domain:google.com\", \"serviceAccount:my-other-app@appspot.gserviceaccount.com\", ] }, { \"role\": \"roles/viewer\", \"members\": [\"user:sean@example.com\"] } ] }\n\nFor a description of IAM and its features, see the [IAM developer's guide](https://cloud.google.com/iam).", - "id": "Policy", - "properties": { - "auditConfigs": { - "description": "Specifies audit logging configs for \"data access\". \"data access\": generally refers to data reads/writes and admin reads. \"admin activity\": generally refers to admin writes.\n\nNote: `AuditConfig` doesn't apply to \"admin activity\", which always enables audit logging.", - "items": { - "$ref": "AuditConfig" - }, - "type": "array" - }, - "bindings": { - "description": "Associates a list of `members` to a `role`. Multiple `bindings` must not be specified for the same `role`. `bindings` with no members will result in an error.", - "items": { - "$ref": "Binding" - }, - "type": "array" - }, - "etag": { - "description": "`etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy.\n\nIf no `etag` is provided in the call to `setIamPolicy`, then the existing policy is overwritten blindly.", - "format": "byte", - "type": "string" - }, - "iamOwned": { - "description": "", - "type": "boolean" - }, - "rules": { - "description": "If more than one rule is specified, the rules are applied in the following manner: - All matching LOG rules are always applied. - If any DENY/DENY_WITH_LOG rule matches, permission is denied. Logging will be applied if one or more matching rule requires logging. - Otherwise, if any ALLOW/ALLOW_WITH_LOG rule matches, permission is granted. Logging will be applied if one or more matching rule requires logging. - Otherwise, if no rule applies, permission is denied.", - "items": { - "$ref": "Rule" - }, - "type": "array" - }, - "version": { - "description": "Version of the `Policy`. The default version is 0.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "PublicKey": { - "description": "A public key for authenticating to guests.", - "id": "PublicKey", - "properties": { - "creationTimestamp": { - "description": "[Output Only] Creation timestamp in RFC3339 text format.", - "type": "string" - }, - "description": { - "description": "An optional textual description of the resource; provided by the client when the resource is created.", - "type": "string" - }, - "expirationTimestamp": { - "description": "Optional expiration timestamp. If provided, the timestamp must be in RFC3339 text format. If not provided, the public key never expires.", - "type": "string" - }, - "fingerprint": { - "description": "[Output Only] The fingerprint of the key is defined by RFC4716 to be the MD5 digest of the public key.", - "type": "string" - }, - "key": { - "description": "Public key text in SSH format, defined by RFC4253 section 6.6.", - "type": "string" - } - }, - "type": "object" - }, - "Rule": { - "description": "A rule to be applied in a Policy.", - "id": "Rule", - "properties": { - "action": { - "description": "Required", - "enum": [ - "ALLOW", - "ALLOW_WITH_LOG", - "DENY", - "DENY_WITH_LOG", - "LOG", - "NO_ACTION" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "" - ], - "type": "string" - }, - "conditions": { - "description": "Additional restrictions that must be met", - "items": { - "$ref": "Condition" - }, - "type": "array" - }, - "description": { - "description": "Human-readable description of the rule.", - "type": "string" - }, - "ins": { - "description": "The rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is in this set of entries.", - "items": { - "type": "string" - }, - "type": "array" - }, - "logConfigs": { - "description": "The config returned to callers of tech.iam.IAM.CheckPolicy for any entries that match the LOG action.", - "items": { - "$ref": "LogConfig" - }, - "type": "array" - }, - "notIns": { - "description": "The rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is not in this set of entries.", - "items": { - "type": "string" - }, - "type": "array" - }, - "permissions": { - "description": "A permission is a string of form '..' (e.g., 'storage.buckets.list'). A value of '*' matches all permissions, and a verb part of '*' (e.g., 'storage.buckets.*') matches all verbs.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "TestPermissionsRequest": { - "id": "TestPermissionsRequest", - "properties": { - "permissions": { - "description": "The set of permissions to check for the 'resource'. Permissions with wildcards (such as '*' or 'storage.*') are not allowed.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "TestPermissionsResponse": { - "id": "TestPermissionsResponse", - "properties": { - "permissions": { - "description": "A subset of `TestPermissionsRequest.permissions` that the caller is allowed.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "User": { - "description": "A User resource.", - "id": "User", - "properties": { - "creationTimestamp": { - "description": "[Output Only] Creation timestamp in RFC3339 text format.", - "type": "string" - }, - "description": { - "description": "An optional textual description of the resource; provided by the client when the resource is created.", - "type": "string" - }, - "groups": { - "description": "[Output Only] A list of URLs to Group resources who contain the user. Users are only members of groups in the same project.", - "items": { - "type": "string" - }, - "type": "array" - }, - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "format": "uint64", - "type": "string" - }, - "kind": { - "default": "clouduseraccounts#user", - "description": "[Output Only] Type of the resource. Always clouduseraccounts#user for users.", - "type": "string" - }, - "name": { - "annotations": { - "required": [ - "clouduseraccounts.users.insert" - ] - }, - "description": "Name of the resource; provided by the client when the resource is created.", - "pattern": "[a-z][-a-z0-9_]{0,31}", - "type": "string" - }, - "owner": { - "annotations": { - "required": [ - "clouduseraccounts.users.insert" - ] - }, - "description": "Email address of account's owner. This account will be validated to make sure it exists. The email can belong to any domain, but it must be tied to a Google account.", - "type": "string" - }, - "publicKeys": { - "description": "[Output Only] Public keys that this user may use to login.", - "items": { - "$ref": "PublicKey" - }, - "type": "array" - }, - "selfLink": { - "description": "[Output Only] Server defined URL for the resource.", - "type": "string" - } - }, - "type": "object" - }, - "UserList": { - "id": "UserList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "[Output Only] A list of User resources.", - "items": { - "$ref": "User" - }, - "type": "array" - }, - "kind": { - "default": "clouduseraccounts#userList", - "description": "[Output Only] Type of resource. Always clouduseraccounts#userList for lists of users.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] A token used to continue a truncated list request.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server defined URL for this resource.", - "type": "string" - } - }, - "type": "object" - } - }, - "servicePath": "clouduseraccounts/vm_alpha/projects/", - "title": "Cloud User Accounts API", - "version": "vm_alpha" -} \ No newline at end of file
diff --git a/clouduseraccounts/vm_alpha/clouduseraccounts-gen.go b/clouduseraccounts/vm_alpha/clouduseraccounts-gen.go deleted file mode 100644 index 6408edc..0000000 --- a/clouduseraccounts/vm_alpha/clouduseraccounts-gen.go +++ /dev/null
@@ -1,5199 +0,0 @@ -// Package clouduseraccounts provides access to the Cloud User Accounts API. -// -// See https://cloud.google.com/compute/docs/access/user-accounts/api/latest/ -// -// Usage example: -// -// import "google.golang.org/api/clouduseraccounts/vm_alpha" -// ... -// clouduseraccountsService, err := clouduseraccounts.New(oauthHttpClient) -package clouduseraccounts // import "google.golang.org/api/clouduseraccounts/vm_alpha" - -import ( - "bytes" - "context" - "encoding/json" - "errors" - "fmt" - "io" - "net/http" - "net/url" - "strconv" - "strings" - - gensupport "google.golang.org/api/gensupport" - googleapi "google.golang.org/api/googleapi" -) - -// Always reference these packages, just in case the auto-generated code -// below doesn't. -var _ = bytes.NewBuffer -var _ = strconv.Itoa -var _ = fmt.Sprintf -var _ = json.NewDecoder -var _ = io.Copy -var _ = url.Parse -var _ = gensupport.MarshalJSON -var _ = googleapi.Version -var _ = errors.New -var _ = strings.Replace -var _ = context.Canceled - -const apiId = "clouduseraccounts:vm_alpha" -const apiName = "clouduseraccounts" -const apiVersion = "vm_alpha" -const basePath = "https://www.googleapis.com/clouduseraccounts/vm_alpha/projects/" - -// OAuth2 scopes used by this API. -const ( - // View and manage your data across Google Cloud Platform services - CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform" - - // View your data across Google Cloud Platform services - CloudPlatformReadOnlyScope = "https://www.googleapis.com/auth/cloud-platform.read-only" - - // Manage your Google Cloud User Accounts - CloudUseraccountsScope = "https://www.googleapis.com/auth/cloud.useraccounts" - - // View your Google Cloud User Accounts - CloudUseraccountsReadonlyScope = "https://www.googleapis.com/auth/cloud.useraccounts.readonly" -) - -func New(client *http.Client) (*Service, error) { - if client == nil { - return nil, errors.New("client is nil") - } - s := &Service{client: client, BasePath: basePath} - s.GlobalAccountsOperations = NewGlobalAccountsOperationsService(s) - s.Groups = NewGroupsService(s) - s.Linux = NewLinuxService(s) - s.Users = NewUsersService(s) - return s, nil -} - -type Service struct { - client *http.Client - BasePath string // API endpoint base URL - UserAgent string // optional additional User-Agent fragment - - GlobalAccountsOperations *GlobalAccountsOperationsService - - Groups *GroupsService - - Linux *LinuxService - - Users *UsersService -} - -func (s *Service) userAgent() string { - if s.UserAgent == "" { - return googleapi.UserAgent - } - return googleapi.UserAgent + " " + s.UserAgent -} - -func NewGlobalAccountsOperationsService(s *Service) *GlobalAccountsOperationsService { - rs := &GlobalAccountsOperationsService{s: s} - return rs -} - -type GlobalAccountsOperationsService struct { - s *Service -} - -func NewGroupsService(s *Service) *GroupsService { - rs := &GroupsService{s: s} - return rs -} - -type GroupsService struct { - s *Service -} - -func NewLinuxService(s *Service) *LinuxService { - rs := &LinuxService{s: s} - return rs -} - -type LinuxService struct { - s *Service -} - -func NewUsersService(s *Service) *UsersService { - rs := &UsersService{s: s} - return rs -} - -type UsersService struct { - s *Service -} - -// AuditConfig: Enables "data access" audit logging for a service and -// specifies a list of members that are log-exempted. -type AuditConfig struct { - // ExemptedMembers: Specifies the identities that are exempted from - // "data access" audit logging for the `service` specified above. - // Follows the same format of Binding.members. - ExemptedMembers []string `json:"exemptedMembers,omitempty"` - - // Service: Specifies a service that will be enabled for "data access" - // audit logging. For example, `resourcemanager`, `storage`, `compute`. - // `allServices` is a special value that covers all services. - Service string `json:"service,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ExemptedMembers") 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. "ExemptedMembers") 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 *AuditConfig) MarshalJSON() ([]byte, error) { - type NoMethod AuditConfig - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// AuthorizedKeysView: A list of authorized public keys for a user -// account. -type AuthorizedKeysView struct { - // Keys: [Output Only] The list of authorized public keys in SSH format. - Keys []string `json:"keys,omitempty"` - - // Sudoer: [Output Only] Whether the user has the ability to elevate on - // the instance that requested the authorized keys. - Sudoer bool `json:"sudoer,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Keys") 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. "Keys") 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 *AuthorizedKeysView) MarshalJSON() ([]byte, error) { - type NoMethod AuthorizedKeysView - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// Binding: Associates `members` with a `role`. -type Binding struct { - // Members: Specifies the identities requesting access for a Cloud - // Platform resource. `members` can have the following values: - // - // * `allUsers`: A special identifier that represents anyone who is on - // the internet; with or without a Google account. - // - // * `allAuthenticatedUsers`: A special identifier that represents - // anyone who is authenticated with a Google account or a service - // account. - // - // * `user:{emailid}`: An email address that represents a specific - // Google account. For example, `alice@gmail.com` or - // `joe@example.com`. - // - // * `serviceAccount:{emailid}`: An email address that represents a - // service account. For example, - // `my-other-app@appspot.gserviceaccount.com`. - // - // * `group:{emailid}`: An email address that represents a Google group. - // For example, `admins@example.com`. - // - // * `domain:{domain}`: A Google Apps domain name that represents all - // the users of that domain. For example, `google.com` or `example.com`. - Members []string `json:"members,omitempty"` - - // Role: Role that is assigned to `members`. For example, - // `roles/viewer`, `roles/editor`, or `roles/owner`. - Role string `json:"role,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Members") 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. "Members") 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 *Binding) MarshalJSON() ([]byte, error) { - type NoMethod Binding - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// Condition: A condition to be met. -type Condition struct { - // Iam: Trusted attributes supplied by the IAM system. - // - // Possible values: - // "ATTRIBUTION" - // "AUTHORITY" - // "NO_ATTR" - Iam string `json:"iam,omitempty"` - - // Op: An operator to apply the subject with. - // - // Possible values: - // "DISCHARGED" - // "EQUALS" - // "IN" - // "NOT_EQUALS" - // "NOT_IN" - // "NO_OP" - Op string `json:"op,omitempty"` - - // Svc: Trusted attributes discharged by the service. - Svc string `json:"svc,omitempty"` - - // Sys: Trusted attributes supplied by any service that owns resources - // and uses the IAM system for access control. - // - // Possible values: - // "IP" - // "NAME" - // "NO_ATTR" - // "REGION" - // "SERVICE" - Sys string `json:"sys,omitempty"` - - // Value: The object of the condition. Exactly one of these must be set. - Value string `json:"value,omitempty"` - - // Values: The objects of the condition. This is mutually exclusive with - // 'value'. - Values []string `json:"values,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Iam") 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. "Iam") 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 *Condition) MarshalJSON() ([]byte, error) { - type NoMethod Condition - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// Group: A Group resource. -type Group struct { - // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text - // format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - - // Description: An optional textual description of the resource; - // provided by the client when the resource is created. - Description string `json:"description,omitempty"` - - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id uint64 `json:"id,omitempty,string"` - - // Kind: [Output Only] Type of the resource. Always - // clouduseraccounts#group for groups. - Kind string `json:"kind,omitempty"` - - // Members: [Output Only] A list of URLs to User resources who belong to - // the group. Users may only be members of groups in the same project. - Members []string `json:"members,omitempty"` - - // Name: Name of the resource; provided by the client when the resource - // is created. - Name string `json:"name,omitempty"` - - // SelfLink: [Output Only] Server defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "CreationTimestamp") - // 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. "CreationTimestamp") 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 *Group) MarshalJSON() ([]byte, error) { - type NoMethod Group - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type GroupList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: [Output Only] A list of Group resources. - Items []*Group `json:"items,omitempty"` - - // Kind: [Output Only] Type of resource. Always - // clouduseraccounts#groupList for lists of groups. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] A token used to continue a truncated - // list request. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") 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. "Id") 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 *GroupList) MarshalJSON() ([]byte, error) { - type NoMethod GroupList - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type GroupsAddMemberRequest struct { - // Users: Fully-qualified URLs of the User resources to add. - Users []string `json:"users,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Users") 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. "Users") 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 *GroupsAddMemberRequest) MarshalJSON() ([]byte, error) { - type NoMethod GroupsAddMemberRequest - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type GroupsRemoveMemberRequest struct { - // Users: Fully-qualified URLs of the User resources to remove. - Users []string `json:"users,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Users") 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. "Users") 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 *GroupsRemoveMemberRequest) MarshalJSON() ([]byte, error) { - type NoMethod GroupsRemoveMemberRequest - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// LinuxAccountViews: A list of all Linux accounts for this project. -// This API is only used by Compute Engine virtual machines to get -// information about user accounts for a project or instance. Linux -// resources are read-only views into users and groups managed by the -// Compute Engine Accounts API. -type LinuxAccountViews struct { - // GroupViews: [Output Only] A list of all groups within a project. - GroupViews []*LinuxGroupView `json:"groupViews,omitempty"` - - // Kind: [Output Only] Type of the resource. Always - // clouduseraccounts#linuxAccountViews for Linux resources. - Kind string `json:"kind,omitempty"` - - // UserViews: [Output Only] A list of all users within a project. - UserViews []*LinuxUserView `json:"userViews,omitempty"` - - // ForceSendFields is a list of field names (e.g. "GroupViews") 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. "GroupViews") 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 *LinuxAccountViews) MarshalJSON() ([]byte, error) { - type NoMethod LinuxAccountViews - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type LinuxGetAuthorizedKeysViewResponse struct { - // Resource: [Output Only] A list of authorized public keys for a user. - Resource *AuthorizedKeysView `json:"resource,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Resource") 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. "Resource") 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 *LinuxGetAuthorizedKeysViewResponse) MarshalJSON() ([]byte, error) { - type NoMethod LinuxGetAuthorizedKeysViewResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type LinuxGetLinuxAccountViewsResponse struct { - // Resource: [Output Only] A list of authorized user accounts and - // groups. - Resource *LinuxAccountViews `json:"resource,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Resource") 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. "Resource") 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 *LinuxGetLinuxAccountViewsResponse) MarshalJSON() ([]byte, error) { - type NoMethod LinuxGetLinuxAccountViewsResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// LinuxGroupView: A detailed view of a Linux group. -type LinuxGroupView struct { - // Gid: [Output Only] The Group ID. - Gid int64 `json:"gid,omitempty"` - - // GroupName: [Output Only] Group name. - GroupName string `json:"groupName,omitempty"` - - // Members: [Output Only] List of user accounts that belong to the - // group. - Members []string `json:"members,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Gid") 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. "Gid") 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 *LinuxGroupView) MarshalJSON() ([]byte, error) { - type NoMethod LinuxGroupView - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// LinuxUserView: A detailed view of a Linux user account. -type LinuxUserView struct { - // Gecos: [Output Only] The GECOS (user information) entry for this - // account. - Gecos string `json:"gecos,omitempty"` - - // Gid: [Output Only] User's default group ID. - Gid int64 `json:"gid,omitempty"` - - // HomeDirectory: [Output Only] The path to the home directory for this - // account. - HomeDirectory string `json:"homeDirectory,omitempty"` - - // Shell: [Output Only] The path to the login shell for this account. - Shell string `json:"shell,omitempty"` - - // Uid: [Output Only] User ID. - Uid int64 `json:"uid,omitempty"` - - // Username: [Output Only] The username of the account. - Username string `json:"username,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Gecos") 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. "Gecos") 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 *LinuxUserView) MarshalJSON() ([]byte, error) { - type NoMethod LinuxUserView - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// LogConfig: Specifies what kind of log the caller must write -type LogConfig struct { - // Counter: Counter options. - Counter *LogConfigCounterOptions `json:"counter,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Counter") 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. "Counter") 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 *LogConfig) MarshalJSON() ([]byte, error) { - type NoMethod LogConfig - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// LogConfigCounterOptions: Options for counters -type LogConfigCounterOptions struct { - // Field: The field value to attribute. - Field string `json:"field,omitempty"` - - // Metric: The metric to update. - Metric string `json:"metric,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Field") 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. "Field") 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 *LogConfigCounterOptions) MarshalJSON() ([]byte, error) { - type NoMethod LogConfigCounterOptions - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// Operation: An Operation resource, used to manage asynchronous API -// requests. -type Operation struct { - // ClientOperationId: [Output Only] Reserved for future use. - ClientOperationId string `json:"clientOperationId,omitempty"` - - // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text - // format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - - // Description: [Output Only] A textual description of the operation, - // which is set when the operation is created. - Description string `json:"description,omitempty"` - - // EndTime: [Output Only] The time that this operation was completed. - // This value is in RFC3339 text format. - EndTime string `json:"endTime,omitempty"` - - // Error: [Output Only] If errors are generated during processing of the - // operation, this field will be populated. - Error *OperationError `json:"error,omitempty"` - - // HttpErrorMessage: [Output Only] If the operation fails, this field - // contains the HTTP error message that was returned, such as NOT FOUND. - HttpErrorMessage string `json:"httpErrorMessage,omitempty"` - - // HttpErrorStatusCode: [Output Only] If the operation fails, this field - // contains the HTTP error status code that was returned. For example, a - // 404 means the resource was not found. - HttpErrorStatusCode int64 `json:"httpErrorStatusCode,omitempty"` - - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. - Id uint64 `json:"id,omitempty,string"` - - // InsertTime: [Output Only] The time that this operation was requested. - // This value is in RFC3339 text format. - InsertTime string `json:"insertTime,omitempty"` - - // Kind: [Output Only] Type of the resource. Always compute#operation - // for Operation resources. - Kind string `json:"kind,omitempty"` - - // Name: [Output Only] Name of the resource. - Name string `json:"name,omitempty"` - - // OperationType: [Output Only] The type of operation, such as insert, - // update, or delete, and so on. - OperationType string `json:"operationType,omitempty"` - - // Progress: [Output Only] An optional progress indicator that ranges - // from 0 to 100. There is no requirement that this be linear or support - // any granularity of operations. This should not be used to guess when - // the operation will be complete. This number should monotonically - // increase as the operation progresses. - Progress int64 `json:"progress,omitempty"` - - // Region: [Output Only] The URL of the region where the operation - // resides. Only available when performing regional operations. - Region string `json:"region,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - - // StartTime: [Output Only] The time that this operation was started by - // the server. This value is in RFC3339 text format. - StartTime string `json:"startTime,omitempty"` - - // Status: [Output Only] The status of the operation, which can be one - // of the following: PENDING, RUNNING, or DONE. - // - // Possible values: - // "DONE" - // "PENDING" - // "RUNNING" - Status string `json:"status,omitempty"` - - // StatusMessage: [Output Only] An optional textual description of the - // current status of the operation. - StatusMessage string `json:"statusMessage,omitempty"` - - // TargetId: [Output Only] The unique target ID, which identifies a - // specific incarnation of the target resource. - TargetId uint64 `json:"targetId,omitempty,string"` - - // TargetLink: [Output Only] The URL of the resource that the operation - // modifies. - TargetLink string `json:"targetLink,omitempty"` - - // User: [Output Only] User who requested the operation, for example: - // user@example.com. - User string `json:"user,omitempty"` - - // Warnings: [Output Only] If warning messages are generated during - // processing of the operation, this field will be populated. - Warnings []*OperationWarnings `json:"warnings,omitempty"` - - // Zone: [Output Only] The URL of the zone where the operation resides. - // Only available when performing per-zone operations. - Zone string `json:"zone,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "ClientOperationId") - // 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. "ClientOperationId") 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 *Operation) MarshalJSON() ([]byte, error) { - type NoMethod Operation - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// OperationError: [Output Only] If errors are generated during -// processing of the operation, this field will be populated. -type OperationError struct { - // Errors: [Output Only] The array of errors encountered while - // processing this operation. - Errors []*OperationErrorErrors `json:"errors,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Errors") 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. "Errors") 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 *OperationError) MarshalJSON() ([]byte, error) { - type NoMethod OperationError - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type OperationErrorErrors struct { - // Code: [Output Only] The error type identifier for this error. - Code string `json:"code,omitempty"` - - // Location: [Output Only] Indicates the field in the request that - // caused the error. This property is optional. - Location string `json:"location,omitempty"` - - // Message: [Output Only] An optional, human-readable error message. - Message string `json:"message,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Code") 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. "Code") 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 *OperationErrorErrors) MarshalJSON() ([]byte, error) { - type NoMethod OperationErrorErrors - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type OperationWarnings struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in - // the response. - // - // Possible values: - // "CLEANUP_FAILED" - // "DEPRECATED_RESOURCE_USED" - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - // "INJECTED_KERNELS_DEPRECATED" - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - // "NEXT_HOP_CANNOT_IP_FORWARD" - // "NEXT_HOP_INSTANCE_NOT_FOUND" - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - // "NEXT_HOP_NOT_RUNNING" - // "NOT_CRITICAL_ERROR" - // "NO_RESULTS_ON_PAGE" - // "REQUIRED_TOS_AGREEMENT" - // "RESOURCE_NOT_DELETED" - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - // "UNREACHABLE" - Code string `json:"code,omitempty"` - - // Data: [Output Only] Metadata about this warning in key: value format. - // For example: - // "data": [ { "key": "scope", "value": "zones/us-east1-d" } - Data []*OperationWarningsData `json:"data,omitempty"` - - // Message: [Output Only] A human-readable description of the warning - // code. - Message string `json:"message,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Code") 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. "Code") 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 *OperationWarnings) MarshalJSON() ([]byte, error) { - type NoMethod OperationWarnings - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type OperationWarningsData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being returned. For example, for warnings where there are no results - // in a list request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP - // forwarding). - Key string `json:"key,omitempty"` - - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Key") 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. "Key") 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 *OperationWarningsData) MarshalJSON() ([]byte, error) { - type NoMethod OperationWarningsData - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// OperationList: Contains a list of Operation resources. -type OperationList struct { - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. - Id string `json:"id,omitempty"` - - // Items: [Output Only] A list of Operation resources. - Items []*Operation `json:"items,omitempty"` - - // Kind: [Output Only] Type of resource. Always compute#operations for - // Operations resource. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") 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. "Id") 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 *OperationList) MarshalJSON() ([]byte, error) { - type NoMethod OperationList - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// Policy: Defines an Identity and Access Management (IAM) policy. It is -// used to specify access control policies for Cloud Platform -// resources. -// -// -// -// A `Policy` consists of a list of `bindings`. A `Binding` binds a list -// of `members` to a `role`, where the members can be user accounts, -// Google groups, Google domains, and service accounts. A `role` is a -// named list of permissions defined by IAM. -// -// **Example** -// -// { "bindings": [ { "role": "roles/owner", "members": [ -// "user:mike@example.com", "group:admins@example.com", -// "domain:google.com", -// "serviceAccount:my-other-app@appspot.gserviceaccount.com", ] }, { -// "role": "roles/viewer", "members": ["user:sean@example.com"] } ] -// } -// -// For a description of IAM and its features, see the [IAM developer's -// guide](https://cloud.google.com/iam). -type Policy struct { - // AuditConfigs: Specifies audit logging configs for "data access". - // "data access": generally refers to data reads/writes and admin reads. - // "admin activity": generally refers to admin writes. - // - // Note: `AuditConfig` doesn't apply to "admin activity", which always - // enables audit logging. - AuditConfigs []*AuditConfig `json:"auditConfigs,omitempty"` - - // Bindings: Associates a list of `members` to a `role`. Multiple - // `bindings` must not be specified for the same `role`. `bindings` with - // no members will result in an error. - Bindings []*Binding `json:"bindings,omitempty"` - - // Etag: `etag` is used for optimistic concurrency control as a way to - // help prevent simultaneous updates of a policy from overwriting each - // other. It is strongly suggested that systems make use of the `etag` - // in the read-modify-write cycle to perform policy updates in order to - // avoid race conditions: An `etag` is returned in the response to - // `getIamPolicy`, and systems are expected to put that etag in the - // request to `setIamPolicy` to ensure that their change will be applied - // to the same version of the policy. - // - // If no `etag` is provided in the call to `setIamPolicy`, then the - // existing policy is overwritten blindly. - Etag string `json:"etag,omitempty"` - - IamOwned bool `json:"iamOwned,omitempty"` - - // Rules: If more than one rule is specified, the rules are applied in - // the following manner: - All matching LOG rules are always applied. - - // If any DENY/DENY_WITH_LOG rule matches, permission is denied. Logging - // will be applied if one or more matching rule requires logging. - - // Otherwise, if any ALLOW/ALLOW_WITH_LOG rule matches, permission is - // granted. Logging will be applied if one or more matching rule - // requires logging. - Otherwise, if no rule applies, permission is - // denied. - Rules []*Rule `json:"rules,omitempty"` - - // Version: Version of the `Policy`. The default version is 0. - Version int64 `json:"version,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "AuditConfigs") 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. "AuditConfigs") 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 *Policy) MarshalJSON() ([]byte, error) { - type NoMethod Policy - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// PublicKey: A public key for authenticating to guests. -type PublicKey struct { - // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text - // format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - - // Description: An optional textual description of the resource; - // provided by the client when the resource is created. - Description string `json:"description,omitempty"` - - // ExpirationTimestamp: Optional expiration timestamp. If provided, the - // timestamp must be in RFC3339 text format. If not provided, the public - // key never expires. - ExpirationTimestamp string `json:"expirationTimestamp,omitempty"` - - // Fingerprint: [Output Only] The fingerprint of the key is defined by - // RFC4716 to be the MD5 digest of the public key. - Fingerprint string `json:"fingerprint,omitempty"` - - // Key: Public key text in SSH format, defined by RFC4253 section 6.6. - Key string `json:"key,omitempty"` - - // ForceSendFields is a list of field names (e.g. "CreationTimestamp") - // 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. "CreationTimestamp") 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 *PublicKey) MarshalJSON() ([]byte, error) { - type NoMethod PublicKey - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// Rule: A rule to be applied in a Policy. -type Rule struct { - // Action: Required - // - // Possible values: - // "ALLOW" - // "ALLOW_WITH_LOG" - // "DENY" - // "DENY_WITH_LOG" - // "LOG" - // "NO_ACTION" - Action string `json:"action,omitempty"` - - // Conditions: Additional restrictions that must be met - Conditions []*Condition `json:"conditions,omitempty"` - - // Description: Human-readable description of the rule. - Description string `json:"description,omitempty"` - - // Ins: The rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is in this - // set of entries. - Ins []string `json:"ins,omitempty"` - - // LogConfigs: The config returned to callers of - // tech.iam.IAM.CheckPolicy for any entries that match the LOG action. - LogConfigs []*LogConfig `json:"logConfigs,omitempty"` - - // NotIns: The rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is not - // in this set of entries. - NotIns []string `json:"notIns,omitempty"` - - // Permissions: A permission is a string of form '..' (e.g., - // 'storage.buckets.list'). A value of '*' matches all permissions, and - // a verb part of '*' (e.g., 'storage.buckets.*') matches all verbs. - Permissions []string `json:"permissions,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Action") 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. "Action") 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 *Rule) MarshalJSON() ([]byte, error) { - type NoMethod Rule - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type TestPermissionsRequest struct { - // Permissions: The set of permissions to check for the 'resource'. - // Permissions with wildcards (such as '*' or 'storage.*') are not - // allowed. - Permissions []string `json:"permissions,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Permissions") 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. "Permissions") 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 *TestPermissionsRequest) MarshalJSON() ([]byte, error) { - type NoMethod TestPermissionsRequest - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type TestPermissionsResponse struct { - // Permissions: A subset of `TestPermissionsRequest.permissions` that - // the caller is allowed. - Permissions []string `json:"permissions,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Permissions") 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. "Permissions") 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 *TestPermissionsResponse) MarshalJSON() ([]byte, error) { - type NoMethod TestPermissionsResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// User: A User resource. -type User struct { - // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text - // format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - - // Description: An optional textual description of the resource; - // provided by the client when the resource is created. - Description string `json:"description,omitempty"` - - // Groups: [Output Only] A list of URLs to Group resources who contain - // the user. Users are only members of groups in the same project. - Groups []string `json:"groups,omitempty"` - - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id uint64 `json:"id,omitempty,string"` - - // Kind: [Output Only] Type of the resource. Always - // clouduseraccounts#user for users. - Kind string `json:"kind,omitempty"` - - // Name: Name of the resource; provided by the client when the resource - // is created. - Name string `json:"name,omitempty"` - - // Owner: Email address of account's owner. This account will be - // validated to make sure it exists. The email can belong to any domain, - // but it must be tied to a Google account. - Owner string `json:"owner,omitempty"` - - // PublicKeys: [Output Only] Public keys that this user may use to - // login. - PublicKeys []*PublicKey `json:"publicKeys,omitempty"` - - // SelfLink: [Output Only] Server defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "CreationTimestamp") - // 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. "CreationTimestamp") 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 *User) MarshalJSON() ([]byte, error) { - type NoMethod User - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type UserList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: [Output Only] A list of User resources. - Items []*User `json:"items,omitempty"` - - // Kind: [Output Only] Type of resource. Always - // clouduseraccounts#userList for lists of users. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] A token used to continue a truncated - // list request. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") 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. "Id") 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 *UserList) MarshalJSON() ([]byte, error) { - type NoMethod UserList - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// method id "clouduseraccounts.globalAccountsOperations.delete": - -type GlobalAccountsOperationsDeleteCall struct { - s *Service - project string - operation string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified operation resource. -func (r *GlobalAccountsOperationsService) Delete(project string, operation string) *GlobalAccountsOperationsDeleteCall { - c := &GlobalAccountsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.operation = operation - 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 *GlobalAccountsOperationsDeleteCall) Fields(s ...googleapi.Field) *GlobalAccountsOperationsDeleteCall { - 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 *GlobalAccountsOperationsDeleteCall) Context(ctx context.Context) *GlobalAccountsOperationsDeleteCall { - 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 *GlobalAccountsOperationsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GlobalAccountsOperationsDeleteCall) 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 - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/operations/{operation}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("DELETE", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "operation": c.operation, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "clouduseraccounts.globalAccountsOperations.delete" call. -func (c *GlobalAccountsOperationsDeleteCall) Do(opts ...googleapi.CallOption) error { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if err != nil { - return err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return err - } - return nil - // { - // "description": "Deletes the specified operation resource.", - // "httpMethod": "DELETE", - // "id": "clouduseraccounts.globalAccountsOperations.delete", - // "parameterOrder": [ - // "project", - // "operation" - // ], - // "parameters": { - // "operation": { - // "description": "Name of the Operations resource to delete.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/operations/{operation}", - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/cloud.useraccounts" - // ] - // } - -} - -// method id "clouduseraccounts.globalAccountsOperations.get": - -type GlobalAccountsOperationsGetCall struct { - s *Service - project string - operation string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Retrieves the specified operation resource. -func (r *GlobalAccountsOperationsService) Get(project string, operation string) *GlobalAccountsOperationsGetCall { - c := &GlobalAccountsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.operation = operation - 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 *GlobalAccountsOperationsGetCall) Fields(s ...googleapi.Field) *GlobalAccountsOperationsGetCall { - 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 *GlobalAccountsOperationsGetCall) IfNoneMatch(entityTag string) *GlobalAccountsOperationsGetCall { - 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 *GlobalAccountsOperationsGetCall) Context(ctx context.Context) *GlobalAccountsOperationsGetCall { - 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 *GlobalAccountsOperationsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GlobalAccountsOperationsGetCall) 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, "{project}/global/operations/{operation}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "operation": c.operation, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "clouduseraccounts.globalAccountsOperations.get" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.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 *GlobalAccountsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, 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 := &Operation{ - 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": "Retrieves the specified operation resource.", - // "httpMethod": "GET", - // "id": "clouduseraccounts.globalAccountsOperations.get", - // "parameterOrder": [ - // "project", - // "operation" - // ], - // "parameters": { - // "operation": { - // "description": "Name of the Operations resource to return.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/operations/{operation}", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/cloud-platform.read-only", - // "https://www.googleapis.com/auth/cloud.useraccounts", - // "https://www.googleapis.com/auth/cloud.useraccounts.readonly" - // ] - // } - -} - -// method id "clouduseraccounts.globalAccountsOperations.list": - -type GlobalAccountsOperationsListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of operation resources contained within the -// specified project. -func (r *GlobalAccountsOperationsService) List(project string) *GlobalAccountsOperationsListCall { - c := &GlobalAccountsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": Sets a filter expression -// for filtering listed resources, in the form filter={expression}. Your -// {expression} must be in the format: field_name comparison_string -// literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use filter=name ne -// example-instance. -// -// Compute Engine Beta API Only: If you use filtering in the Beta API, -// you can also filter on nested fields. For example, you could filter -// on instances that have set the scheduling.automaticRestart field to -// true. In particular, use filtering on nested fields to take advantage -// of instance labels to organize and filter results based on label -// values. -// -// The Beta API also supports filtering on multiple expressions by -// providing each separate expression within parentheses. For example, -// (scheduling.automaticRestart eq true) (zone eq us-central1-f). -// Multiple expressions are treated as AND expressions, meaning that -// resources must match all expressions to pass the filters. -func (c *GlobalAccountsOperationsListCall) Filter(filter string) *GlobalAccountsOperationsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. -func (c *GlobalAccountsOperationsListCall) MaxResults(maxResults int64) *GlobalAccountsOperationsListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *GlobalAccountsOperationsListCall) OrderBy(orderBy string) *GlobalAccountsOperationsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *GlobalAccountsOperationsListCall) PageToken(pageToken string) *GlobalAccountsOperationsListCall { - 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 *GlobalAccountsOperationsListCall) Fields(s ...googleapi.Field) *GlobalAccountsOperationsListCall { - 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 *GlobalAccountsOperationsListCall) IfNoneMatch(entityTag string) *GlobalAccountsOperationsListCall { - 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 *GlobalAccountsOperationsListCall) Context(ctx context.Context) *GlobalAccountsOperationsListCall { - 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 *GlobalAccountsOperationsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GlobalAccountsOperationsListCall) 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, "{project}/global/operations") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "clouduseraccounts.globalAccountsOperations.list" call. -// Exactly one of *OperationList or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *OperationList.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 *GlobalAccountsOperationsListCall) Do(opts ...googleapi.CallOption) (*OperationList, 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 := &OperationList{ - 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": "Retrieves the list of operation resources contained within the specified project.", - // "httpMethod": "GET", - // "id": "clouduseraccounts.globalAccountsOperations.list", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", - // "format": "uint32", - // "location": "query", - // "maximum": "500", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/operations", - // "response": { - // "$ref": "OperationList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/cloud-platform.read-only", - // "https://www.googleapis.com/auth/cloud.useraccounts", - // "https://www.googleapis.com/auth/cloud.useraccounts.readonly" - // ] - // } - -} - -// 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 *GlobalAccountsOperationsListCall) Pages(ctx context.Context, f func(*OperationList) 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 "clouduseraccounts.groups.addMember": - -type GroupsAddMemberCall struct { - s *Service - project string - groupName string - groupsaddmemberrequest *GroupsAddMemberRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// AddMember: Adds users to the specified group. -func (r *GroupsService) AddMember(project string, groupName string, groupsaddmemberrequest *GroupsAddMemberRequest) *GroupsAddMemberCall { - c := &GroupsAddMemberCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.groupName = groupName - c.groupsaddmemberrequest = groupsaddmemberrequest - 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 *GroupsAddMemberCall) Fields(s ...googleapi.Field) *GroupsAddMemberCall { - 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 *GroupsAddMemberCall) Context(ctx context.Context) *GroupsAddMemberCall { - 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 *GroupsAddMemberCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GroupsAddMemberCall) 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.groupsaddmemberrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/groups/{groupName}/addMember") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "groupName": c.groupName, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "clouduseraccounts.groups.addMember" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.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 *GroupsAddMemberCall) Do(opts ...googleapi.CallOption) (*Operation, 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 := &Operation{ - 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": "Adds users to the specified group.", - // "httpMethod": "POST", - // "id": "clouduseraccounts.groups.addMember", - // "parameterOrder": [ - // "project", - // "groupName" - // ], - // "parameters": { - // "groupName": { - // "description": "Name of the group for this request.", - // "location": "path", - // "pattern": "[a-z][-a-z0-9_]{0,31}", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/groups/{groupName}/addMember", - // "request": { - // "$ref": "GroupsAddMemberRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/cloud.useraccounts" - // ] - // } - -} - -// method id "clouduseraccounts.groups.delete": - -type GroupsDeleteCall struct { - s *Service - project string - groupName string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified Group resource. -func (r *GroupsService) Delete(project string, groupName string) *GroupsDeleteCall { - c := &GroupsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.groupName = groupName - 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 *GroupsDeleteCall) Fields(s ...googleapi.Field) *GroupsDeleteCall { - 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 *GroupsDeleteCall) Context(ctx context.Context) *GroupsDeleteCall { - 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 *GroupsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GroupsDeleteCall) 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 - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/groups/{groupName}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("DELETE", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "groupName": c.groupName, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "clouduseraccounts.groups.delete" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.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 *GroupsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, 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 := &Operation{ - 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": "Deletes the specified Group resource.", - // "httpMethod": "DELETE", - // "id": "clouduseraccounts.groups.delete", - // "parameterOrder": [ - // "project", - // "groupName" - // ], - // "parameters": { - // "groupName": { - // "description": "Name of the Group resource to delete.", - // "location": "path", - // "pattern": "[a-z][-a-z0-9_]{0,31}", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/groups/{groupName}", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/cloud.useraccounts" - // ] - // } - -} - -// method id "clouduseraccounts.groups.get": - -type GroupsGetCall struct { - s *Service - project string - groupName string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified Group resource. -func (r *GroupsService) Get(project string, groupName string) *GroupsGetCall { - c := &GroupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.groupName = groupName - 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 *GroupsGetCall) Fields(s ...googleapi.Field) *GroupsGetCall { - 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 *GroupsGetCall) IfNoneMatch(entityTag string) *GroupsGetCall { - 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 *GroupsGetCall) Context(ctx context.Context) *GroupsGetCall { - 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 *GroupsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GroupsGetCall) 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, "{project}/global/groups/{groupName}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "groupName": c.groupName, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "clouduseraccounts.groups.get" call. -// Exactly one of *Group or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Group.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 *GroupsGetCall) Do(opts ...googleapi.CallOption) (*Group, 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 := &Group{ - 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": "Returns the specified Group resource.", - // "httpMethod": "GET", - // "id": "clouduseraccounts.groups.get", - // "parameterOrder": [ - // "project", - // "groupName" - // ], - // "parameters": { - // "groupName": { - // "description": "Name of the Group resource to return.", - // "location": "path", - // "pattern": "[a-z][-a-z0-9_]{0,31}", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/groups/{groupName}", - // "response": { - // "$ref": "Group" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/cloud-platform.read-only", - // "https://www.googleapis.com/auth/cloud.useraccounts", - // "https://www.googleapis.com/auth/cloud.useraccounts.readonly" - // ] - // } - -} - -// method id "clouduseraccounts.groups.getIamPolicy": - -type GroupsGetIamPolicyCall struct { - s *Service - project string - resource string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetIamPolicy: Gets the access control policy for a resource. May be -// empty if no such policy or resource exists. -func (r *GroupsService) GetIamPolicy(project string, resource string) *GroupsGetIamPolicyCall { - c := &GroupsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - 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 *GroupsGetIamPolicyCall) Fields(s ...googleapi.Field) *GroupsGetIamPolicyCall { - 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 *GroupsGetIamPolicyCall) IfNoneMatch(entityTag string) *GroupsGetIamPolicyCall { - 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 *GroupsGetIamPolicyCall) Context(ctx context.Context) *GroupsGetIamPolicyCall { - 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 *GroupsGetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GroupsGetIamPolicyCall) 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, "{project}/global/groups/{resource}/getIamPolicy") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "resource": c.resource, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "clouduseraccounts.groups.getIamPolicy" call. -// Exactly one of *Policy or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Policy.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 *GroupsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, 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 := &Policy{ - 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": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.", - // "httpMethod": "GET", - // "id": "clouduseraccounts.groups.getIamPolicy", - // "parameterOrder": [ - // "project", - // "resource" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "resource": { - // "description": "Name of the resource for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/groups/{resource}/getIamPolicy", - // "response": { - // "$ref": "Policy" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/cloud-platform.read-only", - // "https://www.googleapis.com/auth/cloud.useraccounts", - // "https://www.googleapis.com/auth/cloud.useraccounts.readonly" - // ] - // } - -} - -// method id "clouduseraccounts.groups.insert": - -type GroupsInsertCall struct { - s *Service - project string - group *Group - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a Group resource in the specified project using the -// data included in the request. -func (r *GroupsService) Insert(project string, group *Group) *GroupsInsertCall { - c := &GroupsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.group = group - 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 *GroupsInsertCall) Fields(s ...googleapi.Field) *GroupsInsertCall { - 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 *GroupsInsertCall) Context(ctx context.Context) *GroupsInsertCall { - 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 *GroupsInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GroupsInsertCall) 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.group) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/groups") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "clouduseraccounts.groups.insert" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.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 *GroupsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, 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 := &Operation{ - 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": "Creates a Group resource in the specified project using the data included in the request.", - // "httpMethod": "POST", - // "id": "clouduseraccounts.groups.insert", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/groups", - // "request": { - // "$ref": "Group" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/cloud.useraccounts" - // ] - // } - -} - -// method id "clouduseraccounts.groups.list": - -type GroupsListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of groups contained within the specified -// project. -func (r *GroupsService) List(project string) *GroupsListCall { - c := &GroupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": Sets a filter expression -// for filtering listed resources, in the form filter={expression}. Your -// {expression} must be in the format: field_name comparison_string -// literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use filter=name ne -// example-instance. -// -// Compute Engine Beta API Only: If you use filtering in the Beta API, -// you can also filter on nested fields. For example, you could filter -// on instances that have set the scheduling.automaticRestart field to -// true. In particular, use filtering on nested fields to take advantage -// of instance labels to organize and filter results based on label -// values. -// -// The Beta API also supports filtering on multiple expressions by -// providing each separate expression within parentheses. For example, -// (scheduling.automaticRestart eq true) (zone eq us-central1-f). -// Multiple expressions are treated as AND expressions, meaning that -// resources must match all expressions to pass the filters. -func (c *GroupsListCall) Filter(filter string) *GroupsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. -func (c *GroupsListCall) MaxResults(maxResults int64) *GroupsListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *GroupsListCall) OrderBy(orderBy string) *GroupsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *GroupsListCall) PageToken(pageToken string) *GroupsListCall { - 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 *GroupsListCall) Fields(s ...googleapi.Field) *GroupsListCall { - 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 *GroupsListCall) IfNoneMatch(entityTag string) *GroupsListCall { - 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 *GroupsListCall) Context(ctx context.Context) *GroupsListCall { - 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 *GroupsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GroupsListCall) 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, "{project}/global/groups") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "clouduseraccounts.groups.list" call. -// Exactly one of *GroupList or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *GroupList.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 *GroupsListCall) Do(opts ...googleapi.CallOption) (*GroupList, 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 := &GroupList{ - 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": "Retrieves the list of groups contained within the specified project.", - // "httpMethod": "GET", - // "id": "clouduseraccounts.groups.list", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", - // "format": "uint32", - // "location": "query", - // "maximum": "500", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/groups", - // "response": { - // "$ref": "GroupList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/cloud-platform.read-only", - // "https://www.googleapis.com/auth/cloud.useraccounts", - // "https://www.googleapis.com/auth/cloud.useraccounts.readonly" - // ] - // } - -} - -// 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 *GroupsListCall) Pages(ctx context.Context, f func(*GroupList) 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 "clouduseraccounts.groups.removeMember": - -type GroupsRemoveMemberCall struct { - s *Service - project string - groupName string - groupsremovememberrequest *GroupsRemoveMemberRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// RemoveMember: Removes users from the specified group. -func (r *GroupsService) RemoveMember(project string, groupName string, groupsremovememberrequest *GroupsRemoveMemberRequest) *GroupsRemoveMemberCall { - c := &GroupsRemoveMemberCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.groupName = groupName - c.groupsremovememberrequest = groupsremovememberrequest - 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 *GroupsRemoveMemberCall) Fields(s ...googleapi.Field) *GroupsRemoveMemberCall { - 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 *GroupsRemoveMemberCall) Context(ctx context.Context) *GroupsRemoveMemberCall { - 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 *GroupsRemoveMemberCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GroupsRemoveMemberCall) 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.groupsremovememberrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/groups/{groupName}/removeMember") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "groupName": c.groupName, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "clouduseraccounts.groups.removeMember" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.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 *GroupsRemoveMemberCall) Do(opts ...googleapi.CallOption) (*Operation, 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 := &Operation{ - 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": "Removes users from the specified group.", - // "httpMethod": "POST", - // "id": "clouduseraccounts.groups.removeMember", - // "parameterOrder": [ - // "project", - // "groupName" - // ], - // "parameters": { - // "groupName": { - // "description": "Name of the group for this request.", - // "location": "path", - // "pattern": "[a-z][-a-z0-9_]{0,31}", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/groups/{groupName}/removeMember", - // "request": { - // "$ref": "GroupsRemoveMemberRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/cloud.useraccounts" - // ] - // } - -} - -// method id "clouduseraccounts.groups.setIamPolicy": - -type GroupsSetIamPolicyCall struct { - s *Service - project string - resource string - policy *Policy - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetIamPolicy: Sets the access control policy on the specified -// resource. Replaces any existing policy. -func (r *GroupsService) SetIamPolicy(project string, resource string, policy *Policy) *GroupsSetIamPolicyCall { - c := &GroupsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - c.policy = policy - 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 *GroupsSetIamPolicyCall) Fields(s ...googleapi.Field) *GroupsSetIamPolicyCall { - 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 *GroupsSetIamPolicyCall) Context(ctx context.Context) *GroupsSetIamPolicyCall { - 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 *GroupsSetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GroupsSetIamPolicyCall) 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.policy) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/groups/{resource}/setIamPolicy") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "resource": c.resource, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "clouduseraccounts.groups.setIamPolicy" call. -// Exactly one of *Policy or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Policy.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 *GroupsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, 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 := &Policy{ - 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": "Sets the access control policy on the specified resource. Replaces any existing policy.", - // "httpMethod": "POST", - // "id": "clouduseraccounts.groups.setIamPolicy", - // "parameterOrder": [ - // "project", - // "resource" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "resource": { - // "description": "Name of the resource for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/groups/{resource}/setIamPolicy", - // "request": { - // "$ref": "Policy" - // }, - // "response": { - // "$ref": "Policy" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/cloud-platform.read-only", - // "https://www.googleapis.com/auth/cloud.useraccounts", - // "https://www.googleapis.com/auth/cloud.useraccounts.readonly" - // ] - // } - -} - -// method id "clouduseraccounts.groups.testIamPermissions": - -type GroupsTestIamPermissionsCall struct { - s *Service - project string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the -// specified resource. -func (r *GroupsService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *GroupsTestIamPermissionsCall { - c := &GroupsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - 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 *GroupsTestIamPermissionsCall) Fields(s ...googleapi.Field) *GroupsTestIamPermissionsCall { - 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 *GroupsTestIamPermissionsCall) Context(ctx context.Context) *GroupsTestIamPermissionsCall { - 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 *GroupsTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GroupsTestIamPermissionsCall) 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.testpermissionsrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/groups/{resource}/testIamPermissions") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "resource": c.resource, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "clouduseraccounts.groups.testIamPermissions" call. -// Exactly one of *TestPermissionsResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *GroupsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ - 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": "Returns permissions that a caller has on the specified resource.", - // "httpMethod": "POST", - // "id": "clouduseraccounts.groups.testIamPermissions", - // "parameterOrder": [ - // "project", - // "resource" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "resource": { - // "description": "Name of the resource for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/groups/{resource}/testIamPermissions", - // "request": { - // "$ref": "TestPermissionsRequest" - // }, - // "response": { - // "$ref": "TestPermissionsResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/cloud-platform.read-only", - // "https://www.googleapis.com/auth/cloud.useraccounts", - // "https://www.googleapis.com/auth/cloud.useraccounts.readonly" - // ] - // } - -} - -// method id "clouduseraccounts.linux.getAuthorizedKeysView": - -type LinuxGetAuthorizedKeysViewCall struct { - s *Service - project string - zone string - user string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// GetAuthorizedKeysView: Returns a list of authorized public keys for a -// specific user account. -func (r *LinuxService) GetAuthorizedKeysView(project string, zone string, user string, instance string) *LinuxGetAuthorizedKeysViewCall { - c := &LinuxGetAuthorizedKeysViewCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.user = user - c.urlParams_.Set("instance", instance) - return c -} - -// Login sets the optional parameter "login": Whether the view was -// requested as part of a user-initiated login. -func (c *LinuxGetAuthorizedKeysViewCall) Login(login bool) *LinuxGetAuthorizedKeysViewCall { - c.urlParams_.Set("login", fmt.Sprint(login)) - 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 *LinuxGetAuthorizedKeysViewCall) Fields(s ...googleapi.Field) *LinuxGetAuthorizedKeysViewCall { - 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 *LinuxGetAuthorizedKeysViewCall) Context(ctx context.Context) *LinuxGetAuthorizedKeysViewCall { - 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 *LinuxGetAuthorizedKeysViewCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *LinuxGetAuthorizedKeysViewCall) 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 - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/authorizedKeysView/{user}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "user": c.user, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "clouduseraccounts.linux.getAuthorizedKeysView" call. -// Exactly one of *LinuxGetAuthorizedKeysViewResponse or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *LinuxGetAuthorizedKeysViewResponse.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 *LinuxGetAuthorizedKeysViewCall) Do(opts ...googleapi.CallOption) (*LinuxGetAuthorizedKeysViewResponse, 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 := &LinuxGetAuthorizedKeysViewResponse{ - 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": "Returns a list of authorized public keys for a specific user account.", - // "httpMethod": "POST", - // "id": "clouduseraccounts.linux.getAuthorizedKeysView", - // "parameterOrder": [ - // "project", - // "zone", - // "user", - // "instance" - // ], - // "parameters": { - // "instance": { - // "description": "The fully-qualified URL of the virtual machine requesting the view.", - // "location": "query", - // "required": true, - // "type": "string" - // }, - // "login": { - // "description": "Whether the view was requested as part of a user-initiated login.", - // "location": "query", - // "type": "boolean" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "user": { - // "description": "The user account for which you want to get a list of authorized public keys.", - // "location": "path", - // "pattern": "[a-z][-a-z0-9_]{0,31}", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "Name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/authorizedKeysView/{user}", - // "response": { - // "$ref": "LinuxGetAuthorizedKeysViewResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/cloud-platform.read-only", - // "https://www.googleapis.com/auth/cloud.useraccounts", - // "https://www.googleapis.com/auth/cloud.useraccounts.readonly" - // ] - // } - -} - -// method id "clouduseraccounts.linux.getLinuxAccountViews": - -type LinuxGetLinuxAccountViewsCall struct { - s *Service - project string - zone string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// GetLinuxAccountViews: Retrieves a list of user accounts for an -// instance within a specific project. -func (r *LinuxService) GetLinuxAccountViews(project string, zone string, instance string) *LinuxGetLinuxAccountViewsCall { - c := &LinuxGetLinuxAccountViewsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.urlParams_.Set("instance", instance) - return c -} - -// Filter sets the optional parameter "filter": Sets a filter expression -// for filtering listed resources, in the form filter={expression}. Your -// {expression} must be in the format: field_name comparison_string -// literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use filter=name ne -// example-instance. -// -// Compute Engine Beta API Only: If you use filtering in the Beta API, -// you can also filter on nested fields. For example, you could filter -// on instances that have set the scheduling.automaticRestart field to -// true. In particular, use filtering on nested fields to take advantage -// of instance labels to organize and filter results based on label -// values. -// -// The Beta API also supports filtering on multiple expressions by -// providing each separate expression within parentheses. For example, -// (scheduling.automaticRestart eq true) (zone eq us-central1-f). -// Multiple expressions are treated as AND expressions, meaning that -// resources must match all expressions to pass the filters. -func (c *LinuxGetLinuxAccountViewsCall) Filter(filter string) *LinuxGetLinuxAccountViewsCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. -func (c *LinuxGetLinuxAccountViewsCall) MaxResults(maxResults int64) *LinuxGetLinuxAccountViewsCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *LinuxGetLinuxAccountViewsCall) OrderBy(orderBy string) *LinuxGetLinuxAccountViewsCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *LinuxGetLinuxAccountViewsCall) PageToken(pageToken string) *LinuxGetLinuxAccountViewsCall { - 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 *LinuxGetLinuxAccountViewsCall) Fields(s ...googleapi.Field) *LinuxGetLinuxAccountViewsCall { - 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 *LinuxGetLinuxAccountViewsCall) Context(ctx context.Context) *LinuxGetLinuxAccountViewsCall { - 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 *LinuxGetLinuxAccountViewsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *LinuxGetLinuxAccountViewsCall) 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 - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/linuxAccountViews") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "clouduseraccounts.linux.getLinuxAccountViews" call. -// Exactly one of *LinuxGetLinuxAccountViewsResponse or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *LinuxGetLinuxAccountViewsResponse.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 *LinuxGetLinuxAccountViewsCall) Do(opts ...googleapi.CallOption) (*LinuxGetLinuxAccountViewsResponse, 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 := &LinuxGetLinuxAccountViewsResponse{ - 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": "Retrieves a list of user accounts for an instance within a specific project.", - // "httpMethod": "POST", - // "id": "clouduseraccounts.linux.getLinuxAccountViews", - // "parameterOrder": [ - // "project", - // "zone", - // "instance" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "instance": { - // "description": "The fully-qualified URL of the virtual machine requesting the views.", - // "location": "query", - // "required": true, - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", - // "format": "uint32", - // "location": "query", - // "maximum": "500", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "Name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/linuxAccountViews", - // "response": { - // "$ref": "LinuxGetLinuxAccountViewsResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/cloud-platform.read-only", - // "https://www.googleapis.com/auth/cloud.useraccounts", - // "https://www.googleapis.com/auth/cloud.useraccounts.readonly" - // ] - // } - -} - -// method id "clouduseraccounts.users.addPublicKey": - -type UsersAddPublicKeyCall struct { - s *Service - project string - user string - publickey *PublicKey - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// AddPublicKey: Adds a public key to the specified User resource with -// the data included in the request. -func (r *UsersService) AddPublicKey(project string, user string, publickey *PublicKey) *UsersAddPublicKeyCall { - c := &UsersAddPublicKeyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.user = user - c.publickey = publickey - 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 *UsersAddPublicKeyCall) Fields(s ...googleapi.Field) *UsersAddPublicKeyCall { - 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 *UsersAddPublicKeyCall) Context(ctx context.Context) *UsersAddPublicKeyCall { - 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 *UsersAddPublicKeyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *UsersAddPublicKeyCall) 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.publickey) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/users/{user}/addPublicKey") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "user": c.user, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "clouduseraccounts.users.addPublicKey" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.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 *UsersAddPublicKeyCall) Do(opts ...googleapi.CallOption) (*Operation, 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 := &Operation{ - 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": "Adds a public key to the specified User resource with the data included in the request.", - // "httpMethod": "POST", - // "id": "clouduseraccounts.users.addPublicKey", - // "parameterOrder": [ - // "project", - // "user" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "user": { - // "description": "Name of the user for this request.", - // "location": "path", - // "pattern": "[a-z][-a-z0-9_]{0,31}", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/users/{user}/addPublicKey", - // "request": { - // "$ref": "PublicKey" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/cloud.useraccounts" - // ] - // } - -} - -// method id "clouduseraccounts.users.delete": - -type UsersDeleteCall struct { - s *Service - project string - user string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified User resource. -func (r *UsersService) Delete(project string, user string) *UsersDeleteCall { - c := &UsersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.user = user - 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 *UsersDeleteCall) Fields(s ...googleapi.Field) *UsersDeleteCall { - 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 *UsersDeleteCall) Context(ctx context.Context) *UsersDeleteCall { - 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 *UsersDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *UsersDeleteCall) 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 - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/users/{user}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("DELETE", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "user": c.user, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "clouduseraccounts.users.delete" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.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 *UsersDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, 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 := &Operation{ - 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": "Deletes the specified User resource.", - // "httpMethod": "DELETE", - // "id": "clouduseraccounts.users.delete", - // "parameterOrder": [ - // "project", - // "user" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "user": { - // "description": "Name of the user resource to delete.", - // "location": "path", - // "pattern": "[a-z][-a-z0-9_]{0,31}", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/users/{user}", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/cloud.useraccounts" - // ] - // } - -} - -// method id "clouduseraccounts.users.get": - -type UsersGetCall struct { - s *Service - project string - user string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified User resource. -func (r *UsersService) Get(project string, user string) *UsersGetCall { - c := &UsersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.user = user - 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 *UsersGetCall) Fields(s ...googleapi.Field) *UsersGetCall { - 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 *UsersGetCall) IfNoneMatch(entityTag string) *UsersGetCall { - 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 *UsersGetCall) Context(ctx context.Context) *UsersGetCall { - 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 *UsersGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *UsersGetCall) 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, "{project}/global/users/{user}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "user": c.user, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "clouduseraccounts.users.get" call. -// Exactly one of *User or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *User.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 *UsersGetCall) Do(opts ...googleapi.CallOption) (*User, 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 := &User{ - 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": "Returns the specified User resource.", - // "httpMethod": "GET", - // "id": "clouduseraccounts.users.get", - // "parameterOrder": [ - // "project", - // "user" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "user": { - // "description": "Name of the user resource to return.", - // "location": "path", - // "pattern": "[a-z][-a-z0-9_]{0,31}", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/users/{user}", - // "response": { - // "$ref": "User" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/cloud-platform.read-only", - // "https://www.googleapis.com/auth/cloud.useraccounts", - // "https://www.googleapis.com/auth/cloud.useraccounts.readonly" - // ] - // } - -} - -// method id "clouduseraccounts.users.getIamPolicy": - -type UsersGetIamPolicyCall struct { - s *Service - project string - resource string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetIamPolicy: Gets the access control policy for a resource. May be -// empty if no such policy or resource exists. -func (r *UsersService) GetIamPolicy(project string, resource string) *UsersGetIamPolicyCall { - c := &UsersGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - 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 *UsersGetIamPolicyCall) Fields(s ...googleapi.Field) *UsersGetIamPolicyCall { - 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 *UsersGetIamPolicyCall) IfNoneMatch(entityTag string) *UsersGetIamPolicyCall { - 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 *UsersGetIamPolicyCall) Context(ctx context.Context) *UsersGetIamPolicyCall { - 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 *UsersGetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *UsersGetIamPolicyCall) 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, "{project}/global/users/{resource}/getIamPolicy") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "resource": c.resource, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "clouduseraccounts.users.getIamPolicy" call. -// Exactly one of *Policy or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Policy.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 *UsersGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, 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 := &Policy{ - 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": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.", - // "httpMethod": "GET", - // "id": "clouduseraccounts.users.getIamPolicy", - // "parameterOrder": [ - // "project", - // "resource" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "resource": { - // "description": "Name of the resource for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/users/{resource}/getIamPolicy", - // "response": { - // "$ref": "Policy" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/cloud-platform.read-only", - // "https://www.googleapis.com/auth/cloud.useraccounts", - // "https://www.googleapis.com/auth/cloud.useraccounts.readonly" - // ] - // } - -} - -// method id "clouduseraccounts.users.insert": - -type UsersInsertCall struct { - s *Service - project string - user *User - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a User resource in the specified project using the -// data included in the request. -func (r *UsersService) Insert(project string, user *User) *UsersInsertCall { - c := &UsersInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.user = user - 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 *UsersInsertCall) Fields(s ...googleapi.Field) *UsersInsertCall { - 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 *UsersInsertCall) Context(ctx context.Context) *UsersInsertCall { - 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 *UsersInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *UsersInsertCall) 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.user) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/users") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "clouduseraccounts.users.insert" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.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 *UsersInsertCall) Do(opts ...googleapi.CallOption) (*Operation, 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 := &Operation{ - 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": "Creates a User resource in the specified project using the data included in the request.", - // "httpMethod": "POST", - // "id": "clouduseraccounts.users.insert", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/users", - // "request": { - // "$ref": "User" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/cloud.useraccounts" - // ] - // } - -} - -// method id "clouduseraccounts.users.list": - -type UsersListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves a list of users contained within the specified -// project. -func (r *UsersService) List(project string) *UsersListCall { - c := &UsersListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": Sets a filter expression -// for filtering listed resources, in the form filter={expression}. Your -// {expression} must be in the format: field_name comparison_string -// literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use filter=name ne -// example-instance. -// -// Compute Engine Beta API Only: If you use filtering in the Beta API, -// you can also filter on nested fields. For example, you could filter -// on instances that have set the scheduling.automaticRestart field to -// true. In particular, use filtering on nested fields to take advantage -// of instance labels to organize and filter results based on label -// values. -// -// The Beta API also supports filtering on multiple expressions by -// providing each separate expression within parentheses. For example, -// (scheduling.automaticRestart eq true) (zone eq us-central1-f). -// Multiple expressions are treated as AND expressions, meaning that -// resources must match all expressions to pass the filters. -func (c *UsersListCall) Filter(filter string) *UsersListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. -func (c *UsersListCall) MaxResults(maxResults int64) *UsersListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *UsersListCall) OrderBy(orderBy string) *UsersListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *UsersListCall) PageToken(pageToken string) *UsersListCall { - 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 *UsersListCall) Fields(s ...googleapi.Field) *UsersListCall { - 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 *UsersListCall) IfNoneMatch(entityTag string) *UsersListCall { - 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 *UsersListCall) Context(ctx context.Context) *UsersListCall { - 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 *UsersListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *UsersListCall) 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, "{project}/global/users") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "clouduseraccounts.users.list" call. -// Exactly one of *UserList or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *UserList.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 *UsersListCall) Do(opts ...googleapi.CallOption) (*UserList, 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 := &UserList{ - 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": "Retrieves a list of users contained within the specified project.", - // "httpMethod": "GET", - // "id": "clouduseraccounts.users.list", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", - // "format": "uint32", - // "location": "query", - // "maximum": "500", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/users", - // "response": { - // "$ref": "UserList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/cloud-platform.read-only", - // "https://www.googleapis.com/auth/cloud.useraccounts", - // "https://www.googleapis.com/auth/cloud.useraccounts.readonly" - // ] - // } - -} - -// 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 *UsersListCall) Pages(ctx context.Context, f func(*UserList) 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 "clouduseraccounts.users.removePublicKey": - -type UsersRemovePublicKeyCall struct { - s *Service - project string - user string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// RemovePublicKey: Removes the specified public key from the user. -func (r *UsersService) RemovePublicKey(project string, user string, fingerprint string) *UsersRemovePublicKeyCall { - c := &UsersRemovePublicKeyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.user = user - c.urlParams_.Set("fingerprint", fingerprint) - 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 *UsersRemovePublicKeyCall) Fields(s ...googleapi.Field) *UsersRemovePublicKeyCall { - 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 *UsersRemovePublicKeyCall) Context(ctx context.Context) *UsersRemovePublicKeyCall { - 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 *UsersRemovePublicKeyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *UsersRemovePublicKeyCall) 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 - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/users/{user}/removePublicKey") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "user": c.user, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "clouduseraccounts.users.removePublicKey" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.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 *UsersRemovePublicKeyCall) Do(opts ...googleapi.CallOption) (*Operation, 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 := &Operation{ - 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": "Removes the specified public key from the user.", - // "httpMethod": "POST", - // "id": "clouduseraccounts.users.removePublicKey", - // "parameterOrder": [ - // "project", - // "user", - // "fingerprint" - // ], - // "parameters": { - // "fingerprint": { - // "description": "The fingerprint of the public key to delete. Public keys are identified by their fingerprint, which is defined by RFC4716 to be the MD5 digest of the public key.", - // "location": "query", - // "pattern": "[a-f0-9]{32}", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "user": { - // "description": "Name of the user for this request.", - // "location": "path", - // "pattern": "[a-z][-a-z0-9_]{0,31}", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/users/{user}/removePublicKey", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/cloud.useraccounts" - // ] - // } - -} - -// method id "clouduseraccounts.users.setIamPolicy": - -type UsersSetIamPolicyCall struct { - s *Service - project string - resource string - policy *Policy - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetIamPolicy: Sets the access control policy on the specified -// resource. Replaces any existing policy. -func (r *UsersService) SetIamPolicy(project string, resource string, policy *Policy) *UsersSetIamPolicyCall { - c := &UsersSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - c.policy = policy - 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 *UsersSetIamPolicyCall) Fields(s ...googleapi.Field) *UsersSetIamPolicyCall { - 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 *UsersSetIamPolicyCall) Context(ctx context.Context) *UsersSetIamPolicyCall { - 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 *UsersSetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *UsersSetIamPolicyCall) 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.policy) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/users/{resource}/setIamPolicy") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "resource": c.resource, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "clouduseraccounts.users.setIamPolicy" call. -// Exactly one of *Policy or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Policy.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 *UsersSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, 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 := &Policy{ - 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": "Sets the access control policy on the specified resource. Replaces any existing policy.", - // "httpMethod": "POST", - // "id": "clouduseraccounts.users.setIamPolicy", - // "parameterOrder": [ - // "project", - // "resource" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "resource": { - // "description": "Name of the resource for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/users/{resource}/setIamPolicy", - // "request": { - // "$ref": "Policy" - // }, - // "response": { - // "$ref": "Policy" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/cloud-platform.read-only", - // "https://www.googleapis.com/auth/cloud.useraccounts", - // "https://www.googleapis.com/auth/cloud.useraccounts.readonly" - // ] - // } - -} - -// method id "clouduseraccounts.users.testIamPermissions": - -type UsersTestIamPermissionsCall struct { - s *Service - project string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the -// specified resource. -func (r *UsersService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *UsersTestIamPermissionsCall { - c := &UsersTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - 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 *UsersTestIamPermissionsCall) Fields(s ...googleapi.Field) *UsersTestIamPermissionsCall { - 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 *UsersTestIamPermissionsCall) Context(ctx context.Context) *UsersTestIamPermissionsCall { - 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 *UsersTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *UsersTestIamPermissionsCall) 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.testpermissionsrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/users/{resource}/testIamPermissions") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "resource": c.resource, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "clouduseraccounts.users.testIamPermissions" call. -// Exactly one of *TestPermissionsResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *UsersTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ - 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": "Returns permissions that a caller has on the specified resource.", - // "httpMethod": "POST", - // "id": "clouduseraccounts.users.testIamPermissions", - // "parameterOrder": [ - // "project", - // "resource" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "resource": { - // "description": "Name of the resource for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/users/{resource}/testIamPermissions", - // "request": { - // "$ref": "TestPermissionsRequest" - // }, - // "response": { - // "$ref": "TestPermissionsResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/cloud-platform.read-only", - // "https://www.googleapis.com/auth/cloud.useraccounts", - // "https://www.googleapis.com/auth/cloud.useraccounts.readonly" - // ] - // } - -}
diff --git a/clouduseraccounts/vm_beta/clouduseraccounts-api.json b/clouduseraccounts/vm_beta/clouduseraccounts-api.json deleted file mode 100644 index 53e3407..0000000 --- a/clouduseraccounts/vm_beta/clouduseraccounts-api.json +++ /dev/null
@@ -1,1361 +0,0 @@ -{ - "auth": { - "oauth2": { - "scopes": { - "https://www.googleapis.com/auth/cloud-platform": { - "description": "View and manage your data across Google Cloud Platform services" - }, - "https://www.googleapis.com/auth/cloud-platform.read-only": { - "description": "View your data across Google Cloud Platform services" - }, - "https://www.googleapis.com/auth/cloud.useraccounts": { - "description": "Manage your Google Cloud User Accounts" - }, - "https://www.googleapis.com/auth/cloud.useraccounts.readonly": { - "description": "View your Google Cloud User Accounts" - } - } - } - }, - "basePath": "/clouduseraccounts/vm_beta/projects/", - "baseUrl": "https://www.googleapis.com/clouduseraccounts/vm_beta/projects/", - "batchPath": "batch/clouduseraccounts/vm_beta", - "canonicalName": "Cloud User Accounts", - "description": "Creates and manages users and groups for accessing Google Compute Engine virtual machines.", - "discoveryVersion": "v1", - "documentationLink": "https://cloud.google.com/compute/docs/access/user-accounts/api/latest/", - "etag": "\"-iA1DTNe4s-I6JZXPt1t1Ypy8IU/NOgAExjYfIWiV_BL3FlcslmjncY\"", - "icons": { - "x16": "https://www.google.com/images/icons/product/compute_engine-16.png", - "x32": "https://www.google.com/images/icons/product/compute_engine-32.png" - }, - "id": "clouduseraccounts:vm_beta", - "kind": "discovery#restDescription", - "name": "clouduseraccounts", - "ownerDomain": "google.com", - "ownerName": "Google", - "parameters": { - "alt": { - "default": "json", - "description": "Data format for the response.", - "enum": [ - "json" - ], - "enumDescriptions": [ - "Responses with Content-Type of application/json" - ], - "location": "query", - "type": "string" - }, - "fields": { - "description": "Selector specifying which fields to include in a partial response.", - "location": "query", - "type": "string" - }, - "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" - }, - "oauth_token": { - "description": "OAuth 2.0 token for the current user.", - "location": "query", - "type": "string" - }, - "prettyPrint": { - "default": "true", - "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": { - "globalAccountsOperations": { - "methods": { - "delete": { - "description": "Deletes the specified operation resource.", - "httpMethod": "DELETE", - "id": "clouduseraccounts.globalAccountsOperations.delete", - "parameterOrder": [ - "project", - "operation" - ], - "parameters": { - "operation": { - "description": "Name of the Operations resource to delete.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - } - }, - "path": "{project}/global/operations/{operation}", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud.useraccounts" - ] - }, - "get": { - "description": "Retrieves the specified operation resource.", - "httpMethod": "GET", - "id": "clouduseraccounts.globalAccountsOperations.get", - "parameterOrder": [ - "project", - "operation" - ], - "parameters": { - "operation": { - "description": "Name of the Operations resource to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - } - }, - "path": "{project}/global/operations/{operation}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only", - "https://www.googleapis.com/auth/cloud.useraccounts", - "https://www.googleapis.com/auth/cloud.useraccounts.readonly" - ] - }, - "list": { - "description": "Retrieves the list of operation resources contained within the specified project.", - "httpMethod": "GET", - "id": "clouduseraccounts.globalAccountsOperations.list", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", - "format": "uint32", - "location": "query", - "maximum": "500", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - } - }, - "path": "{project}/global/operations", - "response": { - "$ref": "OperationList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only", - "https://www.googleapis.com/auth/cloud.useraccounts", - "https://www.googleapis.com/auth/cloud.useraccounts.readonly" - ] - } - } - }, - "groups": { - "methods": { - "addMember": { - "description": "Adds users to the specified group.", - "httpMethod": "POST", - "id": "clouduseraccounts.groups.addMember", - "parameterOrder": [ - "project", - "groupName" - ], - "parameters": { - "groupName": { - "description": "Name of the group for this request.", - "location": "path", - "pattern": "[a-z][-a-z0-9_]{0,31}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - } - }, - "path": "{project}/global/groups/{groupName}/addMember", - "request": { - "$ref": "GroupsAddMemberRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud.useraccounts" - ] - }, - "delete": { - "description": "Deletes the specified Group resource.", - "httpMethod": "DELETE", - "id": "clouduseraccounts.groups.delete", - "parameterOrder": [ - "project", - "groupName" - ], - "parameters": { - "groupName": { - "description": "Name of the Group resource to delete.", - "location": "path", - "pattern": "[a-z][-a-z0-9_]{0,31}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - } - }, - "path": "{project}/global/groups/{groupName}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud.useraccounts" - ] - }, - "get": { - "description": "Returns the specified Group resource.", - "httpMethod": "GET", - "id": "clouduseraccounts.groups.get", - "parameterOrder": [ - "project", - "groupName" - ], - "parameters": { - "groupName": { - "description": "Name of the Group resource to return.", - "location": "path", - "pattern": "[a-z][-a-z0-9_]{0,31}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - } - }, - "path": "{project}/global/groups/{groupName}", - "response": { - "$ref": "Group" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only", - "https://www.googleapis.com/auth/cloud.useraccounts", - "https://www.googleapis.com/auth/cloud.useraccounts.readonly" - ] - }, - "insert": { - "description": "Creates a Group resource in the specified project using the data included in the request.", - "httpMethod": "POST", - "id": "clouduseraccounts.groups.insert", - "parameterOrder": [ - "project" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - } - }, - "path": "{project}/global/groups", - "request": { - "$ref": "Group" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud.useraccounts" - ] - }, - "list": { - "description": "Retrieves the list of groups contained within the specified project.", - "httpMethod": "GET", - "id": "clouduseraccounts.groups.list", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", - "format": "uint32", - "location": "query", - "maximum": "500", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - } - }, - "path": "{project}/global/groups", - "response": { - "$ref": "GroupList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only", - "https://www.googleapis.com/auth/cloud.useraccounts", - "https://www.googleapis.com/auth/cloud.useraccounts.readonly" - ] - }, - "removeMember": { - "description": "Removes users from the specified group.", - "httpMethod": "POST", - "id": "clouduseraccounts.groups.removeMember", - "parameterOrder": [ - "project", - "groupName" - ], - "parameters": { - "groupName": { - "description": "Name of the group for this request.", - "location": "path", - "pattern": "[a-z][-a-z0-9_]{0,31}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - } - }, - "path": "{project}/global/groups/{groupName}/removeMember", - "request": { - "$ref": "GroupsRemoveMemberRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud.useraccounts" - ] - } - } - }, - "linux": { - "methods": { - "getAuthorizedKeysView": { - "description": "Returns a list of authorized public keys for a specific user account.", - "httpMethod": "POST", - "id": "clouduseraccounts.linux.getAuthorizedKeysView", - "parameterOrder": [ - "project", - "zone", - "user", - "instance" - ], - "parameters": { - "instance": { - "description": "The fully-qualified URL of the virtual machine requesting the view.", - "location": "query", - "required": true, - "type": "string" - }, - "login": { - "description": "Whether the view was requested as part of a user-initiated login.", - "location": "query", - "type": "boolean" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "user": { - "description": "The user account for which you want to get a list of authorized public keys.", - "location": "path", - "pattern": "[a-z][-a-z0-9_]{0,31}", - "required": true, - "type": "string" - }, - "zone": { - "description": "Name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "{project}/zones/{zone}/authorizedKeysView/{user}", - "response": { - "$ref": "LinuxGetAuthorizedKeysViewResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only", - "https://www.googleapis.com/auth/cloud.useraccounts", - "https://www.googleapis.com/auth/cloud.useraccounts.readonly" - ] - }, - "getLinuxAccountViews": { - "description": "Retrieves a list of user accounts for an instance within a specific project.", - "httpMethod": "POST", - "id": "clouduseraccounts.linux.getLinuxAccountViews", - "parameterOrder": [ - "project", - "zone", - "instance" - ], - "parameters": { - "filter": { - "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query", - "type": "string" - }, - "instance": { - "description": "The fully-qualified URL of the virtual machine requesting the views.", - "location": "query", - "required": true, - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", - "format": "uint32", - "location": "query", - "maximum": "500", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "zone": { - "description": "Name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "{project}/zones/{zone}/linuxAccountViews", - "response": { - "$ref": "LinuxGetLinuxAccountViewsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only", - "https://www.googleapis.com/auth/cloud.useraccounts", - "https://www.googleapis.com/auth/cloud.useraccounts.readonly" - ] - } - } - }, - "users": { - "methods": { - "addPublicKey": { - "description": "Adds a public key to the specified User resource with the data included in the request.", - "httpMethod": "POST", - "id": "clouduseraccounts.users.addPublicKey", - "parameterOrder": [ - "project", - "user" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "user": { - "description": "Name of the user for this request.", - "location": "path", - "pattern": "[a-z][-a-z0-9_]{0,31}", - "required": true, - "type": "string" - } - }, - "path": "{project}/global/users/{user}/addPublicKey", - "request": { - "$ref": "PublicKey" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud.useraccounts" - ] - }, - "delete": { - "description": "Deletes the specified User resource.", - "httpMethod": "DELETE", - "id": "clouduseraccounts.users.delete", - "parameterOrder": [ - "project", - "user" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "user": { - "description": "Name of the user resource to delete.", - "location": "path", - "pattern": "[a-z][-a-z0-9_]{0,31}", - "required": true, - "type": "string" - } - }, - "path": "{project}/global/users/{user}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud.useraccounts" - ] - }, - "get": { - "description": "Returns the specified User resource.", - "httpMethod": "GET", - "id": "clouduseraccounts.users.get", - "parameterOrder": [ - "project", - "user" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "user": { - "description": "Name of the user resource to return.", - "location": "path", - "pattern": "[a-z][-a-z0-9_]{0,31}", - "required": true, - "type": "string" - } - }, - "path": "{project}/global/users/{user}", - "response": { - "$ref": "User" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only", - "https://www.googleapis.com/auth/cloud.useraccounts", - "https://www.googleapis.com/auth/cloud.useraccounts.readonly" - ] - }, - "insert": { - "description": "Creates a User resource in the specified project using the data included in the request.", - "httpMethod": "POST", - "id": "clouduseraccounts.users.insert", - "parameterOrder": [ - "project" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - } - }, - "path": "{project}/global/users", - "request": { - "$ref": "User" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud.useraccounts" - ] - }, - "list": { - "description": "Retrieves a list of users contained within the specified project.", - "httpMethod": "GET", - "id": "clouduseraccounts.users.list", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", - "format": "uint32", - "location": "query", - "maximum": "500", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - } - }, - "path": "{project}/global/users", - "response": { - "$ref": "UserList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only", - "https://www.googleapis.com/auth/cloud.useraccounts", - "https://www.googleapis.com/auth/cloud.useraccounts.readonly" - ] - }, - "removePublicKey": { - "description": "Removes the specified public key from the user.", - "httpMethod": "POST", - "id": "clouduseraccounts.users.removePublicKey", - "parameterOrder": [ - "project", - "user", - "fingerprint" - ], - "parameters": { - "fingerprint": { - "description": "The fingerprint of the public key to delete. Public keys are identified by their fingerprint, which is defined by RFC4716 to be the MD5 digest of the public key.", - "location": "query", - "pattern": "[a-f0-9]{32}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "user": { - "description": "Name of the user for this request.", - "location": "path", - "pattern": "[a-z][-a-z0-9_]{0,31}", - "required": true, - "type": "string" - } - }, - "path": "{project}/global/users/{user}/removePublicKey", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud.useraccounts" - ] - } - } - } - }, - "revision": "20160316", - "rootUrl": "https://www.googleapis.com/", - "schemas": { - "AuthorizedKeysView": { - "description": "A list of authorized public keys for a user account.", - "id": "AuthorizedKeysView", - "properties": { - "keys": { - "description": "[Output Only] The list of authorized public keys in SSH format.", - "items": { - "type": "string" - }, - "type": "array" - }, - "sudoer": { - "description": "[Output Only] Whether the user has the ability to elevate on the instance that requested the authorized keys.", - "type": "boolean" - } - }, - "type": "object" - }, - "Group": { - "description": "A Group resource.", - "id": "Group", - "properties": { - "creationTimestamp": { - "description": "[Output Only] Creation timestamp in RFC3339 text format.", - "type": "string" - }, - "description": { - "description": "An optional textual description of the resource; provided by the client when the resource is created.", - "type": "string" - }, - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "format": "uint64", - "type": "string" - }, - "kind": { - "default": "clouduseraccounts#group", - "description": "[Output Only] Type of the resource. Always clouduseraccounts#group for groups.", - "type": "string" - }, - "members": { - "description": "[Output Only] A list of URLs to User resources who belong to the group. Users may only be members of groups in the same project.", - "items": { - "type": "string" - }, - "type": "array" - }, - "name": { - "annotations": { - "required": [ - "clouduseraccounts.groups.insert" - ] - }, - "description": "Name of the resource; provided by the client when the resource is created.", - "pattern": "[a-z][-a-z0-9_]{0,31}", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server defined URL for the resource.", - "type": "string" - } - }, - "type": "object" - }, - "GroupList": { - "id": "GroupList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "[Output Only] A list of Group resources.", - "items": { - "$ref": "Group" - }, - "type": "array" - }, - "kind": { - "default": "clouduseraccounts#groupList", - "description": "[Output Only] Type of resource. Always clouduseraccounts#groupList for lists of groups.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] A token used to continue a truncated list request.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server defined URL for this resource.", - "type": "string" - } - }, - "type": "object" - }, - "GroupsAddMemberRequest": { - "id": "GroupsAddMemberRequest", - "properties": { - "users": { - "description": "Fully-qualified URLs of the User resources to add.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "GroupsRemoveMemberRequest": { - "id": "GroupsRemoveMemberRequest", - "properties": { - "users": { - "description": "Fully-qualified URLs of the User resources to remove.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "LinuxAccountViews": { - "description": "A list of all Linux accounts for this project. This API is only used by Compute Engine virtual machines to get information about user accounts for a project or instance. Linux resources are read-only views into users and groups managed by the Compute Engine Accounts API.", - "id": "LinuxAccountViews", - "properties": { - "groupViews": { - "description": "[Output Only] A list of all groups within a project.", - "items": { - "$ref": "LinuxGroupView" - }, - "type": "array" - }, - "kind": { - "default": "clouduseraccounts#linuxAccountViews", - "description": "[Output Only] Type of the resource. Always clouduseraccounts#linuxAccountViews for Linux resources.", - "type": "string" - }, - "userViews": { - "description": "[Output Only] A list of all users within a project.", - "items": { - "$ref": "LinuxUserView" - }, - "type": "array" - } - }, - "type": "object" - }, - "LinuxGetAuthorizedKeysViewResponse": { - "id": "LinuxGetAuthorizedKeysViewResponse", - "properties": { - "resource": { - "$ref": "AuthorizedKeysView", - "description": "[Output Only] A list of authorized public keys for a user." - } - }, - "type": "object" - }, - "LinuxGetLinuxAccountViewsResponse": { - "id": "LinuxGetLinuxAccountViewsResponse", - "properties": { - "resource": { - "$ref": "LinuxAccountViews", - "description": "[Output Only] A list of authorized user accounts and groups." - } - }, - "type": "object" - }, - "LinuxGroupView": { - "description": "A detailed view of a Linux group.", - "id": "LinuxGroupView", - "properties": { - "gid": { - "description": "[Output Only] The Group ID.", - "format": "uint32", - "type": "integer" - }, - "groupName": { - "description": "[Output Only] Group name.", - "type": "string" - }, - "members": { - "description": "[Output Only] List of user accounts that belong to the group.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "LinuxUserView": { - "description": "A detailed view of a Linux user account.", - "id": "LinuxUserView", - "properties": { - "gecos": { - "description": "[Output Only] The GECOS (user information) entry for this account.", - "type": "string" - }, - "gid": { - "description": "[Output Only] User's default group ID.", - "format": "uint32", - "type": "integer" - }, - "homeDirectory": { - "description": "[Output Only] The path to the home directory for this account.", - "type": "string" - }, - "shell": { - "description": "[Output Only] The path to the login shell for this account.", - "type": "string" - }, - "uid": { - "description": "[Output Only] User ID.", - "format": "uint32", - "type": "integer" - }, - "username": { - "description": "[Output Only] The username of the account.", - "type": "string" - } - }, - "type": "object" - }, - "Operation": { - "description": "An Operation resource, used to manage asynchronous API requests.", - "id": "Operation", - "properties": { - "clientOperationId": { - "description": "[Output Only] Reserved for future use.", - "type": "string" - }, - "creationTimestamp": { - "description": "[Output Only] Creation timestamp in RFC3339 text format.", - "type": "string" - }, - "description": { - "description": "[Output Only] A textual description of the operation, which is set when the operation is created.", - "type": "string" - }, - "endTime": { - "description": "[Output Only] The time that this operation was completed. This value is in RFC3339 text format.", - "type": "string" - }, - "error": { - "description": "[Output Only] If errors are generated during processing of the operation, this field will be populated.", - "properties": { - "errors": { - "description": "[Output Only] The array of errors encountered while processing this operation.", - "items": { - "properties": { - "code": { - "description": "[Output Only] The error type identifier for this error.", - "type": "string" - }, - "location": { - "description": "[Output Only] Indicates the field in the request that caused the error. This property is optional.", - "type": "string" - }, - "message": { - "description": "[Output Only] An optional, human-readable error message.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - } - }, - "type": "object" - }, - "httpErrorMessage": { - "description": "[Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.", - "type": "string" - }, - "httpErrorStatusCode": { - "description": "[Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a 404 means the resource was not found.", - "format": "int32", - "type": "integer" - }, - "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", - "format": "uint64", - "type": "string" - }, - "insertTime": { - "description": "[Output Only] The time that this operation was requested. This value is in RFC3339 text format.", - "type": "string" - }, - "kind": { - "default": "clouduseraccounts#operation", - "description": "[Output Only] Type of the resource. Always compute#operation for Operation resources.", - "type": "string" - }, - "name": { - "description": "[Output Only] Name of the resource.", - "type": "string" - }, - "operationType": { - "description": "[Output Only] The type of operation, such as insert, update, or delete, and so on.", - "type": "string" - }, - "progress": { - "description": "[Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.", - "format": "int32", - "type": "integer" - }, - "region": { - "description": "[Output Only] The URL of the region where the operation resides. Only available when performing regional operations.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for the resource.", - "type": "string" - }, - "startTime": { - "description": "[Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.", - "type": "string" - }, - "status": { - "description": "[Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.", - "enum": [ - "DONE", - "PENDING", - "RUNNING" - ], - "enumDescriptions": [ - "", - "", - "" - ], - "type": "string" - }, - "statusMessage": { - "description": "[Output Only] An optional textual description of the current status of the operation.", - "type": "string" - }, - "targetId": { - "description": "[Output Only] The unique target ID, which identifies a specific incarnation of the target resource.", - "format": "uint64", - "type": "string" - }, - "targetLink": { - "description": "[Output Only] The URL of the resource that the operation modifies.", - "type": "string" - }, - "user": { - "description": "[Output Only] User who requested the operation, for example: user@example.com.", - "type": "string" - }, - "warnings": { - "description": "[Output Only] If warning messages are generated during processing of the operation, this field will be populated.", - "items": { - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "INJECTED_KERNELS_DEPRECATED", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_NOT_DELETED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNREACHABLE" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "" - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "zone": { - "description": "[Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.", - "type": "string" - } - }, - "type": "object" - }, - "OperationList": { - "description": "Contains a list of Operation resources.", - "id": "OperationList", - "properties": { - "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", - "type": "string" - }, - "items": { - "description": "[Output Only] A list of Operation resources.", - "items": { - "$ref": "Operation" - }, - "type": "array" - }, - "kind": { - "default": "clouduseraccounts#operationList", - "description": "[Output Only] Type of resource. Always compute#operations for Operations resource.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - } - }, - "type": "object" - }, - "PublicKey": { - "description": "A public key for authenticating to guests.", - "id": "PublicKey", - "properties": { - "creationTimestamp": { - "description": "[Output Only] Creation timestamp in RFC3339 text format.", - "type": "string" - }, - "description": { - "description": "An optional textual description of the resource; provided by the client when the resource is created.", - "type": "string" - }, - "expirationTimestamp": { - "description": "Optional expiration timestamp. If provided, the timestamp must be in RFC3339 text format. If not provided, the public key never expires.", - "type": "string" - }, - "fingerprint": { - "description": "[Output Only] The fingerprint of the key is defined by RFC4716 to be the MD5 digest of the public key.", - "type": "string" - }, - "key": { - "description": "Public key text in SSH format, defined by RFC4253 section 6.6.", - "type": "string" - } - }, - "type": "object" - }, - "User": { - "description": "A User resource.", - "id": "User", - "properties": { - "creationTimestamp": { - "description": "[Output Only] Creation timestamp in RFC3339 text format.", - "type": "string" - }, - "description": { - "description": "An optional textual description of the resource; provided by the client when the resource is created.", - "type": "string" - }, - "groups": { - "description": "[Output Only] A list of URLs to Group resources who contain the user. Users are only members of groups in the same project.", - "items": { - "type": "string" - }, - "type": "array" - }, - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "format": "uint64", - "type": "string" - }, - "kind": { - "default": "clouduseraccounts#user", - "description": "[Output Only] Type of the resource. Always clouduseraccounts#user for users.", - "type": "string" - }, - "name": { - "annotations": { - "required": [ - "clouduseraccounts.users.insert" - ] - }, - "description": "Name of the resource; provided by the client when the resource is created.", - "pattern": "[a-z][-a-z0-9_]{0,31}", - "type": "string" - }, - "owner": { - "annotations": { - "required": [ - "clouduseraccounts.users.insert" - ] - }, - "description": "Email address of account's owner. This account will be validated to make sure it exists. The email can belong to any domain, but it must be tied to a Google account.", - "type": "string" - }, - "publicKeys": { - "description": "[Output Only] Public keys that this user may use to login.", - "items": { - "$ref": "PublicKey" - }, - "type": "array" - }, - "selfLink": { - "description": "[Output Only] Server defined URL for the resource.", - "type": "string" - } - }, - "type": "object" - }, - "UserList": { - "id": "UserList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "[Output Only] A list of User resources.", - "items": { - "$ref": "User" - }, - "type": "array" - }, - "kind": { - "default": "clouduseraccounts#userList", - "description": "[Output Only] Type of resource. Always clouduseraccounts#userList for lists of users.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] A token used to continue a truncated list request.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server defined URL for this resource.", - "type": "string" - } - }, - "type": "object" - } - }, - "servicePath": "clouduseraccounts/vm_beta/projects/", - "title": "Cloud User Accounts API", - "version": "vm_beta" -} \ No newline at end of file
diff --git a/clouduseraccounts/vm_beta/clouduseraccounts-gen.go b/clouduseraccounts/vm_beta/clouduseraccounts-gen.go deleted file mode 100644 index 4c84715..0000000 --- a/clouduseraccounts/vm_beta/clouduseraccounts-gen.go +++ /dev/null
@@ -1,3871 +0,0 @@ -// Package clouduseraccounts provides access to the Cloud User Accounts API. -// -// See https://cloud.google.com/compute/docs/access/user-accounts/api/latest/ -// -// Usage example: -// -// import "google.golang.org/api/clouduseraccounts/vm_beta" -// ... -// clouduseraccountsService, err := clouduseraccounts.New(oauthHttpClient) -package clouduseraccounts // import "google.golang.org/api/clouduseraccounts/vm_beta" - -import ( - "bytes" - "context" - "encoding/json" - "errors" - "fmt" - "io" - "net/http" - "net/url" - "strconv" - "strings" - - gensupport "google.golang.org/api/gensupport" - googleapi "google.golang.org/api/googleapi" -) - -// Always reference these packages, just in case the auto-generated code -// below doesn't. -var _ = bytes.NewBuffer -var _ = strconv.Itoa -var _ = fmt.Sprintf -var _ = json.NewDecoder -var _ = io.Copy -var _ = url.Parse -var _ = gensupport.MarshalJSON -var _ = googleapi.Version -var _ = errors.New -var _ = strings.Replace -var _ = context.Canceled - -const apiId = "clouduseraccounts:vm_beta" -const apiName = "clouduseraccounts" -const apiVersion = "vm_beta" -const basePath = "https://www.googleapis.com/clouduseraccounts/vm_beta/projects/" - -// OAuth2 scopes used by this API. -const ( - // View and manage your data across Google Cloud Platform services - CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform" - - // View your data across Google Cloud Platform services - CloudPlatformReadOnlyScope = "https://www.googleapis.com/auth/cloud-platform.read-only" - - // Manage your Google Cloud User Accounts - CloudUseraccountsScope = "https://www.googleapis.com/auth/cloud.useraccounts" - - // View your Google Cloud User Accounts - CloudUseraccountsReadonlyScope = "https://www.googleapis.com/auth/cloud.useraccounts.readonly" -) - -func New(client *http.Client) (*Service, error) { - if client == nil { - return nil, errors.New("client is nil") - } - s := &Service{client: client, BasePath: basePath} - s.GlobalAccountsOperations = NewGlobalAccountsOperationsService(s) - s.Groups = NewGroupsService(s) - s.Linux = NewLinuxService(s) - s.Users = NewUsersService(s) - return s, nil -} - -type Service struct { - client *http.Client - BasePath string // API endpoint base URL - UserAgent string // optional additional User-Agent fragment - - GlobalAccountsOperations *GlobalAccountsOperationsService - - Groups *GroupsService - - Linux *LinuxService - - Users *UsersService -} - -func (s *Service) userAgent() string { - if s.UserAgent == "" { - return googleapi.UserAgent - } - return googleapi.UserAgent + " " + s.UserAgent -} - -func NewGlobalAccountsOperationsService(s *Service) *GlobalAccountsOperationsService { - rs := &GlobalAccountsOperationsService{s: s} - return rs -} - -type GlobalAccountsOperationsService struct { - s *Service -} - -func NewGroupsService(s *Service) *GroupsService { - rs := &GroupsService{s: s} - return rs -} - -type GroupsService struct { - s *Service -} - -func NewLinuxService(s *Service) *LinuxService { - rs := &LinuxService{s: s} - return rs -} - -type LinuxService struct { - s *Service -} - -func NewUsersService(s *Service) *UsersService { - rs := &UsersService{s: s} - return rs -} - -type UsersService struct { - s *Service -} - -// AuthorizedKeysView: A list of authorized public keys for a user -// account. -type AuthorizedKeysView struct { - // Keys: [Output Only] The list of authorized public keys in SSH format. - Keys []string `json:"keys,omitempty"` - - // Sudoer: [Output Only] Whether the user has the ability to elevate on - // the instance that requested the authorized keys. - Sudoer bool `json:"sudoer,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Keys") 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. "Keys") 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 *AuthorizedKeysView) MarshalJSON() ([]byte, error) { - type NoMethod AuthorizedKeysView - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// Group: A Group resource. -type Group struct { - // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text - // format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - - // Description: An optional textual description of the resource; - // provided by the client when the resource is created. - Description string `json:"description,omitempty"` - - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id uint64 `json:"id,omitempty,string"` - - // Kind: [Output Only] Type of the resource. Always - // clouduseraccounts#group for groups. - Kind string `json:"kind,omitempty"` - - // Members: [Output Only] A list of URLs to User resources who belong to - // the group. Users may only be members of groups in the same project. - Members []string `json:"members,omitempty"` - - // Name: Name of the resource; provided by the client when the resource - // is created. - Name string `json:"name,omitempty"` - - // SelfLink: [Output Only] Server defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "CreationTimestamp") - // 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. "CreationTimestamp") 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 *Group) MarshalJSON() ([]byte, error) { - type NoMethod Group - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type GroupList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: [Output Only] A list of Group resources. - Items []*Group `json:"items,omitempty"` - - // Kind: [Output Only] Type of resource. Always - // clouduseraccounts#groupList for lists of groups. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] A token used to continue a truncated - // list request. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") 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. "Id") 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 *GroupList) MarshalJSON() ([]byte, error) { - type NoMethod GroupList - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type GroupsAddMemberRequest struct { - // Users: Fully-qualified URLs of the User resources to add. - Users []string `json:"users,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Users") 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. "Users") 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 *GroupsAddMemberRequest) MarshalJSON() ([]byte, error) { - type NoMethod GroupsAddMemberRequest - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type GroupsRemoveMemberRequest struct { - // Users: Fully-qualified URLs of the User resources to remove. - Users []string `json:"users,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Users") 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. "Users") 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 *GroupsRemoveMemberRequest) MarshalJSON() ([]byte, error) { - type NoMethod GroupsRemoveMemberRequest - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// LinuxAccountViews: A list of all Linux accounts for this project. -// This API is only used by Compute Engine virtual machines to get -// information about user accounts for a project or instance. Linux -// resources are read-only views into users and groups managed by the -// Compute Engine Accounts API. -type LinuxAccountViews struct { - // GroupViews: [Output Only] A list of all groups within a project. - GroupViews []*LinuxGroupView `json:"groupViews,omitempty"` - - // Kind: [Output Only] Type of the resource. Always - // clouduseraccounts#linuxAccountViews for Linux resources. - Kind string `json:"kind,omitempty"` - - // UserViews: [Output Only] A list of all users within a project. - UserViews []*LinuxUserView `json:"userViews,omitempty"` - - // ForceSendFields is a list of field names (e.g. "GroupViews") 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. "GroupViews") 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 *LinuxAccountViews) MarshalJSON() ([]byte, error) { - type NoMethod LinuxAccountViews - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type LinuxGetAuthorizedKeysViewResponse struct { - // Resource: [Output Only] A list of authorized public keys for a user. - Resource *AuthorizedKeysView `json:"resource,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Resource") 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. "Resource") 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 *LinuxGetAuthorizedKeysViewResponse) MarshalJSON() ([]byte, error) { - type NoMethod LinuxGetAuthorizedKeysViewResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type LinuxGetLinuxAccountViewsResponse struct { - // Resource: [Output Only] A list of authorized user accounts and - // groups. - Resource *LinuxAccountViews `json:"resource,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Resource") 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. "Resource") 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 *LinuxGetLinuxAccountViewsResponse) MarshalJSON() ([]byte, error) { - type NoMethod LinuxGetLinuxAccountViewsResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// LinuxGroupView: A detailed view of a Linux group. -type LinuxGroupView struct { - // Gid: [Output Only] The Group ID. - Gid int64 `json:"gid,omitempty"` - - // GroupName: [Output Only] Group name. - GroupName string `json:"groupName,omitempty"` - - // Members: [Output Only] List of user accounts that belong to the - // group. - Members []string `json:"members,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Gid") 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. "Gid") 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 *LinuxGroupView) MarshalJSON() ([]byte, error) { - type NoMethod LinuxGroupView - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// LinuxUserView: A detailed view of a Linux user account. -type LinuxUserView struct { - // Gecos: [Output Only] The GECOS (user information) entry for this - // account. - Gecos string `json:"gecos,omitempty"` - - // Gid: [Output Only] User's default group ID. - Gid int64 `json:"gid,omitempty"` - - // HomeDirectory: [Output Only] The path to the home directory for this - // account. - HomeDirectory string `json:"homeDirectory,omitempty"` - - // Shell: [Output Only] The path to the login shell for this account. - Shell string `json:"shell,omitempty"` - - // Uid: [Output Only] User ID. - Uid int64 `json:"uid,omitempty"` - - // Username: [Output Only] The username of the account. - Username string `json:"username,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Gecos") 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. "Gecos") 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 *LinuxUserView) MarshalJSON() ([]byte, error) { - type NoMethod LinuxUserView - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// Operation: An Operation resource, used to manage asynchronous API -// requests. -type Operation struct { - // ClientOperationId: [Output Only] Reserved for future use. - ClientOperationId string `json:"clientOperationId,omitempty"` - - // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text - // format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - - // Description: [Output Only] A textual description of the operation, - // which is set when the operation is created. - Description string `json:"description,omitempty"` - - // EndTime: [Output Only] The time that this operation was completed. - // This value is in RFC3339 text format. - EndTime string `json:"endTime,omitempty"` - - // Error: [Output Only] If errors are generated during processing of the - // operation, this field will be populated. - Error *OperationError `json:"error,omitempty"` - - // HttpErrorMessage: [Output Only] If the operation fails, this field - // contains the HTTP error message that was returned, such as NOT FOUND. - HttpErrorMessage string `json:"httpErrorMessage,omitempty"` - - // HttpErrorStatusCode: [Output Only] If the operation fails, this field - // contains the HTTP error status code that was returned. For example, a - // 404 means the resource was not found. - HttpErrorStatusCode int64 `json:"httpErrorStatusCode,omitempty"` - - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. - Id uint64 `json:"id,omitempty,string"` - - // InsertTime: [Output Only] The time that this operation was requested. - // This value is in RFC3339 text format. - InsertTime string `json:"insertTime,omitempty"` - - // Kind: [Output Only] Type of the resource. Always compute#operation - // for Operation resources. - Kind string `json:"kind,omitempty"` - - // Name: [Output Only] Name of the resource. - Name string `json:"name,omitempty"` - - // OperationType: [Output Only] The type of operation, such as insert, - // update, or delete, and so on. - OperationType string `json:"operationType,omitempty"` - - // Progress: [Output Only] An optional progress indicator that ranges - // from 0 to 100. There is no requirement that this be linear or support - // any granularity of operations. This should not be used to guess when - // the operation will be complete. This number should monotonically - // increase as the operation progresses. - Progress int64 `json:"progress,omitempty"` - - // Region: [Output Only] The URL of the region where the operation - // resides. Only available when performing regional operations. - Region string `json:"region,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - - // StartTime: [Output Only] The time that this operation was started by - // the server. This value is in RFC3339 text format. - StartTime string `json:"startTime,omitempty"` - - // Status: [Output Only] The status of the operation, which can be one - // of the following: PENDING, RUNNING, or DONE. - // - // Possible values: - // "DONE" - // "PENDING" - // "RUNNING" - Status string `json:"status,omitempty"` - - // StatusMessage: [Output Only] An optional textual description of the - // current status of the operation. - StatusMessage string `json:"statusMessage,omitempty"` - - // TargetId: [Output Only] The unique target ID, which identifies a - // specific incarnation of the target resource. - TargetId uint64 `json:"targetId,omitempty,string"` - - // TargetLink: [Output Only] The URL of the resource that the operation - // modifies. - TargetLink string `json:"targetLink,omitempty"` - - // User: [Output Only] User who requested the operation, for example: - // user@example.com. - User string `json:"user,omitempty"` - - // Warnings: [Output Only] If warning messages are generated during - // processing of the operation, this field will be populated. - Warnings []*OperationWarnings `json:"warnings,omitempty"` - - // Zone: [Output Only] The URL of the zone where the operation resides. - // Only available when performing per-zone operations. - Zone string `json:"zone,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "ClientOperationId") - // 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. "ClientOperationId") 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 *Operation) MarshalJSON() ([]byte, error) { - type NoMethod Operation - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// OperationError: [Output Only] If errors are generated during -// processing of the operation, this field will be populated. -type OperationError struct { - // Errors: [Output Only] The array of errors encountered while - // processing this operation. - Errors []*OperationErrorErrors `json:"errors,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Errors") 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. "Errors") 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 *OperationError) MarshalJSON() ([]byte, error) { - type NoMethod OperationError - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type OperationErrorErrors struct { - // Code: [Output Only] The error type identifier for this error. - Code string `json:"code,omitempty"` - - // Location: [Output Only] Indicates the field in the request that - // caused the error. This property is optional. - Location string `json:"location,omitempty"` - - // Message: [Output Only] An optional, human-readable error message. - Message string `json:"message,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Code") 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. "Code") 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 *OperationErrorErrors) MarshalJSON() ([]byte, error) { - type NoMethod OperationErrorErrors - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type OperationWarnings struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in - // the response. - // - // Possible values: - // "CLEANUP_FAILED" - // "DEPRECATED_RESOURCE_USED" - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - // "INJECTED_KERNELS_DEPRECATED" - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - // "NEXT_HOP_CANNOT_IP_FORWARD" - // "NEXT_HOP_INSTANCE_NOT_FOUND" - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - // "NEXT_HOP_NOT_RUNNING" - // "NOT_CRITICAL_ERROR" - // "NO_RESULTS_ON_PAGE" - // "REQUIRED_TOS_AGREEMENT" - // "RESOURCE_NOT_DELETED" - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - // "UNREACHABLE" - Code string `json:"code,omitempty"` - - // Data: [Output Only] Metadata about this warning in key: value format. - // For example: - // "data": [ { "key": "scope", "value": "zones/us-east1-d" } - Data []*OperationWarningsData `json:"data,omitempty"` - - // Message: [Output Only] A human-readable description of the warning - // code. - Message string `json:"message,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Code") 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. "Code") 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 *OperationWarnings) MarshalJSON() ([]byte, error) { - type NoMethod OperationWarnings - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type OperationWarningsData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being returned. For example, for warnings where there are no results - // in a list request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP - // forwarding). - Key string `json:"key,omitempty"` - - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Key") 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. "Key") 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 *OperationWarningsData) MarshalJSON() ([]byte, error) { - type NoMethod OperationWarningsData - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// OperationList: Contains a list of Operation resources. -type OperationList struct { - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. - Id string `json:"id,omitempty"` - - // Items: [Output Only] A list of Operation resources. - Items []*Operation `json:"items,omitempty"` - - // Kind: [Output Only] Type of resource. Always compute#operations for - // Operations resource. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") 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. "Id") 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 *OperationList) MarshalJSON() ([]byte, error) { - type NoMethod OperationList - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// PublicKey: A public key for authenticating to guests. -type PublicKey struct { - // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text - // format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - - // Description: An optional textual description of the resource; - // provided by the client when the resource is created. - Description string `json:"description,omitempty"` - - // ExpirationTimestamp: Optional expiration timestamp. If provided, the - // timestamp must be in RFC3339 text format. If not provided, the public - // key never expires. - ExpirationTimestamp string `json:"expirationTimestamp,omitempty"` - - // Fingerprint: [Output Only] The fingerprint of the key is defined by - // RFC4716 to be the MD5 digest of the public key. - Fingerprint string `json:"fingerprint,omitempty"` - - // Key: Public key text in SSH format, defined by RFC4253 section 6.6. - Key string `json:"key,omitempty"` - - // ForceSendFields is a list of field names (e.g. "CreationTimestamp") - // 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. "CreationTimestamp") 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 *PublicKey) MarshalJSON() ([]byte, error) { - type NoMethod PublicKey - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// User: A User resource. -type User struct { - // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text - // format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - - // Description: An optional textual description of the resource; - // provided by the client when the resource is created. - Description string `json:"description,omitempty"` - - // Groups: [Output Only] A list of URLs to Group resources who contain - // the user. Users are only members of groups in the same project. - Groups []string `json:"groups,omitempty"` - - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id uint64 `json:"id,omitempty,string"` - - // Kind: [Output Only] Type of the resource. Always - // clouduseraccounts#user for users. - Kind string `json:"kind,omitempty"` - - // Name: Name of the resource; provided by the client when the resource - // is created. - Name string `json:"name,omitempty"` - - // Owner: Email address of account's owner. This account will be - // validated to make sure it exists. The email can belong to any domain, - // but it must be tied to a Google account. - Owner string `json:"owner,omitempty"` - - // PublicKeys: [Output Only] Public keys that this user may use to - // login. - PublicKeys []*PublicKey `json:"publicKeys,omitempty"` - - // SelfLink: [Output Only] Server defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "CreationTimestamp") - // 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. "CreationTimestamp") 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 *User) MarshalJSON() ([]byte, error) { - type NoMethod User - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type UserList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: [Output Only] A list of User resources. - Items []*User `json:"items,omitempty"` - - // Kind: [Output Only] Type of resource. Always - // clouduseraccounts#userList for lists of users. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] A token used to continue a truncated - // list request. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") 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. "Id") 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 *UserList) MarshalJSON() ([]byte, error) { - type NoMethod UserList - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// method id "clouduseraccounts.globalAccountsOperations.delete": - -type GlobalAccountsOperationsDeleteCall struct { - s *Service - project string - operation string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified operation resource. -func (r *GlobalAccountsOperationsService) Delete(project string, operation string) *GlobalAccountsOperationsDeleteCall { - c := &GlobalAccountsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.operation = operation - 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 *GlobalAccountsOperationsDeleteCall) Fields(s ...googleapi.Field) *GlobalAccountsOperationsDeleteCall { - 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 *GlobalAccountsOperationsDeleteCall) Context(ctx context.Context) *GlobalAccountsOperationsDeleteCall { - 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 *GlobalAccountsOperationsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GlobalAccountsOperationsDeleteCall) 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 - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/operations/{operation}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("DELETE", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "operation": c.operation, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "clouduseraccounts.globalAccountsOperations.delete" call. -func (c *GlobalAccountsOperationsDeleteCall) Do(opts ...googleapi.CallOption) error { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if err != nil { - return err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return err - } - return nil - // { - // "description": "Deletes the specified operation resource.", - // "httpMethod": "DELETE", - // "id": "clouduseraccounts.globalAccountsOperations.delete", - // "parameterOrder": [ - // "project", - // "operation" - // ], - // "parameters": { - // "operation": { - // "description": "Name of the Operations resource to delete.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/operations/{operation}", - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/cloud.useraccounts" - // ] - // } - -} - -// method id "clouduseraccounts.globalAccountsOperations.get": - -type GlobalAccountsOperationsGetCall struct { - s *Service - project string - operation string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Retrieves the specified operation resource. -func (r *GlobalAccountsOperationsService) Get(project string, operation string) *GlobalAccountsOperationsGetCall { - c := &GlobalAccountsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.operation = operation - 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 *GlobalAccountsOperationsGetCall) Fields(s ...googleapi.Field) *GlobalAccountsOperationsGetCall { - 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 *GlobalAccountsOperationsGetCall) IfNoneMatch(entityTag string) *GlobalAccountsOperationsGetCall { - 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 *GlobalAccountsOperationsGetCall) Context(ctx context.Context) *GlobalAccountsOperationsGetCall { - 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 *GlobalAccountsOperationsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GlobalAccountsOperationsGetCall) 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, "{project}/global/operations/{operation}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "operation": c.operation, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "clouduseraccounts.globalAccountsOperations.get" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.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 *GlobalAccountsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, 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 := &Operation{ - 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": "Retrieves the specified operation resource.", - // "httpMethod": "GET", - // "id": "clouduseraccounts.globalAccountsOperations.get", - // "parameterOrder": [ - // "project", - // "operation" - // ], - // "parameters": { - // "operation": { - // "description": "Name of the Operations resource to return.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/operations/{operation}", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/cloud-platform.read-only", - // "https://www.googleapis.com/auth/cloud.useraccounts", - // "https://www.googleapis.com/auth/cloud.useraccounts.readonly" - // ] - // } - -} - -// method id "clouduseraccounts.globalAccountsOperations.list": - -type GlobalAccountsOperationsListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of operation resources contained within the -// specified project. -func (r *GlobalAccountsOperationsService) List(project string) *GlobalAccountsOperationsListCall { - c := &GlobalAccountsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": Sets a filter expression -// for filtering listed resources, in the form filter={expression}. Your -// {expression} must be in the format: field_name comparison_string -// literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use filter=name ne -// example-instance. -// -// Compute Engine Beta API Only: If you use filtering in the Beta API, -// you can also filter on nested fields. For example, you could filter -// on instances that have set the scheduling.automaticRestart field to -// true. In particular, use filtering on nested fields to take advantage -// of instance labels to organize and filter results based on label -// values. -// -// The Beta API also supports filtering on multiple expressions by -// providing each separate expression within parentheses. For example, -// (scheduling.automaticRestart eq true) (zone eq us-central1-f). -// Multiple expressions are treated as AND expressions, meaning that -// resources must match all expressions to pass the filters. -func (c *GlobalAccountsOperationsListCall) Filter(filter string) *GlobalAccountsOperationsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. -func (c *GlobalAccountsOperationsListCall) MaxResults(maxResults int64) *GlobalAccountsOperationsListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *GlobalAccountsOperationsListCall) OrderBy(orderBy string) *GlobalAccountsOperationsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *GlobalAccountsOperationsListCall) PageToken(pageToken string) *GlobalAccountsOperationsListCall { - 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 *GlobalAccountsOperationsListCall) Fields(s ...googleapi.Field) *GlobalAccountsOperationsListCall { - 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 *GlobalAccountsOperationsListCall) IfNoneMatch(entityTag string) *GlobalAccountsOperationsListCall { - 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 *GlobalAccountsOperationsListCall) Context(ctx context.Context) *GlobalAccountsOperationsListCall { - 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 *GlobalAccountsOperationsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GlobalAccountsOperationsListCall) 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, "{project}/global/operations") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "clouduseraccounts.globalAccountsOperations.list" call. -// Exactly one of *OperationList or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *OperationList.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 *GlobalAccountsOperationsListCall) Do(opts ...googleapi.CallOption) (*OperationList, 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 := &OperationList{ - 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": "Retrieves the list of operation resources contained within the specified project.", - // "httpMethod": "GET", - // "id": "clouduseraccounts.globalAccountsOperations.list", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", - // "format": "uint32", - // "location": "query", - // "maximum": "500", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/operations", - // "response": { - // "$ref": "OperationList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/cloud-platform.read-only", - // "https://www.googleapis.com/auth/cloud.useraccounts", - // "https://www.googleapis.com/auth/cloud.useraccounts.readonly" - // ] - // } - -} - -// 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 *GlobalAccountsOperationsListCall) Pages(ctx context.Context, f func(*OperationList) 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 "clouduseraccounts.groups.addMember": - -type GroupsAddMemberCall struct { - s *Service - project string - groupName string - groupsaddmemberrequest *GroupsAddMemberRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// AddMember: Adds users to the specified group. -func (r *GroupsService) AddMember(project string, groupName string, groupsaddmemberrequest *GroupsAddMemberRequest) *GroupsAddMemberCall { - c := &GroupsAddMemberCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.groupName = groupName - c.groupsaddmemberrequest = groupsaddmemberrequest - 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 *GroupsAddMemberCall) Fields(s ...googleapi.Field) *GroupsAddMemberCall { - 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 *GroupsAddMemberCall) Context(ctx context.Context) *GroupsAddMemberCall { - 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 *GroupsAddMemberCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GroupsAddMemberCall) 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.groupsaddmemberrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/groups/{groupName}/addMember") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "groupName": c.groupName, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "clouduseraccounts.groups.addMember" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.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 *GroupsAddMemberCall) Do(opts ...googleapi.CallOption) (*Operation, 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 := &Operation{ - 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": "Adds users to the specified group.", - // "httpMethod": "POST", - // "id": "clouduseraccounts.groups.addMember", - // "parameterOrder": [ - // "project", - // "groupName" - // ], - // "parameters": { - // "groupName": { - // "description": "Name of the group for this request.", - // "location": "path", - // "pattern": "[a-z][-a-z0-9_]{0,31}", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/groups/{groupName}/addMember", - // "request": { - // "$ref": "GroupsAddMemberRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/cloud.useraccounts" - // ] - // } - -} - -// method id "clouduseraccounts.groups.delete": - -type GroupsDeleteCall struct { - s *Service - project string - groupName string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified Group resource. -func (r *GroupsService) Delete(project string, groupName string) *GroupsDeleteCall { - c := &GroupsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.groupName = groupName - 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 *GroupsDeleteCall) Fields(s ...googleapi.Field) *GroupsDeleteCall { - 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 *GroupsDeleteCall) Context(ctx context.Context) *GroupsDeleteCall { - 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 *GroupsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GroupsDeleteCall) 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 - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/groups/{groupName}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("DELETE", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "groupName": c.groupName, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "clouduseraccounts.groups.delete" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.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 *GroupsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, 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 := &Operation{ - 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": "Deletes the specified Group resource.", - // "httpMethod": "DELETE", - // "id": "clouduseraccounts.groups.delete", - // "parameterOrder": [ - // "project", - // "groupName" - // ], - // "parameters": { - // "groupName": { - // "description": "Name of the Group resource to delete.", - // "location": "path", - // "pattern": "[a-z][-a-z0-9_]{0,31}", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/groups/{groupName}", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/cloud.useraccounts" - // ] - // } - -} - -// method id "clouduseraccounts.groups.get": - -type GroupsGetCall struct { - s *Service - project string - groupName string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified Group resource. -func (r *GroupsService) Get(project string, groupName string) *GroupsGetCall { - c := &GroupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.groupName = groupName - 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 *GroupsGetCall) Fields(s ...googleapi.Field) *GroupsGetCall { - 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 *GroupsGetCall) IfNoneMatch(entityTag string) *GroupsGetCall { - 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 *GroupsGetCall) Context(ctx context.Context) *GroupsGetCall { - 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 *GroupsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GroupsGetCall) 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, "{project}/global/groups/{groupName}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "groupName": c.groupName, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "clouduseraccounts.groups.get" call. -// Exactly one of *Group or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Group.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 *GroupsGetCall) Do(opts ...googleapi.CallOption) (*Group, 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 := &Group{ - 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": "Returns the specified Group resource.", - // "httpMethod": "GET", - // "id": "clouduseraccounts.groups.get", - // "parameterOrder": [ - // "project", - // "groupName" - // ], - // "parameters": { - // "groupName": { - // "description": "Name of the Group resource to return.", - // "location": "path", - // "pattern": "[a-z][-a-z0-9_]{0,31}", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/groups/{groupName}", - // "response": { - // "$ref": "Group" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/cloud-platform.read-only", - // "https://www.googleapis.com/auth/cloud.useraccounts", - // "https://www.googleapis.com/auth/cloud.useraccounts.readonly" - // ] - // } - -} - -// method id "clouduseraccounts.groups.insert": - -type GroupsInsertCall struct { - s *Service - project string - group *Group - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a Group resource in the specified project using the -// data included in the request. -func (r *GroupsService) Insert(project string, group *Group) *GroupsInsertCall { - c := &GroupsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.group = group - 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 *GroupsInsertCall) Fields(s ...googleapi.Field) *GroupsInsertCall { - 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 *GroupsInsertCall) Context(ctx context.Context) *GroupsInsertCall { - 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 *GroupsInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GroupsInsertCall) 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.group) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/groups") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "clouduseraccounts.groups.insert" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.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 *GroupsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, 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 := &Operation{ - 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": "Creates a Group resource in the specified project using the data included in the request.", - // "httpMethod": "POST", - // "id": "clouduseraccounts.groups.insert", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/groups", - // "request": { - // "$ref": "Group" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/cloud.useraccounts" - // ] - // } - -} - -// method id "clouduseraccounts.groups.list": - -type GroupsListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of groups contained within the specified -// project. -func (r *GroupsService) List(project string) *GroupsListCall { - c := &GroupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": Sets a filter expression -// for filtering listed resources, in the form filter={expression}. Your -// {expression} must be in the format: field_name comparison_string -// literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use filter=name ne -// example-instance. -// -// Compute Engine Beta API Only: If you use filtering in the Beta API, -// you can also filter on nested fields. For example, you could filter -// on instances that have set the scheduling.automaticRestart field to -// true. In particular, use filtering on nested fields to take advantage -// of instance labels to organize and filter results based on label -// values. -// -// The Beta API also supports filtering on multiple expressions by -// providing each separate expression within parentheses. For example, -// (scheduling.automaticRestart eq true) (zone eq us-central1-f). -// Multiple expressions are treated as AND expressions, meaning that -// resources must match all expressions to pass the filters. -func (c *GroupsListCall) Filter(filter string) *GroupsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. -func (c *GroupsListCall) MaxResults(maxResults int64) *GroupsListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *GroupsListCall) OrderBy(orderBy string) *GroupsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *GroupsListCall) PageToken(pageToken string) *GroupsListCall { - 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 *GroupsListCall) Fields(s ...googleapi.Field) *GroupsListCall { - 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 *GroupsListCall) IfNoneMatch(entityTag string) *GroupsListCall { - 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 *GroupsListCall) Context(ctx context.Context) *GroupsListCall { - 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 *GroupsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GroupsListCall) 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, "{project}/global/groups") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "clouduseraccounts.groups.list" call. -// Exactly one of *GroupList or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *GroupList.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 *GroupsListCall) Do(opts ...googleapi.CallOption) (*GroupList, 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 := &GroupList{ - 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": "Retrieves the list of groups contained within the specified project.", - // "httpMethod": "GET", - // "id": "clouduseraccounts.groups.list", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", - // "format": "uint32", - // "location": "query", - // "maximum": "500", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/groups", - // "response": { - // "$ref": "GroupList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/cloud-platform.read-only", - // "https://www.googleapis.com/auth/cloud.useraccounts", - // "https://www.googleapis.com/auth/cloud.useraccounts.readonly" - // ] - // } - -} - -// 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 *GroupsListCall) Pages(ctx context.Context, f func(*GroupList) 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 "clouduseraccounts.groups.removeMember": - -type GroupsRemoveMemberCall struct { - s *Service - project string - groupName string - groupsremovememberrequest *GroupsRemoveMemberRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// RemoveMember: Removes users from the specified group. -func (r *GroupsService) RemoveMember(project string, groupName string, groupsremovememberrequest *GroupsRemoveMemberRequest) *GroupsRemoveMemberCall { - c := &GroupsRemoveMemberCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.groupName = groupName - c.groupsremovememberrequest = groupsremovememberrequest - 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 *GroupsRemoveMemberCall) Fields(s ...googleapi.Field) *GroupsRemoveMemberCall { - 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 *GroupsRemoveMemberCall) Context(ctx context.Context) *GroupsRemoveMemberCall { - 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 *GroupsRemoveMemberCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GroupsRemoveMemberCall) 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.groupsremovememberrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/groups/{groupName}/removeMember") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "groupName": c.groupName, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "clouduseraccounts.groups.removeMember" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.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 *GroupsRemoveMemberCall) Do(opts ...googleapi.CallOption) (*Operation, 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 := &Operation{ - 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": "Removes users from the specified group.", - // "httpMethod": "POST", - // "id": "clouduseraccounts.groups.removeMember", - // "parameterOrder": [ - // "project", - // "groupName" - // ], - // "parameters": { - // "groupName": { - // "description": "Name of the group for this request.", - // "location": "path", - // "pattern": "[a-z][-a-z0-9_]{0,31}", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/groups/{groupName}/removeMember", - // "request": { - // "$ref": "GroupsRemoveMemberRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/cloud.useraccounts" - // ] - // } - -} - -// method id "clouduseraccounts.linux.getAuthorizedKeysView": - -type LinuxGetAuthorizedKeysViewCall struct { - s *Service - project string - zone string - user string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// GetAuthorizedKeysView: Returns a list of authorized public keys for a -// specific user account. -func (r *LinuxService) GetAuthorizedKeysView(project string, zone string, user string, instance string) *LinuxGetAuthorizedKeysViewCall { - c := &LinuxGetAuthorizedKeysViewCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.user = user - c.urlParams_.Set("instance", instance) - return c -} - -// Login sets the optional parameter "login": Whether the view was -// requested as part of a user-initiated login. -func (c *LinuxGetAuthorizedKeysViewCall) Login(login bool) *LinuxGetAuthorizedKeysViewCall { - c.urlParams_.Set("login", fmt.Sprint(login)) - 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 *LinuxGetAuthorizedKeysViewCall) Fields(s ...googleapi.Field) *LinuxGetAuthorizedKeysViewCall { - 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 *LinuxGetAuthorizedKeysViewCall) Context(ctx context.Context) *LinuxGetAuthorizedKeysViewCall { - 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 *LinuxGetAuthorizedKeysViewCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *LinuxGetAuthorizedKeysViewCall) 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 - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/authorizedKeysView/{user}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "user": c.user, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "clouduseraccounts.linux.getAuthorizedKeysView" call. -// Exactly one of *LinuxGetAuthorizedKeysViewResponse or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *LinuxGetAuthorizedKeysViewResponse.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 *LinuxGetAuthorizedKeysViewCall) Do(opts ...googleapi.CallOption) (*LinuxGetAuthorizedKeysViewResponse, 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 := &LinuxGetAuthorizedKeysViewResponse{ - 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": "Returns a list of authorized public keys for a specific user account.", - // "httpMethod": "POST", - // "id": "clouduseraccounts.linux.getAuthorizedKeysView", - // "parameterOrder": [ - // "project", - // "zone", - // "user", - // "instance" - // ], - // "parameters": { - // "instance": { - // "description": "The fully-qualified URL of the virtual machine requesting the view.", - // "location": "query", - // "required": true, - // "type": "string" - // }, - // "login": { - // "description": "Whether the view was requested as part of a user-initiated login.", - // "location": "query", - // "type": "boolean" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "user": { - // "description": "The user account for which you want to get a list of authorized public keys.", - // "location": "path", - // "pattern": "[a-z][-a-z0-9_]{0,31}", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "Name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/authorizedKeysView/{user}", - // "response": { - // "$ref": "LinuxGetAuthorizedKeysViewResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/cloud-platform.read-only", - // "https://www.googleapis.com/auth/cloud.useraccounts", - // "https://www.googleapis.com/auth/cloud.useraccounts.readonly" - // ] - // } - -} - -// method id "clouduseraccounts.linux.getLinuxAccountViews": - -type LinuxGetLinuxAccountViewsCall struct { - s *Service - project string - zone string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// GetLinuxAccountViews: Retrieves a list of user accounts for an -// instance within a specific project. -func (r *LinuxService) GetLinuxAccountViews(project string, zone string, instance string) *LinuxGetLinuxAccountViewsCall { - c := &LinuxGetLinuxAccountViewsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.urlParams_.Set("instance", instance) - return c -} - -// Filter sets the optional parameter "filter": Sets a filter expression -// for filtering listed resources, in the form filter={expression}. Your -// {expression} must be in the format: field_name comparison_string -// literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use filter=name ne -// example-instance. -// -// Compute Engine Beta API Only: If you use filtering in the Beta API, -// you can also filter on nested fields. For example, you could filter -// on instances that have set the scheduling.automaticRestart field to -// true. In particular, use filtering on nested fields to take advantage -// of instance labels to organize and filter results based on label -// values. -// -// The Beta API also supports filtering on multiple expressions by -// providing each separate expression within parentheses. For example, -// (scheduling.automaticRestart eq true) (zone eq us-central1-f). -// Multiple expressions are treated as AND expressions, meaning that -// resources must match all expressions to pass the filters. -func (c *LinuxGetLinuxAccountViewsCall) Filter(filter string) *LinuxGetLinuxAccountViewsCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. -func (c *LinuxGetLinuxAccountViewsCall) MaxResults(maxResults int64) *LinuxGetLinuxAccountViewsCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *LinuxGetLinuxAccountViewsCall) OrderBy(orderBy string) *LinuxGetLinuxAccountViewsCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *LinuxGetLinuxAccountViewsCall) PageToken(pageToken string) *LinuxGetLinuxAccountViewsCall { - 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 *LinuxGetLinuxAccountViewsCall) Fields(s ...googleapi.Field) *LinuxGetLinuxAccountViewsCall { - 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 *LinuxGetLinuxAccountViewsCall) Context(ctx context.Context) *LinuxGetLinuxAccountViewsCall { - 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 *LinuxGetLinuxAccountViewsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *LinuxGetLinuxAccountViewsCall) 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 - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/linuxAccountViews") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "clouduseraccounts.linux.getLinuxAccountViews" call. -// Exactly one of *LinuxGetLinuxAccountViewsResponse or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *LinuxGetLinuxAccountViewsResponse.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 *LinuxGetLinuxAccountViewsCall) Do(opts ...googleapi.CallOption) (*LinuxGetLinuxAccountViewsResponse, 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 := &LinuxGetLinuxAccountViewsResponse{ - 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": "Retrieves a list of user accounts for an instance within a specific project.", - // "httpMethod": "POST", - // "id": "clouduseraccounts.linux.getLinuxAccountViews", - // "parameterOrder": [ - // "project", - // "zone", - // "instance" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "instance": { - // "description": "The fully-qualified URL of the virtual machine requesting the views.", - // "location": "query", - // "required": true, - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", - // "format": "uint32", - // "location": "query", - // "maximum": "500", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "Name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/linuxAccountViews", - // "response": { - // "$ref": "LinuxGetLinuxAccountViewsResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/cloud-platform.read-only", - // "https://www.googleapis.com/auth/cloud.useraccounts", - // "https://www.googleapis.com/auth/cloud.useraccounts.readonly" - // ] - // } - -} - -// method id "clouduseraccounts.users.addPublicKey": - -type UsersAddPublicKeyCall struct { - s *Service - project string - user string - publickey *PublicKey - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// AddPublicKey: Adds a public key to the specified User resource with -// the data included in the request. -func (r *UsersService) AddPublicKey(project string, user string, publickey *PublicKey) *UsersAddPublicKeyCall { - c := &UsersAddPublicKeyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.user = user - c.publickey = publickey - 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 *UsersAddPublicKeyCall) Fields(s ...googleapi.Field) *UsersAddPublicKeyCall { - 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 *UsersAddPublicKeyCall) Context(ctx context.Context) *UsersAddPublicKeyCall { - 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 *UsersAddPublicKeyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *UsersAddPublicKeyCall) 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.publickey) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/users/{user}/addPublicKey") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "user": c.user, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "clouduseraccounts.users.addPublicKey" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.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 *UsersAddPublicKeyCall) Do(opts ...googleapi.CallOption) (*Operation, 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 := &Operation{ - 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": "Adds a public key to the specified User resource with the data included in the request.", - // "httpMethod": "POST", - // "id": "clouduseraccounts.users.addPublicKey", - // "parameterOrder": [ - // "project", - // "user" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "user": { - // "description": "Name of the user for this request.", - // "location": "path", - // "pattern": "[a-z][-a-z0-9_]{0,31}", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/users/{user}/addPublicKey", - // "request": { - // "$ref": "PublicKey" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/cloud.useraccounts" - // ] - // } - -} - -// method id "clouduseraccounts.users.delete": - -type UsersDeleteCall struct { - s *Service - project string - user string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified User resource. -func (r *UsersService) Delete(project string, user string) *UsersDeleteCall { - c := &UsersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.user = user - 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 *UsersDeleteCall) Fields(s ...googleapi.Field) *UsersDeleteCall { - 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 *UsersDeleteCall) Context(ctx context.Context) *UsersDeleteCall { - 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 *UsersDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *UsersDeleteCall) 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 - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/users/{user}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("DELETE", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "user": c.user, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "clouduseraccounts.users.delete" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.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 *UsersDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, 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 := &Operation{ - 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": "Deletes the specified User resource.", - // "httpMethod": "DELETE", - // "id": "clouduseraccounts.users.delete", - // "parameterOrder": [ - // "project", - // "user" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "user": { - // "description": "Name of the user resource to delete.", - // "location": "path", - // "pattern": "[a-z][-a-z0-9_]{0,31}", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/users/{user}", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/cloud.useraccounts" - // ] - // } - -} - -// method id "clouduseraccounts.users.get": - -type UsersGetCall struct { - s *Service - project string - user string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified User resource. -func (r *UsersService) Get(project string, user string) *UsersGetCall { - c := &UsersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.user = user - 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 *UsersGetCall) Fields(s ...googleapi.Field) *UsersGetCall { - 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 *UsersGetCall) IfNoneMatch(entityTag string) *UsersGetCall { - 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 *UsersGetCall) Context(ctx context.Context) *UsersGetCall { - 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 *UsersGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *UsersGetCall) 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, "{project}/global/users/{user}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "user": c.user, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "clouduseraccounts.users.get" call. -// Exactly one of *User or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *User.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 *UsersGetCall) Do(opts ...googleapi.CallOption) (*User, 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 := &User{ - 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": "Returns the specified User resource.", - // "httpMethod": "GET", - // "id": "clouduseraccounts.users.get", - // "parameterOrder": [ - // "project", - // "user" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "user": { - // "description": "Name of the user resource to return.", - // "location": "path", - // "pattern": "[a-z][-a-z0-9_]{0,31}", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/users/{user}", - // "response": { - // "$ref": "User" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/cloud-platform.read-only", - // "https://www.googleapis.com/auth/cloud.useraccounts", - // "https://www.googleapis.com/auth/cloud.useraccounts.readonly" - // ] - // } - -} - -// method id "clouduseraccounts.users.insert": - -type UsersInsertCall struct { - s *Service - project string - user *User - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a User resource in the specified project using the -// data included in the request. -func (r *UsersService) Insert(project string, user *User) *UsersInsertCall { - c := &UsersInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.user = user - 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 *UsersInsertCall) Fields(s ...googleapi.Field) *UsersInsertCall { - 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 *UsersInsertCall) Context(ctx context.Context) *UsersInsertCall { - 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 *UsersInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *UsersInsertCall) 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.user) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/users") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "clouduseraccounts.users.insert" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.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 *UsersInsertCall) Do(opts ...googleapi.CallOption) (*Operation, 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 := &Operation{ - 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": "Creates a User resource in the specified project using the data included in the request.", - // "httpMethod": "POST", - // "id": "clouduseraccounts.users.insert", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/users", - // "request": { - // "$ref": "User" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/cloud.useraccounts" - // ] - // } - -} - -// method id "clouduseraccounts.users.list": - -type UsersListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves a list of users contained within the specified -// project. -func (r *UsersService) List(project string) *UsersListCall { - c := &UsersListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": Sets a filter expression -// for filtering listed resources, in the form filter={expression}. Your -// {expression} must be in the format: field_name comparison_string -// literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use filter=name ne -// example-instance. -// -// Compute Engine Beta API Only: If you use filtering in the Beta API, -// you can also filter on nested fields. For example, you could filter -// on instances that have set the scheduling.automaticRestart field to -// true. In particular, use filtering on nested fields to take advantage -// of instance labels to organize and filter results based on label -// values. -// -// The Beta API also supports filtering on multiple expressions by -// providing each separate expression within parentheses. For example, -// (scheduling.automaticRestart eq true) (zone eq us-central1-f). -// Multiple expressions are treated as AND expressions, meaning that -// resources must match all expressions to pass the filters. -func (c *UsersListCall) Filter(filter string) *UsersListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. -func (c *UsersListCall) MaxResults(maxResults int64) *UsersListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *UsersListCall) OrderBy(orderBy string) *UsersListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *UsersListCall) PageToken(pageToken string) *UsersListCall { - 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 *UsersListCall) Fields(s ...googleapi.Field) *UsersListCall { - 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 *UsersListCall) IfNoneMatch(entityTag string) *UsersListCall { - 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 *UsersListCall) Context(ctx context.Context) *UsersListCall { - 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 *UsersListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *UsersListCall) 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, "{project}/global/users") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "clouduseraccounts.users.list" call. -// Exactly one of *UserList or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *UserList.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 *UsersListCall) Do(opts ...googleapi.CallOption) (*UserList, 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 := &UserList{ - 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": "Retrieves a list of users contained within the specified project.", - // "httpMethod": "GET", - // "id": "clouduseraccounts.users.list", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", - // "format": "uint32", - // "location": "query", - // "maximum": "500", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/users", - // "response": { - // "$ref": "UserList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/cloud-platform.read-only", - // "https://www.googleapis.com/auth/cloud.useraccounts", - // "https://www.googleapis.com/auth/cloud.useraccounts.readonly" - // ] - // } - -} - -// 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 *UsersListCall) Pages(ctx context.Context, f func(*UserList) 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 "clouduseraccounts.users.removePublicKey": - -type UsersRemovePublicKeyCall struct { - s *Service - project string - user string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// RemovePublicKey: Removes the specified public key from the user. -func (r *UsersService) RemovePublicKey(project string, user string, fingerprint string) *UsersRemovePublicKeyCall { - c := &UsersRemovePublicKeyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.user = user - c.urlParams_.Set("fingerprint", fingerprint) - 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 *UsersRemovePublicKeyCall) Fields(s ...googleapi.Field) *UsersRemovePublicKeyCall { - 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 *UsersRemovePublicKeyCall) Context(ctx context.Context) *UsersRemovePublicKeyCall { - 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 *UsersRemovePublicKeyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *UsersRemovePublicKeyCall) 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 - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/users/{user}/removePublicKey") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "user": c.user, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "clouduseraccounts.users.removePublicKey" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.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 *UsersRemovePublicKeyCall) Do(opts ...googleapi.CallOption) (*Operation, 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 := &Operation{ - 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": "Removes the specified public key from the user.", - // "httpMethod": "POST", - // "id": "clouduseraccounts.users.removePublicKey", - // "parameterOrder": [ - // "project", - // "user", - // "fingerprint" - // ], - // "parameters": { - // "fingerprint": { - // "description": "The fingerprint of the public key to delete. Public keys are identified by their fingerprint, which is defined by RFC4716 to be the MD5 digest of the public key.", - // "location": "query", - // "pattern": "[a-f0-9]{32}", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "user": { - // "description": "Name of the user for this request.", - // "location": "path", - // "pattern": "[a-z][-a-z0-9_]{0,31}", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/users/{user}/removePublicKey", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/cloud.useraccounts" - // ] - // } - -}
diff --git a/dataproc/v1alpha1/dataproc-api.json b/dataproc/v1alpha1/dataproc-api.json deleted file mode 100644 index 210f916..0000000 --- a/dataproc/v1alpha1/dataproc-api.json +++ /dev/null
@@ -1,2082 +0,0 @@ -{ - "revision": "20170523", - "documentationLink": "https://cloud.google.com/dataproc/", - "id": "dataproc:v1alpha1", - "title": "Google Cloud Dataproc API", - "ownerName": "Google", - "discoveryVersion": "v1", - "resources": { - "operations": { - "methods": { - "cancel": { - "path": "v1alpha1/{+name}:cancel", - "id": "dataproc.operations.cancel", - "request": { - "$ref": "CancelOperationRequest" - }, - "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED. Clients may use Operations.GetOperation or other methods to check whether the cancellation succeeded or the operation completed despite cancellation.", - "response": { - "$ref": "Empty" - }, - "parameterOrder": [ - "name" - ], - "httpMethod": "POST", - "parameters": { - "name": { - "location": "path", - "description": "The name of the operation resource to be cancelled.", - "required": true, - "type": "string", - "pattern": "^operations/.+$" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1alpha1/operations/{operationsId}:cancel" - }, - "delete": { - "flatPath": "v1alpha1/operations/{operationsId}", - "path": "v1alpha1/{+name}", - "id": "dataproc.operations.delete", - "description": "Deletes a long-running operation. It indicates the client is no longer interested in the operation result. It does not cancel the operation.", - "response": { - "$ref": "Empty" - }, - "parameterOrder": [ - "name" - ], - "httpMethod": "DELETE", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "name": { - "location": "path", - "description": "The name of the operation resource to be deleted.", - "required": true, - "type": "string", - "pattern": "^operations/.+$" - } - } - }, - "get": { - "description": "Gets the latest state of a long-running operation. Clients may use this method to poll the operation result at intervals as recommended by the API service.", - "response": { - "$ref": "Operation" - }, - "parameterOrder": [ - "name" - ], - "httpMethod": "GET", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "name": { - "location": "path", - "description": "The operation resource name.", - "required": true, - "type": "string", - "pattern": "^operations/.+$" - } - }, - "flatPath": "v1alpha1/operations/{operationsId}", - "path": "v1alpha1/{+name}", - "id": "dataproc.operations.get" - }, - "list": { - "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED.", - "parameterOrder": [ - "name" - ], - "httpMethod": "GET", - "response": { - "$ref": "ListOperationsResponse" - }, - "parameters": { - "name": { - "pattern": "^operations$", - "location": "path", - "description": "The operation collection name.", - "required": true, - "type": "string" - }, - "pageToken": { - "location": "query", - "description": "The standard List page token.", - "type": "string" - }, - "pageSize": { - "description": "The standard List page size.", - "format": "int32", - "type": "integer", - "location": "query" - }, - "filter": { - "location": "query", - "description": "Required A JSON object that contains filters for the list operation, in the format {\"key1\":\"value1\",\"key2\":\"value2\", ..., }. Possible keys include project_id, cluster_name, and operation_state_matcher.If project_id is set, requests the list of operations that belong to the specified Google Cloud Platform project ID. This key is required.If cluster_name is set, requests the list of operations that were submitted to the specified cluster name. This key is optional.If operation_state_matcher is set, requests the list of operations that match one of the following status options: ALL, ACTIVE, or NON_ACTIVE.", - "type": "string" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1alpha1/operations", - "path": "v1alpha1/{+name}", - "id": "dataproc.operations.list" - } - } - }, - "projects": { - "resources": { - "regions": { - "resources": { - "jobs": { - "methods": { - "submit": { - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "region": { - "location": "path", - "description": "Required The Dataproc region in which to handle the request.", - "required": true, - "type": "string" - }, - "projectId": { - "description": "Required The ID of the Google Cloud Platform project that the job belongs to.", - "required": true, - "type": "string", - "location": "path" - } - }, - "flatPath": "v1alpha1/projects/{projectId}/regions/{region}/jobs:submit", - "path": "v1alpha1/projects/{projectId}/regions/{region}/jobs:submit", - "id": "dataproc.projects.regions.jobs.submit", - "description": "Submits a job to a cluster.", - "request": { - "$ref": "SubmitJobRequest" - }, - "response": { - "$ref": "Job" - }, - "parameterOrder": [ - "projectId", - "region" - ], - "httpMethod": "POST" - }, - "delete": { - "httpMethod": "DELETE", - "response": { - "$ref": "Job" - }, - "parameterOrder": [ - "projectId", - "region", - "jobId" - ], - "parameters": { - "region": { - "location": "path", - "description": "Required The Dataproc region in which to handle the request.", - "required": true, - "type": "string" - }, - "projectId": { - "location": "path", - "description": "Required The ID of the Google Cloud Platform project that the job belongs to.", - "required": true, - "type": "string" - }, - "jobId": { - "description": "Required The job ID.", - "required": true, - "type": "string", - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1alpha1/projects/{projectId}/regions/{region}/jobs/{jobId}", - "id": "dataproc.projects.regions.jobs.delete", - "path": "v1alpha1/projects/{projectId}/regions/{region}/jobs/{jobId}", - "description": "Deletes the job from the project. If the job is active, the delete fails, and the response returns FAILED_PRECONDITION." - }, - "list": { - "id": "dataproc.projects.regions.jobs.list", - "path": "v1alpha1/projects/{projectId}/regions/{region}/jobs:list", - "description": "Lists regions/{region}/jobs in a project.", - "request": { - "$ref": "ListJobsRequest" - }, - "httpMethod": "POST", - "parameterOrder": [ - "projectId", - "region" - ], - "response": { - "$ref": "ListJobsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "projectId": { - "location": "path", - "description": "Required The ID of the Google Cloud Platform project that the job belongs to.", - "required": true, - "type": "string" - }, - "region": { - "required": true, - "type": "string", - "location": "path", - "description": "Required The Dataproc region in which to handle the request." - } - }, - "flatPath": "v1alpha1/projects/{projectId}/regions/{region}/jobs:list" - }, - "cancel": { - "request": { - "$ref": "CancelJobRequest" - }, - "description": "Starts a job cancellation request. To access the job resource after cancellation, call regions/{region}/jobs:list or regions/{region}/jobs:get.", - "httpMethod": "POST", - "parameterOrder": [ - "projectId", - "region", - "jobId" - ], - "response": { - "$ref": "Job" - }, - "parameters": { - "projectId": { - "description": "Required The ID of the Google Cloud Platform project that the job belongs to.", - "required": true, - "type": "string", - "location": "path" - }, - "jobId": { - "description": "Required The job ID.", - "required": true, - "type": "string", - "location": "path" - }, - "region": { - "location": "path", - "description": "Required The Dataproc region in which to handle the request.", - "required": true, - "type": "string" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1alpha1/projects/{projectId}/regions/{region}/jobs/{jobId}:cancel", - "id": "dataproc.projects.regions.jobs.cancel", - "path": "v1alpha1/projects/{projectId}/regions/{region}/jobs/{jobId}:cancel" - }, - "patch": { - "request": { - "$ref": "Job" - }, - "description": "Updates a job in a project.", - "response": { - "$ref": "Job" - }, - "parameterOrder": [ - "projectId", - "region", - "jobId" - ], - "httpMethod": "PATCH", - "parameters": { - "projectId": { - "description": "Required The ID of the Google Cloud Platform project that the job belongs to.", - "required": true, - "type": "string", - "location": "path" - }, - "jobId": { - "description": "Required The job ID.", - "required": true, - "type": "string", - "location": "path" - }, - "region": { - "location": "path", - "description": "Required The Dataproc region in which to handle the request.", - "required": true, - "type": "string" - }, - "updateMask": { - "type": "string", - "location": "query", - "description": "Required Specifies the path, relative to \u003ccode\u003eJob\u003c/code\u003e, of the field to update. For example, to update the labels of a Job the \u003ccode\u003eupdate_mask\u003c/code\u003e parameter would be specified as \u003ccode\u003elabels\u003c/code\u003e, and the PATCH request body would specify the new value. \u003cstrong\u003eNote:\u003c/strong\u003e Currently, \u003ccode\u003elabels\u003c/code\u003e is the only field that can be updated.", - "format": "google-fieldmask" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1alpha1/projects/{projectId}/regions/{region}/jobs/{jobId}", - "path": "v1alpha1/projects/{projectId}/regions/{region}/jobs/{jobId}", - "id": "dataproc.projects.regions.jobs.patch" - }, - "get": { - "flatPath": "v1alpha1/projects/{projectId}/regions/{region}/jobs/{jobId}", - "path": "v1alpha1/projects/{projectId}/regions/{region}/jobs/{jobId}", - "id": "dataproc.projects.regions.jobs.get", - "description": "Gets the resource representation for a job in a project.", - "response": { - "$ref": "Job" - }, - "httpMethod": "GET", - "parameterOrder": [ - "projectId", - "region", - "jobId" - ], - "parameters": { - "region": { - "description": "Required The Dataproc region in which to handle the request.", - "required": true, - "type": "string", - "location": "path" - }, - "projectId": { - "required": true, - "type": "string", - "location": "path", - "description": "Required The ID of the Google Cloud Platform project that the job belongs to." - }, - "jobId": { - "description": "Required The job ID.", - "required": true, - "type": "string", - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - } - }, - "clusters": { - "methods": { - "create": { - "flatPath": "v1alpha1/projects/{projectId}/regions/{region}/clusters", - "id": "dataproc.projects.regions.clusters.create", - "path": "v1alpha1/projects/{projectId}/regions/{region}/clusters", - "request": { - "$ref": "Cluster" - }, - "description": "Request to create a cluster in a project.", - "httpMethod": "POST", - "parameterOrder": [ - "projectId", - "region" - ], - "response": { - "$ref": "Operation" - }, - "parameters": { - "projectId": { - "location": "path", - "description": "Required The ID of the Google Cloud Platform project that the cluster belongs to.", - "required": true, - "type": "string" - }, - "region": { - "description": "Required The Dataproc region in which to handle the request.", - "required": true, - "type": "string", - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "delete": { - "flatPath": "v1alpha1/projects/{projectId}/regions/{region}/clusters/{clusterName}", - "id": "dataproc.projects.regions.clusters.delete", - "path": "v1alpha1/projects/{projectId}/regions/{region}/clusters/{clusterName}", - "description": "Request to delete a cluster in a project.", - "httpMethod": "DELETE", - "response": { - "$ref": "Operation" - }, - "parameterOrder": [ - "projectId", - "region", - "clusterName" - ], - "parameters": { - "clusterName": { - "location": "path", - "description": "Required The cluster name.", - "required": true, - "type": "string" - }, - "projectId": { - "location": "path", - "description": "Required The ID of the Google Cloud Platform project that the cluster belongs to.", - "required": true, - "type": "string" - }, - "region": { - "location": "path", - "description": "Required The Dataproc region in which to handle the request.", - "required": true, - "type": "string" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "patch": { - "request": { - "$ref": "Cluster" - }, - "description": "Request to update a cluster in a project.", - "httpMethod": "PATCH", - "parameterOrder": [ - "projectId", - "region", - "clusterName" - ], - "response": { - "$ref": "Operation" - }, - "parameters": { - "region": { - "required": true, - "type": "string", - "location": "path", - "description": "Required The Dataproc region in which to handle the request." - }, - "updateMask": { - "location": "query", - "description": "Required Specifies the path, relative to \u003ccode\u003eCluster\u003c/code\u003e, of the field to update. For example, to change the number of workers in a cluster to 5, the \u003ccode\u003eupdate_mask\u003c/code\u003e parameter would be specified as \u003ccode\u003e\"configuration.worker_configuration.num_instances,\"\u003c/code\u003e and the PATCH request body would specify the new value, as follows:\n{\n \"configuration\":{\n \"workerConfiguration\":{\n \"numInstances\":\"5\"\n }\n }\n}\n\u003cstrong\u003eNote:\u003c/strong\u003e Currently, \u003ccode\u003econfiguration.worker_configuration.num_instances\u003c/code\u003e is the only field that can be updated.", - "format": "google-fieldmask", - "type": "string" - }, - "clusterName": { - "location": "path", - "description": "Required The cluster name.", - "required": true, - "type": "string" - }, - "projectId": { - "required": true, - "type": "string", - "location": "path", - "description": "Required The ID of the Google Cloud Platform project the cluster belongs to." - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1alpha1/projects/{projectId}/regions/{region}/clusters/{clusterName}", - "id": "dataproc.projects.regions.clusters.patch", - "path": "v1alpha1/projects/{projectId}/regions/{region}/clusters/{clusterName}" - }, - "get": { - "flatPath": "v1alpha1/projects/{projectId}/regions/{region}/clusters/{clusterName}", - "path": "v1alpha1/projects/{projectId}/regions/{region}/clusters/{clusterName}", - "id": "dataproc.projects.regions.clusters.get", - "description": "Request to get the resource representation for a cluster in a project.", - "response": { - "$ref": "Cluster" - }, - "parameterOrder": [ - "projectId", - "region", - "clusterName" - ], - "httpMethod": "GET", - "parameters": { - "clusterName": { - "description": "Required The cluster name.", - "required": true, - "type": "string", - "location": "path" - }, - "projectId": { - "description": "Required The ID of the Google Cloud Platform project that the cluster belongs to.", - "required": true, - "type": "string", - "location": "path" - }, - "region": { - "location": "path", - "description": "Required The Dataproc region in which to handle the request.", - "required": true, - "type": "string" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "list": { - "description": "Request a list of all regions/{region}/clusters in a project.", - "response": { - "$ref": "ListClustersResponse" - }, - "parameterOrder": [ - "projectId", - "region" - ], - "httpMethod": "GET", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "pageToken": { - "description": "The standard List page token.", - "type": "string", - "location": "query" - }, - "pageSize": { - "description": "The standard List page size.", - "format": "int32", - "type": "integer", - "location": "query" - }, - "projectId": { - "location": "path", - "description": "Required The ID of the Google Cloud Platform project that the cluster belongs to.", - "required": true, - "type": "string" - }, - "region": { - "location": "path", - "description": "Required The Dataproc region in which to handle the request.", - "required": true, - "type": "string" - }, - "filter": { - "type": "string", - "location": "query", - "description": "Optional A filter constraining which clusters to list. Valid filters contain label terms such as: labels.key1 = val1 AND (-labels.k2 = val2 OR labels.k3 = val3)" - } - }, - "flatPath": "v1alpha1/projects/{projectId}/regions/{region}/clusters", - "path": "v1alpha1/projects/{projectId}/regions/{region}/clusters", - "id": "dataproc.projects.regions.clusters.list" - } - } - } - } - } - } - } - }, - "parameters": { - "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.", - "type": "string", - "location": "query" - }, - "access_token": { - "description": "OAuth access token.", - "type": "string", - "location": "query" - }, - "quotaUser": { - "type": "string", - "location": "query", - "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." - }, - "pp": { - "location": "query", - "description": "Pretty-print response.", - "type": "boolean", - "default": "true" - }, - "oauth_token": { - "description": "OAuth 2.0 token for the current user.", - "type": "string", - "location": "query" - }, - "bearer_token": { - "location": "query", - "description": "OAuth bearer token.", - "type": "string" - }, - "upload_protocol": { - "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", - "type": "string", - "location": "query" - }, - "prettyPrint": { - "location": "query", - "description": "Returns response with indentations and line breaks.", - "type": "boolean", - "default": "true" - }, - "uploadType": { - "location": "query", - "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", - "type": "string" - }, - "fields": { - "location": "query", - "description": "Selector specifying which fields to include in a partial response.", - "type": "string" - }, - "$.xgafv": { - "type": "string", - "enumDescriptions": [ - "v1 error format", - "v2 error format" - ], - "location": "query", - "enum": [ - "1", - "2" - ], - "description": "V1 error format." - }, - "callback": { - "description": "JSONP", - "type": "string", - "location": "query" - }, - "alt": { - "type": "string", - "enumDescriptions": [ - "Responses with Content-Type of application/json", - "Media download with context-dependent Content-Type", - "Responses with Content-Type of application/x-protobuf" - ], - "location": "query", - "description": "Data format for response.", - "default": "json", - "enum": [ - "json", - "media", - "proto" - ] - } - }, - "schemas": { - "OperationStatus": { - "description": "The status of the operation.", - "type": "object", - "properties": { - "state": { - "enumDescriptions": [ - "Unused.", - "The operation has been created.", - "The operation is running.", - "The operation is done; either cancelled or completed." - ], - "enum": [ - "UNKNOWN", - "PENDING", - "RUNNING", - "DONE" - ], - "description": "A message containing the operation state.", - "type": "string" - }, - "details": { - "description": "A message containing any operation metadata details.", - "type": "string" - }, - "innerState": { - "description": "A message containing the detailed operation state.", - "type": "string" - }, - "stateStartTime": { - "description": "The time this state was entered.", - "format": "google-datetime", - "type": "string" - } - }, - "id": "OperationStatus" - }, - "JobReference": { - "description": "Encapsulates the full scoping used to reference a job.", - "type": "object", - "properties": { - "projectId": { - "description": "Required The ID of the Google Cloud Platform project that the job belongs to.", - "type": "string" - }, - "jobId": { - "description": "Required The job ID, which must be unique within the project. The job ID is generated by the server upon job submission or provided by the user as a means to perform retries without creating duplicate jobs. The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), or dashes (-). The maximum length is 100 characters.", - "type": "string" - } - }, - "id": "JobReference" - }, - "SubmitJobRequest": { - "type": "object", - "properties": { - "job": { - "description": "Required The job resource.", - "$ref": "Job" - } - }, - "id": "SubmitJobRequest", - "description": "A job submission request." - }, - "Status": { - "description": "The Status type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by gRPC (https://github.com/grpc). The error model is designed to be:\nSimple to use and understand for most users\nFlexible enough to meet unexpected needsOverviewThe Status message contains three pieces of data: error code, error message, and error details. The error code should be an enum value of google.rpc.Code, but it may accept additional error codes if needed. The error message should be a developer-facing English message that helps developers understand and resolve the error. If a localized user-facing error message is needed, put the localized message in the error details or localize it in the client. The optional error details may contain arbitrary information about the error. There is a predefined set of error detail types in the package google.rpc that can be used for common error conditions.Language mappingThe Status message is the logical representation of the error model, but it is not necessarily the actual wire format. When the Status message is exposed in different client libraries and different wire protocols, it can be mapped differently. For example, it will likely be mapped to some exceptions in Java, but more likely mapped to some error codes in C.Other usesThe error model and the Status message can be used in a variety of environments, either with or without APIs, to provide a consistent developer experience across different environments.Example uses of this error model include:\nPartial errors. If a service needs to return partial errors to the client, it may embed the Status in the normal response to indicate the partial errors.\nWorkflow errors. A typical workflow has multiple steps. Each step may have a Status message for error reporting.\nBatch operations. If a client uses batch request and batch response, the Status message should be used directly inside batch response, one for each error sub-response.\nAsynchronous operations. If an API call embeds asynchronous operation results in its response, the status of those operations should be represented directly using the Status message.\nLogging. If some API errors are stored in logs, the message Status could be used directly after any stripping needed for security/privacy reasons.", - "type": "object", - "properties": { - "code": { - "type": "integer", - "description": "The status code, which should be an enum value of google.rpc.Code.", - "format": "int32" - }, - "message": { - "description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.", - "type": "string" - }, - "details": { - "type": "array", - "items": { - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - }, - "type": "object" - }, - "description": "A list of messages that carry the error details. There will be a common set of message types for APIs to use." - } - }, - "id": "Status" - }, - "JobScheduling": { - "properties": { - "maxFailuresPerHour": { - "description": "Optional Maximum number of times per hour a driver may be restarted as a result of driver terminating with non-zero code before job is reported failed.A job may be reported as thrashing if driver exits with non-zero code 4 times within 10 minute window.Maximum value is 10.", - "format": "int32", - "type": "integer" - } - }, - "id": "JobScheduling", - "description": "Job scheduling options.Beta Feature: These options are available for testing purposes only. They may be changed before final release.", - "type": "object" - }, - "NodeInitializationAction": { - "description": "Specifies an executable to run on a fully configured node and a timeout period for executable completion.", - "type": "object", - "properties": { - "executableFile": { - "description": "Required Google Cloud Storage URI of executable file.", - "type": "string" - }, - "executionTimeout": { - "type": "string", - "description": "Optional Amount of time executable has to complete. Default is 10 minutes. Cluster creation fails with an explanatory error message (the name of the executable that caused the error and the exceeded timeout period) if the executable is not completed at end of the timeout period.", - "format": "google-duration" - } - }, - "id": "NodeInitializationAction" - }, - "ListJobsResponse": { - "description": "A response to a request to list jobs in a project.", - "type": "object", - "properties": { - "jobs": { - "description": "Output-only Jobs list.", - "type": "array", - "items": { - "$ref": "Job" - } - }, - "nextPageToken": { - "description": "Optional This token is included in the response if there are more results to fetch. To fetch additional results, provide this value as the page_token in a subsequent \u003ccode\u003eListJobsRequest\u003c/code\u003e.", - "type": "string" - } - }, - "id": "ListJobsResponse" - }, - "CancelJobRequest": { - "description": "A request to cancel a job.", - "type": "object", - "properties": {}, - "id": "CancelJobRequest" - }, - "SparkSqlJob": { - "type": "object", - "properties": { - "queryFileUri": { - "description": "The HCFS URI of the script that contains SQL queries.", - "type": "string" - }, - "queryList": { - "description": "A list of queries.", - "$ref": "QueryList" - }, - "jarFileUris": { - "type": "array", - "items": { - "type": "string" - }, - "description": "Optional HCFS URIs of jar files to be added to the Spark CLASSPATH." - }, - "scriptVariables": { - "description": "Optional Mapping of query variable names to values (equivalent to the Spark SQL command: SET name=\"value\";).", - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "loggingConfiguration": { - "$ref": "LoggingConfiguration", - "description": "Optional The runtime log configuration for job execution." - }, - "properties": { - "additionalProperties": { - "type": "string" - }, - "description": "Optional A mapping of property names to values, used to configure Spark SQL's SparkConf. Properties that conflict with values set by the Cloud Dataproc API may be overwritten.", - "type": "object" - } - }, - "id": "SparkSqlJob", - "description": "A Cloud Dataproc job for running Spark SQL queries." - }, - "Cluster": { - "description": "Describes the identifying information, configuration, and status of a cluster of Google Compute Engine instances.", - "type": "object", - "properties": { - "configuration": { - "description": "Required The cluster configuration. It may differ from a user's initial configuration due to Cloud Dataproc setting of default values and updating clusters.", - "$ref": "ClusterConfiguration" - }, - "labels": { - "additionalProperties": { - "type": "string" - }, - "description": "Optional The labels to associate with this cluster.Label keys must be between 1 and 63 characters long, and must conform to the following PCRE regular expression: \\p{Ll}\\p{Lo}{0,62}Label values must be between 1 and 63 characters long, and must conform to the following PCRE regular expression: \\p{Ll}\\p{Lo}\\p{N}_-{0,63}No more than 64 labels can be associated with a given cluster.", - "type": "object" - }, - "createTime": { - "description": "Output-only The timestamp of cluster creation.", - "format": "google-datetime", - "type": "string" - }, - "status": { - "$ref": "ClusterStatus", - "description": "Output-only Cluster status." - }, - "metrics": { - "$ref": "ClusterMetrics", - "description": "Contains cluster daemon metrics such as HDFS and YARN stats." - }, - "statusHistory": { - "description": "Output-only Previous cluster statuses.", - "type": "array", - "items": { - "$ref": "ClusterStatus" - } - }, - "clusterUuid": { - "description": "Output-only A cluster UUID (Unique Universal Identifier). Cloud Dataproc generates this value when it creates the cluster.", - "type": "string" - }, - "clusterName": { - "description": "Required The cluster name. Cluster names within a project must be unique. Names from deleted clusters can be reused.", - "type": "string" - }, - "projectId": { - "description": "Required The Google Cloud Platform project ID that the cluster belongs to.", - "type": "string" - } - }, - "id": "Cluster" - }, - "ListOperationsResponse": { - "id": "ListOperationsResponse", - "description": "The response message for Operations.ListOperations.", - "type": "object", - "properties": { - "nextPageToken": { - "description": "The standard List next-page token.", - "type": "string" - }, - "operations": { - "description": "A list of operations that match the specified filter in the request.", - "type": "array", - "items": { - "$ref": "Operation" - } - } - } - }, - "OperationMetadata": { - "description": "Metadata describing the operation.", - "type": "object", - "properties": { - "warnings": { - "description": "Output-only Errors encountered during operation execution.", - "type": "array", - "items": { - "type": "string" - } - }, - "insertTime": { - "description": "The time that the operation was requested.", - "format": "google-datetime", - "type": "string" - }, - "statusHistory": { - "description": "Output-only Previous operation status.", - "type": "array", - "items": { - "$ref": "OperationStatus" - } - }, - "operationType": { - "description": "Output-only The operation type.", - "type": "string" - }, - "description": { - "type": "string", - "description": "Output-only Short description of operation." - }, - "status": { - "$ref": "OperationStatus", - "description": "Output-only Current operation status." - }, - "state": { - "enum": [ - "UNKNOWN", - "PENDING", - "RUNNING", - "DONE" - ], - "description": "A message containing the operation state.", - "type": "string", - "enumDescriptions": [ - "Unused.", - "The operation has been created.", - "The operation is currently running.", - "The operation is done, either cancelled or completed." - ] - }, - "details": { - "description": "A message containing any operation metadata details.", - "type": "string" - }, - "clusterUuid": { - "description": "Cluster UUId for the operation.", - "type": "string" - }, - "clusterName": { - "description": "Name of the cluster for the operation.", - "type": "string" - }, - "innerState": { - "description": "A message containing the detailed operation state.", - "type": "string" - }, - "endTime": { - "description": "The time that the operation completed.", - "format": "google-datetime", - "type": "string" - }, - "startTime": { - "type": "string", - "description": "The time that the operation was started by the server.", - "format": "google-datetime" - } - }, - "id": "OperationMetadata" - }, - "JobPlacement": { - "type": "object", - "properties": { - "clusterName": { - "description": "Required The name of the cluster where the job will be submitted.", - "type": "string" - }, - "clusterUuid": { - "description": "Output-only A cluster UUID generated by the Dataproc service when the job is submitted.", - "type": "string" - } - }, - "id": "JobPlacement", - "description": "Cloud Dataproc job configuration." - }, - "ClusterStatus": { - "description": "The status of a cluster and its instances.", - "type": "object", - "properties": { - "detail": { - "type": "string", - "description": "Optional details of cluster's state." - }, - "state": { - "type": "string", - "enumDescriptions": [ - "The cluster state is unknown.", - "The cluster is being created and set up. It is not ready for use.", - "The cluster is currently running and healthy. It is ready for use.", - "The cluster encountered an error. It is not ready for use.", - "The cluster is being deleted. It cannot be used.", - "The cluster is being updated. It continues to accept and process jobs." - ], - "enum": [ - "UNKNOWN", - "CREATING", - "RUNNING", - "ERROR", - "DELETING", - "UPDATING" - ], - "description": "The cluster's state." - }, - "stateStartTime": { - "description": "Time when this state was entered.", - "format": "google-datetime", - "type": "string" - }, - "substate": { - "enumDescriptions": [ - "", - "The cluster is known to be in an unhealthy state (for example, critical daemons are not running or HDFS capacity is exhausted).Applies to RUNNING state.", - "The agent-reported status is out of date (may occur if Cloud Dataproc loses communication with Agent).Applies to RUNNING state." - ], - "enum": [ - "UNSPECIFIED", - "UNHEALTHY", - "STALE_STATUS" - ], - "description": "Output-only Additional state information that includes status reported by the agent.", - "type": "string" - } - }, - "id": "ClusterStatus" - }, - "PigJob": { - "description": "A Cloud Dataproc job for running Pig queries on YARN.", - "type": "object", - "properties": { - "loggingConfiguration": { - "$ref": "LoggingConfiguration", - "description": "Optional The runtime log configuration for job execution." - }, - "properties": { - "additionalProperties": { - "type": "string" - }, - "description": "Optional A mapping of property names to values, used to configure Pig. Properties that conflict with values set by the Cloud Dataproc API may be overwritten. Can include properties set in /etc/hadoop/conf/*-site.xml, /etc/pig/conf/pig.properties, and classes in user code.", - "type": "object" - }, - "continueOnFailure": { - "description": "Optional Whether to continue executing queries if a query fails. The default value is false. Setting to true can be useful when executing independent parallel queries.", - "type": "boolean" - }, - "queryList": { - "$ref": "QueryList", - "description": "A list of queries." - }, - "queryFileUri": { - "type": "string", - "description": "The HCFS URI of the script that contains the Pig queries." - }, - "jarFileUris": { - "description": "Optional HCFS URIs of jar files to add to the CLASSPATH of the Pig Client and Hadoop MapReduce (MR) tasks. Can contain Pig UDFs.", - "type": "array", - "items": { - "type": "string" - } - }, - "scriptVariables": { - "description": "Optional Mapping of query variable names to values (equivalent to the Pig command: \"name=value\").", - "type": "object", - "additionalProperties": { - "type": "string" - } - } - }, - "id": "PigJob" - }, - "AcceleratorConfiguration": { - "description": "Specifies the type and number of accelerator cards attached to the instances of an instance group (see GPUs on Compute Engine).", - "type": "object", - "properties": { - "acceleratorCount": { - "description": "The number of the accelerator cards of this type exposed to this instance.", - "format": "int32", - "type": "integer" - }, - "acceleratorTypeUri": { - "description": "Full or partial URI of the accelerator type resource to expose to this instance. See Google Compute Engine AcceleratorTypes( /compute/docs/reference/beta/acceleratorTypes)", - "type": "string" - } - }, - "id": "AcceleratorConfiguration" - }, - "ManagedGroupConfiguration": { - "description": "Specifies the resources used to actively manage an instance group.", - "type": "object", - "properties": { - "instanceGroupManagerName": { - "description": "Output-only The name of Instance Group Manager managing this group.", - "type": "string" - }, - "instanceTemplateName": { - "type": "string", - "description": "Output-only The name of Instance Template used for Managed Instance Group." - } - }, - "id": "ManagedGroupConfiguration" - }, - "ListClustersResponse": { - "type": "object", - "properties": { - "clusters": { - "type": "array", - "items": { - "$ref": "Cluster" - }, - "description": "Output-only The clusters in the project." - }, - "nextPageToken": { - "description": "The standard List next-page token.", - "type": "string" - } - }, - "id": "ListClustersResponse", - "description": "The list of all clusters in a project." - }, - "SparkJob": { - "properties": { - "args": { - "description": "Optional The arguments to pass to the driver. Do not include arguments, such as --conf, that can be set as job properties, since a collision may occur that causes an incorrect job submission.", - "type": "array", - "items": { - "type": "string" - } - }, - "fileUris": { - "description": "Optional HCFS URIs of files to be copied to the working directory of Spark drivers and distributed tasks. Useful for naively parallel tasks.", - "type": "array", - "items": { - "type": "string" - } - }, - "mainClass": { - "description": "The name of the driver's main class. The jar file that contains the class must be in the default CLASSPATH or specified in jar_file_uris.", - "type": "string" - }, - "archiveUris": { - "description": "Optional HCFS URIs of archives to be extracted in the working directory of Spark drivers and tasks. Supported file types: .jar, .tar, .tar.gz, .tgz, and .zip.", - "type": "array", - "items": { - "type": "string" - } - }, - "mainJarFileUri": { - "description": "The Hadoop Compatible Filesystem (HCFS) URI of the jar file that contains the main class.", - "type": "string" - }, - "jarFileUris": { - "description": "Optional HCFS URIs of jar files to add to the CLASSPATHs of the Spark driver and tasks.", - "type": "array", - "items": { - "type": "string" - } - }, - "loggingConfiguration": { - "description": "Optional The runtime log configuration for job execution.", - "$ref": "LoggingConfiguration" - }, - "properties": { - "additionalProperties": { - "type": "string" - }, - "description": "Optional A mapping of property names to values, used to configure Spark. Properties that conflict with values set by the Cloud Dataproc API may be overwritten. Can include properties set in /etc/spark/conf/spark-defaults.conf and classes in user code.", - "type": "object" - } - }, - "id": "SparkJob", - "description": "A Cloud Dataproc job for running Spark applications on YARN.", - "type": "object" - }, - "Job": { - "description": "A Cloud Dataproc job resource.", - "type": "object", - "properties": { - "status": { - "description": "Output-only The job status. Additional application-specific status information may be contained in the \u003ccode\u003etype_job\u003c/code\u003e and \u003ccode\u003eyarn_applications\u003c/code\u003e fields.", - "$ref": "JobStatus" - }, - "placement": { - "$ref": "JobPlacement", - "description": "Required Job information, including how, when, and where to run the job." - }, - "driverControlFilesUri": { - "description": "Output-only If present, the location of miscellaneous control files which may be used as part of job setup and handling. If not present, control files may be placed in the same location as driver_output_uri.", - "type": "string" - }, - "submittedBy": { - "description": "Output-only The email address of the user submitting the job. For jobs submitted on the cluster, the address is \u003ccode\u003eusername@hostname\u003c/code\u003e.", - "type": "string" - }, - "scheduling": { - "description": "Optional Job scheduling configuration.", - "$ref": "JobScheduling" - }, - "pigJob": { - "$ref": "PigJob", - "description": "Job is a Pig job." - }, - "driverOutputUri": { - "description": "Output-only A URI pointing to the location of the mixed stdout/stderr of the job's driver program—for example, \u003ccode\u003egs://sysbucket123/foo-cluster/jobid-123/driver/output\u003c/code\u003e.", - "type": "string" - }, - "hiveJob": { - "$ref": "HiveJob", - "description": "Job is a Hive job." - }, - "labels": { - "additionalProperties": { - "type": "string" - }, - "description": "Optional The labels to associate with this job.Label keys must be between 1 and 63 characters long, and must conform to the following regular expression: \\p{Ll}\\p{Lo}{0,62}Label values must be between 1 and 63 characters long, and must conform to the following regular expression: \\p{Ll}\\p{Lo}\\p{N}_-{0,63}No more than 64 labels can be associated with a given job.", - "type": "object" - }, - "driverOutputResourceUri": { - "type": "string", - "description": "Output-only A URI pointing to the location of the stdout of the job's driver program." - }, - "statusHistory": { - "description": "Output-only The previous job status.", - "type": "array", - "items": { - "$ref": "JobStatus" - } - }, - "sparkSqlJob": { - "$ref": "SparkSqlJob", - "description": "Job is a SparkSql job." - }, - "sparkJob": { - "$ref": "SparkJob", - "description": "Job is a Spark job." - }, - "yarnApplications": { - "description": "Output-only The collection of Yarn applications spun up by this job.", - "type": "array", - "items": { - "$ref": "YarnApplication" - } - }, - "pysparkJob": { - "description": "Job is a Pyspark job.", - "$ref": "PySparkJob" - }, - "reference": { - "$ref": "JobReference", - "description": "Optional The fully-qualified reference to the job, which can be used to obtain the equivalent REST path of the job resource. If this property is not specified when a job is created, the server generates a \u003ccode\u003ejob_id\u003c/code\u003e." - }, - "interactive": { - "description": "Optional If set to true, then the driver's stdin will be kept open and driver_input_uri will be set to provide a path at which additional input can be sent to the driver.", - "type": "boolean" - }, - "driverInputResourceUri": { - "type": "string", - "description": "Output-only A URI pointing to the location of the stdin of the job's driver program, only set if the job is interactive." - }, - "hadoopJob": { - "$ref": "HadoopJob", - "description": "Job is a Hadoop job." - } - }, - "id": "Job" - }, - "JobStatus": { - "description": "Cloud Dataproc job status.", - "type": "object", - "properties": { - "substate": { - "enum": [ - "UNSPECIFIED", - "SUBMITTED", - "QUEUED", - "STALE_STATUS" - ], - "description": "Output-only Additional state information, which includes status reported by the agent.", - "type": "string", - "enumDescriptions": [ - "", - "The Job is submitted to the agent.Applies to RUNNING state.", - "The Job has been received and is awaiting execution (it may be waiting for a condition to be met). See the \"details\" field for the reason for the delay.Applies to RUNNING state.", - "The agent-reported status is out of date, which may be caused by a loss of communication between the agent and Cloud Dataproc. If the agent does not send a timely update, the job will fail.Applies to RUNNING state." - ] - }, - "insertTime": { - "description": "The time of the job request.", - "format": "google-datetime", - "type": "string" - }, - "state": { - "type": "string", - "enumDescriptions": [ - "The job state is unknown.", - "The job is pending; it has been submitted, but is not yet running.", - "Job has been received by the service and completed initial setup; it will shortly be submitted to the cluster.", - "The job is running on the cluster.", - "A CancelJob request has been received, but is pending.", - "Transient in-flight resources have been canceled, and the request to cancel the running job has been issued to the cluster.", - "The job cancelation was successful.", - "The job has completed successfully.", - "The job has completed, but encountered an error.", - "Job attempt has failed. The detail field contains failure details for this attempt.Applies to restartable jobs only." - ], - "enum": [ - "STATE_UNSPECIFIED", - "PENDING", - "SETUP_DONE", - "RUNNING", - "CANCEL_PENDING", - "CANCEL_STARTED", - "CANCELLED", - "DONE", - "ERROR", - "ATTEMPT_FAILURE" - ], - "description": "Required A state message specifying the overall job state." - }, - "details": { - "description": "Optional Job state details, such as an error description if the state is \u003ccode\u003eERROR\u003c/code\u003e.", - "type": "string" - }, - "stateStartTime": { - "description": "Output-only The time when this state was entered.", - "format": "google-datetime", - "type": "string" - }, - "endTime": { - "description": "The time when the job completed.", - "format": "google-datetime", - "type": "string" - }, - "startTime": { - "description": "The time when the server started the job.", - "format": "google-datetime", - "type": "string" - } - }, - "id": "JobStatus" - }, - "DiskConfiguration": { - "description": "Specifies the configuration of disk options for a group of VM instances.", - "type": "object", - "properties": { - "bootDiskSizeGb": { - "description": "Optional Size in GB of the boot disk (default is 500GB).", - "format": "int32", - "type": "integer" - }, - "numLocalSsds": { - "description": "Optional Number of attached SSDs, from 0 to 4 (default is 0). If SSDs are not attached, the boot disk is used to store runtime logs, and HDFS data. If one or more SSDs are attached, this runtime bulk data is spread across them, and the boot disk contains only basic configuration and installed binaries.", - "format": "int32", - "type": "integer" - } - }, - "id": "DiskConfiguration" - }, - "ClusterOperationStatus": { - "properties": { - "state": { - "enumDescriptions": [ - "Unused.", - "The operation has been created.", - "The operation is running.", - "The operation is done; either cancelled or completed." - ], - "enum": [ - "UNKNOWN", - "PENDING", - "RUNNING", - "DONE" - ], - "description": "Output-only. A message containing the operation state.", - "type": "string" - }, - "details": { - "description": "Output-only.A message containing any operation metadata details.", - "type": "string" - }, - "innerState": { - "description": "Output-only. A message containing the detailed operation state.", - "type": "string" - }, - "stateStartTime": { - "description": "Output-only. The time this state was entered.", - "format": "google-datetime", - "type": "string" - } - }, - "id": "ClusterOperationStatus", - "description": "The status of the operation.", - "type": "object" - }, - "HadoopJob": { - "description": "A Cloud Dataproc job for running Hadoop MapReduce jobs on YARN.", - "type": "object", - "properties": { - "properties": { - "additionalProperties": { - "type": "string" - }, - "description": "Optional A mapping of property names to values, used to configure Hadoop. Properties that conflict with values set by the Cloud Dataproc API may be overwritten. Can include properties set in /etc/hadoop/conf/*-site and classes in user code.", - "type": "object" - }, - "args": { - "description": "Optional The arguments to pass to the driver. Do not include arguments, such as -libjars or -Dfoo=bar, that can be set as job properties, since a collision may occur that causes an incorrect job submission.", - "type": "array", - "items": { - "type": "string" - } - }, - "fileUris": { - "description": "Optional HCFS URIs of files to be copied to the working directory of Hadoop drivers and distributed tasks. Useful for naively parallel tasks.", - "type": "array", - "items": { - "type": "string" - } - }, - "mainClass": { - "description": "The name of the driver's main class. The jar file containing the class must be in the default CLASSPATH or specified in jar_file_uris.", - "type": "string" - }, - "archiveUris": { - "description": "Optional HCFS URIs of archives to be extracted in the working directory of Hadoop drivers and tasks. Supported file types: .jar, .tar, .tar.gz, .tgz, or .zip.", - "type": "array", - "items": { - "type": "string" - } - }, - "mainJarFileUri": { - "description": "The Hadoop Compatible Filesystem (HCFS) URI of the jar file containing the main class. Examples: gs://foo-bucket/analytics-binaries/extract-useful-metrics-mr.jar hdfs:/tmp/test-samples/custom-wordcount.jar file:///home/usr/lib/hadoop-mapreduce/hadoop-mapreduce-examples.jar", - "type": "string" - }, - "jarFileUris": { - "description": "Optional Jar file URIs to add to the CLASSPATHs of the Hadoop driver and tasks.", - "type": "array", - "items": { - "type": "string" - } - }, - "loggingConfiguration": { - "description": "Optional The runtime log configuration for job execution.", - "$ref": "LoggingConfiguration" - } - }, - "id": "HadoopJob" - }, - "QueryList": { - "id": "QueryList", - "description": "A list of queries to run on a cluster.", - "type": "object", - "properties": { - "queries": { - "description": "Required The queries to execute. You do not need to terminate a query with a semicolon. Multiple queries can be specified in one string by separating each with a semicolon. Here is an example of an Cloud Dataproc API snippet that uses a QueryList to specify a HiveJob:\n\"hiveJob\": {\n \"queryList\": {\n \"queries\": [\n \"query1\",\n \"query2\",\n \"query3;query4\",\n ]\n }\n}\n", - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "YarnApplication": { - "type": "object", - "properties": { - "state": { - "type": "string", - "enumDescriptions": [ - "Status is unspecified.", - "Status is NEW.", - "Status is NEW_SAVING.", - "Status is SUBMITTED.", - "Status is ACCEPTED.", - "Status is RUNNING.", - "Status is FINISHED.", - "Status is FAILED.", - "Status is KILLED." - ], - "enum": [ - "STATE_UNSPECIFIED", - "NEW", - "NEW_SAVING", - "SUBMITTED", - "ACCEPTED", - "RUNNING", - "FINISHED", - "FAILED", - "KILLED" - ], - "description": "Required The application state." - }, - "name": { - "type": "string", - "description": "Required The application name." - }, - "trackingUrl": { - "description": "Optional The HTTP URL of the ApplicationMaster, HistoryServer, or TimelineServer that provides application-specific information. The URL uses the internal hostname, and requires a proxy server for resolution and, possibly, access.", - "type": "string" - }, - "progress": { - "description": "Required The numerical progress of the application, from 1 to 100.", - "format": "float", - "type": "number" - } - }, - "id": "YarnApplication", - "description": "A YARN application created by a job. Application information is a subset of \u003ccode\u003eorg.apache.hadoop.yarn.proto.YarnProtos.ApplicationReportProto\u003c/code\u003e." - }, - "ClusterOperationMetadata": { - "description": "Metadata describing the operation.", - "type": "object", - "properties": { - "operationType": { - "description": "Output-only. The operation type.", - "type": "string" - }, - "description": { - "description": "Output-only. Short description of operation.", - "type": "string" - }, - "warnings": { - "description": "Output-only. Errors encountered during operation execution.", - "type": "array", - "items": { - "type": "string" - } - }, - "labels": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Output-only. Labels associated with the operation" - }, - "status": { - "description": "Output-only. Current operation status.", - "$ref": "ClusterOperationStatus" - }, - "statusHistory": { - "description": "Output-only. The previous operation status.", - "type": "array", - "items": { - "$ref": "ClusterOperationStatus" - } - }, - "clusterUuid": { - "description": "Output-only. Cluster UUID for the operation.", - "type": "string" - }, - "clusterName": { - "description": "Output-only. Name of the cluster for the operation.", - "type": "string" - } - }, - "id": "ClusterOperationMetadata" - }, - "Empty": { - "type": "object", - "properties": {}, - "id": "Empty", - "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance:\nservice Foo {\n rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);\n}\nThe JSON representation for Empty is empty JSON object {}." - }, - "HiveJob": { - "description": "A Cloud Dataproc job for running Hive queries on YARN.", - "type": "object", - "properties": { - "jarFileUris": { - "description": "Optional HCFS URIs of jar files to add to the CLASSPATH of the Hive server and Hadoop MapReduce (MR) tasks. Can contain Hive SerDes and UDFs.", - "type": "array", - "items": { - "type": "string" - } - }, - "scriptVariables": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Optional Mapping of query variable names to values (equivalent to the Hive command: 'SET name=\"value\";')." - }, - "properties": { - "additionalProperties": { - "type": "string" - }, - "description": "Optional A mapping of property names and values, used to configure Hive. Properties that conflict with values set by the Cloud Dataproc API may be overwritten. Can include properties set in /etc/hadoop/conf/*-site.xml, /etc/hive/conf/hive-site.xml, and classes in user code.", - "type": "object" - }, - "continueOnFailure": { - "description": "Optional Whether to continue executing queries if a query fails. The default value is false. Setting to true can be useful when executing independent parallel queries.", - "type": "boolean" - }, - "queryFileUri": { - "description": "The HCFS URI of the script that contains Hive queries.", - "type": "string" - }, - "queryList": { - "$ref": "QueryList", - "description": "A list of queries." - } - }, - "id": "HiveJob" - }, - "ListJobsRequest": { - "properties": { - "pageToken": { - "description": "Optional The page token, returned by a previous call, to request the next page of results.", - "type": "string" - }, - "clusterName": { - "description": "Optional If set, the returned jobs list includes only jobs that were submitted to the named cluster.", - "type": "string" - }, - "pageSize": { - "type": "integer", - "description": "Optional The number of results to return in each response.", - "format": "int32" - }, - "filter": { - "description": "Optional A filter constraining which jobs to list. Valid filters contain job state and label terms such as: labels.key1 = val1 AND (labels.k2 = val2 OR labels.k3 = val3)", - "type": "string" - }, - "jobStateMatcher": { - "enum": [ - "ALL", - "ACTIVE", - "NON_ACTIVE" - ], - "description": "Optional Specifies enumerated categories of jobs to list.", - "type": "string", - "enumDescriptions": [ - "Match all jobs, regardless of state.", - "Only match jobs in non-terminal states: PENDING, RUNNING, CANCEL_PENDING", - "Only match jobs in terminal states: CANCELLED, DONE, ERROR" - ] - } - }, - "id": "ListJobsRequest", - "description": "A request to list jobs in a project.", - "type": "object" - }, - "DiagnoseClusterResults": { - "properties": { - "outputUri": { - "type": "string", - "description": "Output-only. The Google Cloud Storage URI of the diagnostic output. The output report is a plain text file with a summary of collected diagnostics." - } - }, - "id": "DiagnoseClusterResults", - "description": "The location of diagnostic output.", - "type": "object" - }, - "GceConfiguration": { - "description": "Deprecated Common configuration settings for resources of Google Compute Engine cluster instances, applicable to all instances in the cluster.", - "type": "object", - "properties": { - "networkUri": { - "description": "Deprecated The Google Compute Engine network to be used for machine communications. Inbound SSH connections are necessary to complete cluster configuration. Example \"compute.googleapis.com/projects/project_id /zones/us-east1-a/default\".", - "type": "string" - }, - "serviceAccountScopes": { - "description": "Deprecated The service account scopes included in Google Compute Engine instances. Must include devstorage.full_control to enable the Google Cloud Storage connector. Example \"auth.googleapis.com/compute\" and \"auth.googleapis.com/devstorage.full_control\".", - "type": "array", - "items": { - "type": "string" - } - }, - "zoneUri": { - "type": "string", - "description": "Deprecated The zone where the Google Compute Engine cluster will be located. Example: \"compute.googleapis.com/projects/project_id /zones/us-east1-a\"." - }, - "imageUri": { - "description": "Deprecated The Google Compute Engine image resource used for cluster instances. Example: \"compute.googleapis.com/projects/debian-cloud /global/images/backports-debian-7-wheezy-v20140904\".", - "type": "string" - }, - "machineTypeUri": { - "description": "Deprecated The Google Compute Engine machine type used for cluster instances. Example: \"compute.googleapis.com/projects/project_id /zones/us-east1-a/machineTypes/n1-standard-2\".", - "type": "string" - } - }, - "id": "GceConfiguration" - }, - "SoftwareConfiguration": { - "description": "Specifies the selection and configuration of software inside the cluster.", - "type": "object", - "properties": { - "properties": { - "additionalProperties": { - "type": "string" - }, - "description": "Optional The properties to set on daemon configuration files.Property keys are specified in \"prefix:property\" format, such as \"core:fs.defaultFS\". The following are supported prefixes and their mappings: core - core-site.xml hdfs - hdfs-site.xml mapred - mapred-site.xml yarn - yarn-site.xml hive - hive-site.xml pig - pig.properties spark - spark-defaults.conf", - "type": "object" - }, - "imageVersion": { - "description": "Optional The version of software inside the cluster. It must match the regular expression 0-9+.0-9+. If unspecified it will default to latest version.", - "type": "string" - } - }, - "id": "SoftwareConfiguration" - }, - "PySparkJob": { - "description": "A Cloud Dataproc job for running PySpark applications on YARN.", - "type": "object", - "properties": { - "jarFileUris": { - "description": "Optional HCFS URIs of jar files to add to the CLASSPATHs of the Python driver and tasks.", - "type": "array", - "items": { - "type": "string" - } - }, - "loggingConfiguration": { - "$ref": "LoggingConfiguration", - "description": "Optional The runtime log configuration for job execution." - }, - "properties": { - "additionalProperties": { - "type": "string" - }, - "description": "Optional A mapping of property names to values, used to configure PySpark. Properties that conflict with values set by the Cloud Dataproc API may be overwritten. Can include properties set in /etc/spark/conf/spark-defaults.conf and classes in user code.", - "type": "object" - }, - "args": { - "description": "Optional The arguments to pass to the driver. Do not include arguments, such as --conf, that can be set as job properties, since a collision may occur that causes an incorrect job submission.", - "type": "array", - "items": { - "type": "string" - } - }, - "fileUris": { - "description": "Optional HCFS URIs of files to be copied to the working directory of Python drivers and distributed tasks. Useful for naively parallel tasks.", - "type": "array", - "items": { - "type": "string" - } - }, - "pythonFileUris": { - "description": "Optional HCFS file URIs of Python files to pass to the PySpark framework. Supported file types: .py, .egg, and .zip.", - "type": "array", - "items": { - "type": "string" - } - }, - "mainPythonFileUri": { - "description": "Required The Hadoop Compatible Filesystem (HCFS) URI of the main Python file to use as the driver. Must be a .py file.", - "type": "string" - }, - "archiveUris": { - "description": "Optional HCFS URIs of archives to be extracted in the working directory of .jar, .tar, .tar.gz, .tgz, and .zip.", - "type": "array", - "items": { - "type": "string" - } - } - }, - "id": "PySparkJob" - }, - "ClusterMetrics": { - "description": "Contains cluster daemon metrics, such as HDFS and YARN stats.", - "type": "object", - "properties": { - "yarnMetrics": { - "additionalProperties": { - "format": "int64", - "type": "string" - }, - "description": "The YARN metrics.", - "type": "object" - }, - "hdfsMetrics": { - "additionalProperties": { - "format": "int64", - "type": "string" - }, - "description": "The HDFS metrics.", - "type": "object" - } - }, - "id": "ClusterMetrics" - }, - "ClusterConfiguration": { - "description": "The cluster configuration.", - "type": "object", - "properties": { - "secondaryWorkerConfiguration": { - "$ref": "InstanceGroupConfiguration", - "description": "Optional The Google Compute Engine configuration settings for additional worker instances in a cluster." - }, - "masterName": { - "description": "Deprecated The Master's hostname. Dataproc derives the name from cluster_name if not set by user (recommended practice is to let Dataproc derive the name). Derived master name example: hadoop-m.", - "type": "string" - }, - "workers": { - "description": "Deprecated The list of worker node names. Dataproc derives the names from cluster_name and num_workers if not set by user (recommended practice is to let Dataproc derive the name). Derived worker node name example: hadoop-w-0.", - "type": "array", - "items": { - "type": "string" - } - }, - "workerConfiguration": { - "description": "Optional The Google Compute Engine configuration settings for worker instances in a cluster.", - "$ref": "InstanceGroupConfiguration" - }, - "initializationActions": { - "description": "Optional Commands to execute on each node after configuration is completed. By default, executables are run on master and all worker nodes. You can test a node's \u003ccode\u003erole\u003c/code\u003e metadata to run an executable on a master or worker node, as shown below:\nROLE=$(/usr/share/google/get_metadata_value attributes/role)\nif [[ \"${ROLE}\" == 'Master' ]]; then\n ... master specific actions ...\nelse\n ... worker specific actions ...\nfi\n", - "type": "array", - "items": { - "$ref": "NodeInitializationAction" - } - }, - "gceClusterConfiguration": { - "$ref": "GceClusterConfiguration", - "description": "Optional The shared Google Compute Engine configuration settings for all instances in a cluster." - }, - "softwareConfiguration": { - "$ref": "SoftwareConfiguration", - "description": "Optional The configuration settings for software inside the cluster." - }, - "configurationBucket": { - "description": "Optional A Google Cloud Storage staging bucket used for sharing generated SSH keys and configuration. If you do not specify a staging bucket, Cloud Dataproc will determine an appropriate Cloud Storage location (US, ASIA, or EU) for your cluster's staging bucket according to the Google Compute Engine zone where your cluster is deployed, then it will create and manage this project-level, per-location bucket for you.", - "type": "string" - }, - "numWorkers": { - "description": "Deprecated The number of worker nodes in the cluster.", - "format": "int32", - "type": "integer" - }, - "masterDiskConfiguration": { - "description": "Deprecated The configuration settings of master node disk options.", - "$ref": "DiskConfiguration" - }, - "gceConfiguration": { - "description": "Deprecated The Google Compute Engine configuration settings for cluster resources.", - "$ref": "GceConfiguration" - }, - "workerDiskConfiguration": { - "description": "Deprecated The configuration settings of worker node disk options.", - "$ref": "DiskConfiguration" - }, - "masterConfiguration": { - "$ref": "InstanceGroupConfiguration", - "description": "Optional The Google Compute Engine configuration settings for the master instance in a cluster." - } - }, - "id": "ClusterConfiguration" - }, - "LoggingConfiguration": { - "type": "object", - "properties": { - "driverLogLevels": { - "additionalProperties": { - "type": "string", - "enum": [ - "LEVEL_UNSPECIFIED", - "ALL", - "TRACE", - "DEBUG", - "INFO", - "WARN", - "ERROR", - "FATAL", - "OFF" - ] - }, - "description": "The per-package log levels for the driver. This may include 'root' package name to configure rootLogger. Examples: com.google = FATAL, root = INFO, org.apache = DEBUG", - "type": "object" - } - }, - "id": "LoggingConfiguration", - "description": "The runtime logging configuration of the job." - }, - "InstanceGroupConfiguration": { - "id": "InstanceGroupConfiguration", - "description": "The configuration settings for Google Compute Engine resources in an instance group, such as a master or worker group.", - "type": "object", - "properties": { - "machineTypeUri": { - "type": "string", - "description": "The Google Compute Engine machine type used for cluster instances. Example: \"compute.googleapis.com/projects/project_id /zones/us-east1-a/machineTypes/n1-standard-2\"." - }, - "imageUri": { - "description": "Output-only The Google Compute Engine image resource used for cluster instances. Inferred from SoftwareConfiguration.image_version. Example: \"compute.googleapis.com/projects/debian-cloud /global/images/backports-debian-7-wheezy-v20140904\".", - "type": "string" - }, - "isPreemptible": { - "description": "Specifies that this instance group contains Preemptible Instances.", - "type": "boolean" - }, - "managedGroupConfiguration": { - "description": "Output-only The configuration for Google Compute Engine Instance Group Manager that manages this group. This is only used for preemptible instance groups.", - "$ref": "ManagedGroupConfiguration" - }, - "instanceNames": { - "description": "The list of instance names. Dataproc derives the names from cluster_name, num_instances, and the instance group if not set by user (recommended practice is to let Dataproc derive the name).", - "type": "array", - "items": { - "type": "string" - } - }, - "accelerators": { - "description": "Optional The Google Compute Engine accelerator configuration for these instances.", - "type": "array", - "items": { - "$ref": "AcceleratorConfiguration" - } - }, - "numInstances": { - "description": "The number of VM instances in the instance group. For master instance groups, must be set to 1.", - "format": "int32", - "type": "integer" - }, - "diskConfiguration": { - "$ref": "DiskConfiguration", - "description": "Disk option configuration settings." - } - } - }, - "GceClusterConfiguration": { - "description": "Common configuration settings for resources of Google Compute Engine cluster instances, applicable to all instances in the cluster.", - "type": "object", - "properties": { - "metadata": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "The Google Compute Engine metadata entries to add to all instances." - }, - "internalIpOnly": { - "description": "If true, all instances in the cluser will only have internal IP addresses. By default, clusters are not restricted to internal IP addresses, and will have ephemeral external IP addresses assigned to each instance. This restriction can only be enabled for subnetwork enabled networks, and all off-cluster dependencies must be configured to be accessible without external IP addresses.", - "type": "boolean" - }, - "serviceAccountScopes": { - "description": "The service account scopes included in Google Compute Engine instances. Must include devstorage.full_control to enable the Google Cloud Storage connector. Example \"auth.googleapis.com/compute\" and \"auth.googleapis.com/devstorage.full_control\".", - "type": "array", - "items": { - "type": "string" - } - }, - "tags": { - "description": "The Google Compute Engine tags to add to all instances.", - "type": "array", - "items": { - "type": "string" - } - }, - "serviceAccount": { - "description": "Optional The service account of the instances. Defaults to the default Google Compute Engine service account. Custom service accounts need permissions equivalent to the folloing IAM roles:\nroles/logging.logWriter\nroles/storage.objectAdmin(see https://cloud.google.com/compute/docs/access/service-accounts#custom_service_accounts for more information). Example: [account_id]@[project_id].iam.gserviceaccount.com", - "type": "string" - }, - "subnetworkUri": { - "description": "The Google Compute Engine subnetwork to be used for machine communications. Cannot be specified with network_uri. Example: compute.googleapis.com/projects/[project_id]/regions/us-east1/sub0.", - "type": "string" - }, - "networkUri": { - "description": "The Google Compute Engine network to be used for machine communications. Cannot be specified with subnetwork_uri. If neither network_uri nor subnetwork_uri is specified, the \"default\" network of the project is used, if it exists. Cannot be a \"Custom Subnet Network\" (see https://cloud.google.com/compute/docs/subnetworks for more information). Example: compute.googleapis.com/projects/[project_id]/regions/global/default.", - "type": "string" - }, - "zoneUri": { - "type": "string", - "description": "Required The zone where the Google Compute Engine cluster will be located. Example: \"compute.googleapis.com/projects/project_id /zones/us-east1-a\"." - } - }, - "id": "GceClusterConfiguration" - }, - "CancelOperationRequest": { - "description": "The request message for Operations.CancelOperation.", - "type": "object", - "properties": {}, - "id": "CancelOperationRequest" - }, - "DiagnoseClusterOutputLocation": { - "description": "The location where output from diagnostic command can be found.", - "type": "object", - "properties": { - "outputUri": { - "description": "Output-only The Google Cloud Storage URI of the diagnostic output. This will be a plain text file with summary of collected diagnostics.", - "type": "string" - } - }, - "id": "DiagnoseClusterOutputLocation" - }, - "Operation": { - "id": "Operation", - "description": "An asynchronous operation in a project that runs over a given cluster. Used to track the progress of a user request that is running asynchronously. Examples include creating a cluster, updating a cluster, and deleting a cluster.", - "type": "object", - "properties": { - "response": { - "description": "The operation response. If the called method returns no data on success, the response is google.protobuf.Empty. If the called method is Get,Create or Update, the response is the resource. For all other methods, the response type is a concatenation of the method name and \"Response\". For example, if the called method is TakeSnapshot(), the response type is TakeSnapshotResponse.", - "type": "object", - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - } - }, - "name": { - "description": "The name of the operation resource, in the format projects/project_id/operations/operation_id", - "type": "string" - }, - "error": { - "$ref": "Status", - "description": "The error result of the operation in case of failure." - }, - "metadata": { - "type": "object", - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - }, - "description": "Service-specific metadata associated with the operation." - }, - "done": { - "description": "Indicates if the operation is done. If true, the operation is complete and the result is available. If false, the operation is still in progress.", - "type": "boolean" - } - } - } - }, - "icons": { - "x16": "http://www.google.com/images/icons/product/search-16.gif", - "x32": "http://www.google.com/images/icons/product/search-32.gif" - }, - "protocol": "rest", - "version": "v1alpha1", - "baseUrl": "https://dataproc.googleapis.com/", - "auth": { - "oauth2": { - "scopes": { - "https://www.googleapis.com/auth/cloud-platform": { - "description": "View and manage your data across Google Cloud Platform services" - } - } - } - }, - "kind": "discovery#restDescription", - "description": "Manages Hadoop-based clusters and jobs on Google Cloud Platform.", - "servicePath": "", - "rootUrl": "https://dataproc.googleapis.com/", - "basePath": "", - "ownerDomain": "google.com", - "name": "dataproc", - "batchPath": "batch" -}
diff --git a/dataproc/v1alpha1/dataproc-gen.go b/dataproc/v1alpha1/dataproc-gen.go deleted file mode 100644 index ff99e2e..0000000 --- a/dataproc/v1alpha1/dataproc-gen.go +++ /dev/null
@@ -1,4572 +0,0 @@ -// Package dataproc provides access to the Google Cloud Dataproc API. -// -// See https://cloud.google.com/dataproc/ -// -// Usage example: -// -// import "google.golang.org/api/dataproc/v1alpha1" -// ... -// dataprocService, err := dataproc.New(oauthHttpClient) -package dataproc // import "google.golang.org/api/dataproc/v1alpha1" - -import ( - "bytes" - "context" - "encoding/json" - "errors" - "fmt" - "io" - "net/http" - "net/url" - "strconv" - "strings" - - gensupport "google.golang.org/api/gensupport" - googleapi "google.golang.org/api/googleapi" -) - -// Always reference these packages, just in case the auto-generated code -// below doesn't. -var _ = bytes.NewBuffer -var _ = strconv.Itoa -var _ = fmt.Sprintf -var _ = json.NewDecoder -var _ = io.Copy -var _ = url.Parse -var _ = gensupport.MarshalJSON -var _ = googleapi.Version -var _ = errors.New -var _ = strings.Replace -var _ = context.Canceled - -const apiId = "dataproc:v1alpha1" -const apiName = "dataproc" -const apiVersion = "v1alpha1" -const basePath = "https://dataproc.googleapis.com/" - -// OAuth2 scopes used by this API. -const ( - // View and manage your data across Google Cloud Platform services - CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform" -) - -func New(client *http.Client) (*Service, error) { - if client == nil { - return nil, errors.New("client is nil") - } - s := &Service{client: client, BasePath: basePath} - s.Operations = NewOperationsService(s) - s.Projects = NewProjectsService(s) - return s, nil -} - -type Service struct { - client *http.Client - BasePath string // API endpoint base URL - UserAgent string // optional additional User-Agent fragment - - Operations *OperationsService - - Projects *ProjectsService -} - -func (s *Service) userAgent() string { - if s.UserAgent == "" { - return googleapi.UserAgent - } - return googleapi.UserAgent + " " + s.UserAgent -} - -func NewOperationsService(s *Service) *OperationsService { - rs := &OperationsService{s: s} - return rs -} - -type OperationsService struct { - s *Service -} - -func NewProjectsService(s *Service) *ProjectsService { - rs := &ProjectsService{s: s} - rs.Regions = NewProjectsRegionsService(s) - return rs -} - -type ProjectsService struct { - s *Service - - Regions *ProjectsRegionsService -} - -func NewProjectsRegionsService(s *Service) *ProjectsRegionsService { - rs := &ProjectsRegionsService{s: s} - rs.Clusters = NewProjectsRegionsClustersService(s) - rs.Jobs = NewProjectsRegionsJobsService(s) - return rs -} - -type ProjectsRegionsService struct { - s *Service - - Clusters *ProjectsRegionsClustersService - - Jobs *ProjectsRegionsJobsService -} - -func NewProjectsRegionsClustersService(s *Service) *ProjectsRegionsClustersService { - rs := &ProjectsRegionsClustersService{s: s} - return rs -} - -type ProjectsRegionsClustersService struct { - s *Service -} - -func NewProjectsRegionsJobsService(s *Service) *ProjectsRegionsJobsService { - rs := &ProjectsRegionsJobsService{s: s} - return rs -} - -type ProjectsRegionsJobsService struct { - s *Service -} - -// AcceleratorConfiguration: Specifies the type and number of -// accelerator cards attached to the instances of an instance group (see -// GPUs on Compute Engine). -type AcceleratorConfiguration struct { - // AcceleratorCount: The number of the accelerator cards of this type - // exposed to this instance. - AcceleratorCount int64 `json:"acceleratorCount,omitempty"` - - // AcceleratorTypeUri: Full or partial URI of the accelerator type - // resource to expose to this instance. See Google Compute Engine - // AcceleratorTypes( /compute/docs/reference/beta/acceleratorTypes) - AcceleratorTypeUri string `json:"acceleratorTypeUri,omitempty"` - - // ForceSendFields is a list of field names (e.g. "AcceleratorCount") 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. "AcceleratorCount") 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 *AcceleratorConfiguration) MarshalJSON() ([]byte, error) { - type NoMethod AcceleratorConfiguration - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// CancelJobRequest: A request to cancel a job. -type CancelJobRequest struct { -} - -// CancelOperationRequest: The request message for -// Operations.CancelOperation. -type CancelOperationRequest struct { -} - -// Cluster: Describes the identifying information, configuration, and -// status of a cluster of Google Compute Engine instances. -type Cluster struct { - // ClusterName: Required The cluster name. Cluster names within a - // project must be unique. Names from deleted clusters can be reused. - ClusterName string `json:"clusterName,omitempty"` - - // ClusterUuid: Output-only A cluster UUID (Unique Universal - // Identifier). Cloud Dataproc generates this value when it creates the - // cluster. - ClusterUuid string `json:"clusterUuid,omitempty"` - - // Configuration: Required The cluster configuration. It may differ from - // a user's initial configuration due to Cloud Dataproc setting of - // default values and updating clusters. - Configuration *ClusterConfiguration `json:"configuration,omitempty"` - - // CreateTime: Output-only The timestamp of cluster creation. - CreateTime string `json:"createTime,omitempty"` - - // Labels: Optional The labels to associate with this cluster.Label keys - // must be between 1 and 63 characters long, and must conform to the - // following PCRE regular expression: \p{Ll}\p{Lo}{0,62}Label values - // must be between 1 and 63 characters long, and must conform to the - // following PCRE regular expression: \p{Ll}\p{Lo}\p{N}_-{0,63}No more - // than 64 labels can be associated with a given cluster. - Labels map[string]string `json:"labels,omitempty"` - - // Metrics: Contains cluster daemon metrics such as HDFS and YARN stats. - Metrics *ClusterMetrics `json:"metrics,omitempty"` - - // ProjectId: Required The Google Cloud Platform project ID that the - // cluster belongs to. - ProjectId string `json:"projectId,omitempty"` - - // Status: Output-only Cluster status. - Status *ClusterStatus `json:"status,omitempty"` - - // StatusHistory: Output-only Previous cluster statuses. - StatusHistory []*ClusterStatus `json:"statusHistory,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "ClusterName") 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. "ClusterName") 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 *Cluster) MarshalJSON() ([]byte, error) { - type NoMethod Cluster - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// ClusterConfiguration: The cluster configuration. -type ClusterConfiguration struct { - // ConfigurationBucket: Optional A Google Cloud Storage staging bucket - // used for sharing generated SSH keys and configuration. If you do not - // specify a staging bucket, Cloud Dataproc will determine an - // appropriate Cloud Storage location (US, ASIA, or EU) for your - // cluster's staging bucket according to the Google Compute Engine zone - // where your cluster is deployed, then it will create and manage this - // project-level, per-location bucket for you. - ConfigurationBucket string `json:"configurationBucket,omitempty"` - - // GceClusterConfiguration: Optional The shared Google Compute Engine - // configuration settings for all instances in a cluster. - GceClusterConfiguration *GceClusterConfiguration `json:"gceClusterConfiguration,omitempty"` - - // GceConfiguration: Deprecated The Google Compute Engine configuration - // settings for cluster resources. - GceConfiguration *GceConfiguration `json:"gceConfiguration,omitempty"` - - // InitializationActions: Optional Commands to execute on each node - // after configuration is completed. By default, executables are run on - // master and all worker nodes. You can test a node's <code>role</code> - // metadata to run an executable on a master or worker node, as shown - // below: - // ROLE=$(/usr/share/google/get_metadata_value attributes/role) - // if [[ "${ROLE}" == 'Master' ]]; then - // ... master specific actions ... - // else - // ... worker specific actions ... - // fi - // - InitializationActions []*NodeInitializationAction `json:"initializationActions,omitempty"` - - // MasterConfiguration: Optional The Google Compute Engine configuration - // settings for the master instance in a cluster. - MasterConfiguration *InstanceGroupConfiguration `json:"masterConfiguration,omitempty"` - - // MasterDiskConfiguration: Deprecated The configuration settings of - // master node disk options. - MasterDiskConfiguration *DiskConfiguration `json:"masterDiskConfiguration,omitempty"` - - // MasterName: Deprecated The Master's hostname. Dataproc derives the - // name from cluster_name if not set by user (recommended practice is to - // let Dataproc derive the name). Derived master name example: hadoop-m. - MasterName string `json:"masterName,omitempty"` - - // NumWorkers: Deprecated The number of worker nodes in the cluster. - NumWorkers int64 `json:"numWorkers,omitempty"` - - // SecondaryWorkerConfiguration: Optional The Google Compute Engine - // configuration settings for additional worker instances in a cluster. - SecondaryWorkerConfiguration *InstanceGroupConfiguration `json:"secondaryWorkerConfiguration,omitempty"` - - // SoftwareConfiguration: Optional The configuration settings for - // software inside the cluster. - SoftwareConfiguration *SoftwareConfiguration `json:"softwareConfiguration,omitempty"` - - // WorkerConfiguration: Optional The Google Compute Engine configuration - // settings for worker instances in a cluster. - WorkerConfiguration *InstanceGroupConfiguration `json:"workerConfiguration,omitempty"` - - // WorkerDiskConfiguration: Deprecated The configuration settings of - // worker node disk options. - WorkerDiskConfiguration *DiskConfiguration `json:"workerDiskConfiguration,omitempty"` - - // Workers: Deprecated The list of worker node names. Dataproc derives - // the names from cluster_name and num_workers if not set by user - // (recommended practice is to let Dataproc derive the name). Derived - // worker node name example: hadoop-w-0. - Workers []string `json:"workers,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ConfigurationBucket") - // 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. "ConfigurationBucket") 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 *ClusterConfiguration) MarshalJSON() ([]byte, error) { - type NoMethod ClusterConfiguration - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// ClusterMetrics: Contains cluster daemon metrics, such as HDFS and -// YARN stats. -type ClusterMetrics struct { - // HdfsMetrics: The HDFS metrics. - HdfsMetrics map[string]string `json:"hdfsMetrics,omitempty"` - - // YarnMetrics: The YARN metrics. - YarnMetrics map[string]string `json:"yarnMetrics,omitempty"` - - // ForceSendFields is a list of field names (e.g. "HdfsMetrics") 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. "HdfsMetrics") 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 *ClusterMetrics) MarshalJSON() ([]byte, error) { - type NoMethod ClusterMetrics - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// ClusterOperationMetadata: Metadata describing the operation. -type ClusterOperationMetadata struct { - // ClusterName: Output-only. Name of the cluster for the operation. - ClusterName string `json:"clusterName,omitempty"` - - // ClusterUuid: Output-only. Cluster UUID for the operation. - ClusterUuid string `json:"clusterUuid,omitempty"` - - // Description: Output-only. Short description of operation. - Description string `json:"description,omitempty"` - - // Labels: Output-only. Labels associated with the operation - Labels map[string]string `json:"labels,omitempty"` - - // OperationType: Output-only. The operation type. - OperationType string `json:"operationType,omitempty"` - - // Status: Output-only. Current operation status. - Status *ClusterOperationStatus `json:"status,omitempty"` - - // StatusHistory: Output-only. The previous operation status. - StatusHistory []*ClusterOperationStatus `json:"statusHistory,omitempty"` - - // Warnings: Output-only. Errors encountered during operation execution. - Warnings []string `json:"warnings,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ClusterName") 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. "ClusterName") 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 *ClusterOperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod ClusterOperationMetadata - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// ClusterOperationStatus: The status of the operation. -type ClusterOperationStatus struct { - // Details: Output-only.A message containing any operation metadata - // details. - Details string `json:"details,omitempty"` - - // InnerState: Output-only. A message containing the detailed operation - // state. - InnerState string `json:"innerState,omitempty"` - - // State: Output-only. A message containing the operation state. - // - // Possible values: - // "UNKNOWN" - Unused. - // "PENDING" - The operation has been created. - // "RUNNING" - The operation is running. - // "DONE" - The operation is done; either cancelled or completed. - State string `json:"state,omitempty"` - - // StateStartTime: Output-only. The time this state was entered. - StateStartTime string `json:"stateStartTime,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Details") 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. "Details") 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 *ClusterOperationStatus) MarshalJSON() ([]byte, error) { - type NoMethod ClusterOperationStatus - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// ClusterStatus: The status of a cluster and its instances. -type ClusterStatus struct { - // Detail: Optional details of cluster's state. - Detail string `json:"detail,omitempty"` - - // State: The cluster's state. - // - // Possible values: - // "UNKNOWN" - The cluster state is unknown. - // "CREATING" - The cluster is being created and set up. It is not - // ready for use. - // "RUNNING" - The cluster is currently running and healthy. It is - // ready for use. - // "ERROR" - The cluster encountered an error. It is not ready for - // use. - // "DELETING" - The cluster is being deleted. It cannot be used. - // "UPDATING" - The cluster is being updated. It continues to accept - // and process jobs. - State string `json:"state,omitempty"` - - // StateStartTime: Time when this state was entered. - StateStartTime string `json:"stateStartTime,omitempty"` - - // Substate: Output-only Additional state information that includes - // status reported by the agent. - // - // Possible values: - // "UNSPECIFIED" - // "UNHEALTHY" - The cluster is known to be in an unhealthy state (for - // example, critical daemons are not running or HDFS capacity is - // exhausted).Applies to RUNNING state. - // "STALE_STATUS" - The agent-reported status is out of date (may - // occur if Cloud Dataproc loses communication with Agent).Applies to - // RUNNING state. - Substate string `json:"substate,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Detail") 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. "Detail") 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 *ClusterStatus) MarshalJSON() ([]byte, error) { - type NoMethod ClusterStatus - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// DiagnoseClusterOutputLocation: The location where output from -// diagnostic command can be found. -type DiagnoseClusterOutputLocation struct { - // OutputUri: Output-only The Google Cloud Storage URI of the diagnostic - // output. This will be a plain text file with summary of collected - // diagnostics. - OutputUri string `json:"outputUri,omitempty"` - - // ForceSendFields is a list of field names (e.g. "OutputUri") 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. "OutputUri") 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 *DiagnoseClusterOutputLocation) MarshalJSON() ([]byte, error) { - type NoMethod DiagnoseClusterOutputLocation - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// DiagnoseClusterResults: The location of diagnostic output. -type DiagnoseClusterResults struct { - // OutputUri: Output-only. The Google Cloud Storage URI of the - // diagnostic output. The output report is a plain text file with a - // summary of collected diagnostics. - OutputUri string `json:"outputUri,omitempty"` - - // ForceSendFields is a list of field names (e.g. "OutputUri") 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. "OutputUri") 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 *DiagnoseClusterResults) MarshalJSON() ([]byte, error) { - type NoMethod DiagnoseClusterResults - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// DiskConfiguration: Specifies the configuration of disk options for a -// group of VM instances. -type DiskConfiguration struct { - // BootDiskSizeGb: Optional Size in GB of the boot disk (default is - // 500GB). - BootDiskSizeGb int64 `json:"bootDiskSizeGb,omitempty"` - - // NumLocalSsds: Optional Number of attached SSDs, from 0 to 4 (default - // is 0). If SSDs are not attached, the boot disk is used to store - // runtime logs, and HDFS data. If one or more SSDs are attached, this - // runtime bulk data is spread across them, and the boot disk contains - // only basic configuration and installed binaries. - NumLocalSsds int64 `json:"numLocalSsds,omitempty"` - - // ForceSendFields is a list of field names (e.g. "BootDiskSizeGb") 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. "BootDiskSizeGb") 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 *DiskConfiguration) MarshalJSON() ([]byte, error) { - type NoMethod DiskConfiguration - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// Empty: A generic empty message that you can re-use to avoid defining -// duplicated empty messages in your APIs. A typical example is to use -// it as the request or the response type of an API method. For -// instance: -// service Foo { -// rpc Bar(google.protobuf.Empty) returns -// (google.protobuf.Empty); -// } -// The JSON representation for Empty is empty JSON object {}. -type Empty struct { - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` -} - -// GceClusterConfiguration: Common configuration settings for resources -// of Google Compute Engine cluster instances, applicable to all -// instances in the cluster. -type GceClusterConfiguration struct { - // InternalIpOnly: If true, all instances in the cluser will only have - // internal IP addresses. By default, clusters are not restricted to - // internal IP addresses, and will have ephemeral external IP addresses - // assigned to each instance. This restriction can only be enabled for - // subnetwork enabled networks, and all off-cluster dependencies must be - // configured to be accessible without external IP addresses. - InternalIpOnly bool `json:"internalIpOnly,omitempty"` - - // Metadata: The Google Compute Engine metadata entries to add to all - // instances. - Metadata map[string]string `json:"metadata,omitempty"` - - // NetworkUri: The Google Compute Engine network to be used for machine - // communications. Cannot be specified with subnetwork_uri. If neither - // network_uri nor subnetwork_uri is specified, the "default" network of - // the project is used, if it exists. Cannot be a "Custom Subnet - // Network" (see https://cloud.google.com/compute/docs/subnetworks for - // more information). Example: - // compute.googleapis.com/projects/[project_id]/regions/global/default. - NetworkUri string `json:"networkUri,omitempty"` - - // ServiceAccount: Optional The service account of the instances. - // Defaults to the default Google Compute Engine service account. Custom - // service accounts need permissions equivalent to the folloing IAM - // roles: - // roles/logging.logWriter - // roles/storage.objectAdmin(see - // https://cloud.google.com/compute/docs/access/service-accounts#custom_service_accounts for more information). Example: - // [account_id]@[project_id].iam.gserviceaccount.com - ServiceAccount string `json:"serviceAccount,omitempty"` - - // ServiceAccountScopes: The service account scopes included in Google - // Compute Engine instances. Must include devstorage.full_control to - // enable the Google Cloud Storage connector. Example - // "auth.googleapis.com/compute" and - // "auth.googleapis.com/devstorage.full_control". - ServiceAccountScopes []string `json:"serviceAccountScopes,omitempty"` - - // SubnetworkUri: The Google Compute Engine subnetwork to be used for - // machine communications. Cannot be specified with network_uri. - // Example: - // compute.googleapis.com/projects/[project_id]/regions/us-east1/sub0. - SubnetworkUri string `json:"subnetworkUri,omitempty"` - - // Tags: The Google Compute Engine tags to add to all instances. - Tags []string `json:"tags,omitempty"` - - // ZoneUri: Required The zone where the Google Compute Engine cluster - // will be located. Example: "compute.googleapis.com/projects/project_id - // /zones/us-east1-a". - ZoneUri string `json:"zoneUri,omitempty"` - - // ForceSendFields is a list of field names (e.g. "InternalIpOnly") 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. "InternalIpOnly") 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 *GceClusterConfiguration) MarshalJSON() ([]byte, error) { - type NoMethod GceClusterConfiguration - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GceConfiguration: Deprecated Common configuration settings for -// resources of Google Compute Engine cluster instances, applicable to -// all instances in the cluster. -type GceConfiguration struct { - // ImageUri: Deprecated The Google Compute Engine image resource used - // for cluster instances. Example: - // "compute.googleapis.com/projects/debian-cloud - // /global/images/backports-debian-7-wheezy-v20140904". - ImageUri string `json:"imageUri,omitempty"` - - // MachineTypeUri: Deprecated The Google Compute Engine machine type - // used for cluster instances. Example: - // "compute.googleapis.com/projects/project_id - // /zones/us-east1-a/machineTypes/n1-standard-2". - MachineTypeUri string `json:"machineTypeUri,omitempty"` - - // NetworkUri: Deprecated The Google Compute Engine network to be used - // for machine communications. Inbound SSH connections are necessary to - // complete cluster configuration. Example - // "compute.googleapis.com/projects/project_id - // /zones/us-east1-a/default". - NetworkUri string `json:"networkUri,omitempty"` - - // ServiceAccountScopes: Deprecated The service account scopes included - // in Google Compute Engine instances. Must include - // devstorage.full_control to enable the Google Cloud Storage connector. - // Example "auth.googleapis.com/compute" and - // "auth.googleapis.com/devstorage.full_control". - ServiceAccountScopes []string `json:"serviceAccountScopes,omitempty"` - - // ZoneUri: Deprecated The zone where the Google Compute Engine cluster - // will be located. Example: "compute.googleapis.com/projects/project_id - // /zones/us-east1-a". - ZoneUri string `json:"zoneUri,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ImageUri") 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. "ImageUri") 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 *GceConfiguration) MarshalJSON() ([]byte, error) { - type NoMethod GceConfiguration - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// HadoopJob: A Cloud Dataproc job for running Hadoop MapReduce jobs on -// YARN. -type HadoopJob struct { - // ArchiveUris: Optional HCFS URIs of archives to be extracted in the - // working directory of Hadoop drivers and tasks. Supported file types: - // .jar, .tar, .tar.gz, .tgz, or .zip. - ArchiveUris []string `json:"archiveUris,omitempty"` - - // Args: Optional The arguments to pass to the driver. Do not include - // arguments, such as -libjars or -Dfoo=bar, that can be set as job - // properties, since a collision may occur that causes an incorrect job - // submission. - Args []string `json:"args,omitempty"` - - // FileUris: Optional HCFS URIs of files to be copied to the working - // directory of Hadoop drivers and distributed tasks. Useful for naively - // parallel tasks. - FileUris []string `json:"fileUris,omitempty"` - - // JarFileUris: Optional Jar file URIs to add to the CLASSPATHs of the - // Hadoop driver and tasks. - JarFileUris []string `json:"jarFileUris,omitempty"` - - // LoggingConfiguration: Optional The runtime log configuration for job - // execution. - LoggingConfiguration *LoggingConfiguration `json:"loggingConfiguration,omitempty"` - - // MainClass: The name of the driver's main class. The jar file - // containing the class must be in the default CLASSPATH or specified in - // jar_file_uris. - MainClass string `json:"mainClass,omitempty"` - - // MainJarFileUri: The Hadoop Compatible Filesystem (HCFS) URI of the - // jar file containing the main class. Examples: - // gs://foo-bucket/analytics-binaries/extract-useful-metrics-mr.jar - // hdfs:/tmp/test-samples/custom-wordcount.jar - // file:///home/usr/lib/hadoop-mapreduce/hadoop-mapreduce-examples.jar - MainJarFileUri string `json:"mainJarFileUri,omitempty"` - - // Properties: Optional A mapping of property names to values, used to - // configure Hadoop. Properties that conflict with values set by the - // Cloud Dataproc API may be overwritten. Can include properties set in - // /etc/hadoop/conf/*-site and classes in user code. - Properties map[string]string `json:"properties,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ArchiveUris") 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. "ArchiveUris") 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 *HadoopJob) MarshalJSON() ([]byte, error) { - type NoMethod HadoopJob - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// HiveJob: A Cloud Dataproc job for running Hive queries on YARN. -type HiveJob struct { - // ContinueOnFailure: Optional Whether to continue executing queries if - // a query fails. The default value is false. Setting to true can be - // useful when executing independent parallel queries. - ContinueOnFailure bool `json:"continueOnFailure,omitempty"` - - // JarFileUris: Optional HCFS URIs of jar files to add to the CLASSPATH - // of the Hive server and Hadoop MapReduce (MR) tasks. Can contain Hive - // SerDes and UDFs. - JarFileUris []string `json:"jarFileUris,omitempty"` - - // Properties: Optional A mapping of property names and values, used to - // configure Hive. Properties that conflict with values set by the Cloud - // Dataproc API may be overwritten. Can include properties set in - // /etc/hadoop/conf/*-site.xml, /etc/hive/conf/hive-site.xml, and - // classes in user code. - Properties map[string]string `json:"properties,omitempty"` - - // QueryFileUri: The HCFS URI of the script that contains Hive queries. - QueryFileUri string `json:"queryFileUri,omitempty"` - - // QueryList: A list of queries. - QueryList *QueryList `json:"queryList,omitempty"` - - // ScriptVariables: Optional Mapping of query variable names to values - // (equivalent to the Hive command: 'SET name="value";'). - ScriptVariables map[string]string `json:"scriptVariables,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ContinueOnFailure") - // 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. "ContinueOnFailure") 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 *HiveJob) MarshalJSON() ([]byte, error) { - type NoMethod HiveJob - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// InstanceGroupConfiguration: The configuration settings for Google -// Compute Engine resources in an instance group, such as a master or -// worker group. -type InstanceGroupConfiguration struct { - // Accelerators: Optional The Google Compute Engine accelerator - // configuration for these instances. - Accelerators []*AcceleratorConfiguration `json:"accelerators,omitempty"` - - // DiskConfiguration: Disk option configuration settings. - DiskConfiguration *DiskConfiguration `json:"diskConfiguration,omitempty"` - - // ImageUri: Output-only The Google Compute Engine image resource used - // for cluster instances. Inferred from - // SoftwareConfiguration.image_version. Example: - // "compute.googleapis.com/projects/debian-cloud - // /global/images/backports-debian-7-wheezy-v20140904". - ImageUri string `json:"imageUri,omitempty"` - - // InstanceNames: The list of instance names. Dataproc derives the names - // from cluster_name, num_instances, and the instance group if not set - // by user (recommended practice is to let Dataproc derive the name). - InstanceNames []string `json:"instanceNames,omitempty"` - - // IsPreemptible: Specifies that this instance group contains - // Preemptible Instances. - IsPreemptible bool `json:"isPreemptible,omitempty"` - - // MachineTypeUri: The Google Compute Engine machine type used for - // cluster instances. Example: - // "compute.googleapis.com/projects/project_id - // /zones/us-east1-a/machineTypes/n1-standard-2". - MachineTypeUri string `json:"machineTypeUri,omitempty"` - - // ManagedGroupConfiguration: Output-only The configuration for Google - // Compute Engine Instance Group Manager that manages this group. This - // is only used for preemptible instance groups. - ManagedGroupConfiguration *ManagedGroupConfiguration `json:"managedGroupConfiguration,omitempty"` - - // NumInstances: The number of VM instances in the instance group. For - // master instance groups, must be set to 1. - NumInstances int64 `json:"numInstances,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Accelerators") 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. "Accelerators") 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 *InstanceGroupConfiguration) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupConfiguration - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// Job: A Cloud Dataproc job resource. -type Job struct { - // DriverControlFilesUri: Output-only If present, the location of - // miscellaneous control files which may be used as part of job setup - // and handling. If not present, control files may be placed in the same - // location as driver_output_uri. - DriverControlFilesUri string `json:"driverControlFilesUri,omitempty"` - - // DriverInputResourceUri: Output-only A URI pointing to the location of - // the stdin of the job's driver program, only set if the job is - // interactive. - DriverInputResourceUri string `json:"driverInputResourceUri,omitempty"` - - // DriverOutputResourceUri: Output-only A URI pointing to the location - // of the stdout of the job's driver program. - DriverOutputResourceUri string `json:"driverOutputResourceUri,omitempty"` - - // DriverOutputUri: Output-only A URI pointing to the location of the - // mixed stdout/stderr of the job's driver program—for example, - // <code>gs://sysbucket123/foo-cluster/jobid-123/driver/output</code>. - DriverOutputUri string `json:"driverOutputUri,omitempty"` - - // HadoopJob: Job is a Hadoop job. - HadoopJob *HadoopJob `json:"hadoopJob,omitempty"` - - // HiveJob: Job is a Hive job. - HiveJob *HiveJob `json:"hiveJob,omitempty"` - - // Interactive: Optional If set to true, then the driver's stdin will be - // kept open and driver_input_uri will be set to provide a path at which - // additional input can be sent to the driver. - Interactive bool `json:"interactive,omitempty"` - - // Labels: Optional The labels to associate with this job.Label keys - // must be between 1 and 63 characters long, and must conform to the - // following regular expression: \p{Ll}\p{Lo}{0,62}Label values must be - // between 1 and 63 characters long, and must conform to the following - // regular expression: \p{Ll}\p{Lo}\p{N}_-{0,63}No more than 64 labels - // can be associated with a given job. - Labels map[string]string `json:"labels,omitempty"` - - // PigJob: Job is a Pig job. - PigJob *PigJob `json:"pigJob,omitempty"` - - // Placement: Required Job information, including how, when, and where - // to run the job. - Placement *JobPlacement `json:"placement,omitempty"` - - // PysparkJob: Job is a Pyspark job. - PysparkJob *PySparkJob `json:"pysparkJob,omitempty"` - - // Reference: Optional The fully-qualified reference to the job, which - // can be used to obtain the equivalent REST path of the job resource. - // If this property is not specified when a job is created, the server - // generates a <code>job_id</code>. - Reference *JobReference `json:"reference,omitempty"` - - // Scheduling: Optional Job scheduling configuration. - Scheduling *JobScheduling `json:"scheduling,omitempty"` - - // SparkJob: Job is a Spark job. - SparkJob *SparkJob `json:"sparkJob,omitempty"` - - // SparkSqlJob: Job is a SparkSql job. - SparkSqlJob *SparkSqlJob `json:"sparkSqlJob,omitempty"` - - // Status: Output-only The job status. Additional application-specific - // status information may be contained in the <code>type_job</code> and - // <code>yarn_applications</code> fields. - Status *JobStatus `json:"status,omitempty"` - - // StatusHistory: Output-only The previous job status. - StatusHistory []*JobStatus `json:"statusHistory,omitempty"` - - // SubmittedBy: Output-only The email address of the user submitting the - // job. For jobs submitted on the cluster, the address is - // <code>username@hostname</code>. - SubmittedBy string `json:"submittedBy,omitempty"` - - // YarnApplications: Output-only The collection of Yarn applications - // spun up by this job. - YarnApplications []*YarnApplication `json:"yarnApplications,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. - // "DriverControlFilesUri") 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. "DriverControlFilesUri") 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 *Job) MarshalJSON() ([]byte, error) { - type NoMethod Job - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// JobPlacement: Cloud Dataproc job configuration. -type JobPlacement struct { - // ClusterName: Required The name of the cluster where the job will be - // submitted. - ClusterName string `json:"clusterName,omitempty"` - - // ClusterUuid: Output-only A cluster UUID generated by the Dataproc - // service when the job is submitted. - ClusterUuid string `json:"clusterUuid,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ClusterName") 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. "ClusterName") 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 *JobPlacement) MarshalJSON() ([]byte, error) { - type NoMethod JobPlacement - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// JobReference: Encapsulates the full scoping used to reference a job. -type JobReference struct { - // JobId: Required The job ID, which must be unique within the project. - // The job ID is generated by the server upon job submission or provided - // by the user as a means to perform retries without creating duplicate - // jobs. The ID must contain only letters (a-z, A-Z), numbers (0-9), - // underscores (_), or dashes (-). The maximum length is 100 characters. - JobId string `json:"jobId,omitempty"` - - // ProjectId: Required The ID of the Google Cloud Platform project that - // the job belongs to. - ProjectId string `json:"projectId,omitempty"` - - // ForceSendFields is a list of field names (e.g. "JobId") 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. "JobId") 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 *JobReference) MarshalJSON() ([]byte, error) { - type NoMethod JobReference - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// JobScheduling: Job scheduling options.Beta Feature: These options are -// available for testing purposes only. They may be changed before final -// release. -type JobScheduling struct { - // MaxFailuresPerHour: Optional Maximum number of times per hour a - // driver may be restarted as a result of driver terminating with - // non-zero code before job is reported failed.A job may be reported as - // thrashing if driver exits with non-zero code 4 times within 10 minute - // window.Maximum value is 10. - MaxFailuresPerHour int64 `json:"maxFailuresPerHour,omitempty"` - - // ForceSendFields is a list of field names (e.g. "MaxFailuresPerHour") - // 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. "MaxFailuresPerHour") 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 *JobScheduling) MarshalJSON() ([]byte, error) { - type NoMethod JobScheduling - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// JobStatus: Cloud Dataproc job status. -type JobStatus struct { - // Details: Optional Job state details, such as an error description if - // the state is <code>ERROR</code>. - Details string `json:"details,omitempty"` - - // EndTime: The time when the job completed. - EndTime string `json:"endTime,omitempty"` - - // InsertTime: The time of the job request. - InsertTime string `json:"insertTime,omitempty"` - - // StartTime: The time when the server started the job. - StartTime string `json:"startTime,omitempty"` - - // State: Required A state message specifying the overall job state. - // - // Possible values: - // "STATE_UNSPECIFIED" - The job state is unknown. - // "PENDING" - The job is pending; it has been submitted, but is not - // yet running. - // "SETUP_DONE" - Job has been received by the service and completed - // initial setup; it will shortly be submitted to the cluster. - // "RUNNING" - The job is running on the cluster. - // "CANCEL_PENDING" - A CancelJob request has been received, but is - // pending. - // "CANCEL_STARTED" - Transient in-flight resources have been - // canceled, and the request to cancel the running job has been issued - // to the cluster. - // "CANCELLED" - The job cancelation was successful. - // "DONE" - The job has completed successfully. - // "ERROR" - The job has completed, but encountered an error. - // "ATTEMPT_FAILURE" - Job attempt has failed. The detail field - // contains failure details for this attempt.Applies to restartable jobs - // only. - State string `json:"state,omitempty"` - - // StateStartTime: Output-only The time when this state was entered. - StateStartTime string `json:"stateStartTime,omitempty"` - - // Substate: Output-only Additional state information, which includes - // status reported by the agent. - // - // Possible values: - // "UNSPECIFIED" - // "SUBMITTED" - The Job is submitted to the agent.Applies to RUNNING - // state. - // "QUEUED" - The Job has been received and is awaiting execution (it - // may be waiting for a condition to be met). See the "details" field - // for the reason for the delay.Applies to RUNNING state. - // "STALE_STATUS" - The agent-reported status is out of date, which - // may be caused by a loss of communication between the agent and Cloud - // Dataproc. If the agent does not send a timely update, the job will - // fail.Applies to RUNNING state. - Substate string `json:"substate,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Details") 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. "Details") 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 *JobStatus) MarshalJSON() ([]byte, error) { - type NoMethod JobStatus - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// ListClustersResponse: The list of all clusters in a project. -type ListClustersResponse struct { - // Clusters: Output-only The clusters in the project. - Clusters []*Cluster `json:"clusters,omitempty"` - - // NextPageToken: The standard List next-page token. - 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. "Clusters") 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. "Clusters") 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 *ListClustersResponse) MarshalJSON() ([]byte, error) { - type NoMethod ListClustersResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// ListJobsRequest: A request to list jobs in a project. -type ListJobsRequest struct { - // ClusterName: Optional If set, the returned jobs list includes only - // jobs that were submitted to the named cluster. - ClusterName string `json:"clusterName,omitempty"` - - // Filter: Optional A filter constraining which jobs to list. Valid - // filters contain job state and label terms such as: labels.key1 = val1 - // AND (labels.k2 = val2 OR labels.k3 = val3) - Filter string `json:"filter,omitempty"` - - // JobStateMatcher: Optional Specifies enumerated categories of jobs to - // list. - // - // Possible values: - // "ALL" - Match all jobs, regardless of state. - // "ACTIVE" - Only match jobs in non-terminal states: PENDING, - // RUNNING, CANCEL_PENDING - // "NON_ACTIVE" - Only match jobs in terminal states: CANCELLED, DONE, - // ERROR - JobStateMatcher string `json:"jobStateMatcher,omitempty"` - - // PageSize: Optional The number of results to return in each response. - PageSize int64 `json:"pageSize,omitempty"` - - // PageToken: Optional The page token, returned by a previous call, to - // request the next page of results. - PageToken string `json:"pageToken,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ClusterName") 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. "ClusterName") 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 *ListJobsRequest) MarshalJSON() ([]byte, error) { - type NoMethod ListJobsRequest - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// ListJobsResponse: A response to a request to list jobs in a project. -type ListJobsResponse struct { - // Jobs: Output-only Jobs list. - Jobs []*Job `json:"jobs,omitempty"` - - // NextPageToken: Optional This token is included in the response if - // there are more results to fetch. To fetch additional results, provide - // this value as the page_token in a subsequent - // <code>ListJobsRequest</code>. - 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. "Jobs") 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. "Jobs") 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 *ListJobsResponse) MarshalJSON() ([]byte, error) { - type NoMethod ListJobsResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// ListOperationsResponse: The response message for -// Operations.ListOperations. -type ListOperationsResponse struct { - // NextPageToken: The standard List next-page token. - NextPageToken string `json:"nextPageToken,omitempty"` - - // Operations: A list of operations that match the specified filter in - // the request. - Operations []*Operation `json:"operations,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "NextPageToken") 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. "NextPageToken") 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 *ListOperationsResponse) MarshalJSON() ([]byte, error) { - type NoMethod ListOperationsResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// LoggingConfiguration: The runtime logging configuration of the job. -type LoggingConfiguration struct { - // DriverLogLevels: The per-package log levels for the driver. This may - // include 'root' package name to configure rootLogger. Examples: - // com.google = FATAL, root = INFO, org.apache = DEBUG - DriverLogLevels map[string]string `json:"driverLogLevels,omitempty"` - - // ForceSendFields is a list of field names (e.g. "DriverLogLevels") 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. "DriverLogLevels") 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 *LoggingConfiguration) MarshalJSON() ([]byte, error) { - type NoMethod LoggingConfiguration - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// ManagedGroupConfiguration: Specifies the resources used to actively -// manage an instance group. -type ManagedGroupConfiguration struct { - // InstanceGroupManagerName: Output-only The name of Instance Group - // Manager managing this group. - InstanceGroupManagerName string `json:"instanceGroupManagerName,omitempty"` - - // InstanceTemplateName: Output-only The name of Instance Template used - // for Managed Instance Group. - InstanceTemplateName string `json:"instanceTemplateName,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "InstanceGroupManagerName") 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. "InstanceGroupManagerName") - // 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 *ManagedGroupConfiguration) MarshalJSON() ([]byte, error) { - type NoMethod ManagedGroupConfiguration - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// NodeInitializationAction: Specifies an executable to run on a fully -// configured node and a timeout period for executable completion. -type NodeInitializationAction struct { - // ExecutableFile: Required Google Cloud Storage URI of executable file. - ExecutableFile string `json:"executableFile,omitempty"` - - // ExecutionTimeout: Optional Amount of time executable has to complete. - // Default is 10 minutes. Cluster creation fails with an explanatory - // error message (the name of the executable that caused the error and - // the exceeded timeout period) if the executable is not completed at - // end of the timeout period. - ExecutionTimeout string `json:"executionTimeout,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ExecutableFile") 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. "ExecutableFile") 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 *NodeInitializationAction) MarshalJSON() ([]byte, error) { - type NoMethod NodeInitializationAction - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// Operation: An asynchronous operation in a project that runs over a -// given cluster. Used to track the progress of a user request that is -// running asynchronously. Examples include creating a cluster, updating -// a cluster, and deleting a cluster. -type Operation struct { - // Done: Indicates if the operation is done. If true, the operation is - // complete and the result is available. If false, the operation is - // still in progress. - Done bool `json:"done,omitempty"` - - // Error: The error result of the operation in case of failure. - Error *Status `json:"error,omitempty"` - - // Metadata: Service-specific metadata associated with the operation. - Metadata googleapi.RawMessage `json:"metadata,omitempty"` - - // Name: The name of the operation resource, in the format - // projects/project_id/operations/operation_id - Name string `json:"name,omitempty"` - - // Response: The operation response. If the called method returns no - // data on success, the response is google.protobuf.Empty. If the called - // method is Get,Create or Update, the response is the resource. For all - // other methods, the response type is a concatenation of the method - // name and "Response". For example, if the called method is - // TakeSnapshot(), the response type is TakeSnapshotResponse. - Response googleapi.RawMessage `json:"response,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Done") 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. "Done") 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 *Operation) MarshalJSON() ([]byte, error) { - type NoMethod Operation - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// OperationMetadata: Metadata describing the operation. -type OperationMetadata struct { - // ClusterName: Name of the cluster for the operation. - ClusterName string `json:"clusterName,omitempty"` - - // ClusterUuid: Cluster UUId for the operation. - ClusterUuid string `json:"clusterUuid,omitempty"` - - // Description: Output-only Short description of operation. - Description string `json:"description,omitempty"` - - // Details: A message containing any operation metadata details. - Details string `json:"details,omitempty"` - - // EndTime: The time that the operation completed. - EndTime string `json:"endTime,omitempty"` - - // InnerState: A message containing the detailed operation state. - InnerState string `json:"innerState,omitempty"` - - // InsertTime: The time that the operation was requested. - InsertTime string `json:"insertTime,omitempty"` - - // OperationType: Output-only The operation type. - OperationType string `json:"operationType,omitempty"` - - // StartTime: The time that the operation was started by the server. - StartTime string `json:"startTime,omitempty"` - - // State: A message containing the operation state. - // - // Possible values: - // "UNKNOWN" - Unused. - // "PENDING" - The operation has been created. - // "RUNNING" - The operation is currently running. - // "DONE" - The operation is done, either cancelled or completed. - State string `json:"state,omitempty"` - - // Status: Output-only Current operation status. - Status *OperationStatus `json:"status,omitempty"` - - // StatusHistory: Output-only Previous operation status. - StatusHistory []*OperationStatus `json:"statusHistory,omitempty"` - - // Warnings: Output-only Errors encountered during operation execution. - Warnings []string `json:"warnings,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ClusterName") 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. "ClusterName") 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 *OperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod OperationMetadata - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// OperationStatus: The status of the operation. -type OperationStatus struct { - // Details: A message containing any operation metadata details. - Details string `json:"details,omitempty"` - - // InnerState: A message containing the detailed operation state. - InnerState string `json:"innerState,omitempty"` - - // State: A message containing the operation state. - // - // Possible values: - // "UNKNOWN" - Unused. - // "PENDING" - The operation has been created. - // "RUNNING" - The operation is running. - // "DONE" - The operation is done; either cancelled or completed. - State string `json:"state,omitempty"` - - // StateStartTime: The time this state was entered. - StateStartTime string `json:"stateStartTime,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Details") 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. "Details") 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 *OperationStatus) MarshalJSON() ([]byte, error) { - type NoMethod OperationStatus - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// PigJob: A Cloud Dataproc job for running Pig queries on YARN. -type PigJob struct { - // ContinueOnFailure: Optional Whether to continue executing queries if - // a query fails. The default value is false. Setting to true can be - // useful when executing independent parallel queries. - ContinueOnFailure bool `json:"continueOnFailure,omitempty"` - - // JarFileUris: Optional HCFS URIs of jar files to add to the CLASSPATH - // of the Pig Client and Hadoop MapReduce (MR) tasks. Can contain Pig - // UDFs. - JarFileUris []string `json:"jarFileUris,omitempty"` - - // LoggingConfiguration: Optional The runtime log configuration for job - // execution. - LoggingConfiguration *LoggingConfiguration `json:"loggingConfiguration,omitempty"` - - // Properties: Optional A mapping of property names to values, used to - // configure Pig. Properties that conflict with values set by the Cloud - // Dataproc API may be overwritten. Can include properties set in - // /etc/hadoop/conf/*-site.xml, /etc/pig/conf/pig.properties, and - // classes in user code. - Properties map[string]string `json:"properties,omitempty"` - - // QueryFileUri: The HCFS URI of the script that contains the Pig - // queries. - QueryFileUri string `json:"queryFileUri,omitempty"` - - // QueryList: A list of queries. - QueryList *QueryList `json:"queryList,omitempty"` - - // ScriptVariables: Optional Mapping of query variable names to values - // (equivalent to the Pig command: "name=value"). - ScriptVariables map[string]string `json:"scriptVariables,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ContinueOnFailure") - // 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. "ContinueOnFailure") 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 *PigJob) MarshalJSON() ([]byte, error) { - type NoMethod PigJob - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// PySparkJob: A Cloud Dataproc job for running PySpark applications on -// YARN. -type PySparkJob struct { - // ArchiveUris: Optional HCFS URIs of archives to be extracted in the - // working directory of .jar, .tar, .tar.gz, .tgz, and .zip. - ArchiveUris []string `json:"archiveUris,omitempty"` - - // Args: Optional The arguments to pass to the driver. Do not include - // arguments, such as --conf, that can be set as job properties, since a - // collision may occur that causes an incorrect job submission. - Args []string `json:"args,omitempty"` - - // FileUris: Optional HCFS URIs of files to be copied to the working - // directory of Python drivers and distributed tasks. Useful for naively - // parallel tasks. - FileUris []string `json:"fileUris,omitempty"` - - // JarFileUris: Optional HCFS URIs of jar files to add to the CLASSPATHs - // of the Python driver and tasks. - JarFileUris []string `json:"jarFileUris,omitempty"` - - // LoggingConfiguration: Optional The runtime log configuration for job - // execution. - LoggingConfiguration *LoggingConfiguration `json:"loggingConfiguration,omitempty"` - - // MainPythonFileUri: Required The Hadoop Compatible Filesystem (HCFS) - // URI of the main Python file to use as the driver. Must be a .py file. - MainPythonFileUri string `json:"mainPythonFileUri,omitempty"` - - // Properties: Optional A mapping of property names to values, used to - // configure PySpark. Properties that conflict with values set by the - // Cloud Dataproc API may be overwritten. Can include properties set in - // /etc/spark/conf/spark-defaults.conf and classes in user code. - Properties map[string]string `json:"properties,omitempty"` - - // PythonFileUris: Optional HCFS file URIs of Python files to pass to - // the PySpark framework. Supported file types: .py, .egg, and .zip. - PythonFileUris []string `json:"pythonFileUris,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ArchiveUris") 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. "ArchiveUris") 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 *PySparkJob) MarshalJSON() ([]byte, error) { - type NoMethod PySparkJob - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// QueryList: A list of queries to run on a cluster. -type QueryList struct { - // Queries: Required The queries to execute. You do not need to - // terminate a query with a semicolon. Multiple queries can be specified - // in one string by separating each with a semicolon. Here is an example - // of an Cloud Dataproc API snippet that uses a QueryList to specify a - // HiveJob: - // "hiveJob": { - // "queryList": { - // "queries": [ - // "query1", - // "query2", - // "query3;query4", - // ] - // } - // } - // - Queries []string `json:"queries,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Queries") 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. "Queries") 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 *QueryList) MarshalJSON() ([]byte, error) { - type NoMethod QueryList - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// SoftwareConfiguration: Specifies the selection and configuration of -// software inside the cluster. -type SoftwareConfiguration struct { - // ImageVersion: Optional The version of software inside the cluster. It - // must match the regular expression 0-9+.0-9+. If unspecified it will - // default to latest version. - ImageVersion string `json:"imageVersion,omitempty"` - - // Properties: Optional The properties to set on daemon configuration - // files.Property keys are specified in "prefix:property" format, such - // as "core:fs.defaultFS". The following are supported prefixes and - // their mappings: core - core-site.xml hdfs - hdfs-site.xml mapred - - // mapred-site.xml yarn - yarn-site.xml hive - hive-site.xml pig - - // pig.properties spark - spark-defaults.conf - Properties map[string]string `json:"properties,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ImageVersion") 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. "ImageVersion") 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 *SoftwareConfiguration) MarshalJSON() ([]byte, error) { - type NoMethod SoftwareConfiguration - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// SparkJob: A Cloud Dataproc job for running Spark applications on -// YARN. -type SparkJob struct { - // ArchiveUris: Optional HCFS URIs of archives to be extracted in the - // working directory of Spark drivers and tasks. Supported file types: - // .jar, .tar, .tar.gz, .tgz, and .zip. - ArchiveUris []string `json:"archiveUris,omitempty"` - - // Args: Optional The arguments to pass to the driver. Do not include - // arguments, such as --conf, that can be set as job properties, since a - // collision may occur that causes an incorrect job submission. - Args []string `json:"args,omitempty"` - - // FileUris: Optional HCFS URIs of files to be copied to the working - // directory of Spark drivers and distributed tasks. Useful for naively - // parallel tasks. - FileUris []string `json:"fileUris,omitempty"` - - // JarFileUris: Optional HCFS URIs of jar files to add to the CLASSPATHs - // of the Spark driver and tasks. - JarFileUris []string `json:"jarFileUris,omitempty"` - - // LoggingConfiguration: Optional The runtime log configuration for job - // execution. - LoggingConfiguration *LoggingConfiguration `json:"loggingConfiguration,omitempty"` - - // MainClass: The name of the driver's main class. The jar file that - // contains the class must be in the default CLASSPATH or specified in - // jar_file_uris. - MainClass string `json:"mainClass,omitempty"` - - // MainJarFileUri: The Hadoop Compatible Filesystem (HCFS) URI of the - // jar file that contains the main class. - MainJarFileUri string `json:"mainJarFileUri,omitempty"` - - // Properties: Optional A mapping of property names to values, used to - // configure Spark. Properties that conflict with values set by the - // Cloud Dataproc API may be overwritten. Can include properties set in - // /etc/spark/conf/spark-defaults.conf and classes in user code. - Properties map[string]string `json:"properties,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ArchiveUris") 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. "ArchiveUris") 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 *SparkJob) MarshalJSON() ([]byte, error) { - type NoMethod SparkJob - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// SparkSqlJob: A Cloud Dataproc job for running Spark SQL queries. -type SparkSqlJob struct { - // JarFileUris: Optional HCFS URIs of jar files to be added to the Spark - // CLASSPATH. - JarFileUris []string `json:"jarFileUris,omitempty"` - - // LoggingConfiguration: Optional The runtime log configuration for job - // execution. - LoggingConfiguration *LoggingConfiguration `json:"loggingConfiguration,omitempty"` - - // Properties: Optional A mapping of property names to values, used to - // configure Spark SQL's SparkConf. Properties that conflict with values - // set by the Cloud Dataproc API may be overwritten. - Properties map[string]string `json:"properties,omitempty"` - - // QueryFileUri: The HCFS URI of the script that contains SQL queries. - QueryFileUri string `json:"queryFileUri,omitempty"` - - // QueryList: A list of queries. - QueryList *QueryList `json:"queryList,omitempty"` - - // ScriptVariables: Optional Mapping of query variable names to values - // (equivalent to the Spark SQL command: SET name="value";). - ScriptVariables map[string]string `json:"scriptVariables,omitempty"` - - // ForceSendFields is a list of field names (e.g. "JarFileUris") 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. "JarFileUris") 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 *SparkSqlJob) MarshalJSON() ([]byte, error) { - type NoMethod SparkSqlJob - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// Status: The Status type defines a logical error model that is -// suitable for different programming environments, including REST APIs -// and RPC APIs. It is used by gRPC (https://github.com/grpc). The error -// model is designed to be: -// Simple to use and understand for most users -// Flexible enough to meet unexpected needsOverviewThe Status message -// contains three pieces of data: error code, error message, and error -// details. The error code should be an enum value of google.rpc.Code, -// but it may accept additional error codes if needed. The error message -// should be a developer-facing English message that helps developers -// understand and resolve the error. If a localized user-facing error -// message is needed, put the localized message in the error details or -// localize it in the client. The optional error details may contain -// arbitrary information about the error. There is a predefined set of -// error detail types in the package google.rpc that can be used for -// common error conditions.Language mappingThe Status message is the -// logical representation of the error model, but it is not necessarily -// the actual wire format. When the Status message is exposed in -// different client libraries and different wire protocols, it can be -// mapped differently. For example, it will likely be mapped to some -// exceptions in Java, but more likely mapped to some error codes in -// C.Other usesThe error model and the Status message can be used in a -// variety of environments, either with or without APIs, to provide a -// consistent developer experience across different environments.Example -// uses of this error model include: -// Partial errors. If a service needs to return partial errors to the -// client, it may embed the Status in the normal response to indicate -// the partial errors. -// Workflow errors. A typical workflow has multiple steps. Each step may -// have a Status message for error reporting. -// Batch operations. If a client uses batch request and batch response, -// the Status message should be used directly inside batch response, one -// for each error sub-response. -// Asynchronous operations. If an API call embeds asynchronous operation -// results in its response, the status of those operations should be -// represented directly using the Status message. -// Logging. If some API errors are stored in logs, the message Status -// could be used directly after any stripping needed for -// security/privacy reasons. -type Status struct { - // Code: The status code, which should be an enum value of - // google.rpc.Code. - Code int64 `json:"code,omitempty"` - - // Details: A list of messages that carry the error details. There will - // be a common set of message types for APIs to use. - Details []googleapi.RawMessage `json:"details,omitempty"` - - // Message: A developer-facing error message, which should be in - // English. Any user-facing error message should be localized and sent - // in the google.rpc.Status.details field, or localized by the client. - Message string `json:"message,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Code") 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. "Code") 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 *Status) MarshalJSON() ([]byte, error) { - type NoMethod Status - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// SubmitJobRequest: A job submission request. -type SubmitJobRequest struct { - // Job: Required The job resource. - Job *Job `json:"job,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Job") 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. "Job") 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 *SubmitJobRequest) MarshalJSON() ([]byte, error) { - type NoMethod SubmitJobRequest - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// YarnApplication: A YARN application created by a job. Application -// information is a subset of -// <code>org.apache.hadoop.yarn.proto.YarnProtos.ApplicationReportProto</ -// code>. -type YarnApplication struct { - // Name: Required The application name. - Name string `json:"name,omitempty"` - - // Progress: Required The numerical progress of the application, from 1 - // to 100. - Progress float64 `json:"progress,omitempty"` - - // State: Required The application state. - // - // Possible values: - // "STATE_UNSPECIFIED" - Status is unspecified. - // "NEW" - Status is NEW. - // "NEW_SAVING" - Status is NEW_SAVING. - // "SUBMITTED" - Status is SUBMITTED. - // "ACCEPTED" - Status is ACCEPTED. - // "RUNNING" - Status is RUNNING. - // "FINISHED" - Status is FINISHED. - // "FAILED" - Status is FAILED. - // "KILLED" - Status is KILLED. - State string `json:"state,omitempty"` - - // TrackingUrl: Optional The HTTP URL of the ApplicationMaster, - // HistoryServer, or TimelineServer that provides application-specific - // information. The URL uses the internal hostname, and requires a proxy - // server for resolution and, possibly, access. - TrackingUrl string `json:"trackingUrl,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Name") 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. "Name") 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 *YarnApplication) MarshalJSON() ([]byte, error) { - type NoMethod YarnApplication - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *YarnApplication) UnmarshalJSON(data []byte) error { - type NoMethod YarnApplication - var s1 struct { - Progress gensupport.JSONFloat64 `json:"progress"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.Progress = float64(s1.Progress) - return nil -} - -// method id "dataproc.operations.cancel": - -type OperationsCancelCall struct { - s *Service - name string - canceloperationrequest *CancelOperationRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Cancel: Starts asynchronous cancellation on a long-running operation. -// The server makes a best effort to cancel the operation, but success -// is not guaranteed. If the server doesn't support this method, it -// returns google.rpc.Code.UNIMPLEMENTED. Clients may use -// Operations.GetOperation or other methods to check whether the -// cancellation succeeded or the operation completed despite -// cancellation. -func (r *OperationsService) Cancel(name string, canceloperationrequest *CancelOperationRequest) *OperationsCancelCall { - c := &OperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.canceloperationrequest = canceloperationrequest - 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 *OperationsCancelCall) Fields(s ...googleapi.Field) *OperationsCancelCall { - 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 *OperationsCancelCall) Context(ctx context.Context) *OperationsCancelCall { - 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 *OperationsCancelCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *OperationsCancelCall) 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.canceloperationrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}:cancel") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "dataproc.operations.cancel" call. -// Exactly one of *Empty or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Empty.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 *OperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, 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 := &Empty{ - 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": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED. Clients may use Operations.GetOperation or other methods to check whether the cancellation succeeded or the operation completed despite cancellation.", - // "flatPath": "v1alpha1/operations/{operationsId}:cancel", - // "httpMethod": "POST", - // "id": "dataproc.operations.cancel", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "The name of the operation resource to be cancelled.", - // "location": "path", - // "pattern": "^operations/.+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1alpha1/{+name}:cancel", - // "request": { - // "$ref": "CancelOperationRequest" - // }, - // "response": { - // "$ref": "Empty" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "dataproc.operations.delete": - -type OperationsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes a long-running operation. It indicates the client is -// no longer interested in the operation result. It does not cancel the -// operation. -func (r *OperationsService) Delete(name string) *OperationsDeleteCall { - c := &OperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - 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 *OperationsDeleteCall) Fields(s ...googleapi.Field) *OperationsDeleteCall { - 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 *OperationsDeleteCall) Context(ctx context.Context) *OperationsDeleteCall { - 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 *OperationsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *OperationsDeleteCall) 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 - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("DELETE", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "dataproc.operations.delete" call. -// Exactly one of *Empty or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Empty.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 *OperationsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, 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 := &Empty{ - 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": "Deletes a long-running operation. It indicates the client is no longer interested in the operation result. It does not cancel the operation.", - // "flatPath": "v1alpha1/operations/{operationsId}", - // "httpMethod": "DELETE", - // "id": "dataproc.operations.delete", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "The name of the operation resource to be deleted.", - // "location": "path", - // "pattern": "^operations/.+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1alpha1/{+name}", - // "response": { - // "$ref": "Empty" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "dataproc.operations.get": - -type OperationsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Gets the latest state of a long-running operation. Clients may -// use this method to poll the operation result at intervals as -// recommended by the API service. -func (r *OperationsService) Get(name string) *OperationsGetCall { - c := &OperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - 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 *OperationsGetCall) Fields(s ...googleapi.Field) *OperationsGetCall { - 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 *OperationsGetCall) IfNoneMatch(entityTag string) *OperationsGetCall { - 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 *OperationsGetCall) Context(ctx context.Context) *OperationsGetCall { - 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 *OperationsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *OperationsGetCall) 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, "v1alpha1/{+name}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "dataproc.operations.get" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.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 *OperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, 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 := &Operation{ - 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": "Gets the latest state of a long-running operation. Clients may use this method to poll the operation result at intervals as recommended by the API service.", - // "flatPath": "v1alpha1/operations/{operationsId}", - // "httpMethod": "GET", - // "id": "dataproc.operations.get", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "The operation resource name.", - // "location": "path", - // "pattern": "^operations/.+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1alpha1/{+name}", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "dataproc.operations.list": - -type OperationsListCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists operations that match the specified filter in the -// request. If the server doesn't support this method, it returns -// google.rpc.Code.UNIMPLEMENTED. -func (r *OperationsService) List(name string) *OperationsListCall { - c := &OperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Filter sets the optional parameter "filter": Required A JSON object -// that contains filters for the list operation, in the format -// {"key1":"value1","key2":"value2", ..., }. Possible keys include -// project_id, cluster_name, and operation_state_matcher.If project_id -// is set, requests the list of operations that belong to the specified -// Google Cloud Platform project ID. This key is required.If -// cluster_name is set, requests the list of operations that were -// submitted to the specified cluster name. This key is optional.If -// operation_state_matcher is set, requests the list of operations that -// match one of the following status options: ALL, ACTIVE, or -// NON_ACTIVE. -func (c *OperationsListCall) Filter(filter string) *OperationsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// PageSize sets the optional parameter "pageSize": The standard List -// page size. -func (c *OperationsListCall) PageSize(pageSize int64) *OperationsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": The standard List -// page token. -func (c *OperationsListCall) PageToken(pageToken string) *OperationsListCall { - 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 *OperationsListCall) Fields(s ...googleapi.Field) *OperationsListCall { - 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 *OperationsListCall) IfNoneMatch(entityTag string) *OperationsListCall { - 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 *OperationsListCall) Context(ctx context.Context) *OperationsListCall { - 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 *OperationsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *OperationsListCall) 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, "v1alpha1/{+name}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "dataproc.operations.list" call. -// Exactly one of *ListOperationsResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *ListOperationsResponse.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 *OperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, 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 := &ListOperationsResponse{ - 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": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED.", - // "flatPath": "v1alpha1/operations", - // "httpMethod": "GET", - // "id": "dataproc.operations.list", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "filter": { - // "description": "Required A JSON object that contains filters for the list operation, in the format {\"key1\":\"value1\",\"key2\":\"value2\", ..., }. Possible keys include project_id, cluster_name, and operation_state_matcher.If project_id is set, requests the list of operations that belong to the specified Google Cloud Platform project ID. This key is required.If cluster_name is set, requests the list of operations that were submitted to the specified cluster name. This key is optional.If operation_state_matcher is set, requests the list of operations that match one of the following status options: ALL, ACTIVE, or NON_ACTIVE.", - // "location": "query", - // "type": "string" - // }, - // "name": { - // "description": "The operation collection name.", - // "location": "path", - // "pattern": "^operations$", - // "required": true, - // "type": "string" - // }, - // "pageSize": { - // "description": "The standard List page size.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "The standard List page token.", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "v1alpha1/{+name}", - // "response": { - // "$ref": "ListOperationsResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// 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 *OperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) 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 "dataproc.projects.regions.clusters.create": - -type ProjectsRegionsClustersCreateCall struct { - s *Service - projectId string - region string - cluster *Cluster - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Create: Request to create a cluster in a project. -func (r *ProjectsRegionsClustersService) Create(projectId string, region string, cluster *Cluster) *ProjectsRegionsClustersCreateCall { - c := &ProjectsRegionsClustersCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.projectId = projectId - c.region = region - c.cluster = cluster - 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 *ProjectsRegionsClustersCreateCall) Fields(s ...googleapi.Field) *ProjectsRegionsClustersCreateCall { - 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 *ProjectsRegionsClustersCreateCall) Context(ctx context.Context) *ProjectsRegionsClustersCreateCall { - 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 *ProjectsRegionsClustersCreateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsRegionsClustersCreateCall) 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.cluster) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/projects/{projectId}/regions/{region}/clusters") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "projectId": c.projectId, - "region": c.region, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "dataproc.projects.regions.clusters.create" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.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 *ProjectsRegionsClustersCreateCall) Do(opts ...googleapi.CallOption) (*Operation, 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 := &Operation{ - 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": "Request to create a cluster in a project.", - // "flatPath": "v1alpha1/projects/{projectId}/regions/{region}/clusters", - // "httpMethod": "POST", - // "id": "dataproc.projects.regions.clusters.create", - // "parameterOrder": [ - // "projectId", - // "region" - // ], - // "parameters": { - // "projectId": { - // "description": "Required The ID of the Google Cloud Platform project that the cluster belongs to.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Required The Dataproc region in which to handle the request.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1alpha1/projects/{projectId}/regions/{region}/clusters", - // "request": { - // "$ref": "Cluster" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "dataproc.projects.regions.clusters.delete": - -type ProjectsRegionsClustersDeleteCall struct { - s *Service - projectId string - region string - clusterName string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Request to delete a cluster in a project. -func (r *ProjectsRegionsClustersService) Delete(projectId string, region string, clusterName string) *ProjectsRegionsClustersDeleteCall { - c := &ProjectsRegionsClustersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.projectId = projectId - c.region = region - c.clusterName = clusterName - 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 *ProjectsRegionsClustersDeleteCall) Fields(s ...googleapi.Field) *ProjectsRegionsClustersDeleteCall { - 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 *ProjectsRegionsClustersDeleteCall) Context(ctx context.Context) *ProjectsRegionsClustersDeleteCall { - 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 *ProjectsRegionsClustersDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsRegionsClustersDeleteCall) 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 - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/projects/{projectId}/regions/{region}/clusters/{clusterName}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("DELETE", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "projectId": c.projectId, - "region": c.region, - "clusterName": c.clusterName, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "dataproc.projects.regions.clusters.delete" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.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 *ProjectsRegionsClustersDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, 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 := &Operation{ - 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": "Request to delete a cluster in a project.", - // "flatPath": "v1alpha1/projects/{projectId}/regions/{region}/clusters/{clusterName}", - // "httpMethod": "DELETE", - // "id": "dataproc.projects.regions.clusters.delete", - // "parameterOrder": [ - // "projectId", - // "region", - // "clusterName" - // ], - // "parameters": { - // "clusterName": { - // "description": "Required The cluster name.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "projectId": { - // "description": "Required The ID of the Google Cloud Platform project that the cluster belongs to.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Required The Dataproc region in which to handle the request.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1alpha1/projects/{projectId}/regions/{region}/clusters/{clusterName}", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "dataproc.projects.regions.clusters.get": - -type ProjectsRegionsClustersGetCall struct { - s *Service - projectId string - region string - clusterName string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Request to get the resource representation for a cluster in a -// project. -func (r *ProjectsRegionsClustersService) Get(projectId string, region string, clusterName string) *ProjectsRegionsClustersGetCall { - c := &ProjectsRegionsClustersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.projectId = projectId - c.region = region - c.clusterName = clusterName - 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 *ProjectsRegionsClustersGetCall) Fields(s ...googleapi.Field) *ProjectsRegionsClustersGetCall { - 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 *ProjectsRegionsClustersGetCall) IfNoneMatch(entityTag string) *ProjectsRegionsClustersGetCall { - 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 *ProjectsRegionsClustersGetCall) Context(ctx context.Context) *ProjectsRegionsClustersGetCall { - 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 *ProjectsRegionsClustersGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsRegionsClustersGetCall) 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, "v1alpha1/projects/{projectId}/regions/{region}/clusters/{clusterName}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "projectId": c.projectId, - "region": c.region, - "clusterName": c.clusterName, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "dataproc.projects.regions.clusters.get" call. -// Exactly one of *Cluster or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Cluster.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 *ProjectsRegionsClustersGetCall) Do(opts ...googleapi.CallOption) (*Cluster, 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 := &Cluster{ - 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": "Request to get the resource representation for a cluster in a project.", - // "flatPath": "v1alpha1/projects/{projectId}/regions/{region}/clusters/{clusterName}", - // "httpMethod": "GET", - // "id": "dataproc.projects.regions.clusters.get", - // "parameterOrder": [ - // "projectId", - // "region", - // "clusterName" - // ], - // "parameters": { - // "clusterName": { - // "description": "Required The cluster name.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "projectId": { - // "description": "Required The ID of the Google Cloud Platform project that the cluster belongs to.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Required The Dataproc region in which to handle the request.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1alpha1/projects/{projectId}/regions/{region}/clusters/{clusterName}", - // "response": { - // "$ref": "Cluster" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "dataproc.projects.regions.clusters.list": - -type ProjectsRegionsClustersListCall struct { - s *Service - projectId string - region string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Request a list of all regions/{region}/clusters in a project. -func (r *ProjectsRegionsClustersService) List(projectId string, region string) *ProjectsRegionsClustersListCall { - c := &ProjectsRegionsClustersListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.projectId = projectId - c.region = region - return c -} - -// Filter sets the optional parameter "filter": Optional A filter -// constraining which clusters to list. Valid filters contain label -// terms such as: labels.key1 = val1 AND (-labels.k2 = val2 OR labels.k3 -// = val3) -func (c *ProjectsRegionsClustersListCall) Filter(filter string) *ProjectsRegionsClustersListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// PageSize sets the optional parameter "pageSize": The standard List -// page size. -func (c *ProjectsRegionsClustersListCall) PageSize(pageSize int64) *ProjectsRegionsClustersListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": The standard List -// page token. -func (c *ProjectsRegionsClustersListCall) PageToken(pageToken string) *ProjectsRegionsClustersListCall { - 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 *ProjectsRegionsClustersListCall) Fields(s ...googleapi.Field) *ProjectsRegionsClustersListCall { - 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 *ProjectsRegionsClustersListCall) IfNoneMatch(entityTag string) *ProjectsRegionsClustersListCall { - 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 *ProjectsRegionsClustersListCall) Context(ctx context.Context) *ProjectsRegionsClustersListCall { - 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 *ProjectsRegionsClustersListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsRegionsClustersListCall) 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, "v1alpha1/projects/{projectId}/regions/{region}/clusters") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "projectId": c.projectId, - "region": c.region, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "dataproc.projects.regions.clusters.list" call. -// Exactly one of *ListClustersResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *ListClustersResponse.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 *ProjectsRegionsClustersListCall) Do(opts ...googleapi.CallOption) (*ListClustersResponse, 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 := &ListClustersResponse{ - 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": "Request a list of all regions/{region}/clusters in a project.", - // "flatPath": "v1alpha1/projects/{projectId}/regions/{region}/clusters", - // "httpMethod": "GET", - // "id": "dataproc.projects.regions.clusters.list", - // "parameterOrder": [ - // "projectId", - // "region" - // ], - // "parameters": { - // "filter": { - // "description": "Optional A filter constraining which clusters to list. Valid filters contain label terms such as: labels.key1 = val1 AND (-labels.k2 = val2 OR labels.k3 = val3)", - // "location": "query", - // "type": "string" - // }, - // "pageSize": { - // "description": "The standard List page size.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "The standard List page token.", - // "location": "query", - // "type": "string" - // }, - // "projectId": { - // "description": "Required The ID of the Google Cloud Platform project that the cluster belongs to.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Required The Dataproc region in which to handle the request.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1alpha1/projects/{projectId}/regions/{region}/clusters", - // "response": { - // "$ref": "ListClustersResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// 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 *ProjectsRegionsClustersListCall) Pages(ctx context.Context, f func(*ListClustersResponse) 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 "dataproc.projects.regions.clusters.patch": - -type ProjectsRegionsClustersPatchCall struct { - s *Service - projectId string - region string - clusterName string - cluster *Cluster - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Request to update a cluster in a project. -func (r *ProjectsRegionsClustersService) Patch(projectId string, region string, clusterName string, cluster *Cluster) *ProjectsRegionsClustersPatchCall { - c := &ProjectsRegionsClustersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.projectId = projectId - c.region = region - c.clusterName = clusterName - c.cluster = cluster - return c -} - -// UpdateMask sets the optional parameter "updateMask": Required -// Specifies the path, relative to <code>Cluster</code>, of the field to -// update. For example, to change the number of workers in a cluster to -// 5, the <code>update_mask</code> parameter would be specified as -// <code>"configuration.worker_configuration.num_instances,"</code> and -// the PATCH request body would specify the new value, as follows: -// { -// "configuration":{ -// "workerConfiguration":{ -// "numInstances":"5" -// } -// } -// } -// <strong>Note:</strong> Currently, -// <code>configuration.worker_configuration.num_instances</code> is the -// only field that can be updated. -func (c *ProjectsRegionsClustersPatchCall) UpdateMask(updateMask string) *ProjectsRegionsClustersPatchCall { - c.urlParams_.Set("updateMask", updateMask) - 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 *ProjectsRegionsClustersPatchCall) Fields(s ...googleapi.Field) *ProjectsRegionsClustersPatchCall { - 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 *ProjectsRegionsClustersPatchCall) Context(ctx context.Context) *ProjectsRegionsClustersPatchCall { - 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 *ProjectsRegionsClustersPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsRegionsClustersPatchCall) 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.cluster) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/projects/{projectId}/regions/{region}/clusters/{clusterName}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("PATCH", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "projectId": c.projectId, - "region": c.region, - "clusterName": c.clusterName, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "dataproc.projects.regions.clusters.patch" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.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 *ProjectsRegionsClustersPatchCall) Do(opts ...googleapi.CallOption) (*Operation, 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 := &Operation{ - 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": "Request to update a cluster in a project.", - // "flatPath": "v1alpha1/projects/{projectId}/regions/{region}/clusters/{clusterName}", - // "httpMethod": "PATCH", - // "id": "dataproc.projects.regions.clusters.patch", - // "parameterOrder": [ - // "projectId", - // "region", - // "clusterName" - // ], - // "parameters": { - // "clusterName": { - // "description": "Required The cluster name.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "projectId": { - // "description": "Required The ID of the Google Cloud Platform project the cluster belongs to.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Required The Dataproc region in which to handle the request.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "updateMask": { - // "description": "Required Specifies the path, relative to \u003ccode\u003eCluster\u003c/code\u003e, of the field to update. For example, to change the number of workers in a cluster to 5, the \u003ccode\u003eupdate_mask\u003c/code\u003e parameter would be specified as \u003ccode\u003e\"configuration.worker_configuration.num_instances,\"\u003c/code\u003e and the PATCH request body would specify the new value, as follows:\n{\n \"configuration\":{\n \"workerConfiguration\":{\n \"numInstances\":\"5\"\n }\n }\n}\n\u003cstrong\u003eNote:\u003c/strong\u003e Currently, \u003ccode\u003econfiguration.worker_configuration.num_instances\u003c/code\u003e is the only field that can be updated.", - // "format": "google-fieldmask", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "v1alpha1/projects/{projectId}/regions/{region}/clusters/{clusterName}", - // "request": { - // "$ref": "Cluster" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "dataproc.projects.regions.jobs.cancel": - -type ProjectsRegionsJobsCancelCall struct { - s *Service - projectId string - region string - jobId string - canceljobrequest *CancelJobRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Cancel: Starts a job cancellation request. To access the job resource -// after cancellation, call regions/{region}/jobs:list or -// regions/{region}/jobs:get. -func (r *ProjectsRegionsJobsService) Cancel(projectId string, region string, jobId string, canceljobrequest *CancelJobRequest) *ProjectsRegionsJobsCancelCall { - c := &ProjectsRegionsJobsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.projectId = projectId - c.region = region - c.jobId = jobId - c.canceljobrequest = canceljobrequest - 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 *ProjectsRegionsJobsCancelCall) Fields(s ...googleapi.Field) *ProjectsRegionsJobsCancelCall { - 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 *ProjectsRegionsJobsCancelCall) Context(ctx context.Context) *ProjectsRegionsJobsCancelCall { - 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 *ProjectsRegionsJobsCancelCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsRegionsJobsCancelCall) 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.canceljobrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/projects/{projectId}/regions/{region}/jobs/{jobId}:cancel") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "projectId": c.projectId, - "region": c.region, - "jobId": c.jobId, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "dataproc.projects.regions.jobs.cancel" call. -// Exactly one of *Job or error will be non-nil. Any non-2xx status code -// is an error. Response headers are in either -// *Job.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 *ProjectsRegionsJobsCancelCall) Do(opts ...googleapi.CallOption) (*Job, 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 := &Job{ - 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": "Starts a job cancellation request. To access the job resource after cancellation, call regions/{region}/jobs:list or regions/{region}/jobs:get.", - // "flatPath": "v1alpha1/projects/{projectId}/regions/{region}/jobs/{jobId}:cancel", - // "httpMethod": "POST", - // "id": "dataproc.projects.regions.jobs.cancel", - // "parameterOrder": [ - // "projectId", - // "region", - // "jobId" - // ], - // "parameters": { - // "jobId": { - // "description": "Required The job ID.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "projectId": { - // "description": "Required The ID of the Google Cloud Platform project that the job belongs to.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Required The Dataproc region in which to handle the request.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1alpha1/projects/{projectId}/regions/{region}/jobs/{jobId}:cancel", - // "request": { - // "$ref": "CancelJobRequest" - // }, - // "response": { - // "$ref": "Job" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "dataproc.projects.regions.jobs.delete": - -type ProjectsRegionsJobsDeleteCall struct { - s *Service - projectId string - region string - jobId string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the job from the project. If the job is active, the -// delete fails, and the response returns FAILED_PRECONDITION. -func (r *ProjectsRegionsJobsService) Delete(projectId string, region string, jobId string) *ProjectsRegionsJobsDeleteCall { - c := &ProjectsRegionsJobsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.projectId = projectId - c.region = region - c.jobId = jobId - 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 *ProjectsRegionsJobsDeleteCall) Fields(s ...googleapi.Field) *ProjectsRegionsJobsDeleteCall { - 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 *ProjectsRegionsJobsDeleteCall) Context(ctx context.Context) *ProjectsRegionsJobsDeleteCall { - 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 *ProjectsRegionsJobsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsRegionsJobsDeleteCall) 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 - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/projects/{projectId}/regions/{region}/jobs/{jobId}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("DELETE", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "projectId": c.projectId, - "region": c.region, - "jobId": c.jobId, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "dataproc.projects.regions.jobs.delete" call. -// Exactly one of *Job or error will be non-nil. Any non-2xx status code -// is an error. Response headers are in either -// *Job.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 *ProjectsRegionsJobsDeleteCall) Do(opts ...googleapi.CallOption) (*Job, 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 := &Job{ - 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": "Deletes the job from the project. If the job is active, the delete fails, and the response returns FAILED_PRECONDITION.", - // "flatPath": "v1alpha1/projects/{projectId}/regions/{region}/jobs/{jobId}", - // "httpMethod": "DELETE", - // "id": "dataproc.projects.regions.jobs.delete", - // "parameterOrder": [ - // "projectId", - // "region", - // "jobId" - // ], - // "parameters": { - // "jobId": { - // "description": "Required The job ID.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "projectId": { - // "description": "Required The ID of the Google Cloud Platform project that the job belongs to.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Required The Dataproc region in which to handle the request.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1alpha1/projects/{projectId}/regions/{region}/jobs/{jobId}", - // "response": { - // "$ref": "Job" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "dataproc.projects.regions.jobs.get": - -type ProjectsRegionsJobsGetCall struct { - s *Service - projectId string - region string - jobId string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Gets the resource representation for a job in a project. -func (r *ProjectsRegionsJobsService) Get(projectId string, region string, jobId string) *ProjectsRegionsJobsGetCall { - c := &ProjectsRegionsJobsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.projectId = projectId - c.region = region - c.jobId = jobId - 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 *ProjectsRegionsJobsGetCall) Fields(s ...googleapi.Field) *ProjectsRegionsJobsGetCall { - 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 *ProjectsRegionsJobsGetCall) IfNoneMatch(entityTag string) *ProjectsRegionsJobsGetCall { - 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 *ProjectsRegionsJobsGetCall) Context(ctx context.Context) *ProjectsRegionsJobsGetCall { - 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 *ProjectsRegionsJobsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsRegionsJobsGetCall) 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, "v1alpha1/projects/{projectId}/regions/{region}/jobs/{jobId}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "projectId": c.projectId, - "region": c.region, - "jobId": c.jobId, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "dataproc.projects.regions.jobs.get" call. -// Exactly one of *Job or error will be non-nil. Any non-2xx status code -// is an error. Response headers are in either -// *Job.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 *ProjectsRegionsJobsGetCall) Do(opts ...googleapi.CallOption) (*Job, 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 := &Job{ - 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": "Gets the resource representation for a job in a project.", - // "flatPath": "v1alpha1/projects/{projectId}/regions/{region}/jobs/{jobId}", - // "httpMethod": "GET", - // "id": "dataproc.projects.regions.jobs.get", - // "parameterOrder": [ - // "projectId", - // "region", - // "jobId" - // ], - // "parameters": { - // "jobId": { - // "description": "Required The job ID.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "projectId": { - // "description": "Required The ID of the Google Cloud Platform project that the job belongs to.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Required The Dataproc region in which to handle the request.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1alpha1/projects/{projectId}/regions/{region}/jobs/{jobId}", - // "response": { - // "$ref": "Job" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "dataproc.projects.regions.jobs.list": - -type ProjectsRegionsJobsListCall struct { - s *Service - projectId string - region string - listjobsrequest *ListJobsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// List: Lists regions/{region}/jobs in a project. -func (r *ProjectsRegionsJobsService) List(projectId string, region string, listjobsrequest *ListJobsRequest) *ProjectsRegionsJobsListCall { - c := &ProjectsRegionsJobsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.projectId = projectId - c.region = region - c.listjobsrequest = listjobsrequest - 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 *ProjectsRegionsJobsListCall) Fields(s ...googleapi.Field) *ProjectsRegionsJobsListCall { - 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 *ProjectsRegionsJobsListCall) Context(ctx context.Context) *ProjectsRegionsJobsListCall { - 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 *ProjectsRegionsJobsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsRegionsJobsListCall) 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.listjobsrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/projects/{projectId}/regions/{region}/jobs:list") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "projectId": c.projectId, - "region": c.region, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "dataproc.projects.regions.jobs.list" call. -// Exactly one of *ListJobsResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *ListJobsResponse.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 *ProjectsRegionsJobsListCall) Do(opts ...googleapi.CallOption) (*ListJobsResponse, 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 := &ListJobsResponse{ - 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": "Lists regions/{region}/jobs in a project.", - // "flatPath": "v1alpha1/projects/{projectId}/regions/{region}/jobs:list", - // "httpMethod": "POST", - // "id": "dataproc.projects.regions.jobs.list", - // "parameterOrder": [ - // "projectId", - // "region" - // ], - // "parameters": { - // "projectId": { - // "description": "Required The ID of the Google Cloud Platform project that the job belongs to.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Required The Dataproc region in which to handle the request.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1alpha1/projects/{projectId}/regions/{region}/jobs:list", - // "request": { - // "$ref": "ListJobsRequest" - // }, - // "response": { - // "$ref": "ListJobsResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// 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 *ProjectsRegionsJobsListCall) Pages(ctx context.Context, f func(*ListJobsResponse) error) error { - c.ctx_ = ctx - defer func(pt string) { c.listjobsrequest.PageToken = pt }(c.listjobsrequest.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.listjobsrequest.PageToken = x.NextPageToken - } -} - -// method id "dataproc.projects.regions.jobs.patch": - -type ProjectsRegionsJobsPatchCall struct { - s *Service - projectId string - region string - jobId string - job *Job - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Updates a job in a project. -func (r *ProjectsRegionsJobsService) Patch(projectId string, region string, jobId string, job *Job) *ProjectsRegionsJobsPatchCall { - c := &ProjectsRegionsJobsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.projectId = projectId - c.region = region - c.jobId = jobId - c.job = job - return c -} - -// UpdateMask sets the optional parameter "updateMask": Required -// Specifies the path, relative to <code>Job</code>, of the field to -// update. For example, to update the labels of a Job the -// <code>update_mask</code> parameter would be specified as -// <code>labels</code>, and the PATCH request body would specify the new -// value. <strong>Note:</strong> Currently, <code>labels</code> is the -// only field that can be updated. -func (c *ProjectsRegionsJobsPatchCall) UpdateMask(updateMask string) *ProjectsRegionsJobsPatchCall { - c.urlParams_.Set("updateMask", updateMask) - 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 *ProjectsRegionsJobsPatchCall) Fields(s ...googleapi.Field) *ProjectsRegionsJobsPatchCall { - 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 *ProjectsRegionsJobsPatchCall) Context(ctx context.Context) *ProjectsRegionsJobsPatchCall { - 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 *ProjectsRegionsJobsPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsRegionsJobsPatchCall) 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.job) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/projects/{projectId}/regions/{region}/jobs/{jobId}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("PATCH", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "projectId": c.projectId, - "region": c.region, - "jobId": c.jobId, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "dataproc.projects.regions.jobs.patch" call. -// Exactly one of *Job or error will be non-nil. Any non-2xx status code -// is an error. Response headers are in either -// *Job.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 *ProjectsRegionsJobsPatchCall) Do(opts ...googleapi.CallOption) (*Job, 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 := &Job{ - 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": "Updates a job in a project.", - // "flatPath": "v1alpha1/projects/{projectId}/regions/{region}/jobs/{jobId}", - // "httpMethod": "PATCH", - // "id": "dataproc.projects.regions.jobs.patch", - // "parameterOrder": [ - // "projectId", - // "region", - // "jobId" - // ], - // "parameters": { - // "jobId": { - // "description": "Required The job ID.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "projectId": { - // "description": "Required The ID of the Google Cloud Platform project that the job belongs to.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Required The Dataproc region in which to handle the request.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "updateMask": { - // "description": "Required Specifies the path, relative to \u003ccode\u003eJob\u003c/code\u003e, of the field to update. For example, to update the labels of a Job the \u003ccode\u003eupdate_mask\u003c/code\u003e parameter would be specified as \u003ccode\u003elabels\u003c/code\u003e, and the PATCH request body would specify the new value. \u003cstrong\u003eNote:\u003c/strong\u003e Currently, \u003ccode\u003elabels\u003c/code\u003e is the only field that can be updated.", - // "format": "google-fieldmask", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "v1alpha1/projects/{projectId}/regions/{region}/jobs/{jobId}", - // "request": { - // "$ref": "Job" - // }, - // "response": { - // "$ref": "Job" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "dataproc.projects.regions.jobs.submit": - -type ProjectsRegionsJobsSubmitCall struct { - s *Service - projectId string - region string - submitjobrequest *SubmitJobRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Submit: Submits a job to a cluster. -func (r *ProjectsRegionsJobsService) Submit(projectId string, region string, submitjobrequest *SubmitJobRequest) *ProjectsRegionsJobsSubmitCall { - c := &ProjectsRegionsJobsSubmitCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.projectId = projectId - c.region = region - c.submitjobrequest = submitjobrequest - 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 *ProjectsRegionsJobsSubmitCall) Fields(s ...googleapi.Field) *ProjectsRegionsJobsSubmitCall { - 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 *ProjectsRegionsJobsSubmitCall) Context(ctx context.Context) *ProjectsRegionsJobsSubmitCall { - 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 *ProjectsRegionsJobsSubmitCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsRegionsJobsSubmitCall) 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.submitjobrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/projects/{projectId}/regions/{region}/jobs:submit") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "projectId": c.projectId, - "region": c.region, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "dataproc.projects.regions.jobs.submit" call. -// Exactly one of *Job or error will be non-nil. Any non-2xx status code -// is an error. Response headers are in either -// *Job.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 *ProjectsRegionsJobsSubmitCall) Do(opts ...googleapi.CallOption) (*Job, 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 := &Job{ - 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": "Submits a job to a cluster.", - // "flatPath": "v1alpha1/projects/{projectId}/regions/{region}/jobs:submit", - // "httpMethod": "POST", - // "id": "dataproc.projects.regions.jobs.submit", - // "parameterOrder": [ - // "projectId", - // "region" - // ], - // "parameters": { - // "projectId": { - // "description": "Required The ID of the Google Cloud Platform project that the job belongs to.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Required The Dataproc region in which to handle the request.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1alpha1/projects/{projectId}/regions/{region}/jobs:submit", - // "request": { - // "$ref": "SubmitJobRequest" - // }, - // "response": { - // "$ref": "Job" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -}
diff --git a/dataproc/v1beta1/dataproc-api.json b/dataproc/v1beta1/dataproc-api.json deleted file mode 100644 index f7407cd..0000000 --- a/dataproc/v1beta1/dataproc-api.json +++ /dev/null
@@ -1,1910 +0,0 @@ -{ - "ownerName": "Google", - "discoveryVersion": "v1", - "resources": { - "operations": { - "methods": { - "cancel": { - "path": "v1beta1/{+name}:cancel", - "id": "dataproc.operations.cancel", - "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED. Clients can use operations.get or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation.", - "request": { - "$ref": "CancelOperationRequest" - }, - "response": { - "$ref": "Empty" - }, - "parameterOrder": [ - "name" - ], - "httpMethod": "POST", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "name": { - "description": "The name of the operation resource to be cancelled.", - "required": true, - "type": "string", - "pattern": "^operations/.+$", - "location": "path" - } - }, - "flatPath": "v1beta1/operations/{operationsId}:cancel" - }, - "delete": { - "description": "Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED.", - "response": { - "$ref": "Empty" - }, - "parameterOrder": [ - "name" - ], - "httpMethod": "DELETE", - "parameters": { - "name": { - "location": "path", - "description": "The name of the operation resource to be deleted.", - "required": true, - "type": "string", - "pattern": "^operations/.+$" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1beta1/operations/{operationsId}", - "path": "v1beta1/{+name}", - "id": "dataproc.operations.delete" - }, - "get": { - "httpMethod": "GET", - "parameterOrder": [ - "name" - ], - "response": { - "$ref": "Operation" - }, - "parameters": { - "name": { - "description": "The name of the operation resource.", - "required": true, - "type": "string", - "pattern": "^operations/.+$", - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1beta1/operations/{operationsId}", - "id": "dataproc.operations.get", - "path": "v1beta1/{+name}", - "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service." - }, - "list": { - "httpMethod": "GET", - "parameterOrder": [ - "name" - ], - "response": { - "$ref": "ListOperationsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "filter": { - "description": "The standard list filter.", - "type": "string", - "location": "query" - }, - "name": { - "required": true, - "type": "string", - "pattern": "^operations$", - "location": "path", - "description": "The name of the operation's parent resource." - }, - "pageToken": { - "location": "query", - "description": "The standard list page token.", - "type": "string" - }, - "pageSize": { - "type": "integer", - "location": "query", - "description": "The standard list page size.", - "format": "int32" - } - }, - "flatPath": "v1beta1/operations", - "id": "dataproc.operations.list", - "path": "v1beta1/{+name}", - "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns UNIMPLEMENTED.NOTE: the name binding below allows API services to override the binding to use different resource name schemes, such as users/*/operations." - } - } - }, - "projects": { - "resources": { - "clusters": { - "methods": { - "diagnose": { - "response": { - "$ref": "Operation" - }, - "parameterOrder": [ - "projectId", - "clusterName" - ], - "httpMethod": "POST", - "parameters": { - "clusterName": { - "location": "path", - "description": "Required The cluster name.", - "required": true, - "type": "string" - }, - "projectId": { - "location": "path", - "description": "Required The ID of the Google Cloud Platform project that the cluster belongs to.", - "required": true, - "type": "string" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1beta1/projects/{projectId}/clusters/{clusterName}:diagnose", - "path": "v1beta1/projects/{projectId}/clusters/{clusterName}:diagnose", - "id": "dataproc.projects.clusters.diagnose", - "request": { - "$ref": "DiagnoseClusterRequest" - }, - "description": "Gets cluster diagnostic information. After the operation completes, the Operation.response field contains DiagnoseClusterOutputLocation." - }, - "delete": { - "description": "Deletes a cluster in a project.", - "response": { - "$ref": "Operation" - }, - "parameterOrder": [ - "projectId", - "clusterName" - ], - "httpMethod": "DELETE", - "parameters": { - "clusterName": { - "description": "Required The cluster name.", - "required": true, - "type": "string", - "location": "path" - }, - "projectId": { - "location": "path", - "description": "Required The ID of the Google Cloud Platform project that the cluster belongs to.", - "required": true, - "type": "string" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1beta1/projects/{projectId}/clusters/{clusterName}", - "path": "v1beta1/projects/{projectId}/clusters/{clusterName}", - "id": "dataproc.projects.clusters.delete" - }, - "list": { - "httpMethod": "GET", - "parameterOrder": [ - "projectId" - ], - "response": { - "$ref": "ListClustersResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "pageToken": { - "location": "query", - "description": "The standard List page token.", - "type": "string" - }, - "pageSize": { - "location": "query", - "description": "The standard List page size.", - "format": "int32", - "type": "integer" - }, - "projectId": { - "location": "path", - "description": "Required The ID of the Google Cloud Platform project that the cluster belongs to.", - "required": true, - "type": "string" - }, - "filter": { - "type": "string", - "location": "query", - "description": "Optional A filter constraining which clusters to list. Valid filters contain label terms such as: labels.key1 = val1 AND (-labels.k2 = val2 OR labels.k3 = val3)" - } - }, - "flatPath": "v1beta1/projects/{projectId}/clusters", - "id": "dataproc.projects.clusters.list", - "path": "v1beta1/projects/{projectId}/clusters", - "description": "Lists all clusters in a project." - }, - "create": { - "request": { - "$ref": "Cluster" - }, - "description": "Creates a cluster in a project.", - "response": { - "$ref": "Operation" - }, - "parameterOrder": [ - "projectId" - ], - "httpMethod": "POST", - "parameters": { - "projectId": { - "location": "path", - "description": "Required The ID of the Google Cloud Platform project that the cluster belongs to.", - "required": true, - "type": "string" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1beta1/projects/{projectId}/clusters", - "path": "v1beta1/projects/{projectId}/clusters", - "id": "dataproc.projects.clusters.create" - }, - "get": { - "httpMethod": "GET", - "parameterOrder": [ - "projectId", - "clusterName" - ], - "response": { - "$ref": "Cluster" - }, - "parameters": { - "clusterName": { - "location": "path", - "description": "Required The cluster name.", - "required": true, - "type": "string" - }, - "projectId": { - "location": "path", - "description": "Required The ID of the Google Cloud Platform project that the cluster belongs to.", - "required": true, - "type": "string" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1beta1/projects/{projectId}/clusters/{clusterName}", - "id": "dataproc.projects.clusters.get", - "path": "v1beta1/projects/{projectId}/clusters/{clusterName}", - "description": "Gets the resource representation for a cluster in a project." - }, - "patch": { - "flatPath": "v1beta1/projects/{projectId}/clusters/{clusterName}", - "path": "v1beta1/projects/{projectId}/clusters/{clusterName}", - "id": "dataproc.projects.clusters.patch", - "description": "Updates a cluster in a project.", - "request": { - "$ref": "Cluster" - }, - "response": { - "$ref": "Operation" - }, - "parameterOrder": [ - "projectId", - "clusterName" - ], - "httpMethod": "PATCH", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "clusterName": { - "location": "path", - "description": "Required The cluster name.", - "required": true, - "type": "string" - }, - "projectId": { - "location": "path", - "description": "Required The ID of the Google Cloud Platform project the cluster belongs to.", - "required": true, - "type": "string" - }, - "updateMask": { - "description": "Required Specifies the path, relative to \u003ccode\u003eCluster\u003c/code\u003e, of the field to update. For example, to change the number of workers in a cluster to 5, the \u003ccode\u003eupdate_mask\u003c/code\u003e parameter would be specified as \u003ccode\u003econfiguration.worker_configuration.num_instances\u003c/code\u003e, and the PATCH request body would specify the new value, as follows:\n{\n \"configuration\":{\n \"workerConfiguration\":{\n \"numInstances\":\"5\"\n }\n }\n}\nSimilarly, to change the number of preemptible workers in a cluster to 5, the \u003ccode\u003eupdate_mask\u003c/code\u003e parameter would be \u003ccode\u003econfig.secondary_worker_config.num_instances\u003c/code\u003e, and the PATCH request body would be set as follows:\n{\n \"config\":{\n \"secondaryWorkerConfig\":{\n \"numInstances\":\"5\"\n }\n }\n}\n\u003cstrong\u003eNote:\u003c/strong\u003e Currently, \u003ccode\u003econfig.worker_config.num_instances\u003c/code\u003e and \u003ccode\u003econfig.secondary_worker_config.num_instances\u003c/code\u003e are the only fields that can be updated.", - "format": "google-fieldmask", - "type": "string", - "location": "query" - } - } - } - } - }, - "jobs": { - "methods": { - "submit": { - "path": "v1beta1/projects/{projectId}/jobs:submit", - "id": "dataproc.projects.jobs.submit", - "request": { - "$ref": "SubmitJobRequest" - }, - "description": "Submits a job to a cluster.", - "response": { - "$ref": "Job" - }, - "parameterOrder": [ - "projectId" - ], - "httpMethod": "POST", - "parameters": { - "projectId": { - "location": "path", - "description": "Required The ID of the Google Cloud Platform project that the job belongs to.", - "required": true, - "type": "string" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1beta1/projects/{projectId}/jobs:submit" - }, - "delete": { - "description": "Deletes the job from the project. If the job is active, the delete fails, and the response returns FAILED_PRECONDITION.", - "response": { - "$ref": "Empty" - }, - "parameterOrder": [ - "projectId", - "jobId" - ], - "httpMethod": "DELETE", - "parameters": { - "projectId": { - "description": "Required The ID of the Google Cloud Platform project that the job belongs to.", - "required": true, - "type": "string", - "location": "path" - }, - "jobId": { - "description": "Required The job ID.", - "required": true, - "type": "string", - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1beta1/projects/{projectId}/jobs/{jobId}", - "path": "v1beta1/projects/{projectId}/jobs/{jobId}", - "id": "dataproc.projects.jobs.delete" - }, - "list": { - "response": { - "$ref": "ListJobsResponse" - }, - "parameterOrder": [ - "projectId" - ], - "httpMethod": "GET", - "parameters": { - "filter": { - "description": "Optional A filter constraining which jobs to list. Valid filters contain job state and label terms such as: labels.key1 = val1 AND (labels.k2 = val2 OR labels.k3 = val3)", - "type": "string", - "location": "query" - }, - "jobStateMatcher": { - "description": "Optional Specifies enumerated categories of jobs to list.", - "type": "string", - "location": "query", - "enum": [ - "ALL", - "ACTIVE", - "NON_ACTIVE" - ] - }, - "pageToken": { - "description": "Optional The page token, returned by a previous call, to request the next page of results.", - "type": "string", - "location": "query" - }, - "pageSize": { - "location": "query", - "description": "Optional The number of results to return in each response.", - "format": "int32", - "type": "integer" - }, - "clusterName": { - "description": "Optional If set, the returned jobs list includes only jobs that were submitted to the named cluster.", - "type": "string", - "location": "query" - }, - "projectId": { - "description": "Required The ID of the Google Cloud Platform project that the job belongs to.", - "required": true, - "type": "string", - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1beta1/projects/{projectId}/jobs", - "path": "v1beta1/projects/{projectId}/jobs", - "id": "dataproc.projects.jobs.list", - "description": "Lists jobs in a project." - }, - "cancel": { - "response": { - "$ref": "Job" - }, - "parameterOrder": [ - "projectId", - "jobId" - ], - "httpMethod": "POST", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "projectId": { - "required": true, - "type": "string", - "location": "path", - "description": "Required The ID of the Google Cloud Platform project that the job belongs to." - }, - "jobId": { - "description": "Required The job ID.", - "required": true, - "type": "string", - "location": "path" - } - }, - "flatPath": "v1beta1/projects/{projectId}/jobs/{jobId}:cancel", - "path": "v1beta1/projects/{projectId}/jobs/{jobId}:cancel", - "id": "dataproc.projects.jobs.cancel", - "description": "Starts a job cancellation request. To access the job resource after cancellation, call jobs.list or jobs.get.", - "request": { - "$ref": "CancelJobRequest" - } - }, - "get": { - "description": "Gets the resource representation for a job in a project.", - "parameterOrder": [ - "projectId", - "jobId" - ], - "response": { - "$ref": "Job" - }, - "httpMethod": "GET", - "parameters": { - "projectId": { - "location": "path", - "description": "Required The ID of the Google Cloud Platform project that the job belongs to.", - "required": true, - "type": "string" - }, - "jobId": { - "location": "path", - "description": "Required The job ID.", - "required": true, - "type": "string" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1beta1/projects/{projectId}/jobs/{jobId}", - "path": "v1beta1/projects/{projectId}/jobs/{jobId}", - "id": "dataproc.projects.jobs.get" - }, - "patch": { - "flatPath": "v1beta1/projects/{projectId}/jobs/{jobId}", - "id": "dataproc.projects.jobs.patch", - "path": "v1beta1/projects/{projectId}/jobs/{jobId}", - "request": { - "$ref": "Job" - }, - "description": "Updates a job in a project.", - "httpMethod": "PATCH", - "parameterOrder": [ - "projectId", - "jobId" - ], - "response": { - "$ref": "Job" - }, - "parameters": { - "projectId": { - "required": true, - "type": "string", - "location": "path", - "description": "Required The ID of the Google Cloud Platform project that the job belongs to." - }, - "jobId": { - "description": "Required The job ID.", - "required": true, - "type": "string", - "location": "path" - }, - "updateMask": { - "location": "query", - "description": "Required Specifies the path, relative to \u003ccode\u003eJob\u003c/code\u003e, of the field to update. For example, to update the labels of a Job the \u003ccode\u003eupdate_mask\u003c/code\u003e parameter would be specified as \u003ccode\u003elabels\u003c/code\u003e, and the PATCH request body would specify the new value. \u003cstrong\u003eNote:\u003c/strong\u003e Currently, \u003ccode\u003elabels\u003c/code\u003e is the only field that can be updated.", - "format": "google-fieldmask", - "type": "string" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - } - } - } - } - }, - "parameters": { - "uploadType": { - "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", - "type": "string", - "location": "query" - }, - "fields": { - "location": "query", - "description": "Selector specifying which fields to include in a partial response.", - "type": "string" - }, - "callback": { - "location": "query", - "description": "JSONP", - "type": "string" - }, - "$.xgafv": { - "type": "string", - "enumDescriptions": [ - "v1 error format", - "v2 error format" - ], - "location": "query", - "enum": [ - "1", - "2" - ], - "description": "V1 error format." - }, - "alt": { - "enumDescriptions": [ - "Responses with Content-Type of application/json", - "Media download with context-dependent Content-Type", - "Responses with Content-Type of application/x-protobuf" - ], - "location": "query", - "description": "Data format for response.", - "default": "json", - "enum": [ - "json", - "media", - "proto" - ], - "type": "string" - }, - "access_token": { - "location": "query", - "description": "OAuth access token.", - "type": "string" - }, - "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.", - "type": "string", - "location": "query" - }, - "quotaUser": { - "location": "query", - "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.", - "type": "string" - }, - "pp": { - "location": "query", - "description": "Pretty-print response.", - "type": "boolean", - "default": "true" - }, - "bearer_token": { - "type": "string", - "location": "query", - "description": "OAuth bearer token." - }, - "oauth_token": { - "description": "OAuth 2.0 token for the current user.", - "type": "string", - "location": "query" - }, - "upload_protocol": { - "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", - "type": "string", - "location": "query" - }, - "prettyPrint": { - "location": "query", - "description": "Returns response with indentations and line breaks.", - "type": "boolean", - "default": "true" - } - }, - "schemas": { - "SparkJob": { - "id": "SparkJob", - "description": "A Cloud Dataproc job for running Spark applications on YARN.", - "type": "object", - "properties": { - "fileUris": { - "description": "Optional HCFS URIs of files to be copied to the working directory of Spark drivers and distributed tasks. Useful for naively parallel tasks.", - "type": "array", - "items": { - "type": "string" - } - }, - "mainClass": { - "description": "The name of the driver's main class. The jar file that contains the class must be in the default CLASSPATH or specified in jar_file_uris.", - "type": "string" - }, - "archiveUris": { - "description": "Optional HCFS URIs of archives to be extracted in the working directory of Spark drivers and tasks. Supported file types: .jar, .tar, .tar.gz, .tgz, and .zip.", - "type": "array", - "items": { - "type": "string" - } - }, - "mainJarFileUri": { - "description": "The Hadoop Compatible Filesystem (HCFS) URI of the jar file that contains the main class.", - "type": "string" - }, - "jarFileUris": { - "description": "Optional HCFS URIs of jar files to add to the CLASSPATHs of the Spark driver and tasks.", - "type": "array", - "items": { - "type": "string" - } - }, - "loggingConfiguration": { - "description": "Optional The runtime log configuration for job execution.", - "$ref": "LoggingConfiguration" - }, - "properties": { - "additionalProperties": { - "type": "string" - }, - "description": "Optional A mapping of property names to values, used to configure Spark. Properties that conflict with values set by the Cloud Dataproc API may be overwritten. Can include properties set in /etc/spark/conf/spark-defaults.conf and classes in user code.", - "type": "object" - }, - "args": { - "description": "Optional The arguments to pass to the driver. Do not include arguments, such as --conf, that can be set as job properties, since a collision may occur that causes an incorrect job submission.", - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "Job": { - "description": "A Cloud Dataproc job resource.", - "type": "object", - "properties": { - "interactive": { - "description": "Optional If set to true, the driver's stdin will be kept open and driver_input_uri will be set to provide a path at which additional input can be sent to the driver.", - "type": "boolean" - }, - "driverInputResourceUri": { - "description": "Output-only A URI pointing to the location of the stdin of the job's driver program, only set if the job is interactive.", - "type": "string" - }, - "hadoopJob": { - "description": "Job is a Hadoop job.", - "$ref": "HadoopJob" - }, - "status": { - "$ref": "JobStatus", - "description": "Output-only The job status. Additional application-specific status information may be contained in the \u003ccode\u003etype_job\u003c/code\u003e and \u003ccode\u003eyarn_applications\u003c/code\u003e fields." - }, - "placement": { - "description": "Required Job information, including how, when, and where to run the job.", - "$ref": "JobPlacement" - }, - "driverControlFilesUri": { - "description": "Output-only If present, the location of miscellaneous control files which may be used as part of job setup and handling. If not present, control files may be placed in the same location as driver_output_uri.", - "type": "string" - }, - "submittedBy": { - "description": "Output-only The email address of the user submitting the job. For jobs submitted on the cluster, the address is \u003ccode\u003eusername@hostname\u003c/code\u003e.", - "type": "string" - }, - "scheduling": { - "$ref": "JobScheduling", - "description": "Optional Job scheduling configuration." - }, - "pigJob": { - "$ref": "PigJob", - "description": "Job is a Pig job." - }, - "hiveJob": { - "$ref": "HiveJob", - "description": "Job is a Hive job." - }, - "labels": { - "additionalProperties": { - "type": "string" - }, - "description": "Optional The labels to associate with this job.Label keys must be between 1 and 63 characters long, and must conform to the following regular expression: \\p{Ll}\\p{Lo}{0,62}Label values must be between 1 and 63 characters long, and must conform to the following regular expression: \\p{Ll}\\p{Lo}\\p{N}_-{0,63}No more than 64 labels can be associated with a given job.", - "type": "object" - }, - "driverOutputResourceUri": { - "description": "Output-only A URI pointing to the location of the stdout of the job's driver program.", - "type": "string" - }, - "statusHistory": { - "description": "Output-only The previous job status.", - "type": "array", - "items": { - "$ref": "JobStatus" - } - }, - "sparkJob": { - "description": "Job is a Spark job.", - "$ref": "SparkJob" - }, - "sparkSqlJob": { - "$ref": "SparkSqlJob", - "description": "Job is a SparkSql job." - }, - "yarnApplications": { - "description": "Output-only The collection of YARN applications spun up by this job.", - "type": "array", - "items": { - "$ref": "YarnApplication" - } - }, - "pysparkJob": { - "$ref": "PySparkJob", - "description": "Job is a Pyspark job." - }, - "reference": { - "$ref": "JobReference", - "description": "Optional The fully qualified reference to the job, which can be used to obtain the equivalent REST path of the job resource. If this property is not specified when a job is created, the server generates a \u003ccode\u003ejob_id\u003c/code\u003e." - } - }, - "id": "Job" - }, - "JobStatus": { - "description": "Cloud Dataproc job status.", - "type": "object", - "properties": { - "stateStartTime": { - "description": "Output-only The time when this state was entered.", - "format": "google-datetime", - "type": "string" - }, - "substate": { - "type": "string", - "enumDescriptions": [ - "", - "The Job is submitted to the agent.Applies to RUNNING state.", - "The Job has been received and is awaiting execution (it may be waiting for a condition to be met). See the \"details\" field for the reason for the delay.Applies to RUNNING state.", - "The agent-reported status is out of date, which may be caused by a loss of communication between the agent and Cloud Dataproc. If the agent does not send a timely update, the job will fail.Applies to RUNNING state." - ], - "enum": [ - "UNSPECIFIED", - "SUBMITTED", - "QUEUED", - "STALE_STATUS" - ], - "description": "Output-only Additional state information, which includes status reported by the agent." - }, - "state": { - "enumDescriptions": [ - "The job state is unknown.", - "The job is pending; it has been submitted, but is not yet running.", - "Job has been received by the service and completed initial setup; it will shortly be submitted to the cluster.", - "The job is running on the cluster.", - "A CancelJob request has been received, but is pending.", - "Transient in-flight resources have been canceled, and the request to cancel the running job has been issued to the cluster.", - "The job cancelation was successful.", - "The job has completed successfully.", - "The job has completed, but encountered an error.", - "Job attempt has failed. The detail field contains failure details for this attempt.Applies to restartable jobs only." - ], - "enum": [ - "STATE_UNSPECIFIED", - "PENDING", - "SETUP_DONE", - "RUNNING", - "CANCEL_PENDING", - "CANCEL_STARTED", - "CANCELLED", - "DONE", - "ERROR", - "ATTEMPT_FAILURE" - ], - "description": "Required A state message specifying the overall job state.", - "type": "string" - }, - "details": { - "type": "string", - "description": "Optional Job state details, such as an error description if the state is \u003ccode\u003eERROR\u003c/code\u003e." - } - }, - "id": "JobStatus" - }, - "DiskConfiguration": { - "description": "Specifies the configuration of disk options for a group of VM instances.", - "type": "object", - "properties": { - "bootDiskSizeGb": { - "description": "Optional Size in GB of the boot disk (default is 500GB).", - "format": "int32", - "type": "integer" - }, - "numLocalSsds": { - "description": "Optional Number of attached SSDs, from 0 to 4 (default is 0). If SSDs are not attached, the boot disk is used to store runtime logs and HDFS data. If one or more SSDs are attached, this runtime bulk data is spread across them, and the boot disk contains only basic configuration and installed binaries.", - "format": "int32", - "type": "integer" - } - }, - "id": "DiskConfiguration" - }, - "ClusterOperationStatus": { - "properties": { - "state": { - "type": "string", - "enumDescriptions": [ - "Unused.", - "The operation has been created.", - "The operation is running.", - "The operation is done; either cancelled or completed." - ], - "enum": [ - "UNKNOWN", - "PENDING", - "RUNNING", - "DONE" - ], - "description": "Output-only. A message containing the operation state." - }, - "details": { - "description": "Output-only.A message containing any operation metadata details.", - "type": "string" - }, - "innerState": { - "type": "string", - "description": "Output-only. A message containing the detailed operation state." - }, - "stateStartTime": { - "description": "Output-only. The time this state was entered.", - "format": "google-datetime", - "type": "string" - } - }, - "id": "ClusterOperationStatus", - "description": "The status of the operation.", - "type": "object" - }, - "HadoopJob": { - "description": "A Cloud Dataproc job for running Hadoop MapReduce jobs on YARN.", - "type": "object", - "properties": { - "mainJarFileUri": { - "description": "The Hadoop Compatible Filesystem (HCFS) URI of the jar file containing the main class. Examples: 'gs://foo-bucket/analytics-binaries/extract-useful-metrics-mr.jar' 'hdfs:/tmp/test-samples/custom-wordcount.jar' 'file:///home/usr/lib/hadoop-mapreduce/hadoop-mapreduce-examples.jar'", - "type": "string" - }, - "jarFileUris": { - "description": "Optional Jar file URIs to add to the CLASSPATHs of the Hadoop driver and tasks.", - "type": "array", - "items": { - "type": "string" - } - }, - "loggingConfiguration": { - "$ref": "LoggingConfiguration", - "description": "Optional The runtime log configuration for job execution." - }, - "properties": { - "additionalProperties": { - "type": "string" - }, - "description": "Optional A mapping of property names to values, used to configure Hadoop. Properties that conflict with values set by the Cloud Dataproc API may be overwritten. Can include properties set in /etc/hadoop/conf/*-site and classes in user code.", - "type": "object" - }, - "args": { - "description": "Optional The arguments to pass to the driver. Do not include arguments, such as -libjars or -Dfoo=bar, that can be set as job properties, since a collision may occur that causes an incorrect job submission.", - "type": "array", - "items": { - "type": "string" - } - }, - "fileUris": { - "description": "Optional HCFS URIs of files to be copied to the working directory of Hadoop drivers and distributed tasks. Useful for naively parallel tasks.", - "type": "array", - "items": { - "type": "string" - } - }, - "mainClass": { - "description": "The name of the driver's main class. The jar file containing the class must be in the default CLASSPATH or specified in jar_file_uris.", - "type": "string" - }, - "archiveUris": { - "description": "Optional HCFS URIs of archives to be extracted in the working directory of Hadoop drivers and tasks. Supported file types: .jar, .tar, .tar.gz, .tgz, or .zip.", - "type": "array", - "items": { - "type": "string" - } - } - }, - "id": "HadoopJob" - }, - "QueryList": { - "type": "object", - "properties": { - "queries": { - "description": "Required The queries to execute. You do not need to terminate a query with a semicolon. Multiple queries can be specified in one string by separating each with a semicolon. Here is an example of an Cloud Dataproc API snippet that uses a QueryList to specify a HiveJob:\n\"hiveJob\": {\n \"queryList\": {\n \"queries\": [\n \"query1\",\n \"query2\",\n \"query3;query4\",\n ]\n }\n}\n", - "type": "array", - "items": { - "type": "string" - } - } - }, - "id": "QueryList", - "description": "A list of queries to run on a cluster." - }, - "YarnApplication": { - "description": "A YARN application created by a job. Application information is a subset of \u003ccode\u003eorg.apache.hadoop.yarn.proto.YarnProtos.ApplicationReportProto\u003c/code\u003e.", - "type": "object", - "properties": { - "trackingUrl": { - "description": "Optional The HTTP URL of the ApplicationMaster, HistoryServer, or TimelineServer that provides application-specific information. The URL uses the internal hostname, and requires a proxy server for resolution and, possibly, access.", - "type": "string" - }, - "progress": { - "description": "Required The numerical progress of the application, from 1 to 100.", - "format": "float", - "type": "number" - }, - "state": { - "enum": [ - "STATE_UNSPECIFIED", - "NEW", - "NEW_SAVING", - "SUBMITTED", - "ACCEPTED", - "RUNNING", - "FINISHED", - "FAILED", - "KILLED" - ], - "description": "Required The application state.", - "type": "string", - "enumDescriptions": [ - "Status is unspecified.", - "Status is NEW.", - "Status is NEW_SAVING.", - "Status is SUBMITTED.", - "Status is ACCEPTED.", - "Status is RUNNING.", - "Status is FINISHED.", - "Status is FAILED.", - "Status is KILLED." - ] - }, - "name": { - "description": "Required The application name.", - "type": "string" - } - }, - "id": "YarnApplication" - }, - "DiagnoseClusterRequest": { - "id": "DiagnoseClusterRequest", - "description": "A request to collect cluster diagnostic information.", - "type": "object", - "properties": {} - }, - "ClusterOperationMetadata": { - "description": "Metadata describing the operation.", - "type": "object", - "properties": { - "operationType": { - "description": "Output-only. The operation type.", - "type": "string" - }, - "description": { - "description": "Output-only. Short description of operation.", - "type": "string" - }, - "warnings": { - "description": "Output-only. Errors encountered during operation execution.", - "type": "array", - "items": { - "type": "string" - } - }, - "labels": { - "additionalProperties": { - "type": "string" - }, - "description": "Output-only. Labels associated with the operation", - "type": "object" - }, - "status": { - "$ref": "ClusterOperationStatus", - "description": "Output-only. Current operation status." - }, - "statusHistory": { - "description": "Output-only. The previous operation status.", - "type": "array", - "items": { - "$ref": "ClusterOperationStatus" - } - }, - "clusterUuid": { - "description": "Output-only. Cluster UUID for the operation.", - "type": "string" - }, - "clusterName": { - "description": "Output-only. Name of the cluster for the operation.", - "type": "string" - } - }, - "id": "ClusterOperationMetadata" - }, - "HiveJob": { - "properties": { - "jarFileUris": { - "description": "Optional HCFS URIs of jar files to add to the CLASSPATH of the Hive server and Hadoop MapReduce (MR) tasks. Can contain Hive SerDes and UDFs.", - "type": "array", - "items": { - "type": "string" - } - }, - "scriptVariables": { - "additionalProperties": { - "type": "string" - }, - "description": "Optional Mapping of query variable names to values (equivalent to the Hive command: SET name=\"value\";).", - "type": "object" - }, - "properties": { - "additionalProperties": { - "type": "string" - }, - "description": "Optional A mapping of property names and values, used to configure Hive. Properties that conflict with values set by the Cloud Dataproc API may be overwritten. Can include properties set in /etc/hadoop/conf/*-site.xml, /etc/hive/conf/hive-site.xml, and classes in user code.", - "type": "object" - }, - "continueOnFailure": { - "description": "Optional Whether to continue executing queries if a query fails. The default value is false. Setting to true can be useful when executing independent parallel queries.", - "type": "boolean" - }, - "queryList": { - "description": "A list of queries.", - "$ref": "QueryList" - }, - "queryFileUri": { - "description": "The HCFS URI of the script that contains Hive queries.", - "type": "string" - } - }, - "id": "HiveJob", - "description": "A Cloud Dataproc job for running Hive queries on YARN.", - "type": "object" - }, - "Empty": { - "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance:\nservice Foo {\n rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);\n}\nThe JSON representation for Empty is empty JSON object {}.", - "type": "object", - "properties": {}, - "id": "Empty" - }, - "DiagnoseClusterResults": { - "description": "The location of diagnostic output.", - "type": "object", - "properties": { - "outputUri": { - "description": "Output-only. The Google Cloud Storage URI of the diagnostic output. The output report is a plain text file with a summary of collected diagnostics.", - "type": "string" - } - }, - "id": "DiagnoseClusterResults" - }, - "SoftwareConfiguration": { - "description": "Specifies the selection and configuration of software inside the cluster.", - "type": "object", - "properties": { - "properties": { - "additionalProperties": { - "type": "string" - }, - "description": "Optional The properties to set on daemon configuration files.Property keys are specified in \"prefix:property\" format, such as \"core:fs.defaultFS\". The following are supported prefixes and their mappings: core - core-site.xml hdfs - hdfs-site.xml mapred - mapred-site.xml yarn - yarn-site.xml hive - hive-site.xml pig - pig.properties spark - spark-defaults.conf", - "type": "object" - }, - "imageVersion": { - "description": "Optional The version of software inside the cluster. It must match the regular expression [0-9]+\\.[0-9]+. If unspecified, it defaults to the latest version (see Cloud Dataproc Versioning).", - "type": "string" - } - }, - "id": "SoftwareConfiguration" - }, - "PySparkJob": { - "description": "A Cloud Dataproc job for running PySpark applications on YARN.", - "type": "object", - "properties": { - "pythonFileUris": { - "type": "array", - "items": { - "type": "string" - }, - "description": "Optional HCFS file URIs of Python files to pass to the PySpark framework. Supported file types: .py, .egg, and .zip." - }, - "mainPythonFileUri": { - "description": "Required The Hadoop Compatible Filesystem (HCFS) URI of the main Python file to use as the driver. Must be a .py file.", - "type": "string" - }, - "archiveUris": { - "description": "Optional HCFS URIs of archives to be extracted in the working directory of .jar, .tar, .tar.gz, .tgz, and .zip.", - "type": "array", - "items": { - "type": "string" - } - }, - "jarFileUris": { - "description": "Optional HCFS URIs of jar files to add to the CLASSPATHs of the Python driver and tasks.", - "type": "array", - "items": { - "type": "string" - } - }, - "loggingConfiguration": { - "$ref": "LoggingConfiguration", - "description": "Optional The runtime log configuration for job execution." - }, - "properties": { - "additionalProperties": { - "type": "string" - }, - "description": "Optional A mapping of property names to values, used to configure PySpark. Properties that conflict with values set by the Cloud Dataproc API may be overwritten. Can include properties set in /etc/spark/conf/spark-defaults.conf and classes in user code.", - "type": "object" - }, - "args": { - "description": "Optional The arguments to pass to the driver. Do not include arguments, such as --conf, that can be set as job properties, since a collision may occur that causes an incorrect job submission.", - "type": "array", - "items": { - "type": "string" - } - }, - "fileUris": { - "description": "Optional HCFS URIs of files to be copied to the working directory of Python drivers and distributed tasks. Useful for naively parallel tasks.", - "type": "array", - "items": { - "type": "string" - } - } - }, - "id": "PySparkJob" - }, - "ClusterMetrics": { - "description": "Contains cluster daemon metrics, such as HDFS and YARN stats.", - "type": "object", - "properties": { - "yarnMetrics": { - "description": "The YARN metrics.", - "type": "object", - "additionalProperties": { - "format": "int64", - "type": "string" - } - }, - "hdfsMetrics": { - "description": "The HDFS metrics.", - "type": "object", - "additionalProperties": { - "type": "string", - "format": "int64" - } - } - }, - "id": "ClusterMetrics" - }, - "ClusterConfiguration": { - "id": "ClusterConfiguration", - "description": "The cluster configuration.", - "type": "object", - "properties": { - "secondaryWorkerConfiguration": { - "description": "Optional The Google Compute Engine configuration settings for additional worker instances in a cluster.", - "$ref": "InstanceGroupConfiguration" - }, - "initializationActions": { - "description": "Optional Commands to execute on each node after configuration is completed. By default, executables are run on master and all worker nodes. You can test a node's \u003ccode\u003erole\u003c/code\u003e metadata to run an executable on a master or worker node, as shown below:\nROLE=$(/usr/share/google/get_metadata_value attributes/role)\nif [[ \"${ROLE}\" == 'Master' ]]; then\n ... master specific actions ...\nelse\n ... worker specific actions ...\nfi\n", - "type": "array", - "items": { - "$ref": "NodeInitializationAction" - } - }, - "workerConfiguration": { - "$ref": "InstanceGroupConfiguration", - "description": "Optional The Google Compute Engine configuration settings for worker instances in a cluster." - }, - "gceClusterConfiguration": { - "$ref": "GceClusterConfiguration", - "description": "Required The shared Google Compute Engine configuration settings for all instances in a cluster." - }, - "softwareConfiguration": { - "$ref": "SoftwareConfiguration", - "description": "Optional The configuration settings for software inside the cluster." - }, - "configurationBucket": { - "description": "Optional A Google Cloud Storage staging bucket used for sharing generated SSH keys and configuration. If you do not specify a staging bucket, Cloud Dataproc will determine an appropriate Cloud Storage location (US, ASIA, or EU) for your cluster's staging bucket according to the Google Compute Engine zone where your cluster is deployed, and then it will create and manage this project-level, per-location bucket for you.", - "type": "string" - }, - "masterConfiguration": { - "$ref": "InstanceGroupConfiguration", - "description": "Optional The Google Compute Engine configuration settings for the master instance in a cluster." - } - } - }, - "LoggingConfiguration": { - "properties": { - "driverLogLevels": { - "description": "The per-package log levels for the driver. This may include \"root\" package name to configure rootLogger. Examples: 'com.google = FATAL', 'root = INFO', 'org.apache = DEBUG'", - "type": "object", - "additionalProperties": { - "enum": [ - "LEVEL_UNSPECIFIED", - "ALL", - "TRACE", - "DEBUG", - "INFO", - "WARN", - "ERROR", - "FATAL", - "OFF" - ], - "type": "string" - } - } - }, - "id": "LoggingConfiguration", - "description": "The runtime logging configuration of the job.", - "type": "object" - }, - "InstanceGroupConfiguration": { - "id": "InstanceGroupConfiguration", - "description": "The configuration settings for Google Compute Engine resources in an instance group, such as a master or worker group.", - "type": "object", - "properties": { - "numInstances": { - "type": "integer", - "description": "The number of VM instances in the instance group. For master instance groups, must be set to 1.", - "format": "int32" - }, - "diskConfiguration": { - "$ref": "DiskConfiguration", - "description": "Disk option configuration settings." - }, - "imageUri": { - "type": "string", - "description": "Output-only The Google Compute Engine image resource used for cluster instances. Inferred from SoftwareConfiguration.image_version." - }, - "machineTypeUri": { - "description": "The Google Compute Engine machine type used for cluster instances. Example: https://www.googleapis.com/compute/v1/projects/[project_id]/zones/us-east1-a/machineTypes/n1-standard-2.", - "type": "string" - }, - "isPreemptible": { - "description": "Specifies that this instance group contains Preemptible Instances.", - "type": "boolean" - }, - "instanceNames": { - "description": "The list of instance names. Dataproc derives the names from cluster_name, num_instances, and the instance group if not set by user (recommended practice is to let Dataproc derive the name).", - "type": "array", - "items": { - "type": "string" - } - }, - "managedGroupConfiguration": { - "description": "Output-only The configuration for Google Compute Engine Instance Group Manager that manages this group. This is only used for preemptible instance groups.", - "$ref": "ManagedGroupConfiguration" - }, - "accelerators": { - "description": "Optional The Google Compute Engine accelerator configuration for these instances.", - "type": "array", - "items": { - "$ref": "AcceleratorConfiguration" - } - } - } - }, - "GceClusterConfiguration": { - "properties": { - "zoneUri": { - "type": "string", - "description": "Required The zone where the Google Compute Engine cluster will be located. Example: https://www.googleapis.com/compute/v1/projects/[project_id]/zones/[zone]." - }, - "metadata": { - "additionalProperties": { - "type": "string" - }, - "description": "The Google Compute Engine metadata entries to add to all instances.", - "type": "object" - }, - "internalIpOnly": { - "description": "If true, all instances in the cluser will only have internal IP addresses. By default, clusters are not restricted to internal IP addresses, and will have ephemeral external IP addresses assigned to each instance. This restriction can only be enabled for subnetwork enabled networks, and all off-cluster dependencies must be configured to be accessible without external IP addresses.", - "type": "boolean" - }, - "serviceAccountScopes": { - "description": "The URIs of service account scopes to be included in Google Compute Engine instances. The following base set of scopes is always included: - https://www.googleapis.com/auth/cloud.useraccounts.readonly - https://www.googleapis.com/auth/devstorage.read_write - https://www.googleapis.com/auth/logging.write If no scopes are specfied, the following defaults are also provided: - https://www.googleapis.com/auth/bigquery - https://www.googleapis.com/auth/bigtable.admin.table - https://www.googleapis.com/auth/bigtable.data - https://www.googleapis.com/auth/devstorage.full_control", - "type": "array", - "items": { - "type": "string" - } - }, - "tags": { - "description": "The Google Compute Engine tags to add to all instances.", - "type": "array", - "items": { - "type": "string" - } - }, - "serviceAccount": { - "description": "Optional The service account of the instances. Defaults to the default Google Compute Engine service account. Custom service accounts need permissions equivalent to the folloing IAM roles:\nroles/logging.logWriter\nroles/storage.objectAdmin(see https://cloud.google.com/compute/docs/access/service-accounts#custom_service_accounts for more information). Example: [account_id]@[project_id].iam.gserviceaccount.com", - "type": "string" - }, - "subnetworkUri": { - "description": "The Google Compute Engine subnetwork to be used for machine communications. Cannot be specified with network_uri. Example: https://www.googleapis.com/compute/v1/projects/[project_id]/regions/us-east1/sub0.", - "type": "string" - }, - "networkUri": { - "description": "The Google Compute Engine network to be used for machine communications. Cannot be specified with subnetwork_uri. If neither network_uri nor subnetwork_uri is specified, the \"default\" network of the project is used, if it exists. Cannot be a \"Custom Subnet Network\" (see https://cloud.google.com/compute/docs/subnetworks for more information). Example: https://www.googleapis.com/compute/v1/projects/[project_id]/regions/global/default.", - "type": "string" - } - }, - "id": "GceClusterConfiguration", - "description": "Common configuration settings for resources of Google Compute Engine cluster instances, applicable to all instances in the cluster.", - "type": "object" - }, - "CancelOperationRequest": { - "properties": {}, - "id": "CancelOperationRequest", - "description": "The request message for Operations.CancelOperation.", - "type": "object" - }, - "DiagnoseClusterOutputLocation": { - "description": "The location of diagnostic output.", - "type": "object", - "properties": { - "outputUri": { - "description": "Output-only The Google Cloud Storage URI of the diagnostic output. This is a plain text file with a summary of collected diagnostics.", - "type": "string" - } - }, - "id": "DiagnoseClusterOutputLocation" - }, - "Operation": { - "type": "object", - "properties": { - "done": { - "type": "boolean", - "description": "If the value is false, it means the operation is still in progress. If true, the operation is completed, and either error or response is available." - }, - "response": { - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - }, - "description": "The normal response of the operation in case of success. If the original method returns no data on success, such as Delete, the response is google.protobuf.Empty. If the original method is standard Get/Create/Update, the response should be the resource. For other methods, the response should have the type XxxResponse, where Xxx is the original method name. For example, if the original method name is TakeSnapshot(), the inferred response type is TakeSnapshotResponse.", - "type": "object" - }, - "name": { - "description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the name should have the format of operations/some/unique/name.", - "type": "string" - }, - "error": { - "$ref": "Status", - "description": "The error result of the operation in case of failure or cancellation." - }, - "metadata": { - "description": "Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.", - "type": "object", - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - } - } - }, - "id": "Operation", - "description": "This resource represents a long-running operation that is the result of a network API call." - }, - "OperationStatus": { - "description": "The status of the operation.", - "type": "object", - "properties": { - "state": { - "enumDescriptions": [ - "Unused.", - "The operation has been created.", - "The operation is running.", - "The operation is done; either cancelled or completed." - ], - "enum": [ - "UNKNOWN", - "PENDING", - "RUNNING", - "DONE" - ], - "description": "A message containing the operation state.", - "type": "string" - }, - "details": { - "description": "A message containing any operation metadata details.", - "type": "string" - }, - "innerState": { - "description": "A message containing the detailed operation state.", - "type": "string" - }, - "stateStartTime": { - "description": "The time this state was entered.", - "format": "google-datetime", - "type": "string" - } - }, - "id": "OperationStatus" - }, - "JobReference": { - "description": "Encapsulates the full scoping used to reference a job.", - "type": "object", - "properties": { - "projectId": { - "description": "Required The ID of the Google Cloud Platform project that the job belongs to.", - "type": "string" - }, - "jobId": { - "description": "Required The job ID, which must be unique within the project. The job ID is generated by the server upon job submission or provided by the user as a means to perform retries without creating duplicate jobs. The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), or hyphens (-). The maximum length is 100 characters.", - "type": "string" - } - }, - "id": "JobReference" - }, - "SubmitJobRequest": { - "description": "A request to submit a job.", - "type": "object", - "properties": { - "job": { - "$ref": "Job", - "description": "Required The job resource." - } - }, - "id": "SubmitJobRequest" - }, - "Status": { - "properties": { - "details": { - "type": "array", - "items": { - "type": "object", - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - } - }, - "description": "A list of messages that carry the error details. There will be a common set of message types for APIs to use." - }, - "code": { - "description": "The status code, which should be an enum value of google.rpc.Code.", - "format": "int32", - "type": "integer" - }, - "message": { - "description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.", - "type": "string" - } - }, - "id": "Status", - "description": "The Status type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by gRPC (https://github.com/grpc). The error model is designed to be:\nSimple to use and understand for most users\nFlexible enough to meet unexpected needsOverviewThe Status message contains three pieces of data: error code, error message, and error details. The error code should be an enum value of google.rpc.Code, but it may accept additional error codes if needed. The error message should be a developer-facing English message that helps developers understand and resolve the error. If a localized user-facing error message is needed, put the localized message in the error details or localize it in the client. The optional error details may contain arbitrary information about the error. There is a predefined set of error detail types in the package google.rpc that can be used for common error conditions.Language mappingThe Status message is the logical representation of the error model, but it is not necessarily the actual wire format. When the Status message is exposed in different client libraries and different wire protocols, it can be mapped differently. For example, it will likely be mapped to some exceptions in Java, but more likely mapped to some error codes in C.Other usesThe error model and the Status message can be used in a variety of environments, either with or without APIs, to provide a consistent developer experience across different environments.Example uses of this error model include:\nPartial errors. If a service needs to return partial errors to the client, it may embed the Status in the normal response to indicate the partial errors.\nWorkflow errors. A typical workflow has multiple steps. Each step may have a Status message for error reporting.\nBatch operations. If a client uses batch request and batch response, the Status message should be used directly inside batch response, one for each error sub-response.\nAsynchronous operations. If an API call embeds asynchronous operation results in its response, the status of those operations should be represented directly using the Status message.\nLogging. If some API errors are stored in logs, the message Status could be used directly after any stripping needed for security/privacy reasons.", - "type": "object" - }, - "JobScheduling": { - "id": "JobScheduling", - "description": "Job scheduling options.Beta Feature: These options are available for testing purposes only. They may be changed before final release.", - "type": "object", - "properties": { - "maxFailuresPerHour": { - "description": "Optional Maximum number of times per hour a driver may be restarted as a result of driver terminating with non-zero code before job is reported failed.A job may be reported as thrashing if driver exits with non-zero code 4 times within 10 minute window.Maximum value is 10.", - "format": "int32", - "type": "integer" - } - } - }, - "NodeInitializationAction": { - "description": "Specifies an executable to run on a fully configured node and a timeout period for executable completion.", - "type": "object", - "properties": { - "executableFile": { - "description": "Required Google Cloud Storage URI of executable file.", - "type": "string" - }, - "executionTimeout": { - "description": "Optional Amount of time executable has to complete. Default is 10 minutes. Cluster creation fails with an explanatory error message (the name of the executable that caused the error and the exceeded timeout period) if the executable is not completed at end of the timeout period.", - "format": "google-duration", - "type": "string" - } - }, - "id": "NodeInitializationAction" - }, - "ListJobsResponse": { - "description": "A list of jobs in a project.", - "type": "object", - "properties": { - "jobs": { - "description": "Output-only Jobs list.", - "type": "array", - "items": { - "$ref": "Job" - } - }, - "nextPageToken": { - "type": "string", - "description": "Optional This token is included in the response if there are more results to fetch. To fetch additional results, provide this value as the page_token in a subsequent \u003ccode\u003eListJobsRequest\u003c/code\u003e." - } - }, - "id": "ListJobsResponse" - }, - "CancelJobRequest": { - "type": "object", - "properties": {}, - "id": "CancelJobRequest", - "description": "A request to cancel a job." - }, - "SparkSqlJob": { - "description": "A Cloud Dataproc job for running Spark SQL queries.", - "type": "object", - "properties": { - "scriptVariables": { - "additionalProperties": { - "type": "string" - }, - "description": "Optional Mapping of query variable names to values (equivalent to the Spark SQL command: SET name=\"value\";).", - "type": "object" - }, - "jarFileUris": { - "description": "Optional HCFS URIs of jar files to be added to the Spark CLASSPATH.", - "type": "array", - "items": { - "type": "string" - } - }, - "loggingConfiguration": { - "$ref": "LoggingConfiguration", - "description": "Optional The runtime log configuration for job execution." - }, - "properties": { - "description": "Optional A mapping of property names to values, used to configure Spark SQL's SparkConf. Properties that conflict with values set by the Cloud Dataproc API may be overwritten.", - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "queryFileUri": { - "description": "The HCFS URI of the script that contains SQL queries.", - "type": "string" - }, - "queryList": { - "$ref": "QueryList", - "description": "A list of queries." - } - }, - "id": "SparkSqlJob" - }, - "Cluster": { - "properties": { - "configuration": { - "$ref": "ClusterConfiguration", - "description": "Required The cluster configuration. Note that Cloud Dataproc may set default values, and values may change when clusters are updated." - }, - "labels": { - "additionalProperties": { - "type": "string" - }, - "description": "Optional The labels to associate with this cluster.Label keys must be between 1 and 63 characters long, and must conform to the following PCRE regular expression: \\p{Ll}\\p{Lo}{0,62}Label values must be between 1 and 63 characters long, and must conform to the following PCRE regular expression: \\p{Ll}\\p{Lo}\\p{N}_-{0,63}No more than 64 labels can be associated with a given cluster.", - "type": "object" - }, - "status": { - "description": "Output-only Cluster status.", - "$ref": "ClusterStatus" - }, - "metrics": { - "$ref": "ClusterMetrics", - "description": "Contains cluster daemon metrics such as HDFS and YARN stats." - }, - "statusHistory": { - "description": "Output-only Previous cluster statuses.", - "type": "array", - "items": { - "$ref": "ClusterStatus" - } - }, - "clusterUuid": { - "description": "Output-only A cluster UUID (Unique Universal Identifier). Cloud Dataproc generates this value when it creates the cluster.", - "type": "string" - }, - "clusterName": { - "description": "Required The cluster name. Cluster names within a project must be unique. Names from deleted clusters can be reused.", - "type": "string" - }, - "projectId": { - "description": "Required The Google Cloud Platform project ID that the cluster belongs to.", - "type": "string" - } - }, - "id": "Cluster", - "description": "Describes the identifying information, configuration, and status of a cluster of Google Compute Engine instances.", - "type": "object" - }, - "ListOperationsResponse": { - "description": "The response message for Operations.ListOperations.", - "type": "object", - "properties": { - "nextPageToken": { - "type": "string", - "description": "The standard List next-page token." - }, - "operations": { - "description": "A list of operations that matches the specified filter in the request.", - "type": "array", - "items": { - "$ref": "Operation" - } - } - }, - "id": "ListOperationsResponse" - }, - "OperationMetadata": { - "description": "Metadata describing the operation.", - "type": "object", - "properties": { - "operationType": { - "description": "Output-only The operation type.", - "type": "string" - }, - "description": { - "description": "Output-only Short description of operation.", - "type": "string" - }, - "warnings": { - "description": "Output-only Errors encountered during operation execution.", - "type": "array", - "items": { - "type": "string" - } - }, - "status": { - "$ref": "OperationStatus", - "description": "Output-only Current operation status." - }, - "statusHistory": { - "description": "Output-only Previous operation status.", - "type": "array", - "items": { - "$ref": "OperationStatus" - } - }, - "clusterName": { - "description": "Name of the cluster for the operation.", - "type": "string" - }, - "clusterUuid": { - "description": "Cluster UUId for the operation.", - "type": "string" - } - }, - "id": "OperationMetadata" - }, - "JobPlacement": { - "description": "Cloud Dataproc job configuration.", - "type": "object", - "properties": { - "clusterName": { - "description": "Required The name of the cluster where the job will be submitted.", - "type": "string" - }, - "clusterUuid": { - "description": "Output-only A cluster UUID generated by the Dataproc service when the job is submitted.", - "type": "string" - } - }, - "id": "JobPlacement" - }, - "ClusterStatus": { - "description": "The status of a cluster and its instances.", - "type": "object", - "properties": { - "stateStartTime": { - "description": "Time when this state was entered.", - "format": "google-datetime", - "type": "string" - }, - "substate": { - "enumDescriptions": [ - "", - "The cluster is known to be in an unhealthy state (for example, critical daemons are not running or HDFS capacity is exhausted).Applies to RUNNING state.", - "The agent-reported status is out of date (may occur if Cloud Dataproc loses communication with Agent).Applies to RUNNING state." - ], - "enum": [ - "UNSPECIFIED", - "UNHEALTHY", - "STALE_STATUS" - ], - "description": "Output-only Additional state information that includes status reported by the agent.", - "type": "string" - }, - "detail": { - "description": "Optional details of cluster's state.", - "type": "string" - }, - "state": { - "description": "The cluster's state.", - "type": "string", - "enumDescriptions": [ - "The cluster state is unknown.", - "The cluster is being created and set up. It is not ready for use.", - "The cluster is currently running and healthy. It is ready for use.", - "The cluster encountered an error. It is not ready for use.", - "The cluster is being deleted. It cannot be used.", - "The cluster is being updated. It continues to accept and process jobs." - ], - "enum": [ - "UNKNOWN", - "CREATING", - "RUNNING", - "ERROR", - "DELETING", - "UPDATING" - ] - } - }, - "id": "ClusterStatus" - }, - "PigJob": { - "description": "A Cloud Dataproc job for running Pig queries on YARN.", - "type": "object", - "properties": { - "properties": { - "additionalProperties": { - "type": "string" - }, - "description": "Optional A mapping of property names to values, used to configure Pig. Properties that conflict with values set by the Cloud Dataproc API may be overwritten. Can include properties set in /etc/hadoop/conf/*-site.xml, /etc/pig/conf/pig.properties, and classes in user code.", - "type": "object" - }, - "continueOnFailure": { - "description": "Optional Whether to continue executing queries if a query fails. The default value is false. Setting to true can be useful when executing independent parallel queries.", - "type": "boolean" - }, - "queryList": { - "$ref": "QueryList", - "description": "A list of queries." - }, - "queryFileUri": { - "description": "The HCFS URI of the script that contains the Pig queries.", - "type": "string" - }, - "jarFileUris": { - "description": "Optional HCFS URIs of jar files to add to the CLASSPATH of the Pig Client and Hadoop MapReduce (MR) tasks. Can contain Pig UDFs.", - "type": "array", - "items": { - "type": "string" - } - }, - "scriptVariables": { - "additionalProperties": { - "type": "string" - }, - "description": "Optional Mapping of query variable names to values (equivalent to the Pig command: name=[value]).", - "type": "object" - }, - "loggingConfiguration": { - "description": "Optional The runtime log configuration for job execution.", - "$ref": "LoggingConfiguration" - } - }, - "id": "PigJob" - }, - "AcceleratorConfiguration": { - "id": "AcceleratorConfiguration", - "description": "Specifies the type and number of accelerator cards attached to the instances of an instance group (see GPUs on Compute Engine).", - "type": "object", - "properties": { - "acceleratorCount": { - "description": "The number of the accelerator cards of this type exposed to this instance.", - "format": "int32", - "type": "integer" - }, - "acceleratorTypeUri": { - "description": "Full or partial URI of the accelerator type resource to expose to this instance. See Google Compute Engine AcceleratorTypes( /compute/docs/reference/beta/acceleratorTypes)", - "type": "string" - } - } - }, - "ListClustersResponse": { - "description": "The list of all clusters in a project.", - "type": "object", - "properties": { - "clusters": { - "description": "Output-only The clusters in the project.", - "type": "array", - "items": { - "$ref": "Cluster" - } - }, - "nextPageToken": { - "description": "The standard List next-page token.", - "type": "string" - } - }, - "id": "ListClustersResponse" - }, - "ManagedGroupConfiguration": { - "description": "Specifies the resources used to actively manage an instance group.", - "type": "object", - "properties": { - "instanceTemplateName": { - "description": "Output-only The name of the Instance Template used for the Managed Instance Group.", - "type": "string" - }, - "instanceGroupManagerName": { - "description": "Output-only The name of the Instance Group Manager for this group.", - "type": "string" - } - }, - "id": "ManagedGroupConfiguration" - } - }, - "protocol": "rest", - "icons": { - "x32": "http://www.google.com/images/icons/product/search-32.gif", - "x16": "http://www.google.com/images/icons/product/search-16.gif" - }, - "version": "v1beta1", - "baseUrl": "https://dataproc.googleapis.com/", - "auth": { - "oauth2": { - "scopes": { - "https://www.googleapis.com/auth/cloud-platform": { - "description": "View and manage your data across Google Cloud Platform services" - } - } - } - }, - "servicePath": "", - "description": "Manages Hadoop-based clusters and jobs on Google Cloud Platform.", - "kind": "discovery#restDescription", - "rootUrl": "https://dataproc.googleapis.com/", - "basePath": "", - "ownerDomain": "google.com", - "name": "dataproc", - "batchPath": "batch", - "id": "dataproc:v1beta1", - "documentationLink": "https://cloud.google.com/dataproc/", - "revision": "20170523", - "title": "Google Cloud Dataproc API" -}
diff --git a/dataproc/v1beta1/dataproc-gen.go b/dataproc/v1beta1/dataproc-gen.go deleted file mode 100644 index da52e15..0000000 --- a/dataproc/v1beta1/dataproc-gen.go +++ /dev/null
@@ -1,4515 +0,0 @@ -// Package dataproc provides access to the Google Cloud Dataproc API. -// -// See https://cloud.google.com/dataproc/ -// -// Usage example: -// -// import "google.golang.org/api/dataproc/v1beta1" -// ... -// dataprocService, err := dataproc.New(oauthHttpClient) -package dataproc // import "google.golang.org/api/dataproc/v1beta1" - -import ( - "bytes" - "context" - "encoding/json" - "errors" - "fmt" - "io" - "net/http" - "net/url" - "strconv" - "strings" - - gensupport "google.golang.org/api/gensupport" - googleapi "google.golang.org/api/googleapi" -) - -// Always reference these packages, just in case the auto-generated code -// below doesn't. -var _ = bytes.NewBuffer -var _ = strconv.Itoa -var _ = fmt.Sprintf -var _ = json.NewDecoder -var _ = io.Copy -var _ = url.Parse -var _ = gensupport.MarshalJSON -var _ = googleapi.Version -var _ = errors.New -var _ = strings.Replace -var _ = context.Canceled - -const apiId = "dataproc:v1beta1" -const apiName = "dataproc" -const apiVersion = "v1beta1" -const basePath = "https://dataproc.googleapis.com/" - -// OAuth2 scopes used by this API. -const ( - // View and manage your data across Google Cloud Platform services - CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform" -) - -func New(client *http.Client) (*Service, error) { - if client == nil { - return nil, errors.New("client is nil") - } - s := &Service{client: client, BasePath: basePath} - s.Operations = NewOperationsService(s) - s.Projects = NewProjectsService(s) - return s, nil -} - -type Service struct { - client *http.Client - BasePath string // API endpoint base URL - UserAgent string // optional additional User-Agent fragment - - Operations *OperationsService - - Projects *ProjectsService -} - -func (s *Service) userAgent() string { - if s.UserAgent == "" { - return googleapi.UserAgent - } - return googleapi.UserAgent + " " + s.UserAgent -} - -func NewOperationsService(s *Service) *OperationsService { - rs := &OperationsService{s: s} - return rs -} - -type OperationsService struct { - s *Service -} - -func NewProjectsService(s *Service) *ProjectsService { - rs := &ProjectsService{s: s} - rs.Clusters = NewProjectsClustersService(s) - rs.Jobs = NewProjectsJobsService(s) - return rs -} - -type ProjectsService struct { - s *Service - - Clusters *ProjectsClustersService - - Jobs *ProjectsJobsService -} - -func NewProjectsClustersService(s *Service) *ProjectsClustersService { - rs := &ProjectsClustersService{s: s} - return rs -} - -type ProjectsClustersService struct { - s *Service -} - -func NewProjectsJobsService(s *Service) *ProjectsJobsService { - rs := &ProjectsJobsService{s: s} - return rs -} - -type ProjectsJobsService struct { - s *Service -} - -// AcceleratorConfiguration: Specifies the type and number of -// accelerator cards attached to the instances of an instance group (see -// GPUs on Compute Engine). -type AcceleratorConfiguration struct { - // AcceleratorCount: The number of the accelerator cards of this type - // exposed to this instance. - AcceleratorCount int64 `json:"acceleratorCount,omitempty"` - - // AcceleratorTypeUri: Full or partial URI of the accelerator type - // resource to expose to this instance. See Google Compute Engine - // AcceleratorTypes( /compute/docs/reference/beta/acceleratorTypes) - AcceleratorTypeUri string `json:"acceleratorTypeUri,omitempty"` - - // ForceSendFields is a list of field names (e.g. "AcceleratorCount") 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. "AcceleratorCount") 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 *AcceleratorConfiguration) MarshalJSON() ([]byte, error) { - type NoMethod AcceleratorConfiguration - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// CancelJobRequest: A request to cancel a job. -type CancelJobRequest struct { -} - -// CancelOperationRequest: The request message for -// Operations.CancelOperation. -type CancelOperationRequest struct { -} - -// Cluster: Describes the identifying information, configuration, and -// status of a cluster of Google Compute Engine instances. -type Cluster struct { - // ClusterName: Required The cluster name. Cluster names within a - // project must be unique. Names from deleted clusters can be reused. - ClusterName string `json:"clusterName,omitempty"` - - // ClusterUuid: Output-only A cluster UUID (Unique Universal - // Identifier). Cloud Dataproc generates this value when it creates the - // cluster. - ClusterUuid string `json:"clusterUuid,omitempty"` - - // Configuration: Required The cluster configuration. Note that Cloud - // Dataproc may set default values, and values may change when clusters - // are updated. - Configuration *ClusterConfiguration `json:"configuration,omitempty"` - - // Labels: Optional The labels to associate with this cluster.Label keys - // must be between 1 and 63 characters long, and must conform to the - // following PCRE regular expression: \p{Ll}\p{Lo}{0,62}Label values - // must be between 1 and 63 characters long, and must conform to the - // following PCRE regular expression: \p{Ll}\p{Lo}\p{N}_-{0,63}No more - // than 64 labels can be associated with a given cluster. - Labels map[string]string `json:"labels,omitempty"` - - // Metrics: Contains cluster daemon metrics such as HDFS and YARN stats. - Metrics *ClusterMetrics `json:"metrics,omitempty"` - - // ProjectId: Required The Google Cloud Platform project ID that the - // cluster belongs to. - ProjectId string `json:"projectId,omitempty"` - - // Status: Output-only Cluster status. - Status *ClusterStatus `json:"status,omitempty"` - - // StatusHistory: Output-only Previous cluster statuses. - StatusHistory []*ClusterStatus `json:"statusHistory,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "ClusterName") 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. "ClusterName") 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 *Cluster) MarshalJSON() ([]byte, error) { - type NoMethod Cluster - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// ClusterConfiguration: The cluster configuration. -type ClusterConfiguration struct { - // ConfigurationBucket: Optional A Google Cloud Storage staging bucket - // used for sharing generated SSH keys and configuration. If you do not - // specify a staging bucket, Cloud Dataproc will determine an - // appropriate Cloud Storage location (US, ASIA, or EU) for your - // cluster's staging bucket according to the Google Compute Engine zone - // where your cluster is deployed, and then it will create and manage - // this project-level, per-location bucket for you. - ConfigurationBucket string `json:"configurationBucket,omitempty"` - - // GceClusterConfiguration: Required The shared Google Compute Engine - // configuration settings for all instances in a cluster. - GceClusterConfiguration *GceClusterConfiguration `json:"gceClusterConfiguration,omitempty"` - - // InitializationActions: Optional Commands to execute on each node - // after configuration is completed. By default, executables are run on - // master and all worker nodes. You can test a node's <code>role</code> - // metadata to run an executable on a master or worker node, as shown - // below: - // ROLE=$(/usr/share/google/get_metadata_value attributes/role) - // if [[ "${ROLE}" == 'Master' ]]; then - // ... master specific actions ... - // else - // ... worker specific actions ... - // fi - // - InitializationActions []*NodeInitializationAction `json:"initializationActions,omitempty"` - - // MasterConfiguration: Optional The Google Compute Engine configuration - // settings for the master instance in a cluster. - MasterConfiguration *InstanceGroupConfiguration `json:"masterConfiguration,omitempty"` - - // SecondaryWorkerConfiguration: Optional The Google Compute Engine - // configuration settings for additional worker instances in a cluster. - SecondaryWorkerConfiguration *InstanceGroupConfiguration `json:"secondaryWorkerConfiguration,omitempty"` - - // SoftwareConfiguration: Optional The configuration settings for - // software inside the cluster. - SoftwareConfiguration *SoftwareConfiguration `json:"softwareConfiguration,omitempty"` - - // WorkerConfiguration: Optional The Google Compute Engine configuration - // settings for worker instances in a cluster. - WorkerConfiguration *InstanceGroupConfiguration `json:"workerConfiguration,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ConfigurationBucket") - // 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. "ConfigurationBucket") 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 *ClusterConfiguration) MarshalJSON() ([]byte, error) { - type NoMethod ClusterConfiguration - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// ClusterMetrics: Contains cluster daemon metrics, such as HDFS and -// YARN stats. -type ClusterMetrics struct { - // HdfsMetrics: The HDFS metrics. - HdfsMetrics map[string]string `json:"hdfsMetrics,omitempty"` - - // YarnMetrics: The YARN metrics. - YarnMetrics map[string]string `json:"yarnMetrics,omitempty"` - - // ForceSendFields is a list of field names (e.g. "HdfsMetrics") 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. "HdfsMetrics") 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 *ClusterMetrics) MarshalJSON() ([]byte, error) { - type NoMethod ClusterMetrics - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// ClusterOperationMetadata: Metadata describing the operation. -type ClusterOperationMetadata struct { - // ClusterName: Output-only. Name of the cluster for the operation. - ClusterName string `json:"clusterName,omitempty"` - - // ClusterUuid: Output-only. Cluster UUID for the operation. - ClusterUuid string `json:"clusterUuid,omitempty"` - - // Description: Output-only. Short description of operation. - Description string `json:"description,omitempty"` - - // Labels: Output-only. Labels associated with the operation - Labels map[string]string `json:"labels,omitempty"` - - // OperationType: Output-only. The operation type. - OperationType string `json:"operationType,omitempty"` - - // Status: Output-only. Current operation status. - Status *ClusterOperationStatus `json:"status,omitempty"` - - // StatusHistory: Output-only. The previous operation status. - StatusHistory []*ClusterOperationStatus `json:"statusHistory,omitempty"` - - // Warnings: Output-only. Errors encountered during operation execution. - Warnings []string `json:"warnings,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ClusterName") 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. "ClusterName") 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 *ClusterOperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod ClusterOperationMetadata - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// ClusterOperationStatus: The status of the operation. -type ClusterOperationStatus struct { - // Details: Output-only.A message containing any operation metadata - // details. - Details string `json:"details,omitempty"` - - // InnerState: Output-only. A message containing the detailed operation - // state. - InnerState string `json:"innerState,omitempty"` - - // State: Output-only. A message containing the operation state. - // - // Possible values: - // "UNKNOWN" - Unused. - // "PENDING" - The operation has been created. - // "RUNNING" - The operation is running. - // "DONE" - The operation is done; either cancelled or completed. - State string `json:"state,omitempty"` - - // StateStartTime: Output-only. The time this state was entered. - StateStartTime string `json:"stateStartTime,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Details") 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. "Details") 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 *ClusterOperationStatus) MarshalJSON() ([]byte, error) { - type NoMethod ClusterOperationStatus - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// ClusterStatus: The status of a cluster and its instances. -type ClusterStatus struct { - // Detail: Optional details of cluster's state. - Detail string `json:"detail,omitempty"` - - // State: The cluster's state. - // - // Possible values: - // "UNKNOWN" - The cluster state is unknown. - // "CREATING" - The cluster is being created and set up. It is not - // ready for use. - // "RUNNING" - The cluster is currently running and healthy. It is - // ready for use. - // "ERROR" - The cluster encountered an error. It is not ready for - // use. - // "DELETING" - The cluster is being deleted. It cannot be used. - // "UPDATING" - The cluster is being updated. It continues to accept - // and process jobs. - State string `json:"state,omitempty"` - - // StateStartTime: Time when this state was entered. - StateStartTime string `json:"stateStartTime,omitempty"` - - // Substate: Output-only Additional state information that includes - // status reported by the agent. - // - // Possible values: - // "UNSPECIFIED" - // "UNHEALTHY" - The cluster is known to be in an unhealthy state (for - // example, critical daemons are not running or HDFS capacity is - // exhausted).Applies to RUNNING state. - // "STALE_STATUS" - The agent-reported status is out of date (may - // occur if Cloud Dataproc loses communication with Agent).Applies to - // RUNNING state. - Substate string `json:"substate,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Detail") 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. "Detail") 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 *ClusterStatus) MarshalJSON() ([]byte, error) { - type NoMethod ClusterStatus - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// DiagnoseClusterOutputLocation: The location of diagnostic output. -type DiagnoseClusterOutputLocation struct { - // OutputUri: Output-only The Google Cloud Storage URI of the diagnostic - // output. This is a plain text file with a summary of collected - // diagnostics. - OutputUri string `json:"outputUri,omitempty"` - - // ForceSendFields is a list of field names (e.g. "OutputUri") 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. "OutputUri") 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 *DiagnoseClusterOutputLocation) MarshalJSON() ([]byte, error) { - type NoMethod DiagnoseClusterOutputLocation - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// DiagnoseClusterRequest: A request to collect cluster diagnostic -// information. -type DiagnoseClusterRequest struct { -} - -// DiagnoseClusterResults: The location of diagnostic output. -type DiagnoseClusterResults struct { - // OutputUri: Output-only. The Google Cloud Storage URI of the - // diagnostic output. The output report is a plain text file with a - // summary of collected diagnostics. - OutputUri string `json:"outputUri,omitempty"` - - // ForceSendFields is a list of field names (e.g. "OutputUri") 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. "OutputUri") 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 *DiagnoseClusterResults) MarshalJSON() ([]byte, error) { - type NoMethod DiagnoseClusterResults - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// DiskConfiguration: Specifies the configuration of disk options for a -// group of VM instances. -type DiskConfiguration struct { - // BootDiskSizeGb: Optional Size in GB of the boot disk (default is - // 500GB). - BootDiskSizeGb int64 `json:"bootDiskSizeGb,omitempty"` - - // NumLocalSsds: Optional Number of attached SSDs, from 0 to 4 (default - // is 0). If SSDs are not attached, the boot disk is used to store - // runtime logs and HDFS data. If one or more SSDs are attached, this - // runtime bulk data is spread across them, and the boot disk contains - // only basic configuration and installed binaries. - NumLocalSsds int64 `json:"numLocalSsds,omitempty"` - - // ForceSendFields is a list of field names (e.g. "BootDiskSizeGb") 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. "BootDiskSizeGb") 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 *DiskConfiguration) MarshalJSON() ([]byte, error) { - type NoMethod DiskConfiguration - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// Empty: A generic empty message that you can re-use to avoid defining -// duplicated empty messages in your APIs. A typical example is to use -// it as the request or the response type of an API method. For -// instance: -// service Foo { -// rpc Bar(google.protobuf.Empty) returns -// (google.protobuf.Empty); -// } -// The JSON representation for Empty is empty JSON object {}. -type Empty struct { - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` -} - -// GceClusterConfiguration: Common configuration settings for resources -// of Google Compute Engine cluster instances, applicable to all -// instances in the cluster. -type GceClusterConfiguration struct { - // InternalIpOnly: If true, all instances in the cluser will only have - // internal IP addresses. By default, clusters are not restricted to - // internal IP addresses, and will have ephemeral external IP addresses - // assigned to each instance. This restriction can only be enabled for - // subnetwork enabled networks, and all off-cluster dependencies must be - // configured to be accessible without external IP addresses. - InternalIpOnly bool `json:"internalIpOnly,omitempty"` - - // Metadata: The Google Compute Engine metadata entries to add to all - // instances. - Metadata map[string]string `json:"metadata,omitempty"` - - // NetworkUri: The Google Compute Engine network to be used for machine - // communications. Cannot be specified with subnetwork_uri. If neither - // network_uri nor subnetwork_uri is specified, the "default" network of - // the project is used, if it exists. Cannot be a "Custom Subnet - // Network" (see https://cloud.google.com/compute/docs/subnetworks for - // more information). Example: - // https://www.googleapis.com/compute/v1/projects/[project_id]/regions/global/default. - NetworkUri string `json:"networkUri,omitempty"` - - // ServiceAccount: Optional The service account of the instances. - // Defaults to the default Google Compute Engine service account. Custom - // service accounts need permissions equivalent to the folloing IAM - // roles: - // roles/logging.logWriter - // roles/storage.objectAdmin(see - // https://cloud.google.com/compute/docs/access/service-accounts#custom_service_accounts for more information). Example: - // [account_id]@[project_id].iam.gserviceaccount.com - ServiceAccount string `json:"serviceAccount,omitempty"` - - // ServiceAccountScopes: The URIs of service account scopes to be - // included in Google Compute Engine instances. The following base set - // of scopes is always included: - - // https://www.googleapis.com/auth/cloud.useraccounts.readonly - - // https://www.googleapis.com/auth/devstorage.read_write - - // https://www.googleapis.com/auth/logging.write If no scopes are - // specfied, the following defaults are also provided: - - // https://www.googleapis.com/auth/bigquery - - // https://www.googleapis.com/auth/bigtable.admin.table - - // https://www.googleapis.com/auth/bigtable.data - - // https://www.googleapis.com/auth/devstorage.full_control - ServiceAccountScopes []string `json:"serviceAccountScopes,omitempty"` - - // SubnetworkUri: The Google Compute Engine subnetwork to be used for - // machine communications. Cannot be specified with network_uri. - // Example: - // https://www.googleapis.com/compute/v1/projects/[project_id]/regions/us-east1/sub0. - SubnetworkUri string `json:"subnetworkUri,omitempty"` - - // Tags: The Google Compute Engine tags to add to all instances. - Tags []string `json:"tags,omitempty"` - - // ZoneUri: Required The zone where the Google Compute Engine cluster - // will be located. Example: - // https://www.googleapis.com/compute/v1/projects/[project_id]/zones/[zone]. - ZoneUri string `json:"zoneUri,omitempty"` - - // ForceSendFields is a list of field names (e.g. "InternalIpOnly") 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. "InternalIpOnly") 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 *GceClusterConfiguration) MarshalJSON() ([]byte, error) { - type NoMethod GceClusterConfiguration - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// HadoopJob: A Cloud Dataproc job for running Hadoop MapReduce jobs on -// YARN. -type HadoopJob struct { - // ArchiveUris: Optional HCFS URIs of archives to be extracted in the - // working directory of Hadoop drivers and tasks. Supported file types: - // .jar, .tar, .tar.gz, .tgz, or .zip. - ArchiveUris []string `json:"archiveUris,omitempty"` - - // Args: Optional The arguments to pass to the driver. Do not include - // arguments, such as -libjars or -Dfoo=bar, that can be set as job - // properties, since a collision may occur that causes an incorrect job - // submission. - Args []string `json:"args,omitempty"` - - // FileUris: Optional HCFS URIs of files to be copied to the working - // directory of Hadoop drivers and distributed tasks. Useful for naively - // parallel tasks. - FileUris []string `json:"fileUris,omitempty"` - - // JarFileUris: Optional Jar file URIs to add to the CLASSPATHs of the - // Hadoop driver and tasks. - JarFileUris []string `json:"jarFileUris,omitempty"` - - // LoggingConfiguration: Optional The runtime log configuration for job - // execution. - LoggingConfiguration *LoggingConfiguration `json:"loggingConfiguration,omitempty"` - - // MainClass: The name of the driver's main class. The jar file - // containing the class must be in the default CLASSPATH or specified in - // jar_file_uris. - MainClass string `json:"mainClass,omitempty"` - - // MainJarFileUri: The Hadoop Compatible Filesystem (HCFS) URI of the - // jar file containing the main class. Examples: - // 'gs://foo-bucket/analytics-binaries/extract-useful-metrics-mr.jar' - // 'hdfs:/tmp/test-samples/custom-wordcount.jar' - // 'file:///home/usr/lib/hadoop-mapreduce/hadoop-mapreduce-examples.jar' - MainJarFileUri string `json:"mainJarFileUri,omitempty"` - - // Properties: Optional A mapping of property names to values, used to - // configure Hadoop. Properties that conflict with values set by the - // Cloud Dataproc API may be overwritten. Can include properties set in - // /etc/hadoop/conf/*-site and classes in user code. - Properties map[string]string `json:"properties,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ArchiveUris") 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. "ArchiveUris") 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 *HadoopJob) MarshalJSON() ([]byte, error) { - type NoMethod HadoopJob - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// HiveJob: A Cloud Dataproc job for running Hive queries on YARN. -type HiveJob struct { - // ContinueOnFailure: Optional Whether to continue executing queries if - // a query fails. The default value is false. Setting to true can be - // useful when executing independent parallel queries. - ContinueOnFailure bool `json:"continueOnFailure,omitempty"` - - // JarFileUris: Optional HCFS URIs of jar files to add to the CLASSPATH - // of the Hive server and Hadoop MapReduce (MR) tasks. Can contain Hive - // SerDes and UDFs. - JarFileUris []string `json:"jarFileUris,omitempty"` - - // Properties: Optional A mapping of property names and values, used to - // configure Hive. Properties that conflict with values set by the Cloud - // Dataproc API may be overwritten. Can include properties set in - // /etc/hadoop/conf/*-site.xml, /etc/hive/conf/hive-site.xml, and - // classes in user code. - Properties map[string]string `json:"properties,omitempty"` - - // QueryFileUri: The HCFS URI of the script that contains Hive queries. - QueryFileUri string `json:"queryFileUri,omitempty"` - - // QueryList: A list of queries. - QueryList *QueryList `json:"queryList,omitempty"` - - // ScriptVariables: Optional Mapping of query variable names to values - // (equivalent to the Hive command: SET name="value";). - ScriptVariables map[string]string `json:"scriptVariables,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ContinueOnFailure") - // 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. "ContinueOnFailure") 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 *HiveJob) MarshalJSON() ([]byte, error) { - type NoMethod HiveJob - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// InstanceGroupConfiguration: The configuration settings for Google -// Compute Engine resources in an instance group, such as a master or -// worker group. -type InstanceGroupConfiguration struct { - // Accelerators: Optional The Google Compute Engine accelerator - // configuration for these instances. - Accelerators []*AcceleratorConfiguration `json:"accelerators,omitempty"` - - // DiskConfiguration: Disk option configuration settings. - DiskConfiguration *DiskConfiguration `json:"diskConfiguration,omitempty"` - - // ImageUri: Output-only The Google Compute Engine image resource used - // for cluster instances. Inferred from - // SoftwareConfiguration.image_version. - ImageUri string `json:"imageUri,omitempty"` - - // InstanceNames: The list of instance names. Dataproc derives the names - // from cluster_name, num_instances, and the instance group if not set - // by user (recommended practice is to let Dataproc derive the name). - InstanceNames []string `json:"instanceNames,omitempty"` - - // IsPreemptible: Specifies that this instance group contains - // Preemptible Instances. - IsPreemptible bool `json:"isPreemptible,omitempty"` - - // MachineTypeUri: The Google Compute Engine machine type used for - // cluster instances. Example: - // https://www.googleapis.com/compute/v1/projects/[project_id]/zones/us-east1-a/machineTypes/n1-standard-2. - MachineTypeUri string `json:"machineTypeUri,omitempty"` - - // ManagedGroupConfiguration: Output-only The configuration for Google - // Compute Engine Instance Group Manager that manages this group. This - // is only used for preemptible instance groups. - ManagedGroupConfiguration *ManagedGroupConfiguration `json:"managedGroupConfiguration,omitempty"` - - // NumInstances: The number of VM instances in the instance group. For - // master instance groups, must be set to 1. - NumInstances int64 `json:"numInstances,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Accelerators") 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. "Accelerators") 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 *InstanceGroupConfiguration) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupConfiguration - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// Job: A Cloud Dataproc job resource. -type Job struct { - // DriverControlFilesUri: Output-only If present, the location of - // miscellaneous control files which may be used as part of job setup - // and handling. If not present, control files may be placed in the same - // location as driver_output_uri. - DriverControlFilesUri string `json:"driverControlFilesUri,omitempty"` - - // DriverInputResourceUri: Output-only A URI pointing to the location of - // the stdin of the job's driver program, only set if the job is - // interactive. - DriverInputResourceUri string `json:"driverInputResourceUri,omitempty"` - - // DriverOutputResourceUri: Output-only A URI pointing to the location - // of the stdout of the job's driver program. - DriverOutputResourceUri string `json:"driverOutputResourceUri,omitempty"` - - // HadoopJob: Job is a Hadoop job. - HadoopJob *HadoopJob `json:"hadoopJob,omitempty"` - - // HiveJob: Job is a Hive job. - HiveJob *HiveJob `json:"hiveJob,omitempty"` - - // Interactive: Optional If set to true, the driver's stdin will be kept - // open and driver_input_uri will be set to provide a path at which - // additional input can be sent to the driver. - Interactive bool `json:"interactive,omitempty"` - - // Labels: Optional The labels to associate with this job.Label keys - // must be between 1 and 63 characters long, and must conform to the - // following regular expression: \p{Ll}\p{Lo}{0,62}Label values must be - // between 1 and 63 characters long, and must conform to the following - // regular expression: \p{Ll}\p{Lo}\p{N}_-{0,63}No more than 64 labels - // can be associated with a given job. - Labels map[string]string `json:"labels,omitempty"` - - // PigJob: Job is a Pig job. - PigJob *PigJob `json:"pigJob,omitempty"` - - // Placement: Required Job information, including how, when, and where - // to run the job. - Placement *JobPlacement `json:"placement,omitempty"` - - // PysparkJob: Job is a Pyspark job. - PysparkJob *PySparkJob `json:"pysparkJob,omitempty"` - - // Reference: Optional The fully qualified reference to the job, which - // can be used to obtain the equivalent REST path of the job resource. - // If this property is not specified when a job is created, the server - // generates a <code>job_id</code>. - Reference *JobReference `json:"reference,omitempty"` - - // Scheduling: Optional Job scheduling configuration. - Scheduling *JobScheduling `json:"scheduling,omitempty"` - - // SparkJob: Job is a Spark job. - SparkJob *SparkJob `json:"sparkJob,omitempty"` - - // SparkSqlJob: Job is a SparkSql job. - SparkSqlJob *SparkSqlJob `json:"sparkSqlJob,omitempty"` - - // Status: Output-only The job status. Additional application-specific - // status information may be contained in the <code>type_job</code> and - // <code>yarn_applications</code> fields. - Status *JobStatus `json:"status,omitempty"` - - // StatusHistory: Output-only The previous job status. - StatusHistory []*JobStatus `json:"statusHistory,omitempty"` - - // SubmittedBy: Output-only The email address of the user submitting the - // job. For jobs submitted on the cluster, the address is - // <code>username@hostname</code>. - SubmittedBy string `json:"submittedBy,omitempty"` - - // YarnApplications: Output-only The collection of YARN applications - // spun up by this job. - YarnApplications []*YarnApplication `json:"yarnApplications,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. - // "DriverControlFilesUri") 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. "DriverControlFilesUri") 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 *Job) MarshalJSON() ([]byte, error) { - type NoMethod Job - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// JobPlacement: Cloud Dataproc job configuration. -type JobPlacement struct { - // ClusterName: Required The name of the cluster where the job will be - // submitted. - ClusterName string `json:"clusterName,omitempty"` - - // ClusterUuid: Output-only A cluster UUID generated by the Dataproc - // service when the job is submitted. - ClusterUuid string `json:"clusterUuid,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ClusterName") 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. "ClusterName") 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 *JobPlacement) MarshalJSON() ([]byte, error) { - type NoMethod JobPlacement - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// JobReference: Encapsulates the full scoping used to reference a job. -type JobReference struct { - // JobId: Required The job ID, which must be unique within the project. - // The job ID is generated by the server upon job submission or provided - // by the user as a means to perform retries without creating duplicate - // jobs. The ID must contain only letters (a-z, A-Z), numbers (0-9), - // underscores (_), or hyphens (-). The maximum length is 100 - // characters. - JobId string `json:"jobId,omitempty"` - - // ProjectId: Required The ID of the Google Cloud Platform project that - // the job belongs to. - ProjectId string `json:"projectId,omitempty"` - - // ForceSendFields is a list of field names (e.g. "JobId") 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. "JobId") 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 *JobReference) MarshalJSON() ([]byte, error) { - type NoMethod JobReference - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// JobScheduling: Job scheduling options.Beta Feature: These options are -// available for testing purposes only. They may be changed before final -// release. -type JobScheduling struct { - // MaxFailuresPerHour: Optional Maximum number of times per hour a - // driver may be restarted as a result of driver terminating with - // non-zero code before job is reported failed.A job may be reported as - // thrashing if driver exits with non-zero code 4 times within 10 minute - // window.Maximum value is 10. - MaxFailuresPerHour int64 `json:"maxFailuresPerHour,omitempty"` - - // ForceSendFields is a list of field names (e.g. "MaxFailuresPerHour") - // 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. "MaxFailuresPerHour") 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 *JobScheduling) MarshalJSON() ([]byte, error) { - type NoMethod JobScheduling - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// JobStatus: Cloud Dataproc job status. -type JobStatus struct { - // Details: Optional Job state details, such as an error description if - // the state is <code>ERROR</code>. - Details string `json:"details,omitempty"` - - // State: Required A state message specifying the overall job state. - // - // Possible values: - // "STATE_UNSPECIFIED" - The job state is unknown. - // "PENDING" - The job is pending; it has been submitted, but is not - // yet running. - // "SETUP_DONE" - Job has been received by the service and completed - // initial setup; it will shortly be submitted to the cluster. - // "RUNNING" - The job is running on the cluster. - // "CANCEL_PENDING" - A CancelJob request has been received, but is - // pending. - // "CANCEL_STARTED" - Transient in-flight resources have been - // canceled, and the request to cancel the running job has been issued - // to the cluster. - // "CANCELLED" - The job cancelation was successful. - // "DONE" - The job has completed successfully. - // "ERROR" - The job has completed, but encountered an error. - // "ATTEMPT_FAILURE" - Job attempt has failed. The detail field - // contains failure details for this attempt.Applies to restartable jobs - // only. - State string `json:"state,omitempty"` - - // StateStartTime: Output-only The time when this state was entered. - StateStartTime string `json:"stateStartTime,omitempty"` - - // Substate: Output-only Additional state information, which includes - // status reported by the agent. - // - // Possible values: - // "UNSPECIFIED" - // "SUBMITTED" - The Job is submitted to the agent.Applies to RUNNING - // state. - // "QUEUED" - The Job has been received and is awaiting execution (it - // may be waiting for a condition to be met). See the "details" field - // for the reason for the delay.Applies to RUNNING state. - // "STALE_STATUS" - The agent-reported status is out of date, which - // may be caused by a loss of communication between the agent and Cloud - // Dataproc. If the agent does not send a timely update, the job will - // fail.Applies to RUNNING state. - Substate string `json:"substate,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Details") 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. "Details") 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 *JobStatus) MarshalJSON() ([]byte, error) { - type NoMethod JobStatus - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// ListClustersResponse: The list of all clusters in a project. -type ListClustersResponse struct { - // Clusters: Output-only The clusters in the project. - Clusters []*Cluster `json:"clusters,omitempty"` - - // NextPageToken: The standard List next-page token. - 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. "Clusters") 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. "Clusters") 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 *ListClustersResponse) MarshalJSON() ([]byte, error) { - type NoMethod ListClustersResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// ListJobsResponse: A list of jobs in a project. -type ListJobsResponse struct { - // Jobs: Output-only Jobs list. - Jobs []*Job `json:"jobs,omitempty"` - - // NextPageToken: Optional This token is included in the response if - // there are more results to fetch. To fetch additional results, provide - // this value as the page_token in a subsequent - // <code>ListJobsRequest</code>. - 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. "Jobs") 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. "Jobs") 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 *ListJobsResponse) MarshalJSON() ([]byte, error) { - type NoMethod ListJobsResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// ListOperationsResponse: The response message for -// Operations.ListOperations. -type ListOperationsResponse struct { - // NextPageToken: The standard List next-page token. - NextPageToken string `json:"nextPageToken,omitempty"` - - // Operations: A list of operations that matches the specified filter in - // the request. - Operations []*Operation `json:"operations,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "NextPageToken") 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. "NextPageToken") 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 *ListOperationsResponse) MarshalJSON() ([]byte, error) { - type NoMethod ListOperationsResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// LoggingConfiguration: The runtime logging configuration of the job. -type LoggingConfiguration struct { - // DriverLogLevels: The per-package log levels for the driver. This may - // include "root" package name to configure rootLogger. Examples: - // 'com.google = FATAL', 'root = INFO', 'org.apache = DEBUG' - DriverLogLevels map[string]string `json:"driverLogLevels,omitempty"` - - // ForceSendFields is a list of field names (e.g. "DriverLogLevels") 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. "DriverLogLevels") 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 *LoggingConfiguration) MarshalJSON() ([]byte, error) { - type NoMethod LoggingConfiguration - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// ManagedGroupConfiguration: Specifies the resources used to actively -// manage an instance group. -type ManagedGroupConfiguration struct { - // InstanceGroupManagerName: Output-only The name of the Instance Group - // Manager for this group. - InstanceGroupManagerName string `json:"instanceGroupManagerName,omitempty"` - - // InstanceTemplateName: Output-only The name of the Instance Template - // used for the Managed Instance Group. - InstanceTemplateName string `json:"instanceTemplateName,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "InstanceGroupManagerName") 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. "InstanceGroupManagerName") - // 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 *ManagedGroupConfiguration) MarshalJSON() ([]byte, error) { - type NoMethod ManagedGroupConfiguration - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// NodeInitializationAction: Specifies an executable to run on a fully -// configured node and a timeout period for executable completion. -type NodeInitializationAction struct { - // ExecutableFile: Required Google Cloud Storage URI of executable file. - ExecutableFile string `json:"executableFile,omitempty"` - - // ExecutionTimeout: Optional Amount of time executable has to complete. - // Default is 10 minutes. Cluster creation fails with an explanatory - // error message (the name of the executable that caused the error and - // the exceeded timeout period) if the executable is not completed at - // end of the timeout period. - ExecutionTimeout string `json:"executionTimeout,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ExecutableFile") 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. "ExecutableFile") 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 *NodeInitializationAction) MarshalJSON() ([]byte, error) { - type NoMethod NodeInitializationAction - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// Operation: This resource represents a long-running operation that is -// the result of a network API call. -type Operation struct { - // Done: If the value is false, it means the operation is still in - // progress. If true, the operation is completed, and either error or - // response is available. - Done bool `json:"done,omitempty"` - - // Error: The error result of the operation in case of failure or - // cancellation. - Error *Status `json:"error,omitempty"` - - // Metadata: Service-specific metadata associated with the operation. It - // typically contains progress information and common metadata such as - // create time. Some services might not provide such metadata. Any - // method that returns a long-running operation should document the - // metadata type, if any. - Metadata googleapi.RawMessage `json:"metadata,omitempty"` - - // Name: The server-assigned name, which is only unique within the same - // service that originally returns it. If you use the default HTTP - // mapping, the name should have the format of - // operations/some/unique/name. - Name string `json:"name,omitempty"` - - // Response: The normal response of the operation in case of success. If - // the original method returns no data on success, such as Delete, the - // response is google.protobuf.Empty. If the original method is standard - // Get/Create/Update, the response should be the resource. For other - // methods, the response should have the type XxxResponse, where Xxx is - // the original method name. For example, if the original method name is - // TakeSnapshot(), the inferred response type is TakeSnapshotResponse. - Response googleapi.RawMessage `json:"response,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Done") 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. "Done") 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 *Operation) MarshalJSON() ([]byte, error) { - type NoMethod Operation - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// OperationMetadata: Metadata describing the operation. -type OperationMetadata struct { - // ClusterName: Name of the cluster for the operation. - ClusterName string `json:"clusterName,omitempty"` - - // ClusterUuid: Cluster UUId for the operation. - ClusterUuid string `json:"clusterUuid,omitempty"` - - // Description: Output-only Short description of operation. - Description string `json:"description,omitempty"` - - // OperationType: Output-only The operation type. - OperationType string `json:"operationType,omitempty"` - - // Status: Output-only Current operation status. - Status *OperationStatus `json:"status,omitempty"` - - // StatusHistory: Output-only Previous operation status. - StatusHistory []*OperationStatus `json:"statusHistory,omitempty"` - - // Warnings: Output-only Errors encountered during operation execution. - Warnings []string `json:"warnings,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ClusterName") 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. "ClusterName") 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 *OperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod OperationMetadata - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// OperationStatus: The status of the operation. -type OperationStatus struct { - // Details: A message containing any operation metadata details. - Details string `json:"details,omitempty"` - - // InnerState: A message containing the detailed operation state. - InnerState string `json:"innerState,omitempty"` - - // State: A message containing the operation state. - // - // Possible values: - // "UNKNOWN" - Unused. - // "PENDING" - The operation has been created. - // "RUNNING" - The operation is running. - // "DONE" - The operation is done; either cancelled or completed. - State string `json:"state,omitempty"` - - // StateStartTime: The time this state was entered. - StateStartTime string `json:"stateStartTime,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Details") 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. "Details") 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 *OperationStatus) MarshalJSON() ([]byte, error) { - type NoMethod OperationStatus - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// PigJob: A Cloud Dataproc job for running Pig queries on YARN. -type PigJob struct { - // ContinueOnFailure: Optional Whether to continue executing queries if - // a query fails. The default value is false. Setting to true can be - // useful when executing independent parallel queries. - ContinueOnFailure bool `json:"continueOnFailure,omitempty"` - - // JarFileUris: Optional HCFS URIs of jar files to add to the CLASSPATH - // of the Pig Client and Hadoop MapReduce (MR) tasks. Can contain Pig - // UDFs. - JarFileUris []string `json:"jarFileUris,omitempty"` - - // LoggingConfiguration: Optional The runtime log configuration for job - // execution. - LoggingConfiguration *LoggingConfiguration `json:"loggingConfiguration,omitempty"` - - // Properties: Optional A mapping of property names to values, used to - // configure Pig. Properties that conflict with values set by the Cloud - // Dataproc API may be overwritten. Can include properties set in - // /etc/hadoop/conf/*-site.xml, /etc/pig/conf/pig.properties, and - // classes in user code. - Properties map[string]string `json:"properties,omitempty"` - - // QueryFileUri: The HCFS URI of the script that contains the Pig - // queries. - QueryFileUri string `json:"queryFileUri,omitempty"` - - // QueryList: A list of queries. - QueryList *QueryList `json:"queryList,omitempty"` - - // ScriptVariables: Optional Mapping of query variable names to values - // (equivalent to the Pig command: name=[value]). - ScriptVariables map[string]string `json:"scriptVariables,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ContinueOnFailure") - // 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. "ContinueOnFailure") 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 *PigJob) MarshalJSON() ([]byte, error) { - type NoMethod PigJob - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// PySparkJob: A Cloud Dataproc job for running PySpark applications on -// YARN. -type PySparkJob struct { - // ArchiveUris: Optional HCFS URIs of archives to be extracted in the - // working directory of .jar, .tar, .tar.gz, .tgz, and .zip. - ArchiveUris []string `json:"archiveUris,omitempty"` - - // Args: Optional The arguments to pass to the driver. Do not include - // arguments, such as --conf, that can be set as job properties, since a - // collision may occur that causes an incorrect job submission. - Args []string `json:"args,omitempty"` - - // FileUris: Optional HCFS URIs of files to be copied to the working - // directory of Python drivers and distributed tasks. Useful for naively - // parallel tasks. - FileUris []string `json:"fileUris,omitempty"` - - // JarFileUris: Optional HCFS URIs of jar files to add to the CLASSPATHs - // of the Python driver and tasks. - JarFileUris []string `json:"jarFileUris,omitempty"` - - // LoggingConfiguration: Optional The runtime log configuration for job - // execution. - LoggingConfiguration *LoggingConfiguration `json:"loggingConfiguration,omitempty"` - - // MainPythonFileUri: Required The Hadoop Compatible Filesystem (HCFS) - // URI of the main Python file to use as the driver. Must be a .py file. - MainPythonFileUri string `json:"mainPythonFileUri,omitempty"` - - // Properties: Optional A mapping of property names to values, used to - // configure PySpark. Properties that conflict with values set by the - // Cloud Dataproc API may be overwritten. Can include properties set in - // /etc/spark/conf/spark-defaults.conf and classes in user code. - Properties map[string]string `json:"properties,omitempty"` - - // PythonFileUris: Optional HCFS file URIs of Python files to pass to - // the PySpark framework. Supported file types: .py, .egg, and .zip. - PythonFileUris []string `json:"pythonFileUris,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ArchiveUris") 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. "ArchiveUris") 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 *PySparkJob) MarshalJSON() ([]byte, error) { - type NoMethod PySparkJob - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// QueryList: A list of queries to run on a cluster. -type QueryList struct { - // Queries: Required The queries to execute. You do not need to - // terminate a query with a semicolon. Multiple queries can be specified - // in one string by separating each with a semicolon. Here is an example - // of an Cloud Dataproc API snippet that uses a QueryList to specify a - // HiveJob: - // "hiveJob": { - // "queryList": { - // "queries": [ - // "query1", - // "query2", - // "query3;query4", - // ] - // } - // } - // - Queries []string `json:"queries,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Queries") 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. "Queries") 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 *QueryList) MarshalJSON() ([]byte, error) { - type NoMethod QueryList - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// SoftwareConfiguration: Specifies the selection and configuration of -// software inside the cluster. -type SoftwareConfiguration struct { - // ImageVersion: Optional The version of software inside the cluster. It - // must match the regular expression [0-9]+\.[0-9]+. If unspecified, it - // defaults to the latest version (see Cloud Dataproc Versioning). - ImageVersion string `json:"imageVersion,omitempty"` - - // Properties: Optional The properties to set on daemon configuration - // files.Property keys are specified in "prefix:property" format, such - // as "core:fs.defaultFS". The following are supported prefixes and - // their mappings: core - core-site.xml hdfs - hdfs-site.xml mapred - - // mapred-site.xml yarn - yarn-site.xml hive - hive-site.xml pig - - // pig.properties spark - spark-defaults.conf - Properties map[string]string `json:"properties,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ImageVersion") 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. "ImageVersion") 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 *SoftwareConfiguration) MarshalJSON() ([]byte, error) { - type NoMethod SoftwareConfiguration - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// SparkJob: A Cloud Dataproc job for running Spark applications on -// YARN. -type SparkJob struct { - // ArchiveUris: Optional HCFS URIs of archives to be extracted in the - // working directory of Spark drivers and tasks. Supported file types: - // .jar, .tar, .tar.gz, .tgz, and .zip. - ArchiveUris []string `json:"archiveUris,omitempty"` - - // Args: Optional The arguments to pass to the driver. Do not include - // arguments, such as --conf, that can be set as job properties, since a - // collision may occur that causes an incorrect job submission. - Args []string `json:"args,omitempty"` - - // FileUris: Optional HCFS URIs of files to be copied to the working - // directory of Spark drivers and distributed tasks. Useful for naively - // parallel tasks. - FileUris []string `json:"fileUris,omitempty"` - - // JarFileUris: Optional HCFS URIs of jar files to add to the CLASSPATHs - // of the Spark driver and tasks. - JarFileUris []string `json:"jarFileUris,omitempty"` - - // LoggingConfiguration: Optional The runtime log configuration for job - // execution. - LoggingConfiguration *LoggingConfiguration `json:"loggingConfiguration,omitempty"` - - // MainClass: The name of the driver's main class. The jar file that - // contains the class must be in the default CLASSPATH or specified in - // jar_file_uris. - MainClass string `json:"mainClass,omitempty"` - - // MainJarFileUri: The Hadoop Compatible Filesystem (HCFS) URI of the - // jar file that contains the main class. - MainJarFileUri string `json:"mainJarFileUri,omitempty"` - - // Properties: Optional A mapping of property names to values, used to - // configure Spark. Properties that conflict with values set by the - // Cloud Dataproc API may be overwritten. Can include properties set in - // /etc/spark/conf/spark-defaults.conf and classes in user code. - Properties map[string]string `json:"properties,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ArchiveUris") 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. "ArchiveUris") 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 *SparkJob) MarshalJSON() ([]byte, error) { - type NoMethod SparkJob - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// SparkSqlJob: A Cloud Dataproc job for running Spark SQL queries. -type SparkSqlJob struct { - // JarFileUris: Optional HCFS URIs of jar files to be added to the Spark - // CLASSPATH. - JarFileUris []string `json:"jarFileUris,omitempty"` - - // LoggingConfiguration: Optional The runtime log configuration for job - // execution. - LoggingConfiguration *LoggingConfiguration `json:"loggingConfiguration,omitempty"` - - // Properties: Optional A mapping of property names to values, used to - // configure Spark SQL's SparkConf. Properties that conflict with values - // set by the Cloud Dataproc API may be overwritten. - Properties map[string]string `json:"properties,omitempty"` - - // QueryFileUri: The HCFS URI of the script that contains SQL queries. - QueryFileUri string `json:"queryFileUri,omitempty"` - - // QueryList: A list of queries. - QueryList *QueryList `json:"queryList,omitempty"` - - // ScriptVariables: Optional Mapping of query variable names to values - // (equivalent to the Spark SQL command: SET name="value";). - ScriptVariables map[string]string `json:"scriptVariables,omitempty"` - - // ForceSendFields is a list of field names (e.g. "JarFileUris") 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. "JarFileUris") 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 *SparkSqlJob) MarshalJSON() ([]byte, error) { - type NoMethod SparkSqlJob - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// Status: The Status type defines a logical error model that is -// suitable for different programming environments, including REST APIs -// and RPC APIs. It is used by gRPC (https://github.com/grpc). The error -// model is designed to be: -// Simple to use and understand for most users -// Flexible enough to meet unexpected needsOverviewThe Status message -// contains three pieces of data: error code, error message, and error -// details. The error code should be an enum value of google.rpc.Code, -// but it may accept additional error codes if needed. The error message -// should be a developer-facing English message that helps developers -// understand and resolve the error. If a localized user-facing error -// message is needed, put the localized message in the error details or -// localize it in the client. The optional error details may contain -// arbitrary information about the error. There is a predefined set of -// error detail types in the package google.rpc that can be used for -// common error conditions.Language mappingThe Status message is the -// logical representation of the error model, but it is not necessarily -// the actual wire format. When the Status message is exposed in -// different client libraries and different wire protocols, it can be -// mapped differently. For example, it will likely be mapped to some -// exceptions in Java, but more likely mapped to some error codes in -// C.Other usesThe error model and the Status message can be used in a -// variety of environments, either with or without APIs, to provide a -// consistent developer experience across different environments.Example -// uses of this error model include: -// Partial errors. If a service needs to return partial errors to the -// client, it may embed the Status in the normal response to indicate -// the partial errors. -// Workflow errors. A typical workflow has multiple steps. Each step may -// have a Status message for error reporting. -// Batch operations. If a client uses batch request and batch response, -// the Status message should be used directly inside batch response, one -// for each error sub-response. -// Asynchronous operations. If an API call embeds asynchronous operation -// results in its response, the status of those operations should be -// represented directly using the Status message. -// Logging. If some API errors are stored in logs, the message Status -// could be used directly after any stripping needed for -// security/privacy reasons. -type Status struct { - // Code: The status code, which should be an enum value of - // google.rpc.Code. - Code int64 `json:"code,omitempty"` - - // Details: A list of messages that carry the error details. There will - // be a common set of message types for APIs to use. - Details []googleapi.RawMessage `json:"details,omitempty"` - - // Message: A developer-facing error message, which should be in - // English. Any user-facing error message should be localized and sent - // in the google.rpc.Status.details field, or localized by the client. - Message string `json:"message,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Code") 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. "Code") 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 *Status) MarshalJSON() ([]byte, error) { - type NoMethod Status - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// SubmitJobRequest: A request to submit a job. -type SubmitJobRequest struct { - // Job: Required The job resource. - Job *Job `json:"job,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Job") 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. "Job") 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 *SubmitJobRequest) MarshalJSON() ([]byte, error) { - type NoMethod SubmitJobRequest - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// YarnApplication: A YARN application created by a job. Application -// information is a subset of -// <code>org.apache.hadoop.yarn.proto.YarnProtos.ApplicationReportProto</ -// code>. -type YarnApplication struct { - // Name: Required The application name. - Name string `json:"name,omitempty"` - - // Progress: Required The numerical progress of the application, from 1 - // to 100. - Progress float64 `json:"progress,omitempty"` - - // State: Required The application state. - // - // Possible values: - // "STATE_UNSPECIFIED" - Status is unspecified. - // "NEW" - Status is NEW. - // "NEW_SAVING" - Status is NEW_SAVING. - // "SUBMITTED" - Status is SUBMITTED. - // "ACCEPTED" - Status is ACCEPTED. - // "RUNNING" - Status is RUNNING. - // "FINISHED" - Status is FINISHED. - // "FAILED" - Status is FAILED. - // "KILLED" - Status is KILLED. - State string `json:"state,omitempty"` - - // TrackingUrl: Optional The HTTP URL of the ApplicationMaster, - // HistoryServer, or TimelineServer that provides application-specific - // information. The URL uses the internal hostname, and requires a proxy - // server for resolution and, possibly, access. - TrackingUrl string `json:"trackingUrl,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Name") 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. "Name") 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 *YarnApplication) MarshalJSON() ([]byte, error) { - type NoMethod YarnApplication - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *YarnApplication) UnmarshalJSON(data []byte) error { - type NoMethod YarnApplication - var s1 struct { - Progress gensupport.JSONFloat64 `json:"progress"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.Progress = float64(s1.Progress) - return nil -} - -// method id "dataproc.operations.cancel": - -type OperationsCancelCall struct { - s *Service - name string - canceloperationrequest *CancelOperationRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Cancel: Starts asynchronous cancellation on a long-running operation. -// The server makes a best effort to cancel the operation, but success -// is not guaranteed. If the server doesn't support this method, it -// returns google.rpc.Code.UNIMPLEMENTED. Clients can use operations.get -// or other methods to check whether the cancellation succeeded or -// whether the operation completed despite cancellation. -func (r *OperationsService) Cancel(name string, canceloperationrequest *CancelOperationRequest) *OperationsCancelCall { - c := &OperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.canceloperationrequest = canceloperationrequest - 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 *OperationsCancelCall) Fields(s ...googleapi.Field) *OperationsCancelCall { - 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 *OperationsCancelCall) Context(ctx context.Context) *OperationsCancelCall { - 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 *OperationsCancelCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *OperationsCancelCall) 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.canceloperationrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:cancel") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "dataproc.operations.cancel" call. -// Exactly one of *Empty or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Empty.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 *OperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, 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 := &Empty{ - 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": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED. Clients can use operations.get or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation.", - // "flatPath": "v1beta1/operations/{operationsId}:cancel", - // "httpMethod": "POST", - // "id": "dataproc.operations.cancel", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "The name of the operation resource to be cancelled.", - // "location": "path", - // "pattern": "^operations/.+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1beta1/{+name}:cancel", - // "request": { - // "$ref": "CancelOperationRequest" - // }, - // "response": { - // "$ref": "Empty" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "dataproc.operations.delete": - -type OperationsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes a long-running operation. This method indicates that -// the client is no longer interested in the operation result. It does -// not cancel the operation. If the server doesn't support this method, -// it returns google.rpc.Code.UNIMPLEMENTED. -func (r *OperationsService) Delete(name string) *OperationsDeleteCall { - c := &OperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - 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 *OperationsDeleteCall) Fields(s ...googleapi.Field) *OperationsDeleteCall { - 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 *OperationsDeleteCall) Context(ctx context.Context) *OperationsDeleteCall { - 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 *OperationsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *OperationsDeleteCall) 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 - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("DELETE", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "dataproc.operations.delete" call. -// Exactly one of *Empty or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Empty.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 *OperationsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, 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 := &Empty{ - 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": "Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED.", - // "flatPath": "v1beta1/operations/{operationsId}", - // "httpMethod": "DELETE", - // "id": "dataproc.operations.delete", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "The name of the operation resource to be deleted.", - // "location": "path", - // "pattern": "^operations/.+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1beta1/{+name}", - // "response": { - // "$ref": "Empty" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "dataproc.operations.get": - -type OperationsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Gets the latest state of a long-running operation. Clients can -// use this method to poll the operation result at intervals as -// recommended by the API service. -func (r *OperationsService) Get(name string) *OperationsGetCall { - c := &OperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - 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 *OperationsGetCall) Fields(s ...googleapi.Field) *OperationsGetCall { - 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 *OperationsGetCall) IfNoneMatch(entityTag string) *OperationsGetCall { - 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 *OperationsGetCall) Context(ctx context.Context) *OperationsGetCall { - 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 *OperationsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *OperationsGetCall) 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, "v1beta1/{+name}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "dataproc.operations.get" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.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 *OperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, 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 := &Operation{ - 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": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", - // "flatPath": "v1beta1/operations/{operationsId}", - // "httpMethod": "GET", - // "id": "dataproc.operations.get", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "The name of the operation resource.", - // "location": "path", - // "pattern": "^operations/.+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1beta1/{+name}", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "dataproc.operations.list": - -type OperationsListCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists operations that match the specified filter in the -// request. If the server doesn't support this method, it returns -// UNIMPLEMENTED.NOTE: the name binding below allows API services to -// override the binding to use different resource name schemes, such as -// users/*/operations. -func (r *OperationsService) List(name string) *OperationsListCall { - c := &OperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Filter sets the optional parameter "filter": The standard list -// filter. -func (c *OperationsListCall) Filter(filter string) *OperationsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// PageSize sets the optional parameter "pageSize": The standard list -// page size. -func (c *OperationsListCall) PageSize(pageSize int64) *OperationsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": The standard list -// page token. -func (c *OperationsListCall) PageToken(pageToken string) *OperationsListCall { - 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 *OperationsListCall) Fields(s ...googleapi.Field) *OperationsListCall { - 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 *OperationsListCall) IfNoneMatch(entityTag string) *OperationsListCall { - 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 *OperationsListCall) Context(ctx context.Context) *OperationsListCall { - 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 *OperationsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *OperationsListCall) 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, "v1beta1/{+name}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "dataproc.operations.list" call. -// Exactly one of *ListOperationsResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *ListOperationsResponse.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 *OperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, 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 := &ListOperationsResponse{ - 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": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns UNIMPLEMENTED.NOTE: the name binding below allows API services to override the binding to use different resource name schemes, such as users/*/operations.", - // "flatPath": "v1beta1/operations", - // "httpMethod": "GET", - // "id": "dataproc.operations.list", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "filter": { - // "description": "The standard list filter.", - // "location": "query", - // "type": "string" - // }, - // "name": { - // "description": "The name of the operation's parent resource.", - // "location": "path", - // "pattern": "^operations$", - // "required": true, - // "type": "string" - // }, - // "pageSize": { - // "description": "The standard list page size.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "The standard list page token.", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "v1beta1/{+name}", - // "response": { - // "$ref": "ListOperationsResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// 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 *OperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) 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 "dataproc.projects.clusters.create": - -type ProjectsClustersCreateCall struct { - s *Service - projectId string - cluster *Cluster - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Create: Creates a cluster in a project. -func (r *ProjectsClustersService) Create(projectId string, cluster *Cluster) *ProjectsClustersCreateCall { - c := &ProjectsClustersCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.projectId = projectId - c.cluster = cluster - 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 *ProjectsClustersCreateCall) Fields(s ...googleapi.Field) *ProjectsClustersCreateCall { - 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 *ProjectsClustersCreateCall) Context(ctx context.Context) *ProjectsClustersCreateCall { - 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 *ProjectsClustersCreateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsClustersCreateCall) 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.cluster) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/clusters") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "projectId": c.projectId, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "dataproc.projects.clusters.create" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.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 *ProjectsClustersCreateCall) Do(opts ...googleapi.CallOption) (*Operation, 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 := &Operation{ - 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": "Creates a cluster in a project.", - // "flatPath": "v1beta1/projects/{projectId}/clusters", - // "httpMethod": "POST", - // "id": "dataproc.projects.clusters.create", - // "parameterOrder": [ - // "projectId" - // ], - // "parameters": { - // "projectId": { - // "description": "Required The ID of the Google Cloud Platform project that the cluster belongs to.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1beta1/projects/{projectId}/clusters", - // "request": { - // "$ref": "Cluster" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "dataproc.projects.clusters.delete": - -type ProjectsClustersDeleteCall struct { - s *Service - projectId string - clusterName string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes a cluster in a project. -func (r *ProjectsClustersService) Delete(projectId string, clusterName string) *ProjectsClustersDeleteCall { - c := &ProjectsClustersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.projectId = projectId - c.clusterName = clusterName - 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 *ProjectsClustersDeleteCall) Fields(s ...googleapi.Field) *ProjectsClustersDeleteCall { - 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 *ProjectsClustersDeleteCall) Context(ctx context.Context) *ProjectsClustersDeleteCall { - 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 *ProjectsClustersDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsClustersDeleteCall) 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 - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/clusters/{clusterName}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("DELETE", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "projectId": c.projectId, - "clusterName": c.clusterName, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "dataproc.projects.clusters.delete" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.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 *ProjectsClustersDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, 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 := &Operation{ - 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": "Deletes a cluster in a project.", - // "flatPath": "v1beta1/projects/{projectId}/clusters/{clusterName}", - // "httpMethod": "DELETE", - // "id": "dataproc.projects.clusters.delete", - // "parameterOrder": [ - // "projectId", - // "clusterName" - // ], - // "parameters": { - // "clusterName": { - // "description": "Required The cluster name.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "projectId": { - // "description": "Required The ID of the Google Cloud Platform project that the cluster belongs to.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1beta1/projects/{projectId}/clusters/{clusterName}", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "dataproc.projects.clusters.diagnose": - -type ProjectsClustersDiagnoseCall struct { - s *Service - projectId string - clusterName string - diagnoseclusterrequest *DiagnoseClusterRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Diagnose: Gets cluster diagnostic information. After the operation -// completes, the Operation.response field contains -// DiagnoseClusterOutputLocation. -func (r *ProjectsClustersService) Diagnose(projectId string, clusterName string, diagnoseclusterrequest *DiagnoseClusterRequest) *ProjectsClustersDiagnoseCall { - c := &ProjectsClustersDiagnoseCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.projectId = projectId - c.clusterName = clusterName - c.diagnoseclusterrequest = diagnoseclusterrequest - 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 *ProjectsClustersDiagnoseCall) Fields(s ...googleapi.Field) *ProjectsClustersDiagnoseCall { - 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 *ProjectsClustersDiagnoseCall) Context(ctx context.Context) *ProjectsClustersDiagnoseCall { - 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 *ProjectsClustersDiagnoseCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsClustersDiagnoseCall) 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.diagnoseclusterrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/clusters/{clusterName}:diagnose") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "projectId": c.projectId, - "clusterName": c.clusterName, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "dataproc.projects.clusters.diagnose" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.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 *ProjectsClustersDiagnoseCall) Do(opts ...googleapi.CallOption) (*Operation, 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 := &Operation{ - 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": "Gets cluster diagnostic information. After the operation completes, the Operation.response field contains DiagnoseClusterOutputLocation.", - // "flatPath": "v1beta1/projects/{projectId}/clusters/{clusterName}:diagnose", - // "httpMethod": "POST", - // "id": "dataproc.projects.clusters.diagnose", - // "parameterOrder": [ - // "projectId", - // "clusterName" - // ], - // "parameters": { - // "clusterName": { - // "description": "Required The cluster name.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "projectId": { - // "description": "Required The ID of the Google Cloud Platform project that the cluster belongs to.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1beta1/projects/{projectId}/clusters/{clusterName}:diagnose", - // "request": { - // "$ref": "DiagnoseClusterRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "dataproc.projects.clusters.get": - -type ProjectsClustersGetCall struct { - s *Service - projectId string - clusterName string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Gets the resource representation for a cluster in a project. -func (r *ProjectsClustersService) Get(projectId string, clusterName string) *ProjectsClustersGetCall { - c := &ProjectsClustersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.projectId = projectId - c.clusterName = clusterName - 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 *ProjectsClustersGetCall) Fields(s ...googleapi.Field) *ProjectsClustersGetCall { - 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 *ProjectsClustersGetCall) IfNoneMatch(entityTag string) *ProjectsClustersGetCall { - 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 *ProjectsClustersGetCall) Context(ctx context.Context) *ProjectsClustersGetCall { - 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 *ProjectsClustersGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsClustersGetCall) 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, "v1beta1/projects/{projectId}/clusters/{clusterName}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "projectId": c.projectId, - "clusterName": c.clusterName, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "dataproc.projects.clusters.get" call. -// Exactly one of *Cluster or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Cluster.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 *ProjectsClustersGetCall) Do(opts ...googleapi.CallOption) (*Cluster, 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 := &Cluster{ - 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": "Gets the resource representation for a cluster in a project.", - // "flatPath": "v1beta1/projects/{projectId}/clusters/{clusterName}", - // "httpMethod": "GET", - // "id": "dataproc.projects.clusters.get", - // "parameterOrder": [ - // "projectId", - // "clusterName" - // ], - // "parameters": { - // "clusterName": { - // "description": "Required The cluster name.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "projectId": { - // "description": "Required The ID of the Google Cloud Platform project that the cluster belongs to.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1beta1/projects/{projectId}/clusters/{clusterName}", - // "response": { - // "$ref": "Cluster" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "dataproc.projects.clusters.list": - -type ProjectsClustersListCall struct { - s *Service - projectId string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists all clusters in a project. -func (r *ProjectsClustersService) List(projectId string) *ProjectsClustersListCall { - c := &ProjectsClustersListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.projectId = projectId - return c -} - -// Filter sets the optional parameter "filter": Optional A filter -// constraining which clusters to list. Valid filters contain label -// terms such as: labels.key1 = val1 AND (-labels.k2 = val2 OR labels.k3 -// = val3) -func (c *ProjectsClustersListCall) Filter(filter string) *ProjectsClustersListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// PageSize sets the optional parameter "pageSize": The standard List -// page size. -func (c *ProjectsClustersListCall) PageSize(pageSize int64) *ProjectsClustersListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": The standard List -// page token. -func (c *ProjectsClustersListCall) PageToken(pageToken string) *ProjectsClustersListCall { - 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 *ProjectsClustersListCall) Fields(s ...googleapi.Field) *ProjectsClustersListCall { - 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 *ProjectsClustersListCall) IfNoneMatch(entityTag string) *ProjectsClustersListCall { - 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 *ProjectsClustersListCall) Context(ctx context.Context) *ProjectsClustersListCall { - 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 *ProjectsClustersListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsClustersListCall) 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, "v1beta1/projects/{projectId}/clusters") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "projectId": c.projectId, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "dataproc.projects.clusters.list" call. -// Exactly one of *ListClustersResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *ListClustersResponse.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 *ProjectsClustersListCall) Do(opts ...googleapi.CallOption) (*ListClustersResponse, 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 := &ListClustersResponse{ - 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": "Lists all clusters in a project.", - // "flatPath": "v1beta1/projects/{projectId}/clusters", - // "httpMethod": "GET", - // "id": "dataproc.projects.clusters.list", - // "parameterOrder": [ - // "projectId" - // ], - // "parameters": { - // "filter": { - // "description": "Optional A filter constraining which clusters to list. Valid filters contain label terms such as: labels.key1 = val1 AND (-labels.k2 = val2 OR labels.k3 = val3)", - // "location": "query", - // "type": "string" - // }, - // "pageSize": { - // "description": "The standard List page size.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "The standard List page token.", - // "location": "query", - // "type": "string" - // }, - // "projectId": { - // "description": "Required The ID of the Google Cloud Platform project that the cluster belongs to.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1beta1/projects/{projectId}/clusters", - // "response": { - // "$ref": "ListClustersResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// 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 *ProjectsClustersListCall) Pages(ctx context.Context, f func(*ListClustersResponse) 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 "dataproc.projects.clusters.patch": - -type ProjectsClustersPatchCall struct { - s *Service - projectId string - clusterName string - cluster *Cluster - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Updates a cluster in a project. -func (r *ProjectsClustersService) Patch(projectId string, clusterName string, cluster *Cluster) *ProjectsClustersPatchCall { - c := &ProjectsClustersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.projectId = projectId - c.clusterName = clusterName - c.cluster = cluster - return c -} - -// UpdateMask sets the optional parameter "updateMask": Required -// Specifies the path, relative to <code>Cluster</code>, of the field to -// update. For example, to change the number of workers in a cluster to -// 5, the <code>update_mask</code> parameter would be specified as -// <code>configuration.worker_configuration.num_instances</code>, and -// the PATCH request body would specify the new value, as follows: -// { -// "configuration":{ -// "workerConfiguration":{ -// "numInstances":"5" -// } -// } -// } -// Similarly, to change the number of preemptible workers in a cluster -// to 5, the <code>update_mask</code> parameter would be -// <code>config.secondary_worker_config.num_instances</code>, and the -// PATCH request body would be set as follows: -// { -// "config":{ -// "secondaryWorkerConfig":{ -// "numInstances":"5" -// } -// } -// } -// <strong>Note:</strong> Currently, -// <code>config.worker_config.num_instances</code> and -// <code>config.secondary_worker_config.num_instances</code> are the -// only fields that can be updated. -func (c *ProjectsClustersPatchCall) UpdateMask(updateMask string) *ProjectsClustersPatchCall { - c.urlParams_.Set("updateMask", updateMask) - 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 *ProjectsClustersPatchCall) Fields(s ...googleapi.Field) *ProjectsClustersPatchCall { - 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 *ProjectsClustersPatchCall) Context(ctx context.Context) *ProjectsClustersPatchCall { - 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 *ProjectsClustersPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsClustersPatchCall) 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.cluster) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/clusters/{clusterName}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("PATCH", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "projectId": c.projectId, - "clusterName": c.clusterName, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "dataproc.projects.clusters.patch" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.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 *ProjectsClustersPatchCall) Do(opts ...googleapi.CallOption) (*Operation, 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 := &Operation{ - 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": "Updates a cluster in a project.", - // "flatPath": "v1beta1/projects/{projectId}/clusters/{clusterName}", - // "httpMethod": "PATCH", - // "id": "dataproc.projects.clusters.patch", - // "parameterOrder": [ - // "projectId", - // "clusterName" - // ], - // "parameters": { - // "clusterName": { - // "description": "Required The cluster name.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "projectId": { - // "description": "Required The ID of the Google Cloud Platform project the cluster belongs to.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "updateMask": { - // "description": "Required Specifies the path, relative to \u003ccode\u003eCluster\u003c/code\u003e, of the field to update. For example, to change the number of workers in a cluster to 5, the \u003ccode\u003eupdate_mask\u003c/code\u003e parameter would be specified as \u003ccode\u003econfiguration.worker_configuration.num_instances\u003c/code\u003e, and the PATCH request body would specify the new value, as follows:\n{\n \"configuration\":{\n \"workerConfiguration\":{\n \"numInstances\":\"5\"\n }\n }\n}\nSimilarly, to change the number of preemptible workers in a cluster to 5, the \u003ccode\u003eupdate_mask\u003c/code\u003e parameter would be \u003ccode\u003econfig.secondary_worker_config.num_instances\u003c/code\u003e, and the PATCH request body would be set as follows:\n{\n \"config\":{\n \"secondaryWorkerConfig\":{\n \"numInstances\":\"5\"\n }\n }\n}\n\u003cstrong\u003eNote:\u003c/strong\u003e Currently, \u003ccode\u003econfig.worker_config.num_instances\u003c/code\u003e and \u003ccode\u003econfig.secondary_worker_config.num_instances\u003c/code\u003e are the only fields that can be updated.", - // "format": "google-fieldmask", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "v1beta1/projects/{projectId}/clusters/{clusterName}", - // "request": { - // "$ref": "Cluster" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "dataproc.projects.jobs.cancel": - -type ProjectsJobsCancelCall struct { - s *Service - projectId string - jobId string - canceljobrequest *CancelJobRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Cancel: Starts a job cancellation request. To access the job resource -// after cancellation, call jobs.list or jobs.get. -func (r *ProjectsJobsService) Cancel(projectId string, jobId string, canceljobrequest *CancelJobRequest) *ProjectsJobsCancelCall { - c := &ProjectsJobsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.projectId = projectId - c.jobId = jobId - c.canceljobrequest = canceljobrequest - 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 *ProjectsJobsCancelCall) Fields(s ...googleapi.Field) *ProjectsJobsCancelCall { - 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 *ProjectsJobsCancelCall) Context(ctx context.Context) *ProjectsJobsCancelCall { - 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 *ProjectsJobsCancelCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsJobsCancelCall) 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.canceljobrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/jobs/{jobId}:cancel") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "projectId": c.projectId, - "jobId": c.jobId, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "dataproc.projects.jobs.cancel" call. -// Exactly one of *Job or error will be non-nil. Any non-2xx status code -// is an error. Response headers are in either -// *Job.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 *ProjectsJobsCancelCall) Do(opts ...googleapi.CallOption) (*Job, 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 := &Job{ - 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": "Starts a job cancellation request. To access the job resource after cancellation, call jobs.list or jobs.get.", - // "flatPath": "v1beta1/projects/{projectId}/jobs/{jobId}:cancel", - // "httpMethod": "POST", - // "id": "dataproc.projects.jobs.cancel", - // "parameterOrder": [ - // "projectId", - // "jobId" - // ], - // "parameters": { - // "jobId": { - // "description": "Required The job ID.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "projectId": { - // "description": "Required The ID of the Google Cloud Platform project that the job belongs to.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1beta1/projects/{projectId}/jobs/{jobId}:cancel", - // "request": { - // "$ref": "CancelJobRequest" - // }, - // "response": { - // "$ref": "Job" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "dataproc.projects.jobs.delete": - -type ProjectsJobsDeleteCall struct { - s *Service - projectId string - jobId string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the job from the project. If the job is active, the -// delete fails, and the response returns FAILED_PRECONDITION. -func (r *ProjectsJobsService) Delete(projectId string, jobId string) *ProjectsJobsDeleteCall { - c := &ProjectsJobsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.projectId = projectId - c.jobId = jobId - 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 *ProjectsJobsDeleteCall) Fields(s ...googleapi.Field) *ProjectsJobsDeleteCall { - 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 *ProjectsJobsDeleteCall) Context(ctx context.Context) *ProjectsJobsDeleteCall { - 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 *ProjectsJobsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsJobsDeleteCall) 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 - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/jobs/{jobId}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("DELETE", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "projectId": c.projectId, - "jobId": c.jobId, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "dataproc.projects.jobs.delete" call. -// Exactly one of *Empty or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Empty.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 *ProjectsJobsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, 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 := &Empty{ - 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": "Deletes the job from the project. If the job is active, the delete fails, and the response returns FAILED_PRECONDITION.", - // "flatPath": "v1beta1/projects/{projectId}/jobs/{jobId}", - // "httpMethod": "DELETE", - // "id": "dataproc.projects.jobs.delete", - // "parameterOrder": [ - // "projectId", - // "jobId" - // ], - // "parameters": { - // "jobId": { - // "description": "Required The job ID.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "projectId": { - // "description": "Required The ID of the Google Cloud Platform project that the job belongs to.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1beta1/projects/{projectId}/jobs/{jobId}", - // "response": { - // "$ref": "Empty" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "dataproc.projects.jobs.get": - -type ProjectsJobsGetCall struct { - s *Service - projectId string - jobId string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Gets the resource representation for a job in a project. -func (r *ProjectsJobsService) Get(projectId string, jobId string) *ProjectsJobsGetCall { - c := &ProjectsJobsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.projectId = projectId - c.jobId = jobId - 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 *ProjectsJobsGetCall) Fields(s ...googleapi.Field) *ProjectsJobsGetCall { - 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 *ProjectsJobsGetCall) IfNoneMatch(entityTag string) *ProjectsJobsGetCall { - 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 *ProjectsJobsGetCall) Context(ctx context.Context) *ProjectsJobsGetCall { - 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 *ProjectsJobsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsJobsGetCall) 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, "v1beta1/projects/{projectId}/jobs/{jobId}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "projectId": c.projectId, - "jobId": c.jobId, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "dataproc.projects.jobs.get" call. -// Exactly one of *Job or error will be non-nil. Any non-2xx status code -// is an error. Response headers are in either -// *Job.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 *ProjectsJobsGetCall) Do(opts ...googleapi.CallOption) (*Job, 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 := &Job{ - 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": "Gets the resource representation for a job in a project.", - // "flatPath": "v1beta1/projects/{projectId}/jobs/{jobId}", - // "httpMethod": "GET", - // "id": "dataproc.projects.jobs.get", - // "parameterOrder": [ - // "projectId", - // "jobId" - // ], - // "parameters": { - // "jobId": { - // "description": "Required The job ID.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "projectId": { - // "description": "Required The ID of the Google Cloud Platform project that the job belongs to.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1beta1/projects/{projectId}/jobs/{jobId}", - // "response": { - // "$ref": "Job" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "dataproc.projects.jobs.list": - -type ProjectsJobsListCall struct { - s *Service - projectId string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists jobs in a project. -func (r *ProjectsJobsService) List(projectId string) *ProjectsJobsListCall { - c := &ProjectsJobsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.projectId = projectId - return c -} - -// ClusterName sets the optional parameter "clusterName": Optional If -// set, the returned jobs list includes only jobs that were submitted to -// the named cluster. -func (c *ProjectsJobsListCall) ClusterName(clusterName string) *ProjectsJobsListCall { - c.urlParams_.Set("clusterName", clusterName) - return c -} - -// Filter sets the optional parameter "filter": Optional A filter -// constraining which jobs to list. Valid filters contain job state and -// label terms such as: labels.key1 = val1 AND (labels.k2 = val2 OR -// labels.k3 = val3) -func (c *ProjectsJobsListCall) Filter(filter string) *ProjectsJobsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// JobStateMatcher sets the optional parameter "jobStateMatcher": -// Optional Specifies enumerated categories of jobs to list. -// -// Possible values: -// "ALL" -// "ACTIVE" -// "NON_ACTIVE" -func (c *ProjectsJobsListCall) JobStateMatcher(jobStateMatcher string) *ProjectsJobsListCall { - c.urlParams_.Set("jobStateMatcher", jobStateMatcher) - return c -} - -// PageSize sets the optional parameter "pageSize": Optional The number -// of results to return in each response. -func (c *ProjectsJobsListCall) PageSize(pageSize int64) *ProjectsJobsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": Optional The page -// token, returned by a previous call, to request the next page of -// results. -func (c *ProjectsJobsListCall) PageToken(pageToken string) *ProjectsJobsListCall { - 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 *ProjectsJobsListCall) Fields(s ...googleapi.Field) *ProjectsJobsListCall { - 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 *ProjectsJobsListCall) IfNoneMatch(entityTag string) *ProjectsJobsListCall { - 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 *ProjectsJobsListCall) Context(ctx context.Context) *ProjectsJobsListCall { - 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 *ProjectsJobsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsJobsListCall) 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, "v1beta1/projects/{projectId}/jobs") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "projectId": c.projectId, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "dataproc.projects.jobs.list" call. -// Exactly one of *ListJobsResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *ListJobsResponse.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 *ProjectsJobsListCall) Do(opts ...googleapi.CallOption) (*ListJobsResponse, 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 := &ListJobsResponse{ - 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": "Lists jobs in a project.", - // "flatPath": "v1beta1/projects/{projectId}/jobs", - // "httpMethod": "GET", - // "id": "dataproc.projects.jobs.list", - // "parameterOrder": [ - // "projectId" - // ], - // "parameters": { - // "clusterName": { - // "description": "Optional If set, the returned jobs list includes only jobs that were submitted to the named cluster.", - // "location": "query", - // "type": "string" - // }, - // "filter": { - // "description": "Optional A filter constraining which jobs to list. Valid filters contain job state and label terms such as: labels.key1 = val1 AND (labels.k2 = val2 OR labels.k3 = val3)", - // "location": "query", - // "type": "string" - // }, - // "jobStateMatcher": { - // "description": "Optional Specifies enumerated categories of jobs to list.", - // "enum": [ - // "ALL", - // "ACTIVE", - // "NON_ACTIVE" - // ], - // "location": "query", - // "type": "string" - // }, - // "pageSize": { - // "description": "Optional The number of results to return in each response.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "Optional The page token, returned by a previous call, to request the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "projectId": { - // "description": "Required The ID of the Google Cloud Platform project that the job belongs to.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1beta1/projects/{projectId}/jobs", - // "response": { - // "$ref": "ListJobsResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// 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 *ProjectsJobsListCall) Pages(ctx context.Context, f func(*ListJobsResponse) 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 "dataproc.projects.jobs.patch": - -type ProjectsJobsPatchCall struct { - s *Service - projectId string - jobId string - job *Job - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Updates a job in a project. -func (r *ProjectsJobsService) Patch(projectId string, jobId string, job *Job) *ProjectsJobsPatchCall { - c := &ProjectsJobsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.projectId = projectId - c.jobId = jobId - c.job = job - return c -} - -// UpdateMask sets the optional parameter "updateMask": Required -// Specifies the path, relative to <code>Job</code>, of the field to -// update. For example, to update the labels of a Job the -// <code>update_mask</code> parameter would be specified as -// <code>labels</code>, and the PATCH request body would specify the new -// value. <strong>Note:</strong> Currently, <code>labels</code> is the -// only field that can be updated. -func (c *ProjectsJobsPatchCall) UpdateMask(updateMask string) *ProjectsJobsPatchCall { - c.urlParams_.Set("updateMask", updateMask) - 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 *ProjectsJobsPatchCall) Fields(s ...googleapi.Field) *ProjectsJobsPatchCall { - 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 *ProjectsJobsPatchCall) Context(ctx context.Context) *ProjectsJobsPatchCall { - 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 *ProjectsJobsPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsJobsPatchCall) 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.job) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/jobs/{jobId}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("PATCH", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "projectId": c.projectId, - "jobId": c.jobId, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "dataproc.projects.jobs.patch" call. -// Exactly one of *Job or error will be non-nil. Any non-2xx status code -// is an error. Response headers are in either -// *Job.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 *ProjectsJobsPatchCall) Do(opts ...googleapi.CallOption) (*Job, 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 := &Job{ - 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": "Updates a job in a project.", - // "flatPath": "v1beta1/projects/{projectId}/jobs/{jobId}", - // "httpMethod": "PATCH", - // "id": "dataproc.projects.jobs.patch", - // "parameterOrder": [ - // "projectId", - // "jobId" - // ], - // "parameters": { - // "jobId": { - // "description": "Required The job ID.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "projectId": { - // "description": "Required The ID of the Google Cloud Platform project that the job belongs to.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "updateMask": { - // "description": "Required Specifies the path, relative to \u003ccode\u003eJob\u003c/code\u003e, of the field to update. For example, to update the labels of a Job the \u003ccode\u003eupdate_mask\u003c/code\u003e parameter would be specified as \u003ccode\u003elabels\u003c/code\u003e, and the PATCH request body would specify the new value. \u003cstrong\u003eNote:\u003c/strong\u003e Currently, \u003ccode\u003elabels\u003c/code\u003e is the only field that can be updated.", - // "format": "google-fieldmask", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "v1beta1/projects/{projectId}/jobs/{jobId}", - // "request": { - // "$ref": "Job" - // }, - // "response": { - // "$ref": "Job" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "dataproc.projects.jobs.submit": - -type ProjectsJobsSubmitCall struct { - s *Service - projectId string - submitjobrequest *SubmitJobRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Submit: Submits a job to a cluster. -func (r *ProjectsJobsService) Submit(projectId string, submitjobrequest *SubmitJobRequest) *ProjectsJobsSubmitCall { - c := &ProjectsJobsSubmitCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.projectId = projectId - c.submitjobrequest = submitjobrequest - 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 *ProjectsJobsSubmitCall) Fields(s ...googleapi.Field) *ProjectsJobsSubmitCall { - 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 *ProjectsJobsSubmitCall) Context(ctx context.Context) *ProjectsJobsSubmitCall { - 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 *ProjectsJobsSubmitCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsJobsSubmitCall) 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.submitjobrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/jobs:submit") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "projectId": c.projectId, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "dataproc.projects.jobs.submit" call. -// Exactly one of *Job or error will be non-nil. Any non-2xx status code -// is an error. Response headers are in either -// *Job.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 *ProjectsJobsSubmitCall) Do(opts ...googleapi.CallOption) (*Job, 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 := &Job{ - 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": "Submits a job to a cluster.", - // "flatPath": "v1beta1/projects/{projectId}/jobs:submit", - // "httpMethod": "POST", - // "id": "dataproc.projects.jobs.submit", - // "parameterOrder": [ - // "projectId" - // ], - // "parameters": { - // "projectId": { - // "description": "Required The ID of the Google Cloud Platform project that the job belongs to.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1beta1/projects/{projectId}/jobs:submit", - // "request": { - // "$ref": "SubmitJobRequest" - // }, - // "response": { - // "$ref": "Job" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -}
diff --git a/dlp/v2beta1/dlp-gen.go b/dlp/v2beta1/dlp-gen.go deleted file mode 100644 index 7942029..0000000 --- a/dlp/v2beta1/dlp-gen.go +++ /dev/null
@@ -1,7248 +0,0 @@ -// Package dlp provides access to the Cloud Data Loss Prevention (DLP) API. -// -// See https://cloud.google.com/dlp/docs/ -// -// Usage example: -// -// import "google.golang.org/api/dlp/v2beta1" -// ... -// dlpService, err := dlp.New(oauthHttpClient) -package dlp // import "google.golang.org/api/dlp/v2beta1" - -import ( - "bytes" - "context" - "encoding/json" - "errors" - "fmt" - "io" - "net/http" - "net/url" - "strconv" - "strings" - - gensupport "google.golang.org/api/gensupport" - googleapi "google.golang.org/api/googleapi" -) - -// Always reference these packages, just in case the auto-generated code -// below doesn't. -var _ = bytes.NewBuffer -var _ = strconv.Itoa -var _ = fmt.Sprintf -var _ = json.NewDecoder -var _ = io.Copy -var _ = url.Parse -var _ = gensupport.MarshalJSON -var _ = googleapi.Version -var _ = errors.New -var _ = strings.Replace -var _ = context.Canceled - -const apiId = "dlp:v2beta1" -const apiName = "dlp" -const apiVersion = "v2beta1" -const basePath = "https://dlp.googleapis.com/" - -// OAuth2 scopes used by this API. -const ( - // View and manage your data across Google Cloud Platform services - CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform" -) - -func New(client *http.Client) (*Service, error) { - if client == nil { - return nil, errors.New("client is nil") - } - s := &Service{client: client, BasePath: basePath} - s.Content = NewContentService(s) - s.DataSource = NewDataSourceService(s) - s.Inspect = NewInspectService(s) - s.RiskAnalysis = NewRiskAnalysisService(s) - s.RootCategories = NewRootCategoriesService(s) - return s, nil -} - -type Service struct { - client *http.Client - BasePath string // API endpoint base URL - UserAgent string // optional additional User-Agent fragment - - Content *ContentService - - DataSource *DataSourceService - - Inspect *InspectService - - RiskAnalysis *RiskAnalysisService - - RootCategories *RootCategoriesService -} - -func (s *Service) userAgent() string { - if s.UserAgent == "" { - return googleapi.UserAgent - } - return googleapi.UserAgent + " " + s.UserAgent -} - -func NewContentService(s *Service) *ContentService { - rs := &ContentService{s: s} - return rs -} - -type ContentService struct { - s *Service -} - -func NewDataSourceService(s *Service) *DataSourceService { - rs := &DataSourceService{s: s} - return rs -} - -type DataSourceService struct { - s *Service -} - -func NewInspectService(s *Service) *InspectService { - rs := &InspectService{s: s} - rs.Operations = NewInspectOperationsService(s) - rs.Results = NewInspectResultsService(s) - return rs -} - -type InspectService struct { - s *Service - - Operations *InspectOperationsService - - Results *InspectResultsService -} - -func NewInspectOperationsService(s *Service) *InspectOperationsService { - rs := &InspectOperationsService{s: s} - return rs -} - -type InspectOperationsService struct { - s *Service -} - -func NewInspectResultsService(s *Service) *InspectResultsService { - rs := &InspectResultsService{s: s} - rs.Findings = NewInspectResultsFindingsService(s) - return rs -} - -type InspectResultsService struct { - s *Service - - Findings *InspectResultsFindingsService -} - -func NewInspectResultsFindingsService(s *Service) *InspectResultsFindingsService { - rs := &InspectResultsFindingsService{s: s} - return rs -} - -type InspectResultsFindingsService struct { - s *Service -} - -func NewRiskAnalysisService(s *Service) *RiskAnalysisService { - rs := &RiskAnalysisService{s: s} - rs.Operations = NewRiskAnalysisOperationsService(s) - return rs -} - -type RiskAnalysisService struct { - s *Service - - Operations *RiskAnalysisOperationsService -} - -func NewRiskAnalysisOperationsService(s *Service) *RiskAnalysisOperationsService { - rs := &RiskAnalysisOperationsService{s: s} - return rs -} - -type RiskAnalysisOperationsService struct { - s *Service -} - -func NewRootCategoriesService(s *Service) *RootCategoriesService { - rs := &RootCategoriesService{s: s} - rs.InfoTypes = NewRootCategoriesInfoTypesService(s) - return rs -} - -type RootCategoriesService struct { - s *Service - - InfoTypes *RootCategoriesInfoTypesService -} - -func NewRootCategoriesInfoTypesService(s *Service) *RootCategoriesInfoTypesService { - rs := &RootCategoriesInfoTypesService{s: s} - return rs -} - -type RootCategoriesInfoTypesService struct { - s *Service -} - -// GoogleLongrunningCancelOperationRequest: The request message for -// Operations.CancelOperation. -type GoogleLongrunningCancelOperationRequest struct { -} - -// GoogleLongrunningListOperationsResponse: The response message for -// Operations.ListOperations. -type GoogleLongrunningListOperationsResponse struct { - // NextPageToken: The standard List next-page token. - NextPageToken string `json:"nextPageToken,omitempty"` - - // Operations: A list of operations that matches the specified filter in - // the request. - Operations []*GoogleLongrunningOperation `json:"operations,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "NextPageToken") 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. "NextPageToken") 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 *GoogleLongrunningListOperationsResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleLongrunningListOperationsResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GoogleLongrunningOperation: This resource represents a long-running -// operation that is the result of a -// network API call. -type GoogleLongrunningOperation struct { - // Done: If the value is `false`, it means the operation is still in - // progress. - // If `true`, the operation is completed, and either `error` or - // `response` is - // available. - Done bool `json:"done,omitempty"` - - // Error: The error result of the operation in case of failure or - // cancellation. - Error *GoogleRpcStatus `json:"error,omitempty"` - - // Metadata: This field will contain an InspectOperationMetadata object - // for `inspect.operations.create` or a RiskAnalysisOperationMetadata - // object for `dataSource.analyze`. This will always be returned with - // the Operation. - Metadata googleapi.RawMessage `json:"metadata,omitempty"` - - // Name: The server-assigned name. The `name` should have the format of - // `inspect/operations/<identifier>`. - Name string `json:"name,omitempty"` - - // Response: This field will contain an InspectOperationResult object - // for `inspect.operations.create` or a RiskAnalysisOperationResult - // object for `dataSource.analyze`. - Response googleapi.RawMessage `json:"response,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Done") 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. "Done") 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 *GoogleLongrunningOperation) MarshalJSON() ([]byte, error) { - type NoMethod GoogleLongrunningOperation - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta1AnalyzeDataSourceRiskRequest: Request for -// creating a risk analysis operation. -type GooglePrivacyDlpV2beta1AnalyzeDataSourceRiskRequest struct { - // PrivacyMetric: Privacy metric to compute. - PrivacyMetric *GooglePrivacyDlpV2beta1PrivacyMetric `json:"privacyMetric,omitempty"` - - // SourceTable: Input dataset to compute metrics over. - SourceTable *GooglePrivacyDlpV2beta1BigQueryTable `json:"sourceTable,omitempty"` - - // ForceSendFields is a list of field names (e.g. "PrivacyMetric") 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. "PrivacyMetric") 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 *GooglePrivacyDlpV2beta1AnalyzeDataSourceRiskRequest) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta1AnalyzeDataSourceRiskRequest - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta1AuxiliaryTable: An auxiliary table contains -// statistical information on the relative -// frequency of different quasi-identifiers values. It has one or -// several -// quasi-identifiers columns, and one column that indicates the -// relative -// frequency of each quasi-identifier tuple. -// If a tuple is present in the data but not in the auxiliary table, -// the -// corresponding relative frequency is assumed to be zero (and thus, -// the -// tuple is highly reidentifiable). -type GooglePrivacyDlpV2beta1AuxiliaryTable struct { - // QuasiIds: Quasi-identifier columns. [required] - QuasiIds []*GooglePrivacyDlpV2beta1QuasiIdField `json:"quasiIds,omitempty"` - - // RelativeFrequency: The relative frequency column must contain a - // floating-point number - // between 0 and 1 (inclusive). Null values are assumed to be - // zero. - // [required] - RelativeFrequency *GooglePrivacyDlpV2beta1FieldId `json:"relativeFrequency,omitempty"` - - // Table: Auxiliary table location. [required] - Table *GooglePrivacyDlpV2beta1BigQueryTable `json:"table,omitempty"` - - // ForceSendFields is a list of field names (e.g. "QuasiIds") 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. "QuasiIds") 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 *GooglePrivacyDlpV2beta1AuxiliaryTable) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta1AuxiliaryTable - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta1BigQueryKey: LINT.IfChange -// Row key for identifying a record in BigQuery table. -type GooglePrivacyDlpV2beta1BigQueryKey struct { - // RowNumber: Absolute number of the row from the beginning of the table - // at the time - // of scanning. - RowNumber int64 `json:"rowNumber,omitempty,string"` - - // TableReference: Complete BigQuery table reference. - TableReference *GooglePrivacyDlpV2beta1BigQueryTable `json:"tableReference,omitempty"` - - // ForceSendFields is a list of field names (e.g. "RowNumber") 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. "RowNumber") 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 *GooglePrivacyDlpV2beta1BigQueryKey) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta1BigQueryKey - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta1BigQueryOptions: Options defining BigQuery -// table and row identifiers. -type GooglePrivacyDlpV2beta1BigQueryOptions struct { - // IdentifyingFields: References to fields uniquely identifying rows - // within the table. - // Nested fields in the format, like `person.birthdate.year`, are - // allowed. - IdentifyingFields []*GooglePrivacyDlpV2beta1FieldId `json:"identifyingFields,omitempty"` - - // TableReference: Complete BigQuery table reference. - TableReference *GooglePrivacyDlpV2beta1BigQueryTable `json:"tableReference,omitempty"` - - // ForceSendFields is a list of field names (e.g. "IdentifyingFields") - // 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. "IdentifyingFields") 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 *GooglePrivacyDlpV2beta1BigQueryOptions) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta1BigQueryOptions - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta1BigQueryTable: Message defining the location -// of a BigQuery table. A table is uniquely -// identified by its project_id, dataset_id, and table_name. Within a -// query -// a table is often referenced with a string in the format -// of: -// `<project_id>:<dataset_id>.<table_id>` -// or -// `<project_id>.<dataset_id>.<table_id>`. -type GooglePrivacyDlpV2beta1BigQueryTable struct { - // DatasetId: Dataset ID of the table. - DatasetId string `json:"datasetId,omitempty"` - - // ProjectId: The Google Cloud Platform project ID of the project - // containing the table. - // If omitted, project ID is inferred from the API call. - ProjectId string `json:"projectId,omitempty"` - - // TableId: Name of the table. - TableId string `json:"tableId,omitempty"` - - // ForceSendFields is a list of field names (e.g. "DatasetId") 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. "DatasetId") 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 *GooglePrivacyDlpV2beta1BigQueryTable) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta1BigQueryTable - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta1Bucket: Buckets represented as ranges, along -// with replacement values. Ranges must -// be non-overlapping. -type GooglePrivacyDlpV2beta1Bucket struct { - // Max: Upper bound of the range, exclusive; type must match min. - Max *GooglePrivacyDlpV2beta1Value `json:"max,omitempty"` - - // Min: Lower bound of the range, inclusive. Type should be the same as - // max if - // used. - Min *GooglePrivacyDlpV2beta1Value `json:"min,omitempty"` - - // ReplacementValue: Replacement value for this bucket. If not - // provided - // the default behavior will be to hyphenate the min-max range. - ReplacementValue *GooglePrivacyDlpV2beta1Value `json:"replacementValue,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Max") 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. "Max") 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 *GooglePrivacyDlpV2beta1Bucket) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta1Bucket - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta1BucketingConfig: Generalization function that -// buckets values based on ranges. The ranges and -// replacement values are dynamically provided by the user for custom -// behavior, -// such as 1-30 -> LOW 31-65 -> MEDIUM 66-100 -> HIGH -// This can be used on -// data of type: number, long, string, timestamp. -// If the bound `Value` type differs from the type of data being -// transformed, we -// will first attempt converting the type of the data to be transformed -// to match -// the type of the bound before comparing. -type GooglePrivacyDlpV2beta1BucketingConfig struct { - Buckets []*GooglePrivacyDlpV2beta1Bucket `json:"buckets,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Buckets") 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. "Buckets") 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 *GooglePrivacyDlpV2beta1BucketingConfig) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta1BucketingConfig - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta1CategoricalStatsConfig: Compute numerical -// stats over an individual column, including -// number of distinct values and value count distribution. -type GooglePrivacyDlpV2beta1CategoricalStatsConfig struct { - // Field: Field to compute categorical stats on. All column types - // are - // supported except for arrays and structs. However, it may be - // more - // informative to use NumericalStats when the field type is - // supported, - // depending on the data. - Field *GooglePrivacyDlpV2beta1FieldId `json:"field,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Field") 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. "Field") 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 *GooglePrivacyDlpV2beta1CategoricalStatsConfig) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta1CategoricalStatsConfig - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta1CategoricalStatsHistogramBucket: Histogram -// bucket of value frequencies in the column. -type GooglePrivacyDlpV2beta1CategoricalStatsHistogramBucket struct { - // BucketSize: Total number of records in this bucket. - BucketSize int64 `json:"bucketSize,omitempty,string"` - - // BucketValues: Sample of value frequencies in this bucket. The total - // number of - // values returned per bucket is capped at 20. - BucketValues []*GooglePrivacyDlpV2beta1ValueFrequency `json:"bucketValues,omitempty"` - - // ValueFrequencyLowerBound: Lower bound on the value frequency of the - // values in this bucket. - ValueFrequencyLowerBound int64 `json:"valueFrequencyLowerBound,omitempty,string"` - - // ValueFrequencyUpperBound: Upper bound on the value frequency of the - // values in this bucket. - ValueFrequencyUpperBound int64 `json:"valueFrequencyUpperBound,omitempty,string"` - - // ForceSendFields is a list of field names (e.g. "BucketSize") 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. "BucketSize") 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 *GooglePrivacyDlpV2beta1CategoricalStatsHistogramBucket) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta1CategoricalStatsHistogramBucket - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta1CategoricalStatsResult: Result of the -// categorical stats computation. -type GooglePrivacyDlpV2beta1CategoricalStatsResult struct { - // ValueFrequencyHistogramBuckets: Histogram of value frequencies in the - // column. - ValueFrequencyHistogramBuckets []*GooglePrivacyDlpV2beta1CategoricalStatsHistogramBucket `json:"valueFrequencyHistogramBuckets,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "ValueFrequencyHistogramBuckets") 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. - // "ValueFrequencyHistogramBuckets") 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 *GooglePrivacyDlpV2beta1CategoricalStatsResult) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta1CategoricalStatsResult - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta1CategoryDescription: Info Type Category -// description. -type GooglePrivacyDlpV2beta1CategoryDescription struct { - // DisplayName: Human readable form of the category name. - DisplayName string `json:"displayName,omitempty"` - - // Name: Internal name of the category. - Name string `json:"name,omitempty"` - - // ForceSendFields is a list of field names (e.g. "DisplayName") 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. "DisplayName") 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 *GooglePrivacyDlpV2beta1CategoryDescription) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta1CategoryDescription - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta1CharacterMaskConfig: Partially mask a string -// by replacing a given number of characters with a -// fixed character. Masking can start from the beginning or end of the -// string. -// This can be used on data of any type (numbers, longs, and so on) and -// when -// de-identifying structured data we'll attempt to preserve the original -// data's -// type. (This allows you to take a long like 123 and modify it to a -// string like -// **3. -type GooglePrivacyDlpV2beta1CharacterMaskConfig struct { - // CharactersToIgnore: When masking a string, items in this list will be - // skipped when replacing. - // For example, if your string is 555-555-5555 and you ask us to skip - // `-` and - // mask 5 chars with * we would produce ***-*55-5555. - CharactersToIgnore []*GooglePrivacyDlpV2beta1CharsToIgnore `json:"charactersToIgnore,omitempty"` - - // MaskingCharacter: Character to mask the sensitive values—for - // example, "*" for an - // alphabetic string such as name, or "0" for a numeric string such as - // ZIP - // code or credit card number. String must have length 1. If not - // supplied, we - // will default to "*" for strings, 0 for digits. - MaskingCharacter string `json:"maskingCharacter,omitempty"` - - // NumberToMask: Number of characters to mask. If not set, all matching - // chars will be - // masked. Skipped characters do not count towards this tally. - NumberToMask int64 `json:"numberToMask,omitempty"` - - // ReverseOrder: Mask characters in reverse order. For example, if - // `masking_character` is - // '0', number_to_mask is 14, and `reverse_order` is false, - // then - // 1234-5678-9012-3456 -> 00000000000000-3456 - // If `masking_character` is '*', `number_to_mask` is 3, and - // `reverse_order` - // is true, then 12345 -> 12*** - ReverseOrder bool `json:"reverseOrder,omitempty"` - - // ForceSendFields is a list of field names (e.g. "CharactersToIgnore") - // 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. "CharactersToIgnore") 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 *GooglePrivacyDlpV2beta1CharacterMaskConfig) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta1CharacterMaskConfig - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta1CharsToIgnore: Characters to skip when doing -// deidentification of a value. These will be left -// alone and skipped. -type GooglePrivacyDlpV2beta1CharsToIgnore struct { - CharactersToSkip string `json:"charactersToSkip,omitempty"` - - // Possible values: - // "CHARACTER_GROUP_UNSPECIFIED" - // "NUMERIC" - 0-9 - // "ALPHA_UPPER_CASE" - A-Z - // "ALPHA_LOWER_CASE" - a-z - // "PUNCTUATION" - US Punctuation, one of - // !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~ - // "WHITESPACE" - Whitespace character, one of [ \t\n\x0B\f\r] - CommonCharactersToIgnore string `json:"commonCharactersToIgnore,omitempty"` - - // ForceSendFields is a list of field names (e.g. "CharactersToSkip") 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. "CharactersToSkip") 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 *GooglePrivacyDlpV2beta1CharsToIgnore) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta1CharsToIgnore - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta1CloudStorageKey: Record key for a finding in a -// Cloud Storage file. -type GooglePrivacyDlpV2beta1CloudStorageKey struct { - // FilePath: Path to the file. - FilePath string `json:"filePath,omitempty"` - - // StartOffset: Byte offset of the referenced data in the file. - StartOffset int64 `json:"startOffset,omitempty,string"` - - // ForceSendFields is a list of field names (e.g. "FilePath") 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. "FilePath") 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 *GooglePrivacyDlpV2beta1CloudStorageKey) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta1CloudStorageKey - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta1CloudStorageOptions: Options defining a file -// or a set of files (path ending with *) within -// a Google Cloud Storage bucket. -type GooglePrivacyDlpV2beta1CloudStorageOptions struct { - FileSet *GooglePrivacyDlpV2beta1FileSet `json:"fileSet,omitempty"` - - // ForceSendFields is a list of field names (e.g. "FileSet") 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. "FileSet") 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 *GooglePrivacyDlpV2beta1CloudStorageOptions) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta1CloudStorageOptions - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta1CloudStoragePath: A location in Cloud Storage. -type GooglePrivacyDlpV2beta1CloudStoragePath struct { - // Path: The url, in the format of `gs://bucket/<path>`. - Path string `json:"path,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Path") 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. "Path") 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 *GooglePrivacyDlpV2beta1CloudStoragePath) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta1CloudStoragePath - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta1Color: Represents a color in the RGB color -// space. -type GooglePrivacyDlpV2beta1Color struct { - // Blue: The amount of blue in the color as a value in the interval [0, - // 1]. - Blue float64 `json:"blue,omitempty"` - - // Green: The amount of green in the color as a value in the interval - // [0, 1]. - Green float64 `json:"green,omitempty"` - - // Red: The amount of red in the color as a value in the interval [0, - // 1]. - Red float64 `json:"red,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Blue") 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. "Blue") 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 *GooglePrivacyDlpV2beta1Color) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta1Color - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *GooglePrivacyDlpV2beta1Color) UnmarshalJSON(data []byte) error { - type NoMethod GooglePrivacyDlpV2beta1Color - var s1 struct { - Blue gensupport.JSONFloat64 `json:"blue"` - Green gensupport.JSONFloat64 `json:"green"` - Red gensupport.JSONFloat64 `json:"red"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.Blue = float64(s1.Blue) - s.Green = float64(s1.Green) - s.Red = float64(s1.Red) - return nil -} - -// GooglePrivacyDlpV2beta1Condition: The field type of `value` and -// `field` do not need to match to be -// considered equal, but not all comparisons are possible. -// -// A `value` of type: -// -// - `string` can be compared against all other types -// - `boolean` can only be compared against other booleans -// - `integer` can be compared against doubles or a string if the string -// value -// can be parsed as an integer. -// - `double` can be compared against integers or a string if the string -// can -// be parsed as a double. -// - `Timestamp` can be compared against strings in RFC 3339 date -// string -// format. -// - `TimeOfDay` can be compared against timestamps and strings in the -// format -// of 'HH:mm:ss'. -// -// If we fail to compare do to type mismatch, a warning will be given -// and -// the condition will evaluate to false. -type GooglePrivacyDlpV2beta1Condition struct { - // Field: Field within the record this condition is evaluated against. - // [required] - Field *GooglePrivacyDlpV2beta1FieldId `json:"field,omitempty"` - - // Operator: Operator used to compare the field or info type to the - // value. [required] - // - // Possible values: - // "RELATIONAL_OPERATOR_UNSPECIFIED" - // "EQUAL_TO" - Equal. - // "NOT_EQUAL_TO" - Not equal to. - // "GREATER_THAN" - Greater than. - // "LESS_THAN" - Less than. - // "GREATER_THAN_OR_EQUALS" - Greater than or equals. - // "LESS_THAN_OR_EQUALS" - Less than or equals. - // "EXISTS" - Exists - Operator string `json:"operator,omitempty"` - - // Value: Value to compare against. [Required, except for `EXISTS` - // tests.] - Value *GooglePrivacyDlpV2beta1Value `json:"value,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Field") 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. "Field") 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 *GooglePrivacyDlpV2beta1Condition) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta1Condition - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type GooglePrivacyDlpV2beta1Conditions struct { - Conditions []*GooglePrivacyDlpV2beta1Condition `json:"conditions,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Conditions") 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. "Conditions") 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 *GooglePrivacyDlpV2beta1Conditions) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta1Conditions - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta1ContentItem: Container structure for the -// content to inspect. -type GooglePrivacyDlpV2beta1ContentItem struct { - // Data: Content data to inspect or redact. - Data string `json:"data,omitempty"` - - // Table: Structured content for inspection. - Table *GooglePrivacyDlpV2beta1Table `json:"table,omitempty"` - - // Type: Type of the content, as defined in Content-Type HTTP - // header. - // Supported types are: all "text" types, octet streams, PNG - // images, - // JPEG images. - Type string `json:"type,omitempty"` - - // Value: String data to inspect or redact. - Value string `json:"value,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Data") 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. "Data") 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 *GooglePrivacyDlpV2beta1ContentItem) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta1ContentItem - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta1CreateInspectOperationRequest: Request for -// scheduling a scan of a data subset from a Google Platform -// data -// repository. -type GooglePrivacyDlpV2beta1CreateInspectOperationRequest struct { - // InspectConfig: Configuration for the inspector. - InspectConfig *GooglePrivacyDlpV2beta1InspectConfig `json:"inspectConfig,omitempty"` - - // OperationConfig: Additional configuration settings for long running - // operations. - OperationConfig *GooglePrivacyDlpV2beta1OperationConfig `json:"operationConfig,omitempty"` - - // OutputConfig: Optional location to store findings. - OutputConfig *GooglePrivacyDlpV2beta1OutputStorageConfig `json:"outputConfig,omitempty"` - - // StorageConfig: Specification of the data set to process. - StorageConfig *GooglePrivacyDlpV2beta1StorageConfig `json:"storageConfig,omitempty"` - - // ForceSendFields is a list of field names (e.g. "InspectConfig") 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. "InspectConfig") 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 *GooglePrivacyDlpV2beta1CreateInspectOperationRequest) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta1CreateInspectOperationRequest - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta1CryptoHashConfig: Pseudonymization method that -// generates surrogates via cryptographic hashing. -// Uses SHA-256. -// Outputs a 32 byte digest as an uppercase hex string -// (for example, 41D1567F7F99F1DC2A5FAB886DEE5BEE). -// Currently, only string and integer values can be hashed. -type GooglePrivacyDlpV2beta1CryptoHashConfig struct { - // CryptoKey: The key used by the hash function. - CryptoKey *GooglePrivacyDlpV2beta1CryptoKey `json:"cryptoKey,omitempty"` - - // ForceSendFields is a list of field names (e.g. "CryptoKey") 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. "CryptoKey") 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 *GooglePrivacyDlpV2beta1CryptoHashConfig) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta1CryptoHashConfig - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta1CryptoKey: This is a data encryption key (DEK) -// (as opposed to -// a key encryption key (KEK) stored by KMS). -// When using KMS to wrap/unwrap DEKs, be sure to set an appropriate -// IAM policy on the KMS CryptoKey (KEK) to ensure an attacker -// cannot -// unwrap the data crypto key. -type GooglePrivacyDlpV2beta1CryptoKey struct { - KmsWrapped *GooglePrivacyDlpV2beta1KmsWrappedCryptoKey `json:"kmsWrapped,omitempty"` - - Transient *GooglePrivacyDlpV2beta1TransientCryptoKey `json:"transient,omitempty"` - - Unwrapped *GooglePrivacyDlpV2beta1UnwrappedCryptoKey `json:"unwrapped,omitempty"` - - // ForceSendFields is a list of field names (e.g. "KmsWrapped") 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. "KmsWrapped") 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 *GooglePrivacyDlpV2beta1CryptoKey) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta1CryptoKey - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta1CryptoReplaceFfxFpeConfig: Replaces an -// identifier with a surrogate using FPE with the FFX -// mode of operation. -// The identifier must be representable by the US-ASCII character -// set. -// For a given crypto key and context, the same identifier will -// be -// replaced with the same surrogate. -// Identifiers must be at least two characters long. -// In the case that the identifier is the empty string, it will be -// skipped. -type GooglePrivacyDlpV2beta1CryptoReplaceFfxFpeConfig struct { - // Possible values: - // "FFX_COMMON_NATIVE_ALPHABET_UNSPECIFIED" - // "NUMERIC" - [0-9] (radix of 10) - // "HEXADECIMAL" - [0-9A-F] (radix of 16) - // "UPPER_CASE_ALPHA_NUMERIC" - [0-9A-Z] (radix of 36) - // "ALPHA_NUMERIC" - [0-9A-Za-z] (radix of 62) - CommonAlphabet string `json:"commonAlphabet,omitempty"` - - // Context: A context may be used for higher security since the - // same - // identifier in two different contexts likely will be given a - // distinct - // surrogate. The principle is that the likeliness is inversely - // related - // to the ratio of the number of distinct identifiers per context over - // the - // number of possible surrogates: As long as this ratio is small, - // the - // likehood is large. - // - // If the context is not set, a default tweak will be used. - // If the context is set but: - // - // 1. there is no record present when transforming a given value or - // 1. the field is not present when transforming a given value, - // - // a default tweak will be used. - // - // Note that case (1) is expected when an `InfoTypeTransformation` - // is - // applied to both structured and non-structured - // `ContentItem`s. - // Currently, the referenced field may be of value type integer or - // string. - // - // The tweak is constructed as a sequence of bytes in big endian byte - // order - // such that: - // - // - a 64 bit integer is encoded followed by a single byte of value 1 - // - a string is encoded in UTF-8 format followed by a single byte of - // value 2 - // - // This is also known as the 'tweak', as in tweakable encryption. - Context *GooglePrivacyDlpV2beta1FieldId `json:"context,omitempty"` - - // CryptoKey: The key used by the encryption algorithm. [required] - CryptoKey *GooglePrivacyDlpV2beta1CryptoKey `json:"cryptoKey,omitempty"` - - // CustomAlphabet: This is supported by mapping these to the - // alphanumeric characters - // that the FFX mode natively supports. This happens - // before/after - // encryption/decryption. - // Each character listed must appear only once. - // Number of characters must be in the range [2, 62]. - // This must be encoded as ASCII. - // The order of characters does not matter. - CustomAlphabet string `json:"customAlphabet,omitempty"` - - // Radix: The native way to select the alphabet. Must be in the range - // [2, 62]. - Radix int64 `json:"radix,omitempty"` - - // SurrogateInfoType: The custom info type to annotate the surrogate - // with. - // This annotation will be applied to the surrogate by prefixing it - // with - // the name of the custom info type followed by the number of - // characters comprising the surrogate. The following scheme defines - // the - // format: info_type_name(surrogate_character_count):surrogate - // - // For example, if the name of custom info type is 'MY_TOKEN_INFO_TYPE' - // and - // the surrogate is 'abc', the full replacement value - // will be: 'MY_TOKEN_INFO_TYPE(3):abc' - // - // This annotation identifies the surrogate when inspecting content - // using the - // custom info - // type - // [`SurrogateType`](/dlp/docs/reference/rest/v2beta1/InspectConfig# - // surrogatetype). - // This facilitates reversal of the surrogate when it occurs in free - // text. - // - // In order for inspection to work properly, the name of this info type - // must - // not occur naturally anywhere in your data; otherwise, inspection - // may - // find a surrogate that does not correspond to an actual - // identifier. - // Therefore, choose your custom info type name carefully after - // considering - // what your data looks like. One way to select a name that has a high - // chance - // of yielding reliable detection is to include one or more unicode - // characters - // that are highly improbable to exist in your data. - // For example, assuming your data is entered from a regular ASCII - // keyboard, - // the symbol with the hex code point 29DD might be used like - // so: - // ⧝MY_TOKEN_TYPE - SurrogateInfoType *GooglePrivacyDlpV2beta1InfoType `json:"surrogateInfoType,omitempty"` - - // ForceSendFields is a list of field names (e.g. "CommonAlphabet") 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. "CommonAlphabet") 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 *GooglePrivacyDlpV2beta1CryptoReplaceFfxFpeConfig) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta1CryptoReplaceFfxFpeConfig - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta1CustomInfoType: Custom information type -// provided by the user. Used to find domain-specific -// sensitive information configurable to the data in question. -type GooglePrivacyDlpV2beta1CustomInfoType struct { - // Dictionary: Dictionary-based custom info type. - Dictionary *GooglePrivacyDlpV2beta1Dictionary `json:"dictionary,omitempty"` - - // InfoType: Info type configuration. All custom info types must have - // configurations - // that do not conflict with built-in info types or other custom info - // types. - InfoType *GooglePrivacyDlpV2beta1InfoType `json:"infoType,omitempty"` - - // SurrogateType: Surrogate info type. - SurrogateType *GooglePrivacyDlpV2beta1SurrogateType `json:"surrogateType,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Dictionary") 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. "Dictionary") 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 *GooglePrivacyDlpV2beta1CustomInfoType) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta1CustomInfoType - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta1DatastoreKey: Record key for a finding in -// Cloud Datastore. -type GooglePrivacyDlpV2beta1DatastoreKey struct { - // EntityKey: Datastore entity key. - EntityKey *GooglePrivacyDlpV2beta1Key `json:"entityKey,omitempty"` - - // ForceSendFields is a list of field names (e.g. "EntityKey") 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. "EntityKey") 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 *GooglePrivacyDlpV2beta1DatastoreKey) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta1DatastoreKey - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta1DatastoreOptions: Options defining a data set -// within Google Cloud Datastore. -type GooglePrivacyDlpV2beta1DatastoreOptions struct { - // Kind: The kind to process. - Kind *GooglePrivacyDlpV2beta1KindExpression `json:"kind,omitempty"` - - // PartitionId: A partition ID identifies a grouping of entities. The - // grouping is always - // by project and namespace, however the namespace ID may be empty. - PartitionId *GooglePrivacyDlpV2beta1PartitionId `json:"partitionId,omitempty"` - - // Projection: Properties to scan. If none are specified, all properties - // will be scanned - // by default. - Projection []*GooglePrivacyDlpV2beta1Projection `json:"projection,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Kind") 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. "Kind") 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 *GooglePrivacyDlpV2beta1DatastoreOptions) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta1DatastoreOptions - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta1DeidentificationSummary: High level summary of -// deidentification. -type GooglePrivacyDlpV2beta1DeidentificationSummary struct { - // TransformationSummaries: Transformations applied to the dataset. - TransformationSummaries []*GooglePrivacyDlpV2beta1TransformationSummary `json:"transformationSummaries,omitempty"` - - // TransformedBytes: Total size in bytes that were transformed in some - // way. - TransformedBytes int64 `json:"transformedBytes,omitempty,string"` - - // ForceSendFields is a list of field names (e.g. - // "TransformationSummaries") 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. "TransformationSummaries") - // 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 *GooglePrivacyDlpV2beta1DeidentificationSummary) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta1DeidentificationSummary - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta1DeidentifyConfig: The configuration that -// controls how the data will change. -type GooglePrivacyDlpV2beta1DeidentifyConfig struct { - // InfoTypeTransformations: Treat the dataset as free-form text and - // apply the same free text - // transformation everywhere. - InfoTypeTransformations *GooglePrivacyDlpV2beta1InfoTypeTransformations `json:"infoTypeTransformations,omitempty"` - - // RecordTransformations: Treat the dataset as structured. - // Transformations can be applied to - // specific locations within structured datasets, such as transforming - // a column within a table. - RecordTransformations *GooglePrivacyDlpV2beta1RecordTransformations `json:"recordTransformations,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "InfoTypeTransformations") 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. "InfoTypeTransformations") - // 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 *GooglePrivacyDlpV2beta1DeidentifyConfig) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta1DeidentifyConfig - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta1DeidentifyContentRequest: Request to -// de-identify a list of items. -type GooglePrivacyDlpV2beta1DeidentifyContentRequest struct { - // DeidentifyConfig: Configuration for the de-identification of the list - // of content items. - DeidentifyConfig *GooglePrivacyDlpV2beta1DeidentifyConfig `json:"deidentifyConfig,omitempty"` - - // InspectConfig: Configuration for the inspector. - InspectConfig *GooglePrivacyDlpV2beta1InspectConfig `json:"inspectConfig,omitempty"` - - // Items: The list of items to inspect. Up to 100 are allowed per - // request. - // All items will be treated as text/*. - Items []*GooglePrivacyDlpV2beta1ContentItem `json:"items,omitempty"` - - // ForceSendFields is a list of field names (e.g. "DeidentifyConfig") 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. "DeidentifyConfig") 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 *GooglePrivacyDlpV2beta1DeidentifyContentRequest) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta1DeidentifyContentRequest - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta1DeidentifyContentResponse: Results of -// de-identifying a list of items. -type GooglePrivacyDlpV2beta1DeidentifyContentResponse struct { - Items []*GooglePrivacyDlpV2beta1ContentItem `json:"items,omitempty"` - - // Summaries: A review of the transformations that took place for each - // item. - Summaries []*GooglePrivacyDlpV2beta1DeidentificationSummary `json:"summaries,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Items") 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. "Items") 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 *GooglePrivacyDlpV2beta1DeidentifyContentResponse) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta1DeidentifyContentResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta1Dictionary: Custom information type based on a -// dictionary of words or phrases. This can -// be used to match sensitive information specific to the data, such as -// a list -// of employee IDs or job titles. -// -// Dictionary words are case-insensitive and all characters other than -// letters -// and digits in the unicode [Basic -// Multilingual -// Plane](https://en.wikipedia.org/wiki/Plane_%28Unicode%29# -// Basic_Multilingual_Plane) -// will be replaced with whitespace when scanning for matches, so -// the -// dictionary phrase "Sam Johnson" will match all three phrases "sam -// johnson", -// "Sam, Johnson", and "Sam (Johnson)". Additionally, the -// characters -// surrounding any match must be of a different type than the -// adjacent -// characters within the word, so letters must be next to non-letters -// and -// digits next to non-digits. For example, the dictionary word "jen" -// will -// match the first three letters of the text "jen123" but will return -// no -// matches for "jennifer". -// -// Dictionary words containing a large number of characters that are -// not -// letters or digits may result in unexpected findings because such -// characters -// are treated as whitespace. -type GooglePrivacyDlpV2beta1Dictionary struct { - // WordList: List of words or phrases to search for. - WordList *GooglePrivacyDlpV2beta1WordList `json:"wordList,omitempty"` - - // ForceSendFields is a list of field names (e.g. "WordList") 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. "WordList") 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 *GooglePrivacyDlpV2beta1Dictionary) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta1Dictionary - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta1EntityId: An entity in a dataset is a field or -// set of fields that correspond to a -// single person. For example, in medical records the `EntityId` might -// be -// a patient identifier, or for financial records it might be an -// account -// identifier. This message is used when generalizations or analysis -// must be -// consistent across multiple rows pertaining to the same entity. -type GooglePrivacyDlpV2beta1EntityId struct { - // Field: Composite key indicating which field contains the entity - // identifier. - Field *GooglePrivacyDlpV2beta1FieldId `json:"field,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Field") 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. "Field") 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 *GooglePrivacyDlpV2beta1EntityId) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta1EntityId - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta1Expressions: A collection of expressions -type GooglePrivacyDlpV2beta1Expressions struct { - Conditions *GooglePrivacyDlpV2beta1Conditions `json:"conditions,omitempty"` - - // LogicalOperator: The operator to apply to the result of conditions. - // Default and currently - // only supported value is `AND`. - // - // Possible values: - // "LOGICAL_OPERATOR_UNSPECIFIED" - // "AND" - LogicalOperator string `json:"logicalOperator,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Conditions") 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. "Conditions") 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 *GooglePrivacyDlpV2beta1Expressions) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta1Expressions - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta1FieldId: General identifier of a data field in -// a storage service. -type GooglePrivacyDlpV2beta1FieldId struct { - // ColumnName: Name describing the field. - ColumnName string `json:"columnName,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ColumnName") 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. "ColumnName") 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 *GooglePrivacyDlpV2beta1FieldId) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta1FieldId - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta1FieldTransformation: The transformation to -// apply to the field. -type GooglePrivacyDlpV2beta1FieldTransformation struct { - // Condition: Only apply the transformation if the condition evaluates - // to true for the - // given `RecordCondition`. The conditions are allowed to reference - // fields - // that are not used in the actual transformation. [optional] - // - // Example Use Cases: - // - // - Apply a different bucket transformation to an age column if the zip - // code - // column for the same record is within a specific range. - // - Redact a field if the date of birth field is greater than 85. - Condition *GooglePrivacyDlpV2beta1RecordCondition `json:"condition,omitempty"` - - // Fields: Input field(s) to apply the transformation to. [required] - Fields []*GooglePrivacyDlpV2beta1FieldId `json:"fields,omitempty"` - - // InfoTypeTransformations: Treat the contents of the field as free - // text, and selectively - // transform content that matches an `InfoType`. - InfoTypeTransformations *GooglePrivacyDlpV2beta1InfoTypeTransformations `json:"infoTypeTransformations,omitempty"` - - // PrimitiveTransformation: Apply the transformation to the entire - // field. - PrimitiveTransformation *GooglePrivacyDlpV2beta1PrimitiveTransformation `json:"primitiveTransformation,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Condition") 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. "Condition") 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 *GooglePrivacyDlpV2beta1FieldTransformation) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta1FieldTransformation - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta1FileSet: Set of files to scan. -type GooglePrivacyDlpV2beta1FileSet struct { - // Url: The url, in the format `gs://<bucket>/<path>`. Trailing wildcard - // in the - // path is allowed. - Url string `json:"url,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Url") 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. "Url") 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 *GooglePrivacyDlpV2beta1FileSet) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta1FileSet - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta1Finding: Represents a piece of potentially -// sensitive content. -type GooglePrivacyDlpV2beta1Finding struct { - // CreateTime: Timestamp when finding was detected. - CreateTime string `json:"createTime,omitempty"` - - // InfoType: The type of content that might have been found. - // Provided if requested by the `InspectConfig`. - InfoType *GooglePrivacyDlpV2beta1InfoType `json:"infoType,omitempty"` - - // Likelihood: Estimate of how likely it is that the `info_type` is - // correct. - // - // Possible values: - // "LIKELIHOOD_UNSPECIFIED" - Default value; information with all - // likelihoods is included. - // "VERY_UNLIKELY" - Few matching elements. - // "UNLIKELY" - // "POSSIBLE" - Some matching elements. - // "LIKELY" - // "VERY_LIKELY" - Many matching elements. - Likelihood string `json:"likelihood,omitempty"` - - // Location: Where the content was found. - Location *GooglePrivacyDlpV2beta1Location `json:"location,omitempty"` - - // Quote: The content that was found. Even if the content is not - // textual, it - // may be converted to a textual representation here. - // Provided if requested by the `InspectConfig` and the finding is - // less than or equal to 4096 bytes long. If the finding exceeds 4096 - // bytes - // in length, the quote may be omitted. - Quote string `json:"quote,omitempty"` - - // ForceSendFields is a list of field names (e.g. "CreateTime") 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. "CreateTime") 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 *GooglePrivacyDlpV2beta1Finding) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta1Finding - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta1FixedSizeBucketingConfig: Buckets values based -// on fixed size ranges. The -// Bucketing transformation can provide all of this functionality, -// but requires more configuration. This message is provided as a -// convenience to -// the user for simple bucketing strategies. -// The resulting value will be a hyphenated string -// of -// lower_bound-upper_bound. -// This can be used on data of type: double, long. -// If the bound Value type differs from the type of data -// being transformed, we will first attempt converting the type of the -// data to -// be transformed to match the type of the bound before comparing. -type GooglePrivacyDlpV2beta1FixedSizeBucketingConfig struct { - // BucketSize: Size of each bucket (except for minimum and maximum - // buckets). So if - // `lower_bound` = 10, `upper_bound` = 89, and `bucket_size` = 10, then - // the - // following buckets would be used: -10, 10-20, 20-30, 30-40, 40-50, - // 50-60, - // 60-70, 70-80, 80-89, 89+. Precision up to 2 decimals works. - // [Required]. - BucketSize float64 `json:"bucketSize,omitempty"` - - // LowerBound: Lower bound value of buckets. All values less than - // `lower_bound` are - // grouped together into a single bucket; for example if `lower_bound` = - // 10, - // then all values less than 10 are replaced with the value “-10”. - // [Required]. - LowerBound *GooglePrivacyDlpV2beta1Value `json:"lowerBound,omitempty"` - - // UpperBound: Upper bound value of buckets. All values greater than - // upper_bound are - // grouped together into a single bucket; for example if `upper_bound` = - // 89, - // then all values greater than 89 are replaced with the value - // “89+”. - // [Required]. - UpperBound *GooglePrivacyDlpV2beta1Value `json:"upperBound,omitempty"` - - // ForceSendFields is a list of field names (e.g. "BucketSize") 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. "BucketSize") 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 *GooglePrivacyDlpV2beta1FixedSizeBucketingConfig) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta1FixedSizeBucketingConfig - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *GooglePrivacyDlpV2beta1FixedSizeBucketingConfig) UnmarshalJSON(data []byte) error { - type NoMethod GooglePrivacyDlpV2beta1FixedSizeBucketingConfig - var s1 struct { - BucketSize gensupport.JSONFloat64 `json:"bucketSize"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.BucketSize = float64(s1.BucketSize) - return nil -} - -// GooglePrivacyDlpV2beta1ImageLocation: Bounding box encompassing -// detected text within an image. -type GooglePrivacyDlpV2beta1ImageLocation struct { - // Height: Height of the bounding box in pixels. - Height int64 `json:"height,omitempty"` - - // Left: Left coordinate of the bounding box. (0,0) is upper left. - Left int64 `json:"left,omitempty"` - - // Top: Top coordinate of the bounding box. (0,0) is upper left. - Top int64 `json:"top,omitempty"` - - // Width: Width of the bounding box in pixels. - Width int64 `json:"width,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Height") 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. "Height") 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 *GooglePrivacyDlpV2beta1ImageLocation) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta1ImageLocation - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta1ImageRedactionConfig: Configuration for -// determining how redaction of images should occur. -type GooglePrivacyDlpV2beta1ImageRedactionConfig struct { - // InfoType: Only one per info_type should be provided per request. If - // not - // specified, and redact_all_text is false, the DLP API will redact - // all - // text that it matches against all info_types that are found, but - // not - // specified in another ImageRedactionConfig. - InfoType *GooglePrivacyDlpV2beta1InfoType `json:"infoType,omitempty"` - - // RedactAllText: If true, all text found in the image, regardless - // whether it matches an - // info_type, is redacted. - RedactAllText bool `json:"redactAllText,omitempty"` - - // RedactionColor: The color to use when redacting content from an - // image. If not specified, - // the default is black. - RedactionColor *GooglePrivacyDlpV2beta1Color `json:"redactionColor,omitempty"` - - // ForceSendFields is a list of field names (e.g. "InfoType") 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. "InfoType") 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 *GooglePrivacyDlpV2beta1ImageRedactionConfig) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta1ImageRedactionConfig - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta1InfoType: Type of information detected by the -// API. -type GooglePrivacyDlpV2beta1InfoType struct { - // Name: Name of the information type. - Name string `json:"name,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Name") 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. "Name") 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 *GooglePrivacyDlpV2beta1InfoType) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta1InfoType - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta1InfoTypeDescription: Description of the -// information type (infoType). -type GooglePrivacyDlpV2beta1InfoTypeDescription struct { - // Categories: List of categories this infoType belongs to. - Categories []*GooglePrivacyDlpV2beta1CategoryDescription `json:"categories,omitempty"` - - // DisplayName: Human readable form of the infoType name. - DisplayName string `json:"displayName,omitempty"` - - // Name: Internal name of the infoType. - Name string `json:"name,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Categories") 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. "Categories") 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 *GooglePrivacyDlpV2beta1InfoTypeDescription) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta1InfoTypeDescription - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta1InfoTypeLimit: Max findings configuration per -// info type, per content item or long running -// operation. -type GooglePrivacyDlpV2beta1InfoTypeLimit struct { - // InfoType: Type of information the findings limit applies to. Only one - // limit per - // info_type should be provided. If InfoTypeLimit does not have - // an - // info_type, the DLP API applies the limit against all info_types that - // are - // found but not specified in another InfoTypeLimit. - InfoType *GooglePrivacyDlpV2beta1InfoType `json:"infoType,omitempty"` - - // MaxFindings: Max findings limit for the given infoType. - MaxFindings int64 `json:"maxFindings,omitempty"` - - // ForceSendFields is a list of field names (e.g. "InfoType") 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. "InfoType") 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 *GooglePrivacyDlpV2beta1InfoTypeLimit) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta1InfoTypeLimit - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta1InfoTypeStatistics: Statistics regarding a -// specific InfoType. -type GooglePrivacyDlpV2beta1InfoTypeStatistics struct { - // Count: Number of findings for this info type. - Count int64 `json:"count,omitempty,string"` - - // InfoType: The type of finding this stat is for. - InfoType *GooglePrivacyDlpV2beta1InfoType `json:"infoType,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Count") 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. "Count") 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 *GooglePrivacyDlpV2beta1InfoTypeStatistics) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta1InfoTypeStatistics - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta1InfoTypeTransformation: A transformation to -// apply to text that is identified as a specific -// info_type. -type GooglePrivacyDlpV2beta1InfoTypeTransformation struct { - // InfoTypes: Info types to apply the transformation to. Empty list will - // match all - // available info types for this transformation. - InfoTypes []*GooglePrivacyDlpV2beta1InfoType `json:"infoTypes,omitempty"` - - // PrimitiveTransformation: Primitive transformation to apply to the - // info type. [required] - PrimitiveTransformation *GooglePrivacyDlpV2beta1PrimitiveTransformation `json:"primitiveTransformation,omitempty"` - - // ForceSendFields is a list of field names (e.g. "InfoTypes") 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. "InfoTypes") 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 *GooglePrivacyDlpV2beta1InfoTypeTransformation) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta1InfoTypeTransformation - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta1InfoTypeTransformations: A type of -// transformation that will scan unstructured text and -// apply various `PrimitiveTransformation`s to each finding, where -// the -// transformation is applied to only values that were identified as a -// specific -// info_type. -type GooglePrivacyDlpV2beta1InfoTypeTransformations struct { - // Transformations: Transformation for each info type. Cannot specify - // more than one - // for a given info type. [required] - Transformations []*GooglePrivacyDlpV2beta1InfoTypeTransformation `json:"transformations,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Transformations") 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. "Transformations") 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 *GooglePrivacyDlpV2beta1InfoTypeTransformations) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta1InfoTypeTransformations - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta1InspectConfig: Configuration description of -// the scanning process. -// When used with redactContent only info_types and min_likelihood are -// currently -// used. -type GooglePrivacyDlpV2beta1InspectConfig struct { - // CustomInfoTypes: Custom info types provided by the user. - CustomInfoTypes []*GooglePrivacyDlpV2beta1CustomInfoType `json:"customInfoTypes,omitempty"` - - // ExcludeTypes: When true, excludes type information of the findings. - ExcludeTypes bool `json:"excludeTypes,omitempty"` - - // IncludeQuote: When true, a contextual quote from the data that - // triggered a finding is - // included in the response; see Finding.quote. - IncludeQuote bool `json:"includeQuote,omitempty"` - - // InfoTypeLimits: Configuration of findings limit given for specified - // info types. - InfoTypeLimits []*GooglePrivacyDlpV2beta1InfoTypeLimit `json:"infoTypeLimits,omitempty"` - - // InfoTypes: Restricts what info_types to look for. The values must - // correspond to - // InfoType values returned by ListInfoTypes or found in - // documentation. - // Empty info_types runs all enabled detectors. - InfoTypes []*GooglePrivacyDlpV2beta1InfoType `json:"infoTypes,omitempty"` - - // MaxFindings: Limits the number of findings per content item or long - // running operation. - MaxFindings int64 `json:"maxFindings,omitempty"` - - // MinLikelihood: Only returns findings equal or above this threshold. - // - // Possible values: - // "LIKELIHOOD_UNSPECIFIED" - Default value; information with all - // likelihoods is included. - // "VERY_UNLIKELY" - Few matching elements. - // "UNLIKELY" - // "POSSIBLE" - Some matching elements. - // "LIKELY" - // "VERY_LIKELY" - Many matching elements. - MinLikelihood string `json:"minLikelihood,omitempty"` - - // ForceSendFields is a list of field names (e.g. "CustomInfoTypes") 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. "CustomInfoTypes") 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 *GooglePrivacyDlpV2beta1InspectConfig) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta1InspectConfig - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta1InspectContentRequest: Request to search for -// potentially sensitive info in a list of items. -type GooglePrivacyDlpV2beta1InspectContentRequest struct { - // InspectConfig: Configuration for the inspector. - InspectConfig *GooglePrivacyDlpV2beta1InspectConfig `json:"inspectConfig,omitempty"` - - // Items: The list of items to inspect. Items in a single request - // are - // considered "related" unless inspect_config.independent_inputs is - // true. - // Up to 100 are allowed per request. - Items []*GooglePrivacyDlpV2beta1ContentItem `json:"items,omitempty"` - - // ForceSendFields is a list of field names (e.g. "InspectConfig") 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. "InspectConfig") 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 *GooglePrivacyDlpV2beta1InspectContentRequest) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta1InspectContentRequest - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta1InspectContentResponse: Results of inspecting -// a list of items. -type GooglePrivacyDlpV2beta1InspectContentResponse struct { - // Results: Each content_item from the request has a result in this - // list, in the - // same order as the request. - Results []*GooglePrivacyDlpV2beta1InspectResult `json:"results,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Results") 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. "Results") 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 *GooglePrivacyDlpV2beta1InspectContentResponse) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta1InspectContentResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta1InspectOperationMetadata: Metadata returned -// within GetOperation for an inspect request. -type GooglePrivacyDlpV2beta1InspectOperationMetadata struct { - // CreateTime: The time which this request was started. - CreateTime string `json:"createTime,omitempty"` - - InfoTypeStats []*GooglePrivacyDlpV2beta1InfoTypeStatistics `json:"infoTypeStats,omitempty"` - - // ProcessedBytes: Total size in bytes that were processed. - ProcessedBytes int64 `json:"processedBytes,omitempty,string"` - - // RequestInspectConfig: The inspect config used to create the - // Operation. - RequestInspectConfig *GooglePrivacyDlpV2beta1InspectConfig `json:"requestInspectConfig,omitempty"` - - // RequestOutputConfig: Optional location to store findings. - RequestOutputConfig *GooglePrivacyDlpV2beta1OutputStorageConfig `json:"requestOutputConfig,omitempty"` - - // RequestStorageConfig: The storage config used to create the - // Operation. - RequestStorageConfig *GooglePrivacyDlpV2beta1StorageConfig `json:"requestStorageConfig,omitempty"` - - // TotalEstimatedBytes: Estimate of the number of bytes to process. - TotalEstimatedBytes int64 `json:"totalEstimatedBytes,omitempty,string"` - - // ForceSendFields is a list of field names (e.g. "CreateTime") 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. "CreateTime") 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 *GooglePrivacyDlpV2beta1InspectOperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta1InspectOperationMetadata - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta1InspectOperationResult: The operational data. -type GooglePrivacyDlpV2beta1InspectOperationResult struct { - // Name: The server-assigned name, which is only unique within the same - // service that - // originally returns it. If you use the default HTTP mapping, - // the - // `name` should have the format of `inspect/results/{id}`. - Name string `json:"name,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Name") 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. "Name") 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 *GooglePrivacyDlpV2beta1InspectOperationResult) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta1InspectOperationResult - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta1InspectResult: All the findings for a single -// scanned item. -type GooglePrivacyDlpV2beta1InspectResult struct { - // Findings: List of findings for an item. - Findings []*GooglePrivacyDlpV2beta1Finding `json:"findings,omitempty"` - - // FindingsTruncated: If true, then this item might have more findings - // than were returned, - // and the findings returned are an arbitrary subset of all - // findings. - // The findings list might be truncated because the input items were - // too - // large, or because the server reached the maximum amount of - // resources - // allowed for a single API call. For best results, divide the input - // into - // smaller batches. - FindingsTruncated bool `json:"findingsTruncated,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Findings") 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. "Findings") 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 *GooglePrivacyDlpV2beta1InspectResult) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta1InspectResult - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta1KAnonymityConfig: k-anonymity metric, used for -// analysis of reidentification risk. -type GooglePrivacyDlpV2beta1KAnonymityConfig struct { - // EntityId: Optional message indicating that each distinct entity_id - // should not - // contribute to the k-anonymity count more than once per equivalence - // class. - // If an entity_id appears on several rows with different - // quasi-identifier - // tuples, it will contribute to each count exactly once. - // - // This can lead to unexpected results. Consider a table where ID 1 - // is - // associated to quasi-identifier "foo", ID 2 to "bar", and ID 3 to - // *both* - // quasi-identifiers "foo" and "bar" (on separate rows), and where this - // ID - // is used as entity_id. Then, the anonymity value associated to ID 3 - // will - // be 2, even if it is the only ID to be associated to both values "foo" - // and - // "bar". - EntityId *GooglePrivacyDlpV2beta1EntityId `json:"entityId,omitempty"` - - // QuasiIds: Set of fields to compute k-anonymity over. When multiple - // fields are - // specified, they are considered a single composite key. Structs - // and - // repeated data types are not supported; however, nested fields - // are - // supported so long as they are not structs themselves or nested - // within - // a repeated field. - QuasiIds []*GooglePrivacyDlpV2beta1FieldId `json:"quasiIds,omitempty"` - - // ForceSendFields is a list of field names (e.g. "EntityId") 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. "EntityId") 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 *GooglePrivacyDlpV2beta1KAnonymityConfig) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta1KAnonymityConfig - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta1KAnonymityEquivalenceClass: The set of -// columns' values that share the same k-anonymity value. -type GooglePrivacyDlpV2beta1KAnonymityEquivalenceClass struct { - // EquivalenceClassSize: Size of the equivalence class, for example - // number of rows with the - // above set of values. - EquivalenceClassSize int64 `json:"equivalenceClassSize,omitempty,string"` - - // QuasiIdsValues: Set of values defining the equivalence class. One - // value per - // quasi-identifier column in the original KAnonymity metric - // message. - // The order is always the same as the original request. - QuasiIdsValues []*GooglePrivacyDlpV2beta1Value `json:"quasiIdsValues,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "EquivalenceClassSize") 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. "EquivalenceClassSize") 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 *GooglePrivacyDlpV2beta1KAnonymityEquivalenceClass) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta1KAnonymityEquivalenceClass - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta1KAnonymityHistogramBucket: Histogram bucket of -// equivalence class sizes in the table. -type GooglePrivacyDlpV2beta1KAnonymityHistogramBucket struct { - // BucketSize: Total number of records in this bucket. - BucketSize int64 `json:"bucketSize,omitempty,string"` - - // BucketValues: Sample of equivalence classes in this bucket. The total - // number of - // classes returned per bucket is capped at 20. - BucketValues []*GooglePrivacyDlpV2beta1KAnonymityEquivalenceClass `json:"bucketValues,omitempty"` - - // EquivalenceClassSizeLowerBound: Lower bound on the size of the - // equivalence classes in this bucket. - EquivalenceClassSizeLowerBound int64 `json:"equivalenceClassSizeLowerBound,omitempty,string"` - - // EquivalenceClassSizeUpperBound: Upper bound on the size of the - // equivalence classes in this bucket. - EquivalenceClassSizeUpperBound int64 `json:"equivalenceClassSizeUpperBound,omitempty,string"` - - // ForceSendFields is a list of field names (e.g. "BucketSize") 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. "BucketSize") 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 *GooglePrivacyDlpV2beta1KAnonymityHistogramBucket) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta1KAnonymityHistogramBucket - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta1KAnonymityResult: Result of the k-anonymity -// computation. -type GooglePrivacyDlpV2beta1KAnonymityResult struct { - // EquivalenceClassHistogramBuckets: Histogram of k-anonymity - // equivalence classes. - EquivalenceClassHistogramBuckets []*GooglePrivacyDlpV2beta1KAnonymityHistogramBucket `json:"equivalenceClassHistogramBuckets,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "EquivalenceClassHistogramBuckets") 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. - // "EquivalenceClassHistogramBuckets") 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 *GooglePrivacyDlpV2beta1KAnonymityResult) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta1KAnonymityResult - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta1KMapEstimationConfig: Reidentifiability -// metric. This corresponds to a risk model similar to what -// is called "journalist risk" in the literature, except the attack -// dataset is -// statistically modeled instead of being perfectly known. This can be -// done -// using publicly available data (like the US Census), or using a -// custom -// statistical model (indicated as one or several BigQuery tables), or -// by -// extrapolating from the distribution of values in the input dataset. -type GooglePrivacyDlpV2beta1KMapEstimationConfig struct { - // AuxiliaryTables: Several auxiliary tables can be used in the - // analysis. Each custom_tag - // used to tag a quasi-identifiers column must appear in exactly one - // column - // of one auxiliary table. - AuxiliaryTables []*GooglePrivacyDlpV2beta1AuxiliaryTable `json:"auxiliaryTables,omitempty"` - - // QuasiIds: Fields considered to be quasi-identifiers. No two columns - // can have the - // same tag. [required] - QuasiIds []*GooglePrivacyDlpV2beta1TaggedField `json:"quasiIds,omitempty"` - - // RegionCode: ISO 3166-1 alpha-2 region code to use in the statistical - // modeling. - // Required if no column is tagged with a region-specific InfoType - // (like - // US_ZIP_5) or a region code. - RegionCode string `json:"regionCode,omitempty"` - - // ForceSendFields is a list of field names (e.g. "AuxiliaryTables") 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. "AuxiliaryTables") 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 *GooglePrivacyDlpV2beta1KMapEstimationConfig) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta1KMapEstimationConfig - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta1KMapEstimationHistogramBucket: A -// KMapEstimationHistogramBucket message with the following values: -// min_anonymity: 3 -// max_anonymity: 5 -// frequency: 42 -// means that there are 42 records whose quasi-identifier values -// correspond -// to 3, 4 or 5 people in the overlying population. An important -// particular -// case is when min_anonymity = max_anonymity = 1: the frequency field -// then -// corresponds to the number of uniquely identifiable records. -type GooglePrivacyDlpV2beta1KMapEstimationHistogramBucket struct { - // BucketSize: Number of records within these anonymity bounds. - BucketSize int64 `json:"bucketSize,omitempty,string"` - - // BucketValues: Sample of quasi-identifier tuple values in this bucket. - // The total - // number of classes returned per bucket is capped at 20. - BucketValues []*GooglePrivacyDlpV2beta1KMapEstimationQuasiIdValues `json:"bucketValues,omitempty"` - - // MaxAnonymity: Always greater than or equal to min_anonymity. - MaxAnonymity int64 `json:"maxAnonymity,omitempty,string"` - - // MinAnonymity: Always positive. - MinAnonymity int64 `json:"minAnonymity,omitempty,string"` - - // ForceSendFields is a list of field names (e.g. "BucketSize") 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. "BucketSize") 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 *GooglePrivacyDlpV2beta1KMapEstimationHistogramBucket) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta1KMapEstimationHistogramBucket - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta1KMapEstimationQuasiIdValues: A tuple of values -// for the quasi-identifier columns. -type GooglePrivacyDlpV2beta1KMapEstimationQuasiIdValues struct { - // EstimatedAnonymity: The estimated anonymity for these - // quasi-identifier values. - EstimatedAnonymity int64 `json:"estimatedAnonymity,omitempty,string"` - - // QuasiIdsValues: The quasi-identifier values. - QuasiIdsValues []*GooglePrivacyDlpV2beta1Value `json:"quasiIdsValues,omitempty"` - - // ForceSendFields is a list of field names (e.g. "EstimatedAnonymity") - // 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. "EstimatedAnonymity") 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 *GooglePrivacyDlpV2beta1KMapEstimationQuasiIdValues) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta1KMapEstimationQuasiIdValues - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta1KMapEstimationResult: Result of the -// reidentifiability analysis. Note that these results are -// an -// estimation, not exact values. -type GooglePrivacyDlpV2beta1KMapEstimationResult struct { - // KMapEstimationHistogram: The intervals [min_anonymity, max_anonymity] - // do not overlap. If a value - // doesn't correspond to any such interval, the associated frequency - // is - // zero. For example, the following records: - // {min_anonymity: 1, max_anonymity: 1, frequency: 17} - // {min_anonymity: 2, max_anonymity: 3, frequency: 42} - // {min_anonymity: 5, max_anonymity: 10, frequency: 99} - // mean that there are no record with an estimated anonymity of 4, 5, - // or - // larger than 10. - KMapEstimationHistogram []*GooglePrivacyDlpV2beta1KMapEstimationHistogramBucket `json:"kMapEstimationHistogram,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "KMapEstimationHistogram") 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. "KMapEstimationHistogram") - // 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 *GooglePrivacyDlpV2beta1KMapEstimationResult) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta1KMapEstimationResult - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta1Key: A unique identifier for a Datastore -// entity. -// If a key's partition ID or any of its path kinds or names -// are -// reserved/read-only, the key is reserved/read-only. -// A reserved/read-only key is forbidden in certain documented contexts. -type GooglePrivacyDlpV2beta1Key struct { - // PartitionId: Entities are partitioned into subsets, currently - // identified by a project - // ID and namespace ID. - // Queries are scoped to a single partition. - PartitionId *GooglePrivacyDlpV2beta1PartitionId `json:"partitionId,omitempty"` - - // Path: The entity path. - // An entity path consists of one or more elements composed of a kind - // and a - // string or numerical identifier, which identify entities. The - // first - // element identifies a _root entity_, the second element identifies - // a _child_ of the root entity, the third element identifies a child of - // the - // second entity, and so forth. The entities identified by all prefixes - // of - // the path are called the element's _ancestors_. - // - // A path can never be empty, and a path can have at most 100 elements. - Path []*GooglePrivacyDlpV2beta1PathElement `json:"path,omitempty"` - - // ForceSendFields is a list of field names (e.g. "PartitionId") 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. "PartitionId") 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 *GooglePrivacyDlpV2beta1Key) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta1Key - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta1KindExpression: A representation of a -// Datastore kind. -type GooglePrivacyDlpV2beta1KindExpression struct { - // Name: The name of the kind. - Name string `json:"name,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Name") 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. "Name") 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 *GooglePrivacyDlpV2beta1KindExpression) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta1KindExpression - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta1KmsWrappedCryptoKey: Include to use an -// existing data crypto key wrapped by KMS. -// Authorization requires the following IAM permissions when sending a -// request -// to perform a crypto transformation using a kms-wrapped crypto -// key: -// dlp.kms.encrypt -type GooglePrivacyDlpV2beta1KmsWrappedCryptoKey struct { - // CryptoKeyName: The resource name of the KMS CryptoKey to use for - // unwrapping. [required] - CryptoKeyName string `json:"cryptoKeyName,omitempty"` - - // WrappedKey: The wrapped data crypto key. [required] - WrappedKey string `json:"wrappedKey,omitempty"` - - // ForceSendFields is a list of field names (e.g. "CryptoKeyName") 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. "CryptoKeyName") 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 *GooglePrivacyDlpV2beta1KmsWrappedCryptoKey) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta1KmsWrappedCryptoKey - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta1LDiversityConfig: l-diversity metric, used for -// analysis of reidentification risk. -type GooglePrivacyDlpV2beta1LDiversityConfig struct { - // QuasiIds: Set of quasi-identifiers indicating how equivalence classes - // are - // defined for the l-diversity computation. When multiple fields - // are - // specified, they are considered a single composite key. - QuasiIds []*GooglePrivacyDlpV2beta1FieldId `json:"quasiIds,omitempty"` - - // SensitiveAttribute: Sensitive field for computing the l-value. - SensitiveAttribute *GooglePrivacyDlpV2beta1FieldId `json:"sensitiveAttribute,omitempty"` - - // ForceSendFields is a list of field names (e.g. "QuasiIds") 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. "QuasiIds") 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 *GooglePrivacyDlpV2beta1LDiversityConfig) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta1LDiversityConfig - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta1LDiversityEquivalenceClass: The set of -// columns' values that share the same l-diversity value. -type GooglePrivacyDlpV2beta1LDiversityEquivalenceClass struct { - // EquivalenceClassSize: Size of the k-anonymity equivalence class. - EquivalenceClassSize int64 `json:"equivalenceClassSize,omitempty,string"` - - // NumDistinctSensitiveValues: Number of distinct sensitive values in - // this equivalence class. - NumDistinctSensitiveValues int64 `json:"numDistinctSensitiveValues,omitempty,string"` - - // QuasiIdsValues: Quasi-identifier values defining the k-anonymity - // equivalence - // class. The order is always the same as the original request. - QuasiIdsValues []*GooglePrivacyDlpV2beta1Value `json:"quasiIdsValues,omitempty"` - - // TopSensitiveValues: Estimated frequencies of top sensitive values. - TopSensitiveValues []*GooglePrivacyDlpV2beta1ValueFrequency `json:"topSensitiveValues,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "EquivalenceClassSize") 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. "EquivalenceClassSize") 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 *GooglePrivacyDlpV2beta1LDiversityEquivalenceClass) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta1LDiversityEquivalenceClass - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta1LDiversityHistogramBucket: Histogram bucket of -// sensitive value frequencies in the table. -type GooglePrivacyDlpV2beta1LDiversityHistogramBucket struct { - // BucketSize: Total number of records in this bucket. - BucketSize int64 `json:"bucketSize,omitempty,string"` - - // BucketValues: Sample of equivalence classes in this bucket. The total - // number of - // classes returned per bucket is capped at 20. - BucketValues []*GooglePrivacyDlpV2beta1LDiversityEquivalenceClass `json:"bucketValues,omitempty"` - - // SensitiveValueFrequencyLowerBound: Lower bound on the sensitive value - // frequencies of the equivalence - // classes in this bucket. - SensitiveValueFrequencyLowerBound int64 `json:"sensitiveValueFrequencyLowerBound,omitempty,string"` - - // SensitiveValueFrequencyUpperBound: Upper bound on the sensitive value - // frequencies of the equivalence - // classes in this bucket. - SensitiveValueFrequencyUpperBound int64 `json:"sensitiveValueFrequencyUpperBound,omitempty,string"` - - // ForceSendFields is a list of field names (e.g. "BucketSize") 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. "BucketSize") 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 *GooglePrivacyDlpV2beta1LDiversityHistogramBucket) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta1LDiversityHistogramBucket - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta1LDiversityResult: Result of the l-diversity -// computation. -type GooglePrivacyDlpV2beta1LDiversityResult struct { - // SensitiveValueFrequencyHistogramBuckets: Histogram of l-diversity - // equivalence class sensitive value frequencies. - SensitiveValueFrequencyHistogramBuckets []*GooglePrivacyDlpV2beta1LDiversityHistogramBucket `json:"sensitiveValueFrequencyHistogramBuckets,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "SensitiveValueFrequencyHistogramBuckets") 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. - // "SensitiveValueFrequencyHistogramBuckets") 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 *GooglePrivacyDlpV2beta1LDiversityResult) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta1LDiversityResult - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta1ListInfoTypesResponse: Response to the -// ListInfoTypes request. -type GooglePrivacyDlpV2beta1ListInfoTypesResponse struct { - // InfoTypes: Set of sensitive info types belonging to a category. - InfoTypes []*GooglePrivacyDlpV2beta1InfoTypeDescription `json:"infoTypes,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "InfoTypes") 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. "InfoTypes") 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 *GooglePrivacyDlpV2beta1ListInfoTypesResponse) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta1ListInfoTypesResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta1ListInspectFindingsResponse: Response to the -// ListInspectFindings request. -type GooglePrivacyDlpV2beta1ListInspectFindingsResponse struct { - // NextPageToken: If not empty, indicates that there may be more results - // that match the - // request; this value should be passed in a new - // `ListInspectFindingsRequest`. - NextPageToken string `json:"nextPageToken,omitempty"` - - // Result: The results. - Result *GooglePrivacyDlpV2beta1InspectResult `json:"result,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "NextPageToken") 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. "NextPageToken") 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 *GooglePrivacyDlpV2beta1ListInspectFindingsResponse) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta1ListInspectFindingsResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta1ListRootCategoriesResponse: Response for -// ListRootCategories request. -type GooglePrivacyDlpV2beta1ListRootCategoriesResponse struct { - // Categories: List of all into type categories supported by the API. - Categories []*GooglePrivacyDlpV2beta1CategoryDescription `json:"categories,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Categories") 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. "Categories") 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 *GooglePrivacyDlpV2beta1ListRootCategoriesResponse) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta1ListRootCategoriesResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta1Location: Specifies the location of the -// finding. -type GooglePrivacyDlpV2beta1Location struct { - // ByteRange: Zero-based byte offsets delimiting the finding. - // These are relative to the finding's containing element. - // Note that when the content is not textual, this references - // the UTF-8 encoded textual representation of the content. - // Omitted if content is an image. - ByteRange *GooglePrivacyDlpV2beta1Range `json:"byteRange,omitempty"` - - // CodepointRange: Unicode character offsets delimiting the - // finding. - // These are relative to the finding's containing element. - // Provided when the content is text. - CodepointRange *GooglePrivacyDlpV2beta1Range `json:"codepointRange,omitempty"` - - // FieldId: The pointer to the property or cell that contained the - // finding. - // Provided when the finding's containing element is a cell in a - // table - // or a property of storage object. - FieldId *GooglePrivacyDlpV2beta1FieldId `json:"fieldId,omitempty"` - - // ImageBoxes: The area within the image that contained the - // finding. - // Provided when the content is an image. - ImageBoxes []*GooglePrivacyDlpV2beta1ImageLocation `json:"imageBoxes,omitempty"` - - // RecordKey: The pointer to the record in storage that contained the - // field the - // finding was found in. - // Provided when the finding's containing element is a property - // of a storage object. - RecordKey *GooglePrivacyDlpV2beta1RecordKey `json:"recordKey,omitempty"` - - // TableLocation: The pointer to the row of the table that contained the - // finding. - // Provided when the finding's containing element is a cell of a table. - TableLocation *GooglePrivacyDlpV2beta1TableLocation `json:"tableLocation,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ByteRange") 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. "ByteRange") 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 *GooglePrivacyDlpV2beta1Location) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta1Location - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta1NumericalStatsConfig: Compute numerical stats -// over an individual column, including -// min, max, and quantiles. -type GooglePrivacyDlpV2beta1NumericalStatsConfig struct { - // Field: Field to compute numerical stats on. Supported types - // are - // integer, float, date, datetime, timestamp, time. - Field *GooglePrivacyDlpV2beta1FieldId `json:"field,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Field") 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. "Field") 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 *GooglePrivacyDlpV2beta1NumericalStatsConfig) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta1NumericalStatsConfig - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta1NumericalStatsResult: Result of the numerical -// stats computation. -type GooglePrivacyDlpV2beta1NumericalStatsResult struct { - // MaxValue: Maximum value appearing in the column. - MaxValue *GooglePrivacyDlpV2beta1Value `json:"maxValue,omitempty"` - - // MinValue: Minimum value appearing in the column. - MinValue *GooglePrivacyDlpV2beta1Value `json:"minValue,omitempty"` - - // QuantileValues: List of 99 values that partition the set of field - // values into 100 equal - // sized buckets. - QuantileValues []*GooglePrivacyDlpV2beta1Value `json:"quantileValues,omitempty"` - - // ForceSendFields is a list of field names (e.g. "MaxValue") 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. "MaxValue") 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 *GooglePrivacyDlpV2beta1NumericalStatsResult) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta1NumericalStatsResult - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta1OperationConfig: Additional configuration for -// inspect long running operations. -type GooglePrivacyDlpV2beta1OperationConfig struct { - // MaxItemFindings: Max number of findings per file, Datastore entity, - // or database row. - MaxItemFindings int64 `json:"maxItemFindings,omitempty,string"` - - // ForceSendFields is a list of field names (e.g. "MaxItemFindings") 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. "MaxItemFindings") 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 *GooglePrivacyDlpV2beta1OperationConfig) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta1OperationConfig - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta1OutputStorageConfig: Cloud repository for -// storing output. -type GooglePrivacyDlpV2beta1OutputStorageConfig struct { - // StoragePath: The path to a Google Cloud Storage location to store - // output. - // The bucket must already exist and - // the Google APIs service account for DLP must have write permission - // to - // write to the given bucket. - // Results are split over multiple csv files with each file name - // matching - // the pattern "[operation_id]_[count].csv", for - // example - // `3094877188788974909_1.csv`. The `operation_id` matches - // the - // identifier for the Operation, and the `count` is a counter used - // for - // tracking the number of files written. - // - // The CSV file(s) contain the following columns regardless of storage - // type - // scanned: - // - id - // - info_type - // - likelihood - // - byte size of finding - // - quote - // - timestamp - // - // For Cloud Storage the next columns are: - // - // - file_path - // - start_offset - // - // For Cloud Datastore the next columns are: - // - // - project_id - // - namespace_id - // - path - // - column_name - // - offset - // - // For BigQuery the next columns are: - // - // - row_number - // - project_id - // - dataset_id - // - table_id - StoragePath *GooglePrivacyDlpV2beta1CloudStoragePath `json:"storagePath,omitempty"` - - // Table: Store findings in a new table in the dataset. - Table *GooglePrivacyDlpV2beta1BigQueryTable `json:"table,omitempty"` - - // ForceSendFields is a list of field names (e.g. "StoragePath") 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. "StoragePath") 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 *GooglePrivacyDlpV2beta1OutputStorageConfig) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta1OutputStorageConfig - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta1PartitionId: Datastore partition ID. -// A partition ID identifies a grouping of entities. The grouping is -// always -// by project and namespace, however the namespace ID may be empty. -// -// A partition ID contains several dimensions: -// project ID and namespace ID. -type GooglePrivacyDlpV2beta1PartitionId struct { - // NamespaceId: If not empty, the ID of the namespace to which the - // entities belong. - NamespaceId string `json:"namespaceId,omitempty"` - - // ProjectId: The ID of the project to which the entities belong. - ProjectId string `json:"projectId,omitempty"` - - // ForceSendFields is a list of field names (e.g. "NamespaceId") 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. "NamespaceId") 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 *GooglePrivacyDlpV2beta1PartitionId) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta1PartitionId - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta1PathElement: A (kind, ID/name) pair used to -// construct a key path. -// -// If either name or ID is set, the element is complete. -// If neither is set, the element is incomplete. -type GooglePrivacyDlpV2beta1PathElement struct { - // Id: The auto-allocated ID of the entity. - // Never equal to zero. Values less than zero are discouraged and may - // not - // be supported in the future. - Id int64 `json:"id,omitempty,string"` - - // Kind: The kind of the entity. - // A kind matching regex `__.*__` is reserved/read-only. - // A kind must not contain more than 1500 bytes when UTF-8 - // encoded. - // Cannot be "". - Kind string `json:"kind,omitempty"` - - // Name: The name of the entity. - // A name matching regex `__.*__` is reserved/read-only. - // A name must not be more than 1500 bytes when UTF-8 encoded. - // Cannot be "". - Name string `json:"name,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Id") 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. "Id") 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 *GooglePrivacyDlpV2beta1PathElement) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta1PathElement - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta1PrimitiveTransformation: A rule for -// transforming a value. -type GooglePrivacyDlpV2beta1PrimitiveTransformation struct { - BucketingConfig *GooglePrivacyDlpV2beta1BucketingConfig `json:"bucketingConfig,omitempty"` - - CharacterMaskConfig *GooglePrivacyDlpV2beta1CharacterMaskConfig `json:"characterMaskConfig,omitempty"` - - CryptoHashConfig *GooglePrivacyDlpV2beta1CryptoHashConfig `json:"cryptoHashConfig,omitempty"` - - CryptoReplaceFfxFpeConfig *GooglePrivacyDlpV2beta1CryptoReplaceFfxFpeConfig `json:"cryptoReplaceFfxFpeConfig,omitempty"` - - FixedSizeBucketingConfig *GooglePrivacyDlpV2beta1FixedSizeBucketingConfig `json:"fixedSizeBucketingConfig,omitempty"` - - RedactConfig *GooglePrivacyDlpV2beta1RedactConfig `json:"redactConfig,omitempty"` - - ReplaceConfig *GooglePrivacyDlpV2beta1ReplaceValueConfig `json:"replaceConfig,omitempty"` - - ReplaceWithInfoTypeConfig *GooglePrivacyDlpV2beta1ReplaceWithInfoTypeConfig `json:"replaceWithInfoTypeConfig,omitempty"` - - TimePartConfig *GooglePrivacyDlpV2beta1TimePartConfig `json:"timePartConfig,omitempty"` - - // ForceSendFields is a list of field names (e.g. "BucketingConfig") 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. "BucketingConfig") 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 *GooglePrivacyDlpV2beta1PrimitiveTransformation) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta1PrimitiveTransformation - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta1PrivacyMetric: Privacy metric to compute for -// reidentification risk analysis. -type GooglePrivacyDlpV2beta1PrivacyMetric struct { - CategoricalStatsConfig *GooglePrivacyDlpV2beta1CategoricalStatsConfig `json:"categoricalStatsConfig,omitempty"` - - KAnonymityConfig *GooglePrivacyDlpV2beta1KAnonymityConfig `json:"kAnonymityConfig,omitempty"` - - KMapEstimationConfig *GooglePrivacyDlpV2beta1KMapEstimationConfig `json:"kMapEstimationConfig,omitempty"` - - LDiversityConfig *GooglePrivacyDlpV2beta1LDiversityConfig `json:"lDiversityConfig,omitempty"` - - NumericalStatsConfig *GooglePrivacyDlpV2beta1NumericalStatsConfig `json:"numericalStatsConfig,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "CategoricalStatsConfig") 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. "CategoricalStatsConfig") - // 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 *GooglePrivacyDlpV2beta1PrivacyMetric) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta1PrivacyMetric - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta1Projection: A representation of a Datastore -// property in a projection. -type GooglePrivacyDlpV2beta1Projection struct { - // Property: The property to project. - Property *GooglePrivacyDlpV2beta1PropertyReference `json:"property,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Property") 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. "Property") 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 *GooglePrivacyDlpV2beta1Projection) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta1Projection - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta1PropertyReference: A reference to a property -// relative to the Datastore kind expressions. -type GooglePrivacyDlpV2beta1PropertyReference struct { - // Name: The name of the property. - // If name includes "."s, it may be interpreted as a property name path. - Name string `json:"name,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Name") 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. "Name") 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 *GooglePrivacyDlpV2beta1PropertyReference) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta1PropertyReference - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta1QuasiIdField: A quasi-identifier column has a -// custom_tag, used to know which column -// in the data corresponds to which column in the statistical model. -type GooglePrivacyDlpV2beta1QuasiIdField struct { - CustomTag string `json:"customTag,omitempty"` - - Field *GooglePrivacyDlpV2beta1FieldId `json:"field,omitempty"` - - // ForceSendFields is a list of field names (e.g. "CustomTag") 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. "CustomTag") 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 *GooglePrivacyDlpV2beta1QuasiIdField) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta1QuasiIdField - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta1Range: Generic half-open interval [start, end) -type GooglePrivacyDlpV2beta1Range struct { - // End: Index of the last character of the range (exclusive). - End int64 `json:"end,omitempty,string"` - - // Start: Index of the first character of the range (inclusive). - Start int64 `json:"start,omitempty,string"` - - // ForceSendFields is a list of field names (e.g. "End") 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. "End") 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 *GooglePrivacyDlpV2beta1Range) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta1Range - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta1RecordCondition: A condition for determining -// whether a transformation should be applied to -// a field. -type GooglePrivacyDlpV2beta1RecordCondition struct { - Expressions *GooglePrivacyDlpV2beta1Expressions `json:"expressions,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Expressions") 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. "Expressions") 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 *GooglePrivacyDlpV2beta1RecordCondition) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta1RecordCondition - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta1RecordKey: Message for a unique key indicating -// a record that contains a finding. -type GooglePrivacyDlpV2beta1RecordKey struct { - BigQueryKey *GooglePrivacyDlpV2beta1BigQueryKey `json:"bigQueryKey,omitempty"` - - CloudStorageKey *GooglePrivacyDlpV2beta1CloudStorageKey `json:"cloudStorageKey,omitempty"` - - DatastoreKey *GooglePrivacyDlpV2beta1DatastoreKey `json:"datastoreKey,omitempty"` - - // ForceSendFields is a list of field names (e.g. "BigQueryKey") 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. "BigQueryKey") 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 *GooglePrivacyDlpV2beta1RecordKey) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta1RecordKey - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta1RecordSuppression: Configuration to suppress -// records whose suppression conditions evaluate to -// true. -type GooglePrivacyDlpV2beta1RecordSuppression struct { - Condition *GooglePrivacyDlpV2beta1RecordCondition `json:"condition,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Condition") 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. "Condition") 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 *GooglePrivacyDlpV2beta1RecordSuppression) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta1RecordSuppression - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta1RecordTransformations: A type of -// transformation that is applied over structured data such as a -// table. -type GooglePrivacyDlpV2beta1RecordTransformations struct { - // FieldTransformations: Transform the record by applying various field - // transformations. - FieldTransformations []*GooglePrivacyDlpV2beta1FieldTransformation `json:"fieldTransformations,omitempty"` - - // RecordSuppressions: Configuration defining which records get - // suppressed entirely. Records that - // match any suppression rule are omitted from the output [optional]. - RecordSuppressions []*GooglePrivacyDlpV2beta1RecordSuppression `json:"recordSuppressions,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "FieldTransformations") 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. "FieldTransformations") 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 *GooglePrivacyDlpV2beta1RecordTransformations) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta1RecordTransformations - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta1RedactConfig: Redact a given value. For -// example, if used with an `InfoTypeTransformation` -// transforming PHONE_NUMBER, and input 'My phone number is -// 206-555-0123', the -// output would be 'My phone number is '. -type GooglePrivacyDlpV2beta1RedactConfig struct { -} - -// GooglePrivacyDlpV2beta1RedactContentRequest: Request to search for -// potentially sensitive info in a list of items -// and replace it with a default or provided content. -type GooglePrivacyDlpV2beta1RedactContentRequest struct { - // ImageRedactionConfigs: The configuration for specifying what content - // to redact from images. - ImageRedactionConfigs []*GooglePrivacyDlpV2beta1ImageRedactionConfig `json:"imageRedactionConfigs,omitempty"` - - // InspectConfig: Configuration for the inspector. - InspectConfig *GooglePrivacyDlpV2beta1InspectConfig `json:"inspectConfig,omitempty"` - - // Items: The list of items to inspect. Up to 100 are allowed per - // request. - Items []*GooglePrivacyDlpV2beta1ContentItem `json:"items,omitempty"` - - // ReplaceConfigs: The strings to replace findings text findings with. - // Must specify at least - // one of these or one ImageRedactionConfig if redacting images. - ReplaceConfigs []*GooglePrivacyDlpV2beta1ReplaceConfig `json:"replaceConfigs,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "ImageRedactionConfigs") 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. "ImageRedactionConfigs") 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 *GooglePrivacyDlpV2beta1RedactContentRequest) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta1RedactContentRequest - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta1RedactContentResponse: Results of redacting a -// list of items. -type GooglePrivacyDlpV2beta1RedactContentResponse struct { - // Items: The redacted content. - Items []*GooglePrivacyDlpV2beta1ContentItem `json:"items,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Items") 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. "Items") 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 *GooglePrivacyDlpV2beta1RedactContentResponse) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta1RedactContentResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type GooglePrivacyDlpV2beta1ReplaceConfig struct { - // InfoType: Type of information to replace. Only one ReplaceConfig per - // info_type - // should be provided. If ReplaceConfig does not have an info_type, the - // DLP - // API matches it against all info_types that are found but not - // specified in - // another ReplaceConfig. - InfoType *GooglePrivacyDlpV2beta1InfoType `json:"infoType,omitempty"` - - // ReplaceWith: Content replacing sensitive information of given type. - // Max 256 chars. - ReplaceWith string `json:"replaceWith,omitempty"` - - // ForceSendFields is a list of field names (e.g. "InfoType") 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. "InfoType") 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 *GooglePrivacyDlpV2beta1ReplaceConfig) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta1ReplaceConfig - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta1ReplaceValueConfig: Replace each input value -// with a given `Value`. -type GooglePrivacyDlpV2beta1ReplaceValueConfig struct { - // NewValue: Value to replace it with. - NewValue *GooglePrivacyDlpV2beta1Value `json:"newValue,omitempty"` - - // ForceSendFields is a list of field names (e.g. "NewValue") 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. "NewValue") 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 *GooglePrivacyDlpV2beta1ReplaceValueConfig) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta1ReplaceValueConfig - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta1ReplaceWithInfoTypeConfig: Replace each -// matching finding with the name of the info_type. -type GooglePrivacyDlpV2beta1ReplaceWithInfoTypeConfig struct { -} - -// GooglePrivacyDlpV2beta1RiskAnalysisOperationMetadata: Metadata -// returned within -// the -// [`riskAnalysis.operations.get`](/dlp/docs/reference/rest/v2beta1/r -// iskAnalysis.operations/get) -// for risk analysis. -type GooglePrivacyDlpV2beta1RiskAnalysisOperationMetadata struct { - // CreateTime: The time which this request was started. - CreateTime string `json:"createTime,omitempty"` - - // RequestedPrivacyMetric: Privacy metric to compute. - RequestedPrivacyMetric *GooglePrivacyDlpV2beta1PrivacyMetric `json:"requestedPrivacyMetric,omitempty"` - - // RequestedSourceTable: Input dataset to compute metrics over. - RequestedSourceTable *GooglePrivacyDlpV2beta1BigQueryTable `json:"requestedSourceTable,omitempty"` - - // ForceSendFields is a list of field names (e.g. "CreateTime") 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. "CreateTime") 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 *GooglePrivacyDlpV2beta1RiskAnalysisOperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta1RiskAnalysisOperationMetadata - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta1RiskAnalysisOperationResult: Result of a risk -// analysis -// [`Operation`](/dlp/docs/reference/rest/v2beta1/inspect.operat -// ions) -// request. -type GooglePrivacyDlpV2beta1RiskAnalysisOperationResult struct { - CategoricalStatsResult *GooglePrivacyDlpV2beta1CategoricalStatsResult `json:"categoricalStatsResult,omitempty"` - - KAnonymityResult *GooglePrivacyDlpV2beta1KAnonymityResult `json:"kAnonymityResult,omitempty"` - - KMapEstimationResult *GooglePrivacyDlpV2beta1KMapEstimationResult `json:"kMapEstimationResult,omitempty"` - - LDiversityResult *GooglePrivacyDlpV2beta1LDiversityResult `json:"lDiversityResult,omitempty"` - - NumericalStatsResult *GooglePrivacyDlpV2beta1NumericalStatsResult `json:"numericalStatsResult,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "CategoricalStatsResult") 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. "CategoricalStatsResult") - // 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 *GooglePrivacyDlpV2beta1RiskAnalysisOperationResult) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta1RiskAnalysisOperationResult - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type GooglePrivacyDlpV2beta1Row struct { - Values []*GooglePrivacyDlpV2beta1Value `json:"values,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Values") 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. "Values") 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 *GooglePrivacyDlpV2beta1Row) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta1Row - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta1StorageConfig: Shared message indicating Cloud -// storage type. -type GooglePrivacyDlpV2beta1StorageConfig struct { - // BigQueryOptions: BigQuery options specification. - BigQueryOptions *GooglePrivacyDlpV2beta1BigQueryOptions `json:"bigQueryOptions,omitempty"` - - // CloudStorageOptions: Google Cloud Storage options specification. - CloudStorageOptions *GooglePrivacyDlpV2beta1CloudStorageOptions `json:"cloudStorageOptions,omitempty"` - - // DatastoreOptions: Google Cloud Datastore options specification. - DatastoreOptions *GooglePrivacyDlpV2beta1DatastoreOptions `json:"datastoreOptions,omitempty"` - - // ForceSendFields is a list of field names (e.g. "BigQueryOptions") 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. "BigQueryOptions") 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 *GooglePrivacyDlpV2beta1StorageConfig) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta1StorageConfig - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta1SummaryResult: A collection that informs the -// user the number of times a particular -// `TransformationResultCode` and error details occurred. -type GooglePrivacyDlpV2beta1SummaryResult struct { - // Possible values: - // "TRANSFORMATION_RESULT_CODE_UNSPECIFIED" - // "SUCCESS" - // "ERROR" - Code string `json:"code,omitempty"` - - Count int64 `json:"count,omitempty,string"` - - // Details: A place for warnings or errors to show up if a - // transformation didn't - // work as expected. - Details string `json:"details,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Code") 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. "Code") 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 *GooglePrivacyDlpV2beta1SummaryResult) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta1SummaryResult - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta1SurrogateType: Message for detecting output -// from deidentification transformations -// such -// as -// [`CryptoReplaceFfxFpeConfig`](/dlp/docs/reference/rest/v2beta1/cont -// ent/deidentify#CryptoReplaceFfxFpeConfig). -// These types of transformations are -// those that perform pseudonymization, thereby producing a "surrogate" -// as -// output. This should be used in conjunction with a field on -// the -// transformation such as `surrogate_info_type`. This custom info type -// does -// not support the use of `detection_rules`. -type GooglePrivacyDlpV2beta1SurrogateType struct { -} - -// GooglePrivacyDlpV2beta1Table: Structured content to inspect. Up to -// 50,000 `Value`s per request allowed. -type GooglePrivacyDlpV2beta1Table struct { - Headers []*GooglePrivacyDlpV2beta1FieldId `json:"headers,omitempty"` - - Rows []*GooglePrivacyDlpV2beta1Row `json:"rows,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Headers") 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. "Headers") 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 *GooglePrivacyDlpV2beta1Table) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta1Table - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta1TableLocation: Location of a finding within a -// table. -type GooglePrivacyDlpV2beta1TableLocation struct { - // RowIndex: The zero-based index of the row where the finding is - // located. - RowIndex int64 `json:"rowIndex,omitempty,string"` - - // ForceSendFields is a list of field names (e.g. "RowIndex") 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. "RowIndex") 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 *GooglePrivacyDlpV2beta1TableLocation) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta1TableLocation - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta1TaggedField: A column with a semantic tag -// attached. -type GooglePrivacyDlpV2beta1TaggedField struct { - // CustomTag: A column can be tagged with a custom tag. In this case, - // the user must - // indicate an auxiliary table that contains statistical information - // on - // the possible values of this column (below). - CustomTag string `json:"customTag,omitempty"` - - // Field: Identifies the column. [required] - Field *GooglePrivacyDlpV2beta1FieldId `json:"field,omitempty"` - - // Inferred: If no semantic tag is indicated, we infer the statistical - // model from - // the distribution of values in the input data - Inferred *GoogleProtobufEmpty `json:"inferred,omitempty"` - - // InfoType: A column can be tagged with a InfoType to use the relevant - // public - // dataset as a statistical model of population, if available. - // We - // currently support US ZIP codes, region codes, ages and genders. - InfoType *GooglePrivacyDlpV2beta1InfoType `json:"infoType,omitempty"` - - // ForceSendFields is a list of field names (e.g. "CustomTag") 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. "CustomTag") 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 *GooglePrivacyDlpV2beta1TaggedField) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta1TaggedField - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta1TimePartConfig: For use with `Date`, -// `Timestamp`, and `TimeOfDay`, extract or preserve a -// portion of the value. -type GooglePrivacyDlpV2beta1TimePartConfig struct { - // Possible values: - // "TIME_PART_UNSPECIFIED" - // "YEAR" - [000-9999] - // "MONTH" - [1-12] - // "DAY_OF_MONTH" - [1-31] - // "DAY_OF_WEEK" - [1-7] - // "WEEK_OF_YEAR" - [1-52] - // "HOUR_OF_DAY" - [0-24] - PartToExtract string `json:"partToExtract,omitempty"` - - // ForceSendFields is a list of field names (e.g. "PartToExtract") 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. "PartToExtract") 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 *GooglePrivacyDlpV2beta1TimePartConfig) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta1TimePartConfig - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta1TransformationSummary: Summary of a single -// tranformation. -// Only one of 'transformation', 'field_transformation', or -// 'record_suppress' -// will be set. -type GooglePrivacyDlpV2beta1TransformationSummary struct { - // Field: Set if the transformation was limited to a specific FieldId. - Field *GooglePrivacyDlpV2beta1FieldId `json:"field,omitempty"` - - // FieldTransformations: The field transformation that was applied. - // If multiple field transformations are requested for a single - // field, - // this list will contain all of them; otherwise, only one is supplied. - FieldTransformations []*GooglePrivacyDlpV2beta1FieldTransformation `json:"fieldTransformations,omitempty"` - - // InfoType: Set if the transformation was limited to a specific - // info_type. - InfoType *GooglePrivacyDlpV2beta1InfoType `json:"infoType,omitempty"` - - // RecordSuppress: The specific suppression option these stats apply to. - RecordSuppress *GooglePrivacyDlpV2beta1RecordSuppression `json:"recordSuppress,omitempty"` - - Results []*GooglePrivacyDlpV2beta1SummaryResult `json:"results,omitempty"` - - // Transformation: The specific transformation these stats apply to. - Transformation *GooglePrivacyDlpV2beta1PrimitiveTransformation `json:"transformation,omitempty"` - - // TransformedBytes: Total size in bytes that were transformed in some - // way. - TransformedBytes int64 `json:"transformedBytes,omitempty,string"` - - // ForceSendFields is a list of field names (e.g. "Field") 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. "Field") 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 *GooglePrivacyDlpV2beta1TransformationSummary) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta1TransformationSummary - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta1TransientCryptoKey: Use this to have a random -// data crypto key generated. -// It will be discarded after the operation/request finishes. -type GooglePrivacyDlpV2beta1TransientCryptoKey struct { - // Name: Name of the key. [required] - // This is an arbitrary string used to differentiate different keys. - // A unique key is generated per name: two separate - // `TransientCryptoKey` - // protos share the same generated key if their names are the same. - // When the data crypto key is generated, this name is not used in any - // way - // (repeating the api call will result in a different key being - // generated). - Name string `json:"name,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Name") 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. "Name") 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 *GooglePrivacyDlpV2beta1TransientCryptoKey) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta1TransientCryptoKey - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta1UnwrappedCryptoKey: Using raw keys is prone to -// security risks due to accidentally -// leaking the key. Choose another type of key if possible. -type GooglePrivacyDlpV2beta1UnwrappedCryptoKey struct { - // Key: The AES 128/192/256 bit key. [required] - Key string `json:"key,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Key") 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. "Key") 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 *GooglePrivacyDlpV2beta1UnwrappedCryptoKey) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta1UnwrappedCryptoKey - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta1Value: Set of primitive values supported by -// the system. -// Note that for the purposes of inspection or transformation, the -// number -// of bytes considered to comprise a 'Value' is based on its -// representation -// as a UTF-8 encoded string. For example, if 'integer_value' is set -// to -// 123456789, the number of bytes would be counted as 9, even though -// an -// int64 only holds up to 8 bytes of data. -type GooglePrivacyDlpV2beta1Value struct { - BooleanValue bool `json:"booleanValue,omitempty"` - - DateValue *GoogleTypeDate `json:"dateValue,omitempty"` - - FloatValue float64 `json:"floatValue,omitempty"` - - IntegerValue int64 `json:"integerValue,omitempty,string"` - - StringValue string `json:"stringValue,omitempty"` - - TimeValue *GoogleTypeTimeOfDay `json:"timeValue,omitempty"` - - TimestampValue string `json:"timestampValue,omitempty"` - - // ForceSendFields is a list of field names (e.g. "BooleanValue") 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. "BooleanValue") 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 *GooglePrivacyDlpV2beta1Value) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta1Value - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *GooglePrivacyDlpV2beta1Value) UnmarshalJSON(data []byte) error { - type NoMethod GooglePrivacyDlpV2beta1Value - var s1 struct { - FloatValue gensupport.JSONFloat64 `json:"floatValue"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.FloatValue = float64(s1.FloatValue) - return nil -} - -// GooglePrivacyDlpV2beta1ValueFrequency: A value of a field, including -// its frequency. -type GooglePrivacyDlpV2beta1ValueFrequency struct { - // Count: How many times the value is contained in the field. - Count int64 `json:"count,omitempty,string"` - - // Value: A value contained in the field in question. - Value *GooglePrivacyDlpV2beta1Value `json:"value,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Count") 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. "Count") 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 *GooglePrivacyDlpV2beta1ValueFrequency) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta1ValueFrequency - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta1WordList: Message defining a list of words or -// phrases to search for in the data. -type GooglePrivacyDlpV2beta1WordList struct { - // Words: Words or phrases defining the dictionary. The dictionary must - // contain - // at least one phrase and every phrase must contain at least 2 - // characters - // that are letters or digits. [required] - Words []string `json:"words,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Words") 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. "Words") 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 *GooglePrivacyDlpV2beta1WordList) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta1WordList - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GoogleProtobufEmpty: A generic empty message that you can re-use to -// avoid defining duplicated -// empty messages in your APIs. A typical example is to use it as the -// request -// or the response type of an API method. For instance: -// -// service Foo { -// rpc Bar(google.protobuf.Empty) returns -// (google.protobuf.Empty); -// } -// -// The JSON representation for `Empty` is empty JSON object `{}`. -type GoogleProtobufEmpty struct { - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` -} - -// GoogleRpcStatus: The `Status` type defines a logical error model that -// is suitable for different -// programming environments, including REST APIs and RPC APIs. It is -// used by -// [gRPC](https://github.com/grpc). The error model is designed to -// be: -// -// - Simple to use and understand for most users -// - Flexible enough to meet unexpected needs -// -// # Overview -// -// The `Status` message contains three pieces of data: error code, error -// message, -// and error details. The error code should be an enum value -// of -// google.rpc.Code, but it may accept additional error codes if needed. -// The -// error message should be a developer-facing English message that -// helps -// developers *understand* and *resolve* the error. If a localized -// user-facing -// error message is needed, put the localized message in the error -// details or -// localize it in the client. The optional error details may contain -// arbitrary -// information about the error. There is a predefined set of error -// detail types -// in the package `google.rpc` that can be used for common error -// conditions. -// -// # Language mapping -// -// The `Status` message is the logical representation of the error -// model, but it -// is not necessarily the actual wire format. When the `Status` message -// is -// exposed in different client libraries and different wire protocols, -// it can be -// mapped differently. For example, it will likely be mapped to some -// exceptions -// in Java, but more likely mapped to some error codes in C. -// -// # Other uses -// -// The error model and the `Status` message can be used in a variety -// of -// environments, either with or without APIs, to provide a -// consistent developer experience across different -// environments. -// -// Example uses of this error model include: -// -// - Partial errors. If a service needs to return partial errors to the -// client, -// it may embed the `Status` in the normal response to indicate the -// partial -// errors. -// -// - Workflow errors. A typical workflow has multiple steps. Each step -// may -// have a `Status` message for error reporting. -// -// - Batch operations. If a client uses batch request and batch -// response, the -// `Status` message should be used directly inside batch response, -// one for -// each error sub-response. -// -// - Asynchronous operations. If an API call embeds asynchronous -// operation -// results in its response, the status of those operations should -// be -// represented directly using the `Status` message. -// -// - Logging. If some API errors are stored in logs, the message -// `Status` could -// be used directly after any stripping needed for security/privacy -// reasons. -type GoogleRpcStatus struct { - // Code: The status code, which should be an enum value of - // google.rpc.Code. - Code int64 `json:"code,omitempty"` - - // Details: A list of messages that carry the error details. There is a - // common set of - // message types for APIs to use. - Details []googleapi.RawMessage `json:"details,omitempty"` - - // Message: A developer-facing error message, which should be in - // English. Any - // user-facing error message should be localized and sent in - // the - // google.rpc.Status.details field, or localized by the client. - Message string `json:"message,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Code") 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. "Code") 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 *GoogleRpcStatus) MarshalJSON() ([]byte, error) { - type NoMethod GoogleRpcStatus - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GoogleTypeDate: Represents a whole calendar date, e.g. date of birth. -// The time of day and -// time zone are either specified elsewhere or are not significant. The -// date -// is relative to the Proleptic Gregorian Calendar. The day may be 0 -// to -// represent a year and month where the day is not significant, e.g. -// credit card -// expiration date. The year may be 0 to represent a month and day -// independent -// of year, e.g. anniversary date. Related types are -// google.type.TimeOfDay -// and `google.protobuf.Timestamp`. -type GoogleTypeDate struct { - // Day: Day of month. Must be from 1 to 31 and valid for the year and - // month, or 0 - // if specifying a year/month where the day is not significant. - Day int64 `json:"day,omitempty"` - - // Month: Month of year. Must be from 1 to 12, or 0 if specifying a date - // without a - // month. - Month int64 `json:"month,omitempty"` - - // Year: Year of date. Must be from 1 to 9999, or 0 if specifying a date - // without - // a year. - Year int64 `json:"year,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Day") 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. "Day") 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 *GoogleTypeDate) MarshalJSON() ([]byte, error) { - type NoMethod GoogleTypeDate - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GoogleTypeTimeOfDay: Represents a time of day. The date and time zone -// are either not significant -// or are specified elsewhere. An API may choose to allow leap seconds. -// Related -// types are google.type.Date and `google.protobuf.Timestamp`. -type GoogleTypeTimeOfDay struct { - // Hours: Hours of day in 24 hour format. Should be from 0 to 23. An API - // may choose - // to allow the value "24:00:00" for scenarios like business closing - // time. - Hours int64 `json:"hours,omitempty"` - - // Minutes: Minutes of hour of day. Must be from 0 to 59. - Minutes int64 `json:"minutes,omitempty"` - - // Nanos: Fractions of seconds in nanoseconds. Must be from 0 to - // 999,999,999. - Nanos int64 `json:"nanos,omitempty"` - - // Seconds: Seconds of minutes of the time. Must normally be from 0 to - // 59. An API may - // allow the value 60 if it allows leap-seconds. - Seconds int64 `json:"seconds,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Hours") 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. "Hours") 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 *GoogleTypeTimeOfDay) MarshalJSON() ([]byte, error) { - type NoMethod GoogleTypeTimeOfDay - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// method id "dlp.content.deidentify": - -type ContentDeidentifyCall struct { - s *Service - googleprivacydlpv2beta1deidentifycontentrequest *GooglePrivacyDlpV2beta1DeidentifyContentRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Deidentify: De-identifies potentially sensitive info from a list of -// strings. -// This method has limits on input size and output size. -func (r *ContentService) Deidentify(googleprivacydlpv2beta1deidentifycontentrequest *GooglePrivacyDlpV2beta1DeidentifyContentRequest) *ContentDeidentifyCall { - c := &ContentDeidentifyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.googleprivacydlpv2beta1deidentifycontentrequest = googleprivacydlpv2beta1deidentifycontentrequest - 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 *ContentDeidentifyCall) Fields(s ...googleapi.Field) *ContentDeidentifyCall { - 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 *ContentDeidentifyCall) Context(ctx context.Context) *ContentDeidentifyCall { - 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 *ContentDeidentifyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ContentDeidentifyCall) 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.googleprivacydlpv2beta1deidentifycontentrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/content:deidentify") - 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 "dlp.content.deidentify" call. -// Exactly one of *GooglePrivacyDlpV2beta1DeidentifyContentResponse or -// error will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GooglePrivacyDlpV2beta1DeidentifyContentResponse.ServerResponse.Heade -// r 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 *ContentDeidentifyCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2beta1DeidentifyContentResponse, 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 := &GooglePrivacyDlpV2beta1DeidentifyContentResponse{ - 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": "De-identifies potentially sensitive info from a list of strings.\nThis method has limits on input size and output size.", - // "flatPath": "v2beta1/content:deidentify", - // "httpMethod": "POST", - // "id": "dlp.content.deidentify", - // "parameterOrder": [], - // "parameters": {}, - // "path": "v2beta1/content:deidentify", - // "request": { - // "$ref": "GooglePrivacyDlpV2beta1DeidentifyContentRequest" - // }, - // "response": { - // "$ref": "GooglePrivacyDlpV2beta1DeidentifyContentResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "dlp.content.inspect": - -type ContentInspectCall struct { - s *Service - googleprivacydlpv2beta1inspectcontentrequest *GooglePrivacyDlpV2beta1InspectContentRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Inspect: Finds potentially sensitive info in a list of strings. -// This method has limits on input size, processing time, and output -// size. -func (r *ContentService) Inspect(googleprivacydlpv2beta1inspectcontentrequest *GooglePrivacyDlpV2beta1InspectContentRequest) *ContentInspectCall { - c := &ContentInspectCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.googleprivacydlpv2beta1inspectcontentrequest = googleprivacydlpv2beta1inspectcontentrequest - 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 *ContentInspectCall) Fields(s ...googleapi.Field) *ContentInspectCall { - 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 *ContentInspectCall) Context(ctx context.Context) *ContentInspectCall { - 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 *ContentInspectCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ContentInspectCall) 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.googleprivacydlpv2beta1inspectcontentrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/content:inspect") - 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 "dlp.content.inspect" call. -// Exactly one of *GooglePrivacyDlpV2beta1InspectContentResponse or -// error will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GooglePrivacyDlpV2beta1InspectContentResponse.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 *ContentInspectCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2beta1InspectContentResponse, 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 := &GooglePrivacyDlpV2beta1InspectContentResponse{ - 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": "Finds potentially sensitive info in a list of strings.\nThis method has limits on input size, processing time, and output size.", - // "flatPath": "v2beta1/content:inspect", - // "httpMethod": "POST", - // "id": "dlp.content.inspect", - // "parameterOrder": [], - // "parameters": {}, - // "path": "v2beta1/content:inspect", - // "request": { - // "$ref": "GooglePrivacyDlpV2beta1InspectContentRequest" - // }, - // "response": { - // "$ref": "GooglePrivacyDlpV2beta1InspectContentResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "dlp.content.redact": - -type ContentRedactCall struct { - s *Service - googleprivacydlpv2beta1redactcontentrequest *GooglePrivacyDlpV2beta1RedactContentRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Redact: Redacts potentially sensitive info from a list of -// strings. -// This method has limits on input size, processing time, and output -// size. -func (r *ContentService) Redact(googleprivacydlpv2beta1redactcontentrequest *GooglePrivacyDlpV2beta1RedactContentRequest) *ContentRedactCall { - c := &ContentRedactCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.googleprivacydlpv2beta1redactcontentrequest = googleprivacydlpv2beta1redactcontentrequest - 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 *ContentRedactCall) Fields(s ...googleapi.Field) *ContentRedactCall { - 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 *ContentRedactCall) Context(ctx context.Context) *ContentRedactCall { - 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 *ContentRedactCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ContentRedactCall) 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.googleprivacydlpv2beta1redactcontentrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/content:redact") - 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 "dlp.content.redact" call. -// Exactly one of *GooglePrivacyDlpV2beta1RedactContentResponse or error -// will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GooglePrivacyDlpV2beta1RedactContentResponse.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 *ContentRedactCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2beta1RedactContentResponse, 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 := &GooglePrivacyDlpV2beta1RedactContentResponse{ - 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": "Redacts potentially sensitive info from a list of strings.\nThis method has limits on input size, processing time, and output size.", - // "flatPath": "v2beta1/content:redact", - // "httpMethod": "POST", - // "id": "dlp.content.redact", - // "parameterOrder": [], - // "parameters": {}, - // "path": "v2beta1/content:redact", - // "request": { - // "$ref": "GooglePrivacyDlpV2beta1RedactContentRequest" - // }, - // "response": { - // "$ref": "GooglePrivacyDlpV2beta1RedactContentResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "dlp.dataSource.analyze": - -type DataSourceAnalyzeCall struct { - s *Service - googleprivacydlpv2beta1analyzedatasourceriskrequest *GooglePrivacyDlpV2beta1AnalyzeDataSourceRiskRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Analyze: Schedules a job to compute risk analysis metrics over -// content in a Google -// Cloud Platform repository. -func (r *DataSourceService) Analyze(googleprivacydlpv2beta1analyzedatasourceriskrequest *GooglePrivacyDlpV2beta1AnalyzeDataSourceRiskRequest) *DataSourceAnalyzeCall { - c := &DataSourceAnalyzeCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.googleprivacydlpv2beta1analyzedatasourceriskrequest = googleprivacydlpv2beta1analyzedatasourceriskrequest - 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 *DataSourceAnalyzeCall) Fields(s ...googleapi.Field) *DataSourceAnalyzeCall { - 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 *DataSourceAnalyzeCall) Context(ctx context.Context) *DataSourceAnalyzeCall { - 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 *DataSourceAnalyzeCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *DataSourceAnalyzeCall) 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.googleprivacydlpv2beta1analyzedatasourceriskrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/dataSource:analyze") - 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 "dlp.dataSource.analyze" call. -// Exactly one of *GoogleLongrunningOperation or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.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 *DataSourceAnalyzeCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, 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 := &GoogleLongrunningOperation{ - 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": "Schedules a job to compute risk analysis metrics over content in a Google\nCloud Platform repository.", - // "flatPath": "v2beta1/dataSource:analyze", - // "httpMethod": "POST", - // "id": "dlp.dataSource.analyze", - // "parameterOrder": [], - // "parameters": {}, - // "path": "v2beta1/dataSource:analyze", - // "request": { - // "$ref": "GooglePrivacyDlpV2beta1AnalyzeDataSourceRiskRequest" - // }, - // "response": { - // "$ref": "GoogleLongrunningOperation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "dlp.inspect.operations.cancel": - -type InspectOperationsCancelCall struct { - s *Service - name string - googlelongrunningcanceloperationrequest *GoogleLongrunningCancelOperationRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Cancel: Cancels an operation. Use the `inspect.operations.get` to -// check whether the cancellation succeeded or the operation completed -// despite cancellation. -func (r *InspectOperationsService) Cancel(name string, googlelongrunningcanceloperationrequest *GoogleLongrunningCancelOperationRequest) *InspectOperationsCancelCall { - c := &InspectOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googlelongrunningcanceloperationrequest = googlelongrunningcanceloperationrequest - 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 *InspectOperationsCancelCall) Fields(s ...googleapi.Field) *InspectOperationsCancelCall { - 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 *InspectOperationsCancelCall) Context(ctx context.Context) *InspectOperationsCancelCall { - 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 *InspectOperationsCancelCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InspectOperationsCancelCall) 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.googlelongrunningcanceloperationrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}:cancel") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "dlp.inspect.operations.cancel" call. -// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *GoogleProtobufEmpty.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 *InspectOperationsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, 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 := &GoogleProtobufEmpty{ - 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": "Cancels an operation. Use the `inspect.operations.get` to check whether the cancellation succeeded or the operation completed despite cancellation.", - // "flatPath": "v2beta1/inspect/operations/{operationsId}:cancel", - // "httpMethod": "POST", - // "id": "dlp.inspect.operations.cancel", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "The name of the operation resource to be cancelled.", - // "location": "path", - // "pattern": "^inspect/operations/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v2beta1/{+name}:cancel", - // "request": { - // "$ref": "GoogleLongrunningCancelOperationRequest" - // }, - // "response": { - // "$ref": "GoogleProtobufEmpty" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "dlp.inspect.operations.create": - -type InspectOperationsCreateCall struct { - s *Service - googleprivacydlpv2beta1createinspectoperationrequest *GooglePrivacyDlpV2beta1CreateInspectOperationRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Create: Schedules a job scanning content in a Google Cloud Platform -// data -// repository. -func (r *InspectOperationsService) Create(googleprivacydlpv2beta1createinspectoperationrequest *GooglePrivacyDlpV2beta1CreateInspectOperationRequest) *InspectOperationsCreateCall { - c := &InspectOperationsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.googleprivacydlpv2beta1createinspectoperationrequest = googleprivacydlpv2beta1createinspectoperationrequest - 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 *InspectOperationsCreateCall) Fields(s ...googleapi.Field) *InspectOperationsCreateCall { - 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 *InspectOperationsCreateCall) Context(ctx context.Context) *InspectOperationsCreateCall { - 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 *InspectOperationsCreateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InspectOperationsCreateCall) 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.googleprivacydlpv2beta1createinspectoperationrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/inspect/operations") - 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 "dlp.inspect.operations.create" call. -// Exactly one of *GoogleLongrunningOperation or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.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 *InspectOperationsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, 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 := &GoogleLongrunningOperation{ - 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": "Schedules a job scanning content in a Google Cloud Platform data\nrepository.", - // "flatPath": "v2beta1/inspect/operations", - // "httpMethod": "POST", - // "id": "dlp.inspect.operations.create", - // "parameterOrder": [], - // "parameters": {}, - // "path": "v2beta1/inspect/operations", - // "request": { - // "$ref": "GooglePrivacyDlpV2beta1CreateInspectOperationRequest" - // }, - // "response": { - // "$ref": "GoogleLongrunningOperation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "dlp.inspect.operations.delete": - -type InspectOperationsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: This method is not supported and the server returns -// `UNIMPLEMENTED`. -func (r *InspectOperationsService) Delete(name string) *InspectOperationsDeleteCall { - c := &InspectOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - 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 *InspectOperationsDeleteCall) Fields(s ...googleapi.Field) *InspectOperationsDeleteCall { - 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 *InspectOperationsDeleteCall) Context(ctx context.Context) *InspectOperationsDeleteCall { - 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 *InspectOperationsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InspectOperationsDeleteCall) 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 - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("DELETE", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "dlp.inspect.operations.delete" call. -// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *GoogleProtobufEmpty.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 *InspectOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, 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 := &GoogleProtobufEmpty{ - 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": "This method is not supported and the server returns `UNIMPLEMENTED`.", - // "flatPath": "v2beta1/inspect/operations/{operationsId}", - // "httpMethod": "DELETE", - // "id": "dlp.inspect.operations.delete", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "The name of the operation resource to be deleted.", - // "location": "path", - // "pattern": "^inspect/operations/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v2beta1/{+name}", - // "response": { - // "$ref": "GoogleProtobufEmpty" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "dlp.inspect.operations.get": - -type InspectOperationsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Gets the latest state of a long-running operation. Clients can -// use this -// method to poll the operation result at intervals as recommended by -// the API -// service. -func (r *InspectOperationsService) Get(name string) *InspectOperationsGetCall { - c := &InspectOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - 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 *InspectOperationsGetCall) Fields(s ...googleapi.Field) *InspectOperationsGetCall { - 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 *InspectOperationsGetCall) IfNoneMatch(entityTag string) *InspectOperationsGetCall { - 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 *InspectOperationsGetCall) Context(ctx context.Context) *InspectOperationsGetCall { - 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 *InspectOperationsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InspectOperationsGetCall) 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, "v2beta1/{+name}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "dlp.inspect.operations.get" call. -// Exactly one of *GoogleLongrunningOperation or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.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 *InspectOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, 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 := &GoogleLongrunningOperation{ - 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": "Gets the latest state of a long-running operation. Clients can use this\nmethod to poll the operation result at intervals as recommended by the API\nservice.", - // "flatPath": "v2beta1/inspect/operations/{operationsId}", - // "httpMethod": "GET", - // "id": "dlp.inspect.operations.get", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "The name of the operation resource.", - // "location": "path", - // "pattern": "^inspect/operations/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v2beta1/{+name}", - // "response": { - // "$ref": "GoogleLongrunningOperation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "dlp.inspect.operations.list": - -type InspectOperationsListCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Fetches the list of long running operations. -func (r *InspectOperationsService) List(name string) *InspectOperationsListCall { - c := &InspectOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Filter sets the optional parameter "filter": Filters by `done`. That -// is, `done=true` or `done=false`. -func (c *InspectOperationsListCall) Filter(filter string) *InspectOperationsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// PageSize sets the optional parameter "pageSize": The list page size. -// The maximum allowed value is 256 and the default is 100. -func (c *InspectOperationsListCall) PageSize(pageSize int64) *InspectOperationsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": The standard list -// page token. -func (c *InspectOperationsListCall) PageToken(pageToken string) *InspectOperationsListCall { - 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 *InspectOperationsListCall) Fields(s ...googleapi.Field) *InspectOperationsListCall { - 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 *InspectOperationsListCall) IfNoneMatch(entityTag string) *InspectOperationsListCall { - 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 *InspectOperationsListCall) Context(ctx context.Context) *InspectOperationsListCall { - 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 *InspectOperationsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InspectOperationsListCall) 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, "v2beta1/{+name}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "dlp.inspect.operations.list" call. -// Exactly one of *GoogleLongrunningListOperationsResponse or error will -// be non-nil. Any non-2xx status code is an error. Response headers are -// in either -// *GoogleLongrunningListOperationsResponse.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 *InspectOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, 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 := &GoogleLongrunningListOperationsResponse{ - 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": "Fetches the list of long running operations.", - // "flatPath": "v2beta1/inspect/operations", - // "httpMethod": "GET", - // "id": "dlp.inspect.operations.list", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "filter": { - // "description": "Filters by `done`. That is, `done=true` or `done=false`.", - // "location": "query", - // "type": "string" - // }, - // "name": { - // "description": "The name of the operation's parent resource.", - // "location": "path", - // "pattern": "^inspect/operations$", - // "required": true, - // "type": "string" - // }, - // "pageSize": { - // "description": "The list page size. The maximum allowed value is 256 and the default is 100.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "The standard list page token.", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "v2beta1/{+name}", - // "response": { - // "$ref": "GoogleLongrunningListOperationsResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// 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 *InspectOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) 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 "dlp.inspect.results.findings.list": - -type InspectResultsFindingsListCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Returns list of results for given inspect operation result set -// id. -func (r *InspectResultsFindingsService) List(name string) *InspectResultsFindingsListCall { - c := &InspectResultsFindingsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Filter sets the optional parameter "filter": Restricts findings to -// items that match. Supports info_type and likelihood. -// -// Examples: -// -// - info_type=EMAIL_ADDRESS -// - info_type=PHONE_NUMBER,EMAIL_ADDRESS -// - likelihood=VERY_LIKELY -// - likelihood=VERY_LIKELY,LIKELY -// - info_type=EMAIL_ADDRESS,likelihood=VERY_LIKELY,LIKELY -func (c *InspectResultsFindingsListCall) Filter(filter string) *InspectResultsFindingsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// PageSize sets the optional parameter "pageSize": Maximum number of -// results to return. -// If 0, the implementation selects a reasonable value. -func (c *InspectResultsFindingsListCall) PageSize(pageSize int64) *InspectResultsFindingsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": The value returned -// by the last `ListInspectFindingsResponse`; indicates -// that this is a continuation of a prior `ListInspectFindings` call, -// and that -// the system should return the next page of data. -func (c *InspectResultsFindingsListCall) PageToken(pageToken string) *InspectResultsFindingsListCall { - 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 *InspectResultsFindingsListCall) Fields(s ...googleapi.Field) *InspectResultsFindingsListCall { - 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 *InspectResultsFindingsListCall) IfNoneMatch(entityTag string) *InspectResultsFindingsListCall { - 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 *InspectResultsFindingsListCall) Context(ctx context.Context) *InspectResultsFindingsListCall { - 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 *InspectResultsFindingsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InspectResultsFindingsListCall) 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, "v2beta1/{+name}/findings") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "dlp.inspect.results.findings.list" call. -// Exactly one of *GooglePrivacyDlpV2beta1ListInspectFindingsResponse or -// error will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GooglePrivacyDlpV2beta1ListInspectFindingsResponse.ServerResponse.Hea -// der 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 *InspectResultsFindingsListCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2beta1ListInspectFindingsResponse, 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 := &GooglePrivacyDlpV2beta1ListInspectFindingsResponse{ - 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": "Returns list of results for given inspect operation result set id.", - // "flatPath": "v2beta1/inspect/results/{resultsId}/findings", - // "httpMethod": "GET", - // "id": "dlp.inspect.results.findings.list", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "filter": { - // "description": "Restricts findings to items that match. Supports info_type and likelihood.\n\nExamples:\n\n- info_type=EMAIL_ADDRESS\n- info_type=PHONE_NUMBER,EMAIL_ADDRESS\n- likelihood=VERY_LIKELY\n- likelihood=VERY_LIKELY,LIKELY\n- info_type=EMAIL_ADDRESS,likelihood=VERY_LIKELY,LIKELY", - // "location": "query", - // "type": "string" - // }, - // "name": { - // "description": "Identifier of the results set returned as metadata of\nthe longrunning operation created by a call to InspectDataSource.\nShould be in the format of `inspect/results/{id}`.", - // "location": "path", - // "pattern": "^inspect/results/[^/]+$", - // "required": true, - // "type": "string" - // }, - // "pageSize": { - // "description": "Maximum number of results to return.\nIf 0, the implementation selects a reasonable value.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "The value returned by the last `ListInspectFindingsResponse`; indicates\nthat this is a continuation of a prior `ListInspectFindings` call, and that\nthe system should return the next page of data.", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "v2beta1/{+name}/findings", - // "response": { - // "$ref": "GooglePrivacyDlpV2beta1ListInspectFindingsResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// 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 *InspectResultsFindingsListCall) Pages(ctx context.Context, f func(*GooglePrivacyDlpV2beta1ListInspectFindingsResponse) 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 "dlp.riskAnalysis.operations.cancel": - -type RiskAnalysisOperationsCancelCall struct { - s *Service - name string - googlelongrunningcanceloperationrequest *GoogleLongrunningCancelOperationRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Cancel: Cancels an operation. Use the `inspect.operations.get` to -// check whether the cancellation succeeded or the operation completed -// despite cancellation. -func (r *RiskAnalysisOperationsService) Cancel(name string, googlelongrunningcanceloperationrequest *GoogleLongrunningCancelOperationRequest) *RiskAnalysisOperationsCancelCall { - c := &RiskAnalysisOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googlelongrunningcanceloperationrequest = googlelongrunningcanceloperationrequest - 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 *RiskAnalysisOperationsCancelCall) Fields(s ...googleapi.Field) *RiskAnalysisOperationsCancelCall { - 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 *RiskAnalysisOperationsCancelCall) Context(ctx context.Context) *RiskAnalysisOperationsCancelCall { - 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 *RiskAnalysisOperationsCancelCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RiskAnalysisOperationsCancelCall) 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.googlelongrunningcanceloperationrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}:cancel") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "dlp.riskAnalysis.operations.cancel" call. -// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *GoogleProtobufEmpty.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 *RiskAnalysisOperationsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, 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 := &GoogleProtobufEmpty{ - 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": "Cancels an operation. Use the `inspect.operations.get` to check whether the cancellation succeeded or the operation completed despite cancellation.", - // "flatPath": "v2beta1/riskAnalysis/operations/{operationsId}:cancel", - // "httpMethod": "POST", - // "id": "dlp.riskAnalysis.operations.cancel", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "The name of the operation resource to be cancelled.", - // "location": "path", - // "pattern": "^riskAnalysis/operations/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v2beta1/{+name}:cancel", - // "request": { - // "$ref": "GoogleLongrunningCancelOperationRequest" - // }, - // "response": { - // "$ref": "GoogleProtobufEmpty" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "dlp.riskAnalysis.operations.delete": - -type RiskAnalysisOperationsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: This method is not supported and the server returns -// `UNIMPLEMENTED`. -func (r *RiskAnalysisOperationsService) Delete(name string) *RiskAnalysisOperationsDeleteCall { - c := &RiskAnalysisOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - 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 *RiskAnalysisOperationsDeleteCall) Fields(s ...googleapi.Field) *RiskAnalysisOperationsDeleteCall { - 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 *RiskAnalysisOperationsDeleteCall) Context(ctx context.Context) *RiskAnalysisOperationsDeleteCall { - 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 *RiskAnalysisOperationsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RiskAnalysisOperationsDeleteCall) 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 - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("DELETE", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "dlp.riskAnalysis.operations.delete" call. -// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *GoogleProtobufEmpty.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 *RiskAnalysisOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, 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 := &GoogleProtobufEmpty{ - 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": "This method is not supported and the server returns `UNIMPLEMENTED`.", - // "flatPath": "v2beta1/riskAnalysis/operations/{operationsId}", - // "httpMethod": "DELETE", - // "id": "dlp.riskAnalysis.operations.delete", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "The name of the operation resource to be deleted.", - // "location": "path", - // "pattern": "^riskAnalysis/operations/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v2beta1/{+name}", - // "response": { - // "$ref": "GoogleProtobufEmpty" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "dlp.riskAnalysis.operations.get": - -type RiskAnalysisOperationsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Gets the latest state of a long-running operation. Clients can -// use this -// method to poll the operation result at intervals as recommended by -// the API -// service. -func (r *RiskAnalysisOperationsService) Get(name string) *RiskAnalysisOperationsGetCall { - c := &RiskAnalysisOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - 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 *RiskAnalysisOperationsGetCall) Fields(s ...googleapi.Field) *RiskAnalysisOperationsGetCall { - 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 *RiskAnalysisOperationsGetCall) IfNoneMatch(entityTag string) *RiskAnalysisOperationsGetCall { - 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 *RiskAnalysisOperationsGetCall) Context(ctx context.Context) *RiskAnalysisOperationsGetCall { - 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 *RiskAnalysisOperationsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RiskAnalysisOperationsGetCall) 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, "v2beta1/{+name}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "dlp.riskAnalysis.operations.get" call. -// Exactly one of *GoogleLongrunningOperation or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.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 *RiskAnalysisOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, 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 := &GoogleLongrunningOperation{ - 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": "Gets the latest state of a long-running operation. Clients can use this\nmethod to poll the operation result at intervals as recommended by the API\nservice.", - // "flatPath": "v2beta1/riskAnalysis/operations/{operationsId}", - // "httpMethod": "GET", - // "id": "dlp.riskAnalysis.operations.get", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "The name of the operation resource.", - // "location": "path", - // "pattern": "^riskAnalysis/operations/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v2beta1/{+name}", - // "response": { - // "$ref": "GoogleLongrunningOperation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "dlp.riskAnalysis.operations.list": - -type RiskAnalysisOperationsListCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Fetches the list of long running operations. -func (r *RiskAnalysisOperationsService) List(name string) *RiskAnalysisOperationsListCall { - c := &RiskAnalysisOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Filter sets the optional parameter "filter": Filters by `done`. That -// is, `done=true` or `done=false`. -func (c *RiskAnalysisOperationsListCall) Filter(filter string) *RiskAnalysisOperationsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// PageSize sets the optional parameter "pageSize": The list page size. -// The maximum allowed value is 256 and the default is 100. -func (c *RiskAnalysisOperationsListCall) PageSize(pageSize int64) *RiskAnalysisOperationsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": The standard list -// page token. -func (c *RiskAnalysisOperationsListCall) PageToken(pageToken string) *RiskAnalysisOperationsListCall { - 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 *RiskAnalysisOperationsListCall) Fields(s ...googleapi.Field) *RiskAnalysisOperationsListCall { - 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 *RiskAnalysisOperationsListCall) IfNoneMatch(entityTag string) *RiskAnalysisOperationsListCall { - 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 *RiskAnalysisOperationsListCall) Context(ctx context.Context) *RiskAnalysisOperationsListCall { - 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 *RiskAnalysisOperationsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RiskAnalysisOperationsListCall) 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, "v2beta1/{+name}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "dlp.riskAnalysis.operations.list" call. -// Exactly one of *GoogleLongrunningListOperationsResponse or error will -// be non-nil. Any non-2xx status code is an error. Response headers are -// in either -// *GoogleLongrunningListOperationsResponse.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 *RiskAnalysisOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, 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 := &GoogleLongrunningListOperationsResponse{ - 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": "Fetches the list of long running operations.", - // "flatPath": "v2beta1/riskAnalysis/operations", - // "httpMethod": "GET", - // "id": "dlp.riskAnalysis.operations.list", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "filter": { - // "description": "Filters by `done`. That is, `done=true` or `done=false`.", - // "location": "query", - // "type": "string" - // }, - // "name": { - // "description": "The name of the operation's parent resource.", - // "location": "path", - // "pattern": "^riskAnalysis/operations$", - // "required": true, - // "type": "string" - // }, - // "pageSize": { - // "description": "The list page size. The maximum allowed value is 256 and the default is 100.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "The standard list page token.", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "v2beta1/{+name}", - // "response": { - // "$ref": "GoogleLongrunningListOperationsResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// 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 *RiskAnalysisOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) 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 "dlp.rootCategories.list": - -type RootCategoriesListCall struct { - s *Service - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Returns the list of root categories of sensitive information. -func (r *RootCategoriesService) List() *RootCategoriesListCall { - c := &RootCategoriesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - return c -} - -// LanguageCode sets the optional parameter "languageCode": Optional -// language code for localized friendly category names. -// If omitted or if localized strings are not available, -// en-US strings will be returned. -func (c *RootCategoriesListCall) LanguageCode(languageCode string) *RootCategoriesListCall { - c.urlParams_.Set("languageCode", languageCode) - 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 *RootCategoriesListCall) Fields(s ...googleapi.Field) *RootCategoriesListCall { - 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 *RootCategoriesListCall) IfNoneMatch(entityTag string) *RootCategoriesListCall { - 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 *RootCategoriesListCall) Context(ctx context.Context) *RootCategoriesListCall { - 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 *RootCategoriesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RootCategoriesListCall) 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, "v2beta1/rootCategories") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "dlp.rootCategories.list" call. -// Exactly one of *GooglePrivacyDlpV2beta1ListRootCategoriesResponse or -// error will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GooglePrivacyDlpV2beta1ListRootCategoriesResponse.ServerResponse.Head -// er 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 *RootCategoriesListCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2beta1ListRootCategoriesResponse, 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 := &GooglePrivacyDlpV2beta1ListRootCategoriesResponse{ - 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": "Returns the list of root categories of sensitive information.", - // "flatPath": "v2beta1/rootCategories", - // "httpMethod": "GET", - // "id": "dlp.rootCategories.list", - // "parameterOrder": [], - // "parameters": { - // "languageCode": { - // "description": "Optional language code for localized friendly category names.\nIf omitted or if localized strings are not available,\nen-US strings will be returned.", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "v2beta1/rootCategories", - // "response": { - // "$ref": "GooglePrivacyDlpV2beta1ListRootCategoriesResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "dlp.rootCategories.infoTypes.list": - -type RootCategoriesInfoTypesListCall struct { - s *Service - category string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Returns sensitive information types for given category. -func (r *RootCategoriesInfoTypesService) List(category string) *RootCategoriesInfoTypesListCall { - c := &RootCategoriesInfoTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.category = category - return c -} - -// LanguageCode sets the optional parameter "languageCode": Optional -// BCP-47 language code for localized info type friendly -// names. If omitted, or if localized strings are not available, -// en-US strings will be returned. -func (c *RootCategoriesInfoTypesListCall) LanguageCode(languageCode string) *RootCategoriesInfoTypesListCall { - c.urlParams_.Set("languageCode", languageCode) - 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 *RootCategoriesInfoTypesListCall) Fields(s ...googleapi.Field) *RootCategoriesInfoTypesListCall { - 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 *RootCategoriesInfoTypesListCall) IfNoneMatch(entityTag string) *RootCategoriesInfoTypesListCall { - 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 *RootCategoriesInfoTypesListCall) Context(ctx context.Context) *RootCategoriesInfoTypesListCall { - 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 *RootCategoriesInfoTypesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RootCategoriesInfoTypesListCall) 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, "v2beta1/rootCategories/{+category}/infoTypes") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "category": c.category, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "dlp.rootCategories.infoTypes.list" call. -// Exactly one of *GooglePrivacyDlpV2beta1ListInfoTypesResponse or error -// will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GooglePrivacyDlpV2beta1ListInfoTypesResponse.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 *RootCategoriesInfoTypesListCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2beta1ListInfoTypesResponse, 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 := &GooglePrivacyDlpV2beta1ListInfoTypesResponse{ - 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": "Returns sensitive information types for given category.", - // "flatPath": "v2beta1/rootCategories/{rootCategoriesId}/infoTypes", - // "httpMethod": "GET", - // "id": "dlp.rootCategories.infoTypes.list", - // "parameterOrder": [ - // "category" - // ], - // "parameters": { - // "category": { - // "description": "Category name as returned by ListRootCategories.", - // "location": "path", - // "pattern": "^[^/]+$", - // "required": true, - // "type": "string" - // }, - // "languageCode": { - // "description": "Optional BCP-47 language code for localized info type friendly\nnames. If omitted, or if localized strings are not available,\nen-US strings will be returned.", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "v2beta1/rootCategories/{+category}/infoTypes", - // "response": { - // "$ref": "GooglePrivacyDlpV2beta1ListInfoTypesResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -}
diff --git a/dlp/v2beta2/dlp-api.json b/dlp/v2beta2/dlp-api.json deleted file mode 100644 index 5b075da..0000000 --- a/dlp/v2beta2/dlp-api.json +++ /dev/null
@@ -1,5058 +0,0 @@ -{ - "auth": { - "oauth2": { - "scopes": { - "https://www.googleapis.com/auth/cloud-platform": { - "description": "View and manage your data across Google Cloud Platform services" - } - } - } - }, - "basePath": "", - "baseUrl": "https://dlp.googleapis.com/", - "batchPath": "batch", - "canonicalName": "DLP", - "description": "Provides methods for detection, risk analysis, and de-identification of privacy-sensitive fragments in text, images, and Google Cloud Platform storage repositories.", - "discoveryVersion": "v1", - "documentationLink": "https://cloud.google.com/dlp/docs/", - "fullyEncodeReservedExpansion": true, - "icons": { - "x16": "http://www.google.com/images/icons/product/search-16.gif", - "x32": "http://www.google.com/images/icons/product/search-32.gif" - }, - "id": "dlp:v2beta2", - "kind": "discovery#restDescription", - "name": "dlp", - "ownerDomain": "google.com", - "ownerName": "Google", - "parameters": { - "$.xgafv": { - "description": "V1 error format.", - "enum": [ - "1", - "2" - ], - "enumDescriptions": [ - "v1 error format", - "v2 error format" - ], - "location": "query", - "type": "string" - }, - "access_token": { - "description": "OAuth access token.", - "location": "query", - "type": "string" - }, - "alt": { - "default": "json", - "description": "Data format for response.", - "enum": [ - "json", - "media", - "proto" - ], - "enumDescriptions": [ - "Responses with Content-Type of application/json", - "Media download with context-dependent Content-Type", - "Responses with Content-Type of application/x-protobuf" - ], - "location": "query", - "type": "string" - }, - "bearer_token": { - "description": "OAuth bearer token.", - "location": "query", - "type": "string" - }, - "callback": { - "description": "JSONP", - "location": "query", - "type": "string" - }, - "fields": { - "description": "Selector specifying which fields to include in a partial response.", - "location": "query", - "type": "string" - }, - "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" - }, - "oauth_token": { - "description": "OAuth 2.0 token for the current user.", - "location": "query", - "type": "string" - }, - "pp": { - "default": "true", - "description": "Pretty-print response.", - "location": "query", - "type": "boolean" - }, - "prettyPrint": { - "default": "true", - "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.", - "location": "query", - "type": "string" - }, - "uploadType": { - "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", - "location": "query", - "type": "string" - }, - "upload_protocol": { - "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", - "location": "query", - "type": "string" - } - }, - "protocol": "rest", - "resources": { - "infoTypes": { - "methods": { - "list": { - "description": "Returns sensitive information types DLP supports.", - "flatPath": "v2beta2/infoTypes", - "httpMethod": "GET", - "id": "dlp.infoTypes.list", - "parameterOrder": [], - "parameters": { - "filter": { - "description": "Optional filter to only return infoTypes supported by certain parts of the\nAPI. Defaults to supported_by=INSPECT.", - "location": "query", - "type": "string" - }, - "languageCode": { - "description": "Optional BCP-47 language code for localized infoType friendly\nnames. If omitted, or if localized strings are not available,\nen-US strings will be returned.", - "location": "query", - "type": "string" - } - }, - "path": "v2beta2/infoTypes", - "response": { - "$ref": "GooglePrivacyDlpV2beta2ListInfoTypesResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - } - }, - "organizations": { - "resources": { - "deidentifyTemplates": { - "methods": { - "create": { - "description": "Creates an Deidentify template for re-using frequently used configuration\nfor Deidentifying content, images, and storage.", - "flatPath": "v2beta2/organizations/{organizationsId}/deidentifyTemplates", - "httpMethod": "POST", - "id": "dlp.organizations.deidentifyTemplates.create", - "parameterOrder": [ - "parent" - ], - "parameters": { - "parent": { - "description": "The parent resource name, for example projects/my-project-id or\norganizations/my-org-id.", - "location": "path", - "pattern": "^organizations/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v2beta2/{+parent}/deidentifyTemplates", - "request": { - "$ref": "GooglePrivacyDlpV2beta2CreateDeidentifyTemplateRequest" - }, - "response": { - "$ref": "GooglePrivacyDlpV2beta2DeidentifyTemplate" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "delete": { - "description": "Deletes inspect templates.", - "flatPath": "v2beta2/organizations/{organizationsId}/deidentifyTemplates/{deidentifyTemplatesId}", - "httpMethod": "DELETE", - "id": "dlp.organizations.deidentifyTemplates.delete", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Resource name of the organization and deidentify template to be deleted,\nfor example `organizations/433245324/deidentifyTemplates/432452342` or\nprojects/project-id/deidentifyTemplates/432452342.", - "location": "path", - "pattern": "^organizations/[^/]+/deidentifyTemplates/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v2beta2/{+name}", - "response": { - "$ref": "GoogleProtobufEmpty" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "get": { - "description": "Gets an inspect template.", - "flatPath": "v2beta2/organizations/{organizationsId}/deidentifyTemplates/{deidentifyTemplatesId}", - "httpMethod": "GET", - "id": "dlp.organizations.deidentifyTemplates.get", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Resource name of the organization and deidentify template to be read, for\nexample `organizations/433245324/deidentifyTemplates/432452342` or\nprojects/project-id/deidentifyTemplates/432452342.", - "location": "path", - "pattern": "^organizations/[^/]+/deidentifyTemplates/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v2beta2/{+name}", - "response": { - "$ref": "GooglePrivacyDlpV2beta2DeidentifyTemplate" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "list": { - "description": "Lists inspect templates.", - "flatPath": "v2beta2/organizations/{organizationsId}/deidentifyTemplates", - "httpMethod": "GET", - "id": "dlp.organizations.deidentifyTemplates.list", - "parameterOrder": [ - "parent" - ], - "parameters": { - "pageSize": { - "description": "Optional size of the page, can be limited by server. If zero server returns\na page of max size 100.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "pageToken": { - "description": "Optional page token to continue retrieval. Comes from previous call\nto `ListDeidentifyTemplates`.", - "location": "query", - "type": "string" - }, - "parent": { - "description": "The parent resource name, for example projects/my-project-id or\norganizations/my-org-id.", - "location": "path", - "pattern": "^organizations/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v2beta2/{+parent}/deidentifyTemplates", - "response": { - "$ref": "GooglePrivacyDlpV2beta2ListDeidentifyTemplatesResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "patch": { - "description": "Updates the inspect template.", - "flatPath": "v2beta2/organizations/{organizationsId}/deidentifyTemplates/{deidentifyTemplatesId}", - "httpMethod": "PATCH", - "id": "dlp.organizations.deidentifyTemplates.patch", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Resource name of organization and deidentify template to be updated, for\nexample `organizations/433245324/deidentifyTemplates/432452342` or\nprojects/project-id/deidentifyTemplates/432452342.", - "location": "path", - "pattern": "^organizations/[^/]+/deidentifyTemplates/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v2beta2/{+name}", - "request": { - "$ref": "GooglePrivacyDlpV2beta2UpdateDeidentifyTemplateRequest" - }, - "response": { - "$ref": "GooglePrivacyDlpV2beta2DeidentifyTemplate" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - } - }, - "inspectTemplates": { - "methods": { - "create": { - "description": "Creates an inspect template for re-using frequently used configuration\nfor inspecting content, images, and storage.", - "flatPath": "v2beta2/organizations/{organizationsId}/inspectTemplates", - "httpMethod": "POST", - "id": "dlp.organizations.inspectTemplates.create", - "parameterOrder": [ - "parent" - ], - "parameters": { - "parent": { - "description": "The parent resource name, for example projects/my-project-id or\norganizations/my-org-id.", - "location": "path", - "pattern": "^organizations/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v2beta2/{+parent}/inspectTemplates", - "request": { - "$ref": "GooglePrivacyDlpV2beta2CreateInspectTemplateRequest" - }, - "response": { - "$ref": "GooglePrivacyDlpV2beta2InspectTemplate" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "delete": { - "description": "Deletes inspect templates.", - "flatPath": "v2beta2/organizations/{organizationsId}/inspectTemplates/{inspectTemplatesId}", - "httpMethod": "DELETE", - "id": "dlp.organizations.inspectTemplates.delete", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Resource name of the organization and inspectTemplate to be deleted, for\nexample `organizations/433245324/inspectTemplates/432452342` or\nprojects/project-id/inspectTemplates/432452342.", - "location": "path", - "pattern": "^organizations/[^/]+/inspectTemplates/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v2beta2/{+name}", - "response": { - "$ref": "GoogleProtobufEmpty" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "get": { - "description": "Gets an inspect template.", - "flatPath": "v2beta2/organizations/{organizationsId}/inspectTemplates/{inspectTemplatesId}", - "httpMethod": "GET", - "id": "dlp.organizations.inspectTemplates.get", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Resource name of the organization and inspectTemplate to be read, for\nexample `organizations/433245324/inspectTemplates/432452342` or\nprojects/project-id/inspectTemplates/432452342.", - "location": "path", - "pattern": "^organizations/[^/]+/inspectTemplates/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v2beta2/{+name}", - "response": { - "$ref": "GooglePrivacyDlpV2beta2InspectTemplate" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "list": { - "description": "Lists inspect templates.", - "flatPath": "v2beta2/organizations/{organizationsId}/inspectTemplates", - "httpMethod": "GET", - "id": "dlp.organizations.inspectTemplates.list", - "parameterOrder": [ - "parent" - ], - "parameters": { - "pageSize": { - "description": "Optional size of the page, can be limited by server. If zero server returns\na page of max size 100.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "pageToken": { - "description": "Optional page token to continue retrieval. Comes from previous call\nto `ListInspectTemplates`.", - "location": "query", - "type": "string" - }, - "parent": { - "description": "The parent resource name, for example projects/my-project-id or\norganizations/my-org-id.", - "location": "path", - "pattern": "^organizations/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v2beta2/{+parent}/inspectTemplates", - "response": { - "$ref": "GooglePrivacyDlpV2beta2ListInspectTemplatesResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "patch": { - "description": "Updates the inspect template.", - "flatPath": "v2beta2/organizations/{organizationsId}/inspectTemplates/{inspectTemplatesId}", - "httpMethod": "PATCH", - "id": "dlp.organizations.inspectTemplates.patch", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Resource name of organization and inspectTemplate to be updated, for\nexample `organizations/433245324/inspectTemplates/432452342` or\nprojects/project-id/inspectTemplates/432452342.", - "location": "path", - "pattern": "^organizations/[^/]+/inspectTemplates/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v2beta2/{+name}", - "request": { - "$ref": "GooglePrivacyDlpV2beta2UpdateInspectTemplateRequest" - }, - "response": { - "$ref": "GooglePrivacyDlpV2beta2InspectTemplate" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - } - } - } - }, - "projects": { - "resources": { - "content": { - "methods": { - "deidentify": { - "description": "De-identifies potentially sensitive info from a ContentItem.\nThis method has limits on input size and output size.\n[How-to guide](/dlp/docs/deidentify-sensitive-data)", - "flatPath": "v2beta2/projects/{projectsId}/content:deidentify", - "httpMethod": "POST", - "id": "dlp.projects.content.deidentify", - "parameterOrder": [ - "parent" - ], - "parameters": { - "parent": { - "description": "The parent resource name, for example projects/my-project-id.", - "location": "path", - "pattern": "^projects/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v2beta2/{+parent}/content:deidentify", - "request": { - "$ref": "GooglePrivacyDlpV2beta2DeidentifyContentRequest" - }, - "response": { - "$ref": "GooglePrivacyDlpV2beta2DeidentifyContentResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "inspect": { - "description": "Finds potentially sensitive info in content.\nThis method has limits on input size, processing time, and output size.\n[How-to guide for text](/dlp/docs/inspecting-text), [How-to guide for\nimages](/dlp/docs/inspecting-images)", - "flatPath": "v2beta2/projects/{projectsId}/content:inspect", - "httpMethod": "POST", - "id": "dlp.projects.content.inspect", - "parameterOrder": [ - "parent" - ], - "parameters": { - "parent": { - "description": "The parent resource name, for example projects/my-project-id.", - "location": "path", - "pattern": "^projects/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v2beta2/{+parent}/content:inspect", - "request": { - "$ref": "GooglePrivacyDlpV2beta2InspectContentRequest" - }, - "response": { - "$ref": "GooglePrivacyDlpV2beta2InspectContentResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "reidentify": { - "description": "Re-identify content that has been de-identified.", - "flatPath": "v2beta2/projects/{projectsId}/content:reidentify", - "httpMethod": "POST", - "id": "dlp.projects.content.reidentify", - "parameterOrder": [ - "parent" - ], - "parameters": { - "parent": { - "description": "The parent resource name.", - "location": "path", - "pattern": "^projects/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v2beta2/{+parent}/content:reidentify", - "request": { - "$ref": "GooglePrivacyDlpV2beta2ReidentifyContentRequest" - }, - "response": { - "$ref": "GooglePrivacyDlpV2beta2ReidentifyContentResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - } - }, - "dataSource": { - "methods": { - "analyze": { - "description": "Schedules a job to compute risk analysis metrics over content in a Google\nCloud Platform repository. [How-to guide](/dlp/docs/compute-risk-analysis)", - "flatPath": "v2beta2/projects/{projectsId}/dataSource:analyze", - "httpMethod": "POST", - "id": "dlp.projects.dataSource.analyze", - "parameterOrder": [ - "parent" - ], - "parameters": { - "parent": { - "description": "The parent resource name, for example projects/my-project-id.", - "location": "path", - "pattern": "^projects/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v2beta2/{+parent}/dataSource:analyze", - "request": { - "$ref": "GooglePrivacyDlpV2beta2AnalyzeDataSourceRiskRequest" - }, - "response": { - "$ref": "GooglePrivacyDlpV2beta2DlpJob" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "inspect": { - "description": "Schedules a job scanning content in a Google Cloud Platform data\nrepository. [How-to guide](/dlp/docs/inspecting-storage)", - "flatPath": "v2beta2/projects/{projectsId}/dataSource:inspect", - "httpMethod": "POST", - "id": "dlp.projects.dataSource.inspect", - "parameterOrder": [ - "parent" - ], - "parameters": { - "parent": { - "description": "The parent resource name, for example projects/my-project-id.", - "location": "path", - "pattern": "^projects/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v2beta2/{+parent}/dataSource:inspect", - "request": { - "$ref": "GooglePrivacyDlpV2beta2InspectDataSourceRequest" - }, - "response": { - "$ref": "GooglePrivacyDlpV2beta2DlpJob" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - } - }, - "deidentifyTemplates": { - "methods": { - "create": { - "description": "Creates an Deidentify template for re-using frequently used configuration\nfor Deidentifying content, images, and storage.", - "flatPath": "v2beta2/projects/{projectsId}/deidentifyTemplates", - "httpMethod": "POST", - "id": "dlp.projects.deidentifyTemplates.create", - "parameterOrder": [ - "parent" - ], - "parameters": { - "parent": { - "description": "The parent resource name, for example projects/my-project-id or\norganizations/my-org-id.", - "location": "path", - "pattern": "^projects/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v2beta2/{+parent}/deidentifyTemplates", - "request": { - "$ref": "GooglePrivacyDlpV2beta2CreateDeidentifyTemplateRequest" - }, - "response": { - "$ref": "GooglePrivacyDlpV2beta2DeidentifyTemplate" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "delete": { - "description": "Deletes inspect templates.", - "flatPath": "v2beta2/projects/{projectsId}/deidentifyTemplates/{deidentifyTemplatesId}", - "httpMethod": "DELETE", - "id": "dlp.projects.deidentifyTemplates.delete", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Resource name of the organization and deidentify template to be deleted,\nfor example `organizations/433245324/deidentifyTemplates/432452342` or\nprojects/project-id/deidentifyTemplates/432452342.", - "location": "path", - "pattern": "^projects/[^/]+/deidentifyTemplates/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v2beta2/{+name}", - "response": { - "$ref": "GoogleProtobufEmpty" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "get": { - "description": "Gets an inspect template.", - "flatPath": "v2beta2/projects/{projectsId}/deidentifyTemplates/{deidentifyTemplatesId}", - "httpMethod": "GET", - "id": "dlp.projects.deidentifyTemplates.get", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Resource name of the organization and deidentify template to be read, for\nexample `organizations/433245324/deidentifyTemplates/432452342` or\nprojects/project-id/deidentifyTemplates/432452342.", - "location": "path", - "pattern": "^projects/[^/]+/deidentifyTemplates/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v2beta2/{+name}", - "response": { - "$ref": "GooglePrivacyDlpV2beta2DeidentifyTemplate" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "list": { - "description": "Lists inspect templates.", - "flatPath": "v2beta2/projects/{projectsId}/deidentifyTemplates", - "httpMethod": "GET", - "id": "dlp.projects.deidentifyTemplates.list", - "parameterOrder": [ - "parent" - ], - "parameters": { - "pageSize": { - "description": "Optional size of the page, can be limited by server. If zero server returns\na page of max size 100.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "pageToken": { - "description": "Optional page token to continue retrieval. Comes from previous call\nto `ListDeidentifyTemplates`.", - "location": "query", - "type": "string" - }, - "parent": { - "description": "The parent resource name, for example projects/my-project-id or\norganizations/my-org-id.", - "location": "path", - "pattern": "^projects/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v2beta2/{+parent}/deidentifyTemplates", - "response": { - "$ref": "GooglePrivacyDlpV2beta2ListDeidentifyTemplatesResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "patch": { - "description": "Updates the inspect template.", - "flatPath": "v2beta2/projects/{projectsId}/deidentifyTemplates/{deidentifyTemplatesId}", - "httpMethod": "PATCH", - "id": "dlp.projects.deidentifyTemplates.patch", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Resource name of organization and deidentify template to be updated, for\nexample `organizations/433245324/deidentifyTemplates/432452342` or\nprojects/project-id/deidentifyTemplates/432452342.", - "location": "path", - "pattern": "^projects/[^/]+/deidentifyTemplates/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v2beta2/{+name}", - "request": { - "$ref": "GooglePrivacyDlpV2beta2UpdateDeidentifyTemplateRequest" - }, - "response": { - "$ref": "GooglePrivacyDlpV2beta2DeidentifyTemplate" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - } - }, - "dlpJobs": { - "methods": { - "cancel": { - "description": "Starts asynchronous cancellation on a long-running DlpJob. The server\nmakes a best effort to cancel the DlpJob, but success is not\nguaranteed.", - "flatPath": "v2beta2/projects/{projectsId}/dlpJobs/{dlpJobsId}:cancel", - "httpMethod": "POST", - "id": "dlp.projects.dlpJobs.cancel", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "The name of the DlpJob resource to be cancelled.", - "location": "path", - "pattern": "^projects/[^/]+/dlpJobs/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v2beta2/{+name}:cancel", - "request": { - "$ref": "GooglePrivacyDlpV2beta2CancelDlpJobRequest" - }, - "response": { - "$ref": "GoogleProtobufEmpty" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "delete": { - "description": "Deletes a long-running DlpJob. This method indicates that the client is\nno longer interested in the DlpJob result. The job will be cancelled if\npossible.", - "flatPath": "v2beta2/projects/{projectsId}/dlpJobs/{dlpJobsId}", - "httpMethod": "DELETE", - "id": "dlp.projects.dlpJobs.delete", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "The name of the DlpJob resource to be deleted.", - "location": "path", - "pattern": "^projects/[^/]+/dlpJobs/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v2beta2/{+name}", - "response": { - "$ref": "GoogleProtobufEmpty" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "get": { - "description": "Gets the latest state of a long-running DlpJob.", - "flatPath": "v2beta2/projects/{projectsId}/dlpJobs/{dlpJobsId}", - "httpMethod": "GET", - "id": "dlp.projects.dlpJobs.get", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "The name of the DlpJob resource.", - "location": "path", - "pattern": "^projects/[^/]+/dlpJobs/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v2beta2/{+name}", - "response": { - "$ref": "GooglePrivacyDlpV2beta2DlpJob" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "list": { - "description": "Lists DlpJobs that match the specified filter in the request.", - "flatPath": "v2beta2/projects/{projectsId}/dlpJobs", - "httpMethod": "GET", - "id": "dlp.projects.dlpJobs.list", - "parameterOrder": [ - "parent" - ], - "parameters": { - "filter": { - "description": "Optional. Allows filtering.\n\nSupported syntax:\n\n* Filter expressions are made up of one or more restrictions.\n* Restrictions can be combined by `AND` or `OR` logical operators. A\nsequence of restrictions implicitly uses `AND`.\n* A restriction has the form of `\u003cfield\u003e \u003coperator\u003e \u003cvalue\u003e`.\n* Supported fields/values for inspect jobs:\n - `state` - PENDING|RUNNING|CANCELED|FINISHED|FAILED\n - `inspected_storage` - DATASTORE|CLOUD_STORAGE|BIGQUERY\n - `trigger_name` - The resource name of the trigger that created job.\n* Supported fields for risk analysis jobs:\n - `state` - RUNNING|CANCELED|FINISHED|FAILED\n* The operator must be `=` or `!=`.\n\nExamples:\n\n* inspected_storage = cloud_storage AND state = done\n* inspected_storage = cloud_storage OR inspected_storage = bigquery\n* inspected_storage = cloud_storage AND (state = done OR state = canceled)\n\nThe length of this field should be no more than 500 characters.", - "location": "query", - "type": "string" - }, - "pageSize": { - "description": "The standard list page size.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "pageToken": { - "description": "The standard list page token.", - "location": "query", - "type": "string" - }, - "parent": { - "description": "The parent resource name, for example projects/my-project-id.", - "location": "path", - "pattern": "^projects/[^/]+$", - "required": true, - "type": "string" - }, - "type": { - "description": "The type of job. Defaults to `DlpJobType.INSPECT`", - "enum": [ - "DLP_JOB_TYPE_UNSPECIFIED", - "INSPECT_JOB", - "RISK_ANALYSIS_JOB" - ], - "location": "query", - "type": "string" - } - }, - "path": "v2beta2/{+parent}/dlpJobs", - "response": { - "$ref": "GooglePrivacyDlpV2beta2ListDlpJobsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - } - }, - "image": { - "methods": { - "redact": { - "description": "Redacts potentially sensitive info from an image.\nThis method has limits on input size, processing time, and output size.\n[How-to guide](/dlp/docs/redacting-sensitive-data-images)", - "flatPath": "v2beta2/projects/{projectsId}/image:redact", - "httpMethod": "POST", - "id": "dlp.projects.image.redact", - "parameterOrder": [ - "parent" - ], - "parameters": { - "parent": { - "description": "The parent resource name, for example projects/my-project-id.", - "location": "path", - "pattern": "^projects/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v2beta2/{+parent}/image:redact", - "request": { - "$ref": "GooglePrivacyDlpV2beta2RedactImageRequest" - }, - "response": { - "$ref": "GooglePrivacyDlpV2beta2RedactImageResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - } - }, - "inspectTemplates": { - "methods": { - "create": { - "description": "Creates an inspect template for re-using frequently used configuration\nfor inspecting content, images, and storage.", - "flatPath": "v2beta2/projects/{projectsId}/inspectTemplates", - "httpMethod": "POST", - "id": "dlp.projects.inspectTemplates.create", - "parameterOrder": [ - "parent" - ], - "parameters": { - "parent": { - "description": "The parent resource name, for example projects/my-project-id or\norganizations/my-org-id.", - "location": "path", - "pattern": "^projects/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v2beta2/{+parent}/inspectTemplates", - "request": { - "$ref": "GooglePrivacyDlpV2beta2CreateInspectTemplateRequest" - }, - "response": { - "$ref": "GooglePrivacyDlpV2beta2InspectTemplate" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "delete": { - "description": "Deletes inspect templates.", - "flatPath": "v2beta2/projects/{projectsId}/inspectTemplates/{inspectTemplatesId}", - "httpMethod": "DELETE", - "id": "dlp.projects.inspectTemplates.delete", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Resource name of the organization and inspectTemplate to be deleted, for\nexample `organizations/433245324/inspectTemplates/432452342` or\nprojects/project-id/inspectTemplates/432452342.", - "location": "path", - "pattern": "^projects/[^/]+/inspectTemplates/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v2beta2/{+name}", - "response": { - "$ref": "GoogleProtobufEmpty" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "get": { - "description": "Gets an inspect template.", - "flatPath": "v2beta2/projects/{projectsId}/inspectTemplates/{inspectTemplatesId}", - "httpMethod": "GET", - "id": "dlp.projects.inspectTemplates.get", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Resource name of the organization and inspectTemplate to be read, for\nexample `organizations/433245324/inspectTemplates/432452342` or\nprojects/project-id/inspectTemplates/432452342.", - "location": "path", - "pattern": "^projects/[^/]+/inspectTemplates/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v2beta2/{+name}", - "response": { - "$ref": "GooglePrivacyDlpV2beta2InspectTemplate" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "list": { - "description": "Lists inspect templates.", - "flatPath": "v2beta2/projects/{projectsId}/inspectTemplates", - "httpMethod": "GET", - "id": "dlp.projects.inspectTemplates.list", - "parameterOrder": [ - "parent" - ], - "parameters": { - "pageSize": { - "description": "Optional size of the page, can be limited by server. If zero server returns\na page of max size 100.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "pageToken": { - "description": "Optional page token to continue retrieval. Comes from previous call\nto `ListInspectTemplates`.", - "location": "query", - "type": "string" - }, - "parent": { - "description": "The parent resource name, for example projects/my-project-id or\norganizations/my-org-id.", - "location": "path", - "pattern": "^projects/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v2beta2/{+parent}/inspectTemplates", - "response": { - "$ref": "GooglePrivacyDlpV2beta2ListInspectTemplatesResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "patch": { - "description": "Updates the inspect template.", - "flatPath": "v2beta2/projects/{projectsId}/inspectTemplates/{inspectTemplatesId}", - "httpMethod": "PATCH", - "id": "dlp.projects.inspectTemplates.patch", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Resource name of organization and inspectTemplate to be updated, for\nexample `organizations/433245324/inspectTemplates/432452342` or\nprojects/project-id/inspectTemplates/432452342.", - "location": "path", - "pattern": "^projects/[^/]+/inspectTemplates/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v2beta2/{+name}", - "request": { - "$ref": "GooglePrivacyDlpV2beta2UpdateInspectTemplateRequest" - }, - "response": { - "$ref": "GooglePrivacyDlpV2beta2InspectTemplate" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - } - }, - "jobTriggers": { - "methods": { - "create": { - "description": "Creates a job to run DLP actions such as scanning storage for sensitive\ninformation on a set schedule.", - "flatPath": "v2beta2/projects/{projectsId}/jobTriggers", - "httpMethod": "POST", - "id": "dlp.projects.jobTriggers.create", - "parameterOrder": [ - "parent" - ], - "parameters": { - "parent": { - "description": "The parent resource name, for example projects/my-project-id.", - "location": "path", - "pattern": "^projects/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v2beta2/{+parent}/jobTriggers", - "request": { - "$ref": "GooglePrivacyDlpV2beta2CreateJobTriggerRequest" - }, - "response": { - "$ref": "GooglePrivacyDlpV2beta2JobTrigger" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "delete": { - "description": "Deletes a job trigger.", - "flatPath": "v2beta2/projects/{projectsId}/jobTriggers/{jobTriggersId}", - "httpMethod": "DELETE", - "id": "dlp.projects.jobTriggers.delete", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Resource name of the project and the triggeredJob, for example\n`projects/dlp-test-project/jobTriggers/53234423`.", - "location": "path", - "pattern": "^projects/[^/]+/jobTriggers/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v2beta2/{+name}", - "response": { - "$ref": "GoogleProtobufEmpty" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "get": { - "description": "Gets a job trigger.", - "flatPath": "v2beta2/projects/{projectsId}/jobTriggers/{jobTriggersId}", - "httpMethod": "GET", - "id": "dlp.projects.jobTriggers.get", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Resource name of the project and the triggeredJob, for example\n`projects/dlp-test-project/jobTriggers/53234423`.", - "location": "path", - "pattern": "^projects/[^/]+/jobTriggers/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v2beta2/{+name}", - "response": { - "$ref": "GooglePrivacyDlpV2beta2JobTrigger" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "list": { - "description": "Lists job triggers.", - "flatPath": "v2beta2/projects/{projectsId}/jobTriggers", - "httpMethod": "GET", - "id": "dlp.projects.jobTriggers.list", - "parameterOrder": [ - "parent" - ], - "parameters": { - "orderBy": { - "description": "Optional comma separated list of triggeredJob fields to order by,\nfollowed by 'asc/desc' postfix, i.e.\n`\"create_time asc,name desc,schedule_mode asc\"`. This list is\ncase-insensitive.\n\nExample: `\"name asc,schedule_mode desc, status desc\"`\n\nSupported filters keys and values are:\n\n- `create_time`: corresponds to time the triggeredJob was created.\n- `update_time`: corresponds to time the triggeredJob was last updated.\n- `name`: corresponds to JobTrigger's display name.\n- `status`: corresponds to the triggeredJob status.", - "location": "query", - "type": "string" - }, - "pageSize": { - "description": "Optional size of the page, can be limited by a server.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "pageToken": { - "description": "Optional page token to continue retrieval. Comes from previous call\nto ListJobTriggers. `order_by` and `filter` should not change for\nsubsequent calls, but can be omitted if token is specified.", - "location": "query", - "type": "string" - }, - "parent": { - "description": "The parent resource name, for example projects/my-project-id.", - "location": "path", - "pattern": "^projects/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v2beta2/{+parent}/jobTriggers", - "response": { - "$ref": "GooglePrivacyDlpV2beta2ListJobTriggersResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "patch": { - "description": "Updates a job trigger.", - "flatPath": "v2beta2/projects/{projectsId}/jobTriggers/{jobTriggersId}", - "httpMethod": "PATCH", - "id": "dlp.projects.jobTriggers.patch", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Resource name of the project and the triggeredJob, for example\n`projects/dlp-test-project/jobTriggers/53234423`.", - "location": "path", - "pattern": "^projects/[^/]+/jobTriggers/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v2beta2/{+name}", - "request": { - "$ref": "GooglePrivacyDlpV2beta2UpdateJobTriggerRequest" - }, - "response": { - "$ref": "GooglePrivacyDlpV2beta2JobTrigger" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - } - } - } - } - }, - "revision": "20180404", - "rootUrl": "https://dlp.googleapis.com/", - "schemas": { - "GooglePrivacyDlpV2beta1AuxiliaryTable": { - "description": "An auxiliary table contains statistical information on the relative\nfrequency of different quasi-identifiers values. It has one or several\nquasi-identifiers columns, and one column that indicates the relative\nfrequency of each quasi-identifier tuple.\nIf a tuple is present in the data but not in the auxiliary table, the\ncorresponding relative frequency is assumed to be zero (and thus, the\ntuple is highly reidentifiable).", - "id": "GooglePrivacyDlpV2beta1AuxiliaryTable", - "properties": { - "quasiIds": { - "description": "Quasi-identifier columns. [required]", - "items": { - "$ref": "GooglePrivacyDlpV2beta1QuasiIdField" - }, - "type": "array" - }, - "relativeFrequency": { - "$ref": "GooglePrivacyDlpV2beta1FieldId", - "description": "The relative frequency column must contain a floating-point number\nbetween 0 and 1 (inclusive). Null values are assumed to be zero.\n[required]" - }, - "table": { - "$ref": "GooglePrivacyDlpV2beta1BigQueryTable", - "description": "Auxiliary table location. [required]" - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta1BigQueryOptions": { - "description": "Options defining BigQuery table and row identifiers.", - "id": "GooglePrivacyDlpV2beta1BigQueryOptions", - "properties": { - "identifyingFields": { - "description": "References to fields uniquely identifying rows within the table.\nNested fields in the format, like `person.birthdate.year`, are allowed.", - "items": { - "$ref": "GooglePrivacyDlpV2beta1FieldId" - }, - "type": "array" - }, - "tableReference": { - "$ref": "GooglePrivacyDlpV2beta1BigQueryTable", - "description": "Complete BigQuery table reference." - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta1BigQueryTable": { - "description": "Message defining the location of a BigQuery table. A table is uniquely\nidentified by its project_id, dataset_id, and table_name. Within a query\na table is often referenced with a string in the format of:\n`\u003cproject_id\u003e:\u003cdataset_id\u003e.\u003ctable_id\u003e` or\n`\u003cproject_id\u003e.\u003cdataset_id\u003e.\u003ctable_id\u003e`.", - "id": "GooglePrivacyDlpV2beta1BigQueryTable", - "properties": { - "datasetId": { - "description": "Dataset ID of the table.", - "type": "string" - }, - "projectId": { - "description": "The Google Cloud Platform project ID of the project containing the table.\nIf omitted, project ID is inferred from the API call.", - "type": "string" - }, - "tableId": { - "description": "Name of the table.", - "type": "string" - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta1CategoricalStatsConfig": { - "description": "Compute numerical stats over an individual column, including\nnumber of distinct values and value count distribution.", - "id": "GooglePrivacyDlpV2beta1CategoricalStatsConfig", - "properties": { - "field": { - "$ref": "GooglePrivacyDlpV2beta1FieldId", - "description": "Field to compute categorical stats on. All column types are\nsupported except for arrays and structs. However, it may be more\ninformative to use NumericalStats when the field type is supported,\ndepending on the data." - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta1CategoricalStatsHistogramBucket": { - "description": "Histogram bucket of value frequencies in the column.", - "id": "GooglePrivacyDlpV2beta1CategoricalStatsHistogramBucket", - "properties": { - "bucketSize": { - "description": "Total number of records in this bucket.", - "format": "int64", - "type": "string" - }, - "bucketValues": { - "description": "Sample of value frequencies in this bucket. The total number of\nvalues returned per bucket is capped at 20.", - "items": { - "$ref": "GooglePrivacyDlpV2beta1ValueFrequency" - }, - "type": "array" - }, - "valueFrequencyLowerBound": { - "description": "Lower bound on the value frequency of the values in this bucket.", - "format": "int64", - "type": "string" - }, - "valueFrequencyUpperBound": { - "description": "Upper bound on the value frequency of the values in this bucket.", - "format": "int64", - "type": "string" - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta1CategoricalStatsResult": { - "description": "Result of the categorical stats computation.", - "id": "GooglePrivacyDlpV2beta1CategoricalStatsResult", - "properties": { - "valueFrequencyHistogramBuckets": { - "description": "Histogram of value frequencies in the column.", - "items": { - "$ref": "GooglePrivacyDlpV2beta1CategoricalStatsHistogramBucket" - }, - "type": "array" - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta1CloudStorageOptions": { - "description": "Options defining a file or a set of files (path ending with *) within\na Google Cloud Storage bucket.", - "id": "GooglePrivacyDlpV2beta1CloudStorageOptions", - "properties": { - "fileSet": { - "$ref": "GooglePrivacyDlpV2beta1FileSet" - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta1CloudStoragePath": { - "description": "A location in Cloud Storage.", - "id": "GooglePrivacyDlpV2beta1CloudStoragePath", - "properties": { - "path": { - "description": "The url, in the format of `gs://bucket/\u003cpath\u003e`.", - "type": "string" - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta1CustomInfoType": { - "description": "Custom information type provided by the user. Used to find domain-specific\nsensitive information configurable to the data in question.", - "id": "GooglePrivacyDlpV2beta1CustomInfoType", - "properties": { - "dictionary": { - "$ref": "GooglePrivacyDlpV2beta1Dictionary", - "description": "Dictionary-based custom info type." - }, - "infoType": { - "$ref": "GooglePrivacyDlpV2beta1InfoType", - "description": "Info type configuration. All custom info types must have configurations\nthat do not conflict with built-in info types or other custom info types." - }, - "surrogateType": { - "$ref": "GooglePrivacyDlpV2beta1SurrogateType", - "description": "Surrogate info type." - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta1DatastoreOptions": { - "description": "Options defining a data set within Google Cloud Datastore.", - "id": "GooglePrivacyDlpV2beta1DatastoreOptions", - "properties": { - "kind": { - "$ref": "GooglePrivacyDlpV2beta1KindExpression", - "description": "The kind to process." - }, - "partitionId": { - "$ref": "GooglePrivacyDlpV2beta1PartitionId", - "description": "A partition ID identifies a grouping of entities. The grouping is always\nby project and namespace, however the namespace ID may be empty." - }, - "projection": { - "description": "Properties to scan. If none are specified, all properties will be scanned\nby default.", - "items": { - "$ref": "GooglePrivacyDlpV2beta1Projection" - }, - "type": "array" - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta1Dictionary": { - "description": "Custom information type based on a dictionary of words or phrases. This can\nbe used to match sensitive information specific to the data, such as a list\nof employee IDs or job titles.\n\nDictionary words are case-insensitive and all characters other than letters\nand digits in the unicode [Basic Multilingual\nPlane](https://en.wikipedia.org/wiki/Plane_%28Unicode%29#Basic_Multilingual_Plane)\nwill be replaced with whitespace when scanning for matches, so the\ndictionary phrase \"Sam Johnson\" will match all three phrases \"sam johnson\",\n\"Sam, Johnson\", and \"Sam (Johnson)\". Additionally, the characters\nsurrounding any match must be of a different type than the adjacent\ncharacters within the word, so letters must be next to non-letters and\ndigits next to non-digits. For example, the dictionary word \"jen\" will\nmatch the first three letters of the text \"jen123\" but will return no\nmatches for \"jennifer\".\n\nDictionary words containing a large number of characters that are not\nletters or digits may result in unexpected findings because such characters\nare treated as whitespace.", - "id": "GooglePrivacyDlpV2beta1Dictionary", - "properties": { - "wordList": { - "$ref": "GooglePrivacyDlpV2beta1WordList", - "description": "List of words or phrases to search for." - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta1EntityId": { - "description": "An entity in a dataset is a field or set of fields that correspond to a\nsingle person. For example, in medical records the `EntityId` might be\na patient identifier, or for financial records it might be an account\nidentifier. This message is used when generalizations or analysis must be\nconsistent across multiple rows pertaining to the same entity.", - "id": "GooglePrivacyDlpV2beta1EntityId", - "properties": { - "field": { - "$ref": "GooglePrivacyDlpV2beta1FieldId", - "description": "Composite key indicating which field contains the entity identifier." - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta1FieldId": { - "description": "General identifier of a data field in a storage service.", - "id": "GooglePrivacyDlpV2beta1FieldId", - "properties": { - "columnName": { - "description": "Name describing the field.", - "type": "string" - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta1FileSet": { - "description": "Set of files to scan.", - "id": "GooglePrivacyDlpV2beta1FileSet", - "properties": { - "url": { - "description": "The url, in the format `gs://\u003cbucket\u003e/\u003cpath\u003e`. Trailing wildcard in the\npath is allowed.", - "type": "string" - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta1InfoType": { - "description": "Type of information detected by the API.", - "id": "GooglePrivacyDlpV2beta1InfoType", - "properties": { - "name": { - "description": "Name of the information type.", - "type": "string" - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta1InfoTypeLimit": { - "description": "Max findings configuration per info type, per content item or long running\noperation.", - "id": "GooglePrivacyDlpV2beta1InfoTypeLimit", - "properties": { - "infoType": { - "$ref": "GooglePrivacyDlpV2beta1InfoType", - "description": "Type of information the findings limit applies to. Only one limit per\ninfo_type should be provided. If InfoTypeLimit does not have an\ninfo_type, the DLP API applies the limit against all info_types that are\nfound but not specified in another InfoTypeLimit." - }, - "maxFindings": { - "description": "Max findings limit for the given infoType.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta1InfoTypeStatistics": { - "description": "Statistics regarding a specific InfoType.", - "id": "GooglePrivacyDlpV2beta1InfoTypeStatistics", - "properties": { - "count": { - "description": "Number of findings for this info type.", - "format": "int64", - "type": "string" - }, - "infoType": { - "$ref": "GooglePrivacyDlpV2beta1InfoType", - "description": "The type of finding this stat is for." - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta1InspectConfig": { - "description": "Configuration description of the scanning process.\nWhen used with redactContent only info_types and min_likelihood are currently\nused.", - "id": "GooglePrivacyDlpV2beta1InspectConfig", - "properties": { - "customInfoTypes": { - "description": "Custom info types provided by the user.", - "items": { - "$ref": "GooglePrivacyDlpV2beta1CustomInfoType" - }, - "type": "array" - }, - "excludeTypes": { - "description": "When true, excludes type information of the findings.", - "type": "boolean" - }, - "includeQuote": { - "description": "When true, a contextual quote from the data that triggered a finding is\nincluded in the response; see Finding.quote.", - "type": "boolean" - }, - "infoTypeLimits": { - "description": "Configuration of findings limit given for specified info types.", - "items": { - "$ref": "GooglePrivacyDlpV2beta1InfoTypeLimit" - }, - "type": "array" - }, - "infoTypes": { - "description": "Restricts what info_types to look for. The values must correspond to\nInfoType values returned by ListInfoTypes or found in documentation.\nEmpty info_types runs all enabled detectors.", - "items": { - "$ref": "GooglePrivacyDlpV2beta1InfoType" - }, - "type": "array" - }, - "maxFindings": { - "description": "Limits the number of findings per content item or long running operation.", - "format": "int32", - "type": "integer" - }, - "minLikelihood": { - "description": "Only returns findings equal or above this threshold.", - "enum": [ - "LIKELIHOOD_UNSPECIFIED", - "VERY_UNLIKELY", - "UNLIKELY", - "POSSIBLE", - "LIKELY", - "VERY_LIKELY" - ], - "enumDescriptions": [ - "Default value; information with all likelihoods is included.", - "Few matching elements.", - "", - "Some matching elements.", - "", - "Many matching elements." - ], - "type": "string" - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta1InspectOperationMetadata": { - "description": "Metadata returned within GetOperation for an inspect request.", - "id": "GooglePrivacyDlpV2beta1InspectOperationMetadata", - "properties": { - "createTime": { - "description": "The time which this request was started.", - "format": "google-datetime", - "type": "string" - }, - "infoTypeStats": { - "items": { - "$ref": "GooglePrivacyDlpV2beta1InfoTypeStatistics" - }, - "type": "array" - }, - "processedBytes": { - "description": "Total size in bytes that were processed.", - "format": "int64", - "type": "string" - }, - "requestInspectConfig": { - "$ref": "GooglePrivacyDlpV2beta1InspectConfig", - "description": "The inspect config used to create the Operation." - }, - "requestOutputConfig": { - "$ref": "GooglePrivacyDlpV2beta1OutputStorageConfig", - "description": "Optional location to store findings." - }, - "requestStorageConfig": { - "$ref": "GooglePrivacyDlpV2beta1StorageConfig", - "description": "The storage config used to create the Operation." - }, - "totalEstimatedBytes": { - "description": "Estimate of the number of bytes to process.", - "format": "int64", - "type": "string" - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta1InspectOperationResult": { - "description": "The operational data.", - "id": "GooglePrivacyDlpV2beta1InspectOperationResult", - "properties": { - "name": { - "description": "The server-assigned name, which is only unique within the same service that\noriginally returns it. If you use the default HTTP mapping, the\n`name` should have the format of `inspect/results/{id}`.", - "type": "string" - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta1KAnonymityConfig": { - "description": "k-anonymity metric, used for analysis of reidentification risk.", - "id": "GooglePrivacyDlpV2beta1KAnonymityConfig", - "properties": { - "entityId": { - "$ref": "GooglePrivacyDlpV2beta1EntityId", - "description": "Optional message indicating that each distinct entity_id should not\ncontribute to the k-anonymity count more than once per equivalence class.\nIf an entity_id appears on several rows with different quasi-identifier\ntuples, it will contribute to each count exactly once.\n\nThis can lead to unexpected results. Consider a table where ID 1 is\nassociated to quasi-identifier \"foo\", ID 2 to \"bar\", and ID 3 to *both*\nquasi-identifiers \"foo\" and \"bar\" (on separate rows), and where this ID\nis used as entity_id. Then, the anonymity value associated to ID 3 will\nbe 2, even if it is the only ID to be associated to both values \"foo\" and\n\"bar\"." - }, - "quasiIds": { - "description": "Set of fields to compute k-anonymity over. When multiple fields are\nspecified, they are considered a single composite key. Structs and\nrepeated data types are not supported; however, nested fields are\nsupported so long as they are not structs themselves or nested within\na repeated field.", - "items": { - "$ref": "GooglePrivacyDlpV2beta1FieldId" - }, - "type": "array" - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta1KAnonymityEquivalenceClass": { - "description": "The set of columns' values that share the same k-anonymity value.", - "id": "GooglePrivacyDlpV2beta1KAnonymityEquivalenceClass", - "properties": { - "equivalenceClassSize": { - "description": "Size of the equivalence class, for example number of rows with the\nabove set of values.", - "format": "int64", - "type": "string" - }, - "quasiIdsValues": { - "description": "Set of values defining the equivalence class. One value per\nquasi-identifier column in the original KAnonymity metric message.\nThe order is always the same as the original request.", - "items": { - "$ref": "GooglePrivacyDlpV2beta1Value" - }, - "type": "array" - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta1KAnonymityHistogramBucket": { - "description": "Histogram bucket of equivalence class sizes in the table.", - "id": "GooglePrivacyDlpV2beta1KAnonymityHistogramBucket", - "properties": { - "bucketSize": { - "description": "Total number of records in this bucket.", - "format": "int64", - "type": "string" - }, - "bucketValues": { - "description": "Sample of equivalence classes in this bucket. The total number of\nclasses returned per bucket is capped at 20.", - "items": { - "$ref": "GooglePrivacyDlpV2beta1KAnonymityEquivalenceClass" - }, - "type": "array" - }, - "equivalenceClassSizeLowerBound": { - "description": "Lower bound on the size of the equivalence classes in this bucket.", - "format": "int64", - "type": "string" - }, - "equivalenceClassSizeUpperBound": { - "description": "Upper bound on the size of the equivalence classes in this bucket.", - "format": "int64", - "type": "string" - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta1KAnonymityResult": { - "description": "Result of the k-anonymity computation.", - "id": "GooglePrivacyDlpV2beta1KAnonymityResult", - "properties": { - "equivalenceClassHistogramBuckets": { - "description": "Histogram of k-anonymity equivalence classes.", - "items": { - "$ref": "GooglePrivacyDlpV2beta1KAnonymityHistogramBucket" - }, - "type": "array" - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta1KMapEstimationConfig": { - "description": "Reidentifiability metric. This corresponds to a risk model similar to what\nis called \"journalist risk\" in the literature, except the attack dataset is\nstatistically modeled instead of being perfectly known. This can be done\nusing publicly available data (like the US Census), or using a custom\nstatistical model (indicated as one or several BigQuery tables), or by\nextrapolating from the distribution of values in the input dataset.", - "id": "GooglePrivacyDlpV2beta1KMapEstimationConfig", - "properties": { - "auxiliaryTables": { - "description": "Several auxiliary tables can be used in the analysis. Each custom_tag\nused to tag a quasi-identifiers column must appear in exactly one column\nof one auxiliary table.", - "items": { - "$ref": "GooglePrivacyDlpV2beta1AuxiliaryTable" - }, - "type": "array" - }, - "quasiIds": { - "description": "Fields considered to be quasi-identifiers. No two columns can have the\nsame tag. [required]", - "items": { - "$ref": "GooglePrivacyDlpV2beta1TaggedField" - }, - "type": "array" - }, - "regionCode": { - "description": "ISO 3166-1 alpha-2 region code to use in the statistical modeling.\nRequired if no column is tagged with a region-specific InfoType (like\nUS_ZIP_5) or a region code.", - "type": "string" - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta1KMapEstimationHistogramBucket": { - "description": "A KMapEstimationHistogramBucket message with the following values:\n min_anonymity: 3\n max_anonymity: 5\n frequency: 42\nmeans that there are 42 records whose quasi-identifier values correspond\nto 3, 4 or 5 people in the overlying population. An important particular\ncase is when min_anonymity = max_anonymity = 1: the frequency field then\ncorresponds to the number of uniquely identifiable records.", - "id": "GooglePrivacyDlpV2beta1KMapEstimationHistogramBucket", - "properties": { - "bucketSize": { - "description": "Number of records within these anonymity bounds.", - "format": "int64", - "type": "string" - }, - "bucketValues": { - "description": "Sample of quasi-identifier tuple values in this bucket. The total\nnumber of classes returned per bucket is capped at 20.", - "items": { - "$ref": "GooglePrivacyDlpV2beta1KMapEstimationQuasiIdValues" - }, - "type": "array" - }, - "maxAnonymity": { - "description": "Always greater than or equal to min_anonymity.", - "format": "int64", - "type": "string" - }, - "minAnonymity": { - "description": "Always positive.", - "format": "int64", - "type": "string" - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta1KMapEstimationQuasiIdValues": { - "description": "A tuple of values for the quasi-identifier columns.", - "id": "GooglePrivacyDlpV2beta1KMapEstimationQuasiIdValues", - "properties": { - "estimatedAnonymity": { - "description": "The estimated anonymity for these quasi-identifier values.", - "format": "int64", - "type": "string" - }, - "quasiIdsValues": { - "description": "The quasi-identifier values.", - "items": { - "$ref": "GooglePrivacyDlpV2beta1Value" - }, - "type": "array" - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta1KMapEstimationResult": { - "description": "Result of the reidentifiability analysis. Note that these results are an\nestimation, not exact values.", - "id": "GooglePrivacyDlpV2beta1KMapEstimationResult", - "properties": { - "kMapEstimationHistogram": { - "description": "The intervals [min_anonymity, max_anonymity] do not overlap. If a value\ndoesn't correspond to any such interval, the associated frequency is\nzero. For example, the following records:\n {min_anonymity: 1, max_anonymity: 1, frequency: 17}\n {min_anonymity: 2, max_anonymity: 3, frequency: 42}\n {min_anonymity: 5, max_anonymity: 10, frequency: 99}\nmean that there are no record with an estimated anonymity of 4, 5, or\nlarger than 10.", - "items": { - "$ref": "GooglePrivacyDlpV2beta1KMapEstimationHistogramBucket" - }, - "type": "array" - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta1KindExpression": { - "description": "A representation of a Datastore kind.", - "id": "GooglePrivacyDlpV2beta1KindExpression", - "properties": { - "name": { - "description": "The name of the kind.", - "type": "string" - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta1LDiversityConfig": { - "description": "l-diversity metric, used for analysis of reidentification risk.", - "id": "GooglePrivacyDlpV2beta1LDiversityConfig", - "properties": { - "quasiIds": { - "description": "Set of quasi-identifiers indicating how equivalence classes are\ndefined for the l-diversity computation. When multiple fields are\nspecified, they are considered a single composite key.", - "items": { - "$ref": "GooglePrivacyDlpV2beta1FieldId" - }, - "type": "array" - }, - "sensitiveAttribute": { - "$ref": "GooglePrivacyDlpV2beta1FieldId", - "description": "Sensitive field for computing the l-value." - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta1LDiversityEquivalenceClass": { - "description": "The set of columns' values that share the same l-diversity value.", - "id": "GooglePrivacyDlpV2beta1LDiversityEquivalenceClass", - "properties": { - "equivalenceClassSize": { - "description": "Size of the k-anonymity equivalence class.", - "format": "int64", - "type": "string" - }, - "numDistinctSensitiveValues": { - "description": "Number of distinct sensitive values in this equivalence class.", - "format": "int64", - "type": "string" - }, - "quasiIdsValues": { - "description": "Quasi-identifier values defining the k-anonymity equivalence\nclass. The order is always the same as the original request.", - "items": { - "$ref": "GooglePrivacyDlpV2beta1Value" - }, - "type": "array" - }, - "topSensitiveValues": { - "description": "Estimated frequencies of top sensitive values.", - "items": { - "$ref": "GooglePrivacyDlpV2beta1ValueFrequency" - }, - "type": "array" - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta1LDiversityHistogramBucket": { - "description": "Histogram bucket of sensitive value frequencies in the table.", - "id": "GooglePrivacyDlpV2beta1LDiversityHistogramBucket", - "properties": { - "bucketSize": { - "description": "Total number of records in this bucket.", - "format": "int64", - "type": "string" - }, - "bucketValues": { - "description": "Sample of equivalence classes in this bucket. The total number of\nclasses returned per bucket is capped at 20.", - "items": { - "$ref": "GooglePrivacyDlpV2beta1LDiversityEquivalenceClass" - }, - "type": "array" - }, - "sensitiveValueFrequencyLowerBound": { - "description": "Lower bound on the sensitive value frequencies of the equivalence\nclasses in this bucket.", - "format": "int64", - "type": "string" - }, - "sensitiveValueFrequencyUpperBound": { - "description": "Upper bound on the sensitive value frequencies of the equivalence\nclasses in this bucket.", - "format": "int64", - "type": "string" - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta1LDiversityResult": { - "description": "Result of the l-diversity computation.", - "id": "GooglePrivacyDlpV2beta1LDiversityResult", - "properties": { - "sensitiveValueFrequencyHistogramBuckets": { - "description": "Histogram of l-diversity equivalence class sensitive value frequencies.", - "items": { - "$ref": "GooglePrivacyDlpV2beta1LDiversityHistogramBucket" - }, - "type": "array" - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta1NumericalStatsConfig": { - "description": "Compute numerical stats over an individual column, including\nmin, max, and quantiles.", - "id": "GooglePrivacyDlpV2beta1NumericalStatsConfig", - "properties": { - "field": { - "$ref": "GooglePrivacyDlpV2beta1FieldId", - "description": "Field to compute numerical stats on. Supported types are\ninteger, float, date, datetime, timestamp, time." - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta1NumericalStatsResult": { - "description": "Result of the numerical stats computation.", - "id": "GooglePrivacyDlpV2beta1NumericalStatsResult", - "properties": { - "maxValue": { - "$ref": "GooglePrivacyDlpV2beta1Value", - "description": "Maximum value appearing in the column." - }, - "minValue": { - "$ref": "GooglePrivacyDlpV2beta1Value", - "description": "Minimum value appearing in the column." - }, - "quantileValues": { - "description": "List of 99 values that partition the set of field values into 100 equal\nsized buckets.", - "items": { - "$ref": "GooglePrivacyDlpV2beta1Value" - }, - "type": "array" - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta1OutputStorageConfig": { - "description": "Cloud repository for storing output.", - "id": "GooglePrivacyDlpV2beta1OutputStorageConfig", - "properties": { - "storagePath": { - "$ref": "GooglePrivacyDlpV2beta1CloudStoragePath", - "description": "The path to a Google Cloud Storage location to store output.\nThe bucket must already exist and\nthe Google APIs service account for DLP must have write permission to\nwrite to the given bucket.\nResults are split over multiple csv files with each file name matching\nthe pattern \"[operation_id]_[count].csv\", for example\n`3094877188788974909_1.csv`. The `operation_id` matches the\nidentifier for the Operation, and the `count` is a counter used for\ntracking the number of files written.\n\nThe CSV file(s) contain the following columns regardless of storage type\nscanned:\n- id\n- info_type\n- likelihood\n- byte size of finding\n- quote\n- timestamp\n\nFor Cloud Storage the next columns are:\n\n- file_path\n- start_offset\n\nFor Cloud Datastore the next columns are:\n\n- project_id\n- namespace_id\n- path\n- column_name\n- offset\n\nFor BigQuery the next columns are:\n\n- row_number\n- project_id\n- dataset_id\n- table_id" - }, - "table": { - "$ref": "GooglePrivacyDlpV2beta1BigQueryTable", - "description": "Store findings in a new table in the dataset." - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta1PartitionId": { - "description": "Datastore partition ID.\nA partition ID identifies a grouping of entities. The grouping is always\nby project and namespace, however the namespace ID may be empty.\n\nA partition ID contains several dimensions:\nproject ID and namespace ID.", - "id": "GooglePrivacyDlpV2beta1PartitionId", - "properties": { - "namespaceId": { - "description": "If not empty, the ID of the namespace to which the entities belong.", - "type": "string" - }, - "projectId": { - "description": "The ID of the project to which the entities belong.", - "type": "string" - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta1PrivacyMetric": { - "description": "Privacy metric to compute for reidentification risk analysis.", - "id": "GooglePrivacyDlpV2beta1PrivacyMetric", - "properties": { - "categoricalStatsConfig": { - "$ref": "GooglePrivacyDlpV2beta1CategoricalStatsConfig" - }, - "kAnonymityConfig": { - "$ref": "GooglePrivacyDlpV2beta1KAnonymityConfig" - }, - "kMapEstimationConfig": { - "$ref": "GooglePrivacyDlpV2beta1KMapEstimationConfig" - }, - "lDiversityConfig": { - "$ref": "GooglePrivacyDlpV2beta1LDiversityConfig" - }, - "numericalStatsConfig": { - "$ref": "GooglePrivacyDlpV2beta1NumericalStatsConfig" - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta1Projection": { - "description": "A representation of a Datastore property in a projection.", - "id": "GooglePrivacyDlpV2beta1Projection", - "properties": { - "property": { - "$ref": "GooglePrivacyDlpV2beta1PropertyReference", - "description": "The property to project." - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta1PropertyReference": { - "description": "A reference to a property relative to the Datastore kind expressions.", - "id": "GooglePrivacyDlpV2beta1PropertyReference", - "properties": { - "name": { - "description": "The name of the property.\nIf name includes \".\"s, it may be interpreted as a property name path.", - "type": "string" - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta1QuasiIdField": { - "description": "A quasi-identifier column has a custom_tag, used to know which column\nin the data corresponds to which column in the statistical model.", - "id": "GooglePrivacyDlpV2beta1QuasiIdField", - "properties": { - "customTag": { - "type": "string" - }, - "field": { - "$ref": "GooglePrivacyDlpV2beta1FieldId" - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta1RiskAnalysisOperationMetadata": { - "description": "Metadata returned within the\n[`riskAnalysis.operations.get`](/dlp/docs/reference/rest/v2beta1/riskAnalysis.operations/get)\nfor risk analysis.", - "id": "GooglePrivacyDlpV2beta1RiskAnalysisOperationMetadata", - "properties": { - "createTime": { - "description": "The time which this request was started.", - "format": "google-datetime", - "type": "string" - }, - "requestedPrivacyMetric": { - "$ref": "GooglePrivacyDlpV2beta1PrivacyMetric", - "description": "Privacy metric to compute." - }, - "requestedSourceTable": { - "$ref": "GooglePrivacyDlpV2beta1BigQueryTable", - "description": "Input dataset to compute metrics over." - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta1RiskAnalysisOperationResult": { - "description": "Result of a risk analysis\n[`Operation`](/dlp/docs/reference/rest/v2beta1/inspect.operations)\nrequest.", - "id": "GooglePrivacyDlpV2beta1RiskAnalysisOperationResult", - "properties": { - "categoricalStatsResult": { - "$ref": "GooglePrivacyDlpV2beta1CategoricalStatsResult" - }, - "kAnonymityResult": { - "$ref": "GooglePrivacyDlpV2beta1KAnonymityResult" - }, - "kMapEstimationResult": { - "$ref": "GooglePrivacyDlpV2beta1KMapEstimationResult" - }, - "lDiversityResult": { - "$ref": "GooglePrivacyDlpV2beta1LDiversityResult" - }, - "numericalStatsResult": { - "$ref": "GooglePrivacyDlpV2beta1NumericalStatsResult" - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta1StorageConfig": { - "description": "Shared message indicating Cloud storage type.", - "id": "GooglePrivacyDlpV2beta1StorageConfig", - "properties": { - "bigQueryOptions": { - "$ref": "GooglePrivacyDlpV2beta1BigQueryOptions", - "description": "BigQuery options specification." - }, - "cloudStorageOptions": { - "$ref": "GooglePrivacyDlpV2beta1CloudStorageOptions", - "description": "Google Cloud Storage options specification." - }, - "datastoreOptions": { - "$ref": "GooglePrivacyDlpV2beta1DatastoreOptions", - "description": "Google Cloud Datastore options specification." - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta1SurrogateType": { - "description": "Message for detecting output from deidentification transformations\nsuch as\n[`CryptoReplaceFfxFpeConfig`](/dlp/docs/reference/rest/v2beta1/content/deidentify#CryptoReplaceFfxFpeConfig).\nThese types of transformations are\nthose that perform pseudonymization, thereby producing a \"surrogate\" as\noutput. This should be used in conjunction with a field on the\ntransformation such as `surrogate_info_type`. This custom info type does\nnot support the use of `detection_rules`.", - "id": "GooglePrivacyDlpV2beta1SurrogateType", - "properties": {}, - "type": "object" - }, - "GooglePrivacyDlpV2beta1TaggedField": { - "description": "A column with a semantic tag attached.", - "id": "GooglePrivacyDlpV2beta1TaggedField", - "properties": { - "customTag": { - "description": "A column can be tagged with a custom tag. In this case, the user must\nindicate an auxiliary table that contains statistical information on\nthe possible values of this column (below).", - "type": "string" - }, - "field": { - "$ref": "GooglePrivacyDlpV2beta1FieldId", - "description": "Identifies the column. [required]" - }, - "inferred": { - "$ref": "GoogleProtobufEmpty", - "description": "If no semantic tag is indicated, we infer the statistical model from\nthe distribution of values in the input data" - }, - "infoType": { - "$ref": "GooglePrivacyDlpV2beta1InfoType", - "description": "A column can be tagged with a InfoType to use the relevant public\ndataset as a statistical model of population, if available. We\ncurrently support US ZIP codes, region codes, ages and genders." - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta1Value": { - "description": "Set of primitive values supported by the system.\nNote that for the purposes of inspection or transformation, the number\nof bytes considered to comprise a 'Value' is based on its representation\nas a UTF-8 encoded string. For example, if 'integer_value' is set to\n123456789, the number of bytes would be counted as 9, even though an\nint64 only holds up to 8 bytes of data.", - "id": "GooglePrivacyDlpV2beta1Value", - "properties": { - "booleanValue": { - "type": "boolean" - }, - "dateValue": { - "$ref": "GoogleTypeDate" - }, - "floatValue": { - "format": "double", - "type": "number" - }, - "integerValue": { - "format": "int64", - "type": "string" - }, - "stringValue": { - "type": "string" - }, - "timeValue": { - "$ref": "GoogleTypeTimeOfDay" - }, - "timestampValue": { - "format": "google-datetime", - "type": "string" - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta1ValueFrequency": { - "description": "A value of a field, including its frequency.", - "id": "GooglePrivacyDlpV2beta1ValueFrequency", - "properties": { - "count": { - "description": "How many times the value is contained in the field.", - "format": "int64", - "type": "string" - }, - "value": { - "$ref": "GooglePrivacyDlpV2beta1Value", - "description": "A value contained in the field in question." - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta1WordList": { - "description": "Message defining a list of words or phrases to search for in the data.", - "id": "GooglePrivacyDlpV2beta1WordList", - "properties": { - "words": { - "description": "Words or phrases defining the dictionary. The dictionary must contain\nat least one phrase and every phrase must contain at least 2 characters\nthat are letters or digits. [required]", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta2Action": { - "description": "A task to execute on the completion of a job.", - "id": "GooglePrivacyDlpV2beta2Action", - "properties": { - "pubSub": { - "$ref": "GooglePrivacyDlpV2beta2PublishToPubSub", - "description": "Publish a notification to a pubsub topic." - }, - "saveFindings": { - "$ref": "GooglePrivacyDlpV2beta2SaveFindings", - "description": "Save resulting findings in a provided location." - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta2AnalyzeDataSourceRiskDetails": { - "description": "Result of a risk analysis operation request.", - "id": "GooglePrivacyDlpV2beta2AnalyzeDataSourceRiskDetails", - "properties": { - "categoricalStatsResult": { - "$ref": "GooglePrivacyDlpV2beta2CategoricalStatsResult" - }, - "kAnonymityResult": { - "$ref": "GooglePrivacyDlpV2beta2KAnonymityResult" - }, - "kMapEstimationResult": { - "$ref": "GooglePrivacyDlpV2beta2KMapEstimationResult" - }, - "lDiversityResult": { - "$ref": "GooglePrivacyDlpV2beta2LDiversityResult" - }, - "numericalStatsResult": { - "$ref": "GooglePrivacyDlpV2beta2NumericalStatsResult" - }, - "requestedPrivacyMetric": { - "$ref": "GooglePrivacyDlpV2beta2PrivacyMetric", - "description": "Privacy metric to compute." - }, - "requestedSourceTable": { - "$ref": "GooglePrivacyDlpV2beta2BigQueryTable", - "description": "Input dataset to compute metrics over." - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta2AnalyzeDataSourceRiskRequest": { - "description": "Request for creating a risk analysis DlpJob.", - "id": "GooglePrivacyDlpV2beta2AnalyzeDataSourceRiskRequest", - "properties": { - "jobConfig": { - "$ref": "GooglePrivacyDlpV2beta2RiskAnalysisJobConfig", - "description": "Configuration for this risk analysis job." - }, - "jobId": { - "description": "Optional job ID to use for the created job. If not provided, a job ID will\nautomatically be generated. Must be unique within the project. The job ID\ncan contain uppercase and lowercase letters, numbers, and hyphens; that is,\nit must match the regular expression: `[a-zA-Z\\\\d-]+`. The maximum length\nis 100 characters. Can be empty to allow the system to generate one.", - "type": "string" - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta2AuxiliaryTable": { - "description": "An auxiliary table contains statistical information on the relative\nfrequency of different quasi-identifiers values. It has one or several\nquasi-identifiers columns, and one column that indicates the relative\nfrequency of each quasi-identifier tuple.\nIf a tuple is present in the data but not in the auxiliary table, the\ncorresponding relative frequency is assumed to be zero (and thus, the\ntuple is highly reidentifiable).", - "id": "GooglePrivacyDlpV2beta2AuxiliaryTable", - "properties": { - "quasiIds": { - "description": "Quasi-identifier columns. [required]", - "items": { - "$ref": "GooglePrivacyDlpV2beta2QuasiIdField" - }, - "type": "array" - }, - "relativeFrequency": { - "$ref": "GooglePrivacyDlpV2beta2FieldId", - "description": "The relative frequency column must contain a floating-point number\nbetween 0 and 1 (inclusive). Null values are assumed to be zero.\n[required]" - }, - "table": { - "$ref": "GooglePrivacyDlpV2beta2BigQueryTable", - "description": "Auxiliary table location. [required]" - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta2BigQueryKey": { - "description": "Row key for identifying a record in BigQuery table.", - "id": "GooglePrivacyDlpV2beta2BigQueryKey", - "properties": { - "rowNumber": { - "description": "Absolute number of the row from the beginning of the table at the time\nof scanning.", - "format": "int64", - "type": "string" - }, - "tableReference": { - "$ref": "GooglePrivacyDlpV2beta2BigQueryTable", - "description": "Complete BigQuery table reference." - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta2BigQueryOptions": { - "description": "Options defining BigQuery table and row identifiers.", - "id": "GooglePrivacyDlpV2beta2BigQueryOptions", - "properties": { - "identifyingFields": { - "description": "References to fields uniquely identifying rows within the table.\nNested fields in the format, like `person.birthdate.year`, are allowed.", - "items": { - "$ref": "GooglePrivacyDlpV2beta2FieldId" - }, - "type": "array" - }, - "tableReference": { - "$ref": "GooglePrivacyDlpV2beta2BigQueryTable", - "description": "Complete BigQuery table reference." - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta2BigQueryTable": { - "description": "Message defining the location of a BigQuery table. A table is uniquely\nidentified by its project_id, dataset_id, and table_name. Within a query\na table is often referenced with a string in the format of:\n`\u003cproject_id\u003e:\u003cdataset_id\u003e.\u003ctable_id\u003e` or\n`\u003cproject_id\u003e.\u003cdataset_id\u003e.\u003ctable_id\u003e`.", - "id": "GooglePrivacyDlpV2beta2BigQueryTable", - "properties": { - "datasetId": { - "description": "Dataset ID of the table.", - "type": "string" - }, - "projectId": { - "description": "The Google Cloud Platform project ID of the project containing the table.\nIf omitted, project ID is inferred from the API call.", - "type": "string" - }, - "tableId": { - "description": "Name of the table.", - "type": "string" - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta2Bucket": { - "description": "Bucket is represented as a range, along with replacement values.", - "id": "GooglePrivacyDlpV2beta2Bucket", - "properties": { - "max": { - "$ref": "GooglePrivacyDlpV2beta2Value", - "description": "Upper bound of the range, exclusive; type must match min." - }, - "min": { - "$ref": "GooglePrivacyDlpV2beta2Value", - "description": "Lower bound of the range, inclusive. Type should be the same as max if\nused." - }, - "replacementValue": { - "$ref": "GooglePrivacyDlpV2beta2Value", - "description": "Replacement value for this bucket. If not provided\nthe default behavior will be to hyphenate the min-max range." - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta2BucketingConfig": { - "description": "Generalization function that buckets values based on ranges. The ranges and\nreplacement values are dynamically provided by the user for custom behavior,\nsuch as 1-30 -\u003e LOW 31-65 -\u003e MEDIUM 66-100 -\u003e HIGH\nThis can be used on\ndata of type: number, long, string, timestamp.\nIf the bound `Value` type differs from the type of data being transformed, we\nwill first attempt converting the type of the data to be transformed to match\nthe type of the bound before comparing.", - "id": "GooglePrivacyDlpV2beta2BucketingConfig", - "properties": { - "buckets": { - "description": "Set of buckets. Ranges must be non-overlapping.", - "items": { - "$ref": "GooglePrivacyDlpV2beta2Bucket" - }, - "type": "array" - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta2CancelDlpJobRequest": { - "description": "The request message for canceling a DLP job.", - "id": "GooglePrivacyDlpV2beta2CancelDlpJobRequest", - "properties": {}, - "type": "object" - }, - "GooglePrivacyDlpV2beta2CategoricalStatsConfig": { - "description": "Compute numerical stats over an individual column, including\nnumber of distinct values and value count distribution.", - "id": "GooglePrivacyDlpV2beta2CategoricalStatsConfig", - "properties": { - "field": { - "$ref": "GooglePrivacyDlpV2beta2FieldId", - "description": "Field to compute categorical stats on. All column types are\nsupported except for arrays and structs. However, it may be more\ninformative to use NumericalStats when the field type is supported,\ndepending on the data." - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta2CategoricalStatsHistogramBucket": { - "id": "GooglePrivacyDlpV2beta2CategoricalStatsHistogramBucket", - "properties": { - "bucketSize": { - "description": "Total number of values in this bucket.", - "format": "int64", - "type": "string" - }, - "bucketValueCount": { - "description": "Total number of distinct values in this bucket.", - "format": "int64", - "type": "string" - }, - "bucketValues": { - "description": "Sample of value frequencies in this bucket. The total number of\nvalues returned per bucket is capped at 20.", - "items": { - "$ref": "GooglePrivacyDlpV2beta2ValueFrequency" - }, - "type": "array" - }, - "valueFrequencyLowerBound": { - "description": "Lower bound on the value frequency of the values in this bucket.", - "format": "int64", - "type": "string" - }, - "valueFrequencyUpperBound": { - "description": "Upper bound on the value frequency of the values in this bucket.", - "format": "int64", - "type": "string" - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta2CategoricalStatsResult": { - "description": "Result of the categorical stats computation.", - "id": "GooglePrivacyDlpV2beta2CategoricalStatsResult", - "properties": { - "valueFrequencyHistogramBuckets": { - "description": "Histogram of value frequencies in the column.", - "items": { - "$ref": "GooglePrivacyDlpV2beta2CategoricalStatsHistogramBucket" - }, - "type": "array" - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta2CharacterMaskConfig": { - "description": "Partially mask a string by replacing a given number of characters with a\nfixed character. Masking can start from the beginning or end of the string.\nThis can be used on data of any type (numbers, longs, and so on) and when\nde-identifying structured data we'll attempt to preserve the original data's\ntype. (This allows you to take a long like 123 and modify it to a string like\n**3.", - "id": "GooglePrivacyDlpV2beta2CharacterMaskConfig", - "properties": { - "charactersToIgnore": { - "description": "When masking a string, items in this list will be skipped when replacing.\nFor example, if your string is 555-555-5555 and you ask us to skip `-` and\nmask 5 chars with * we would produce ***-*55-5555.", - "items": { - "$ref": "GooglePrivacyDlpV2beta2CharsToIgnore" - }, - "type": "array" - }, - "maskingCharacter": { - "description": "Character to mask the sensitive values\u0026mdash;for example, \"*\" for an\nalphabetic string such as name, or \"0\" for a numeric string such as ZIP\ncode or credit card number. String must have length 1. If not supplied, we\nwill default to \"*\" for strings, 0 for digits.", - "type": "string" - }, - "numberToMask": { - "description": "Number of characters to mask. If not set, all matching chars will be\nmasked. Skipped characters do not count towards this tally.", - "format": "int32", - "type": "integer" - }, - "reverseOrder": { - "description": "Mask characters in reverse order. For example, if `masking_character` is\n'0', number_to_mask is 14, and `reverse_order` is false, then\n1234-5678-9012-3456 -\u003e 00000000000000-3456\nIf `masking_character` is '*', `number_to_mask` is 3, and `reverse_order`\nis true, then 12345 -\u003e 12***", - "type": "boolean" - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta2CharsToIgnore": { - "description": "Characters to skip when doing deidentification of a value. These will be left\nalone and skipped.", - "id": "GooglePrivacyDlpV2beta2CharsToIgnore", - "properties": { - "charactersToSkip": { - "type": "string" - }, - "commonCharactersToIgnore": { - "enum": [ - "COMMON_CHARS_TO_IGNORE_UNSPECIFIED", - "NUMERIC", - "ALPHA_UPPER_CASE", - "ALPHA_LOWER_CASE", - "PUNCTUATION", - "WHITESPACE" - ], - "enumDescriptions": [ - "", - "0-9", - "A-Z", - "a-z", - "US Punctuation, one of !\"#$%\u0026'()*+,-./:;\u003c=\u003e?@[\\]^_`{|}~", - "Whitespace character, one of [ \\t\\n\\x0B\\f\\r]" - ], - "type": "string" - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta2CloudStorageKey": { - "description": "Record key for a finding in a Cloud Storage file.", - "id": "GooglePrivacyDlpV2beta2CloudStorageKey", - "properties": { - "filePath": { - "description": "Path to the file.", - "type": "string" - }, - "startOffset": { - "description": "Byte offset of the referenced data in the file.", - "format": "int64", - "type": "string" - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta2CloudStorageOptions": { - "description": "Options defining a file or a set of files (path ending with *) within\na Google Cloud Storage bucket.", - "id": "GooglePrivacyDlpV2beta2CloudStorageOptions", - "properties": { - "bytesLimitPerFile": { - "description": "Max number of bytes to scan from a file. If a scanned file's size is bigger\nthan this value then the rest of the bytes are omitted.", - "format": "int64", - "type": "string" - }, - "fileSet": { - "$ref": "GooglePrivacyDlpV2beta2FileSet" - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta2Color": { - "description": "Represents a color in the RGB color space.", - "id": "GooglePrivacyDlpV2beta2Color", - "properties": { - "blue": { - "description": "The amount of blue in the color as a value in the interval [0, 1].", - "format": "float", - "type": "number" - }, - "green": { - "description": "The amount of green in the color as a value in the interval [0, 1].", - "format": "float", - "type": "number" - }, - "red": { - "description": "The amount of red in the color as a value in the interval [0, 1].", - "format": "float", - "type": "number" - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta2Condition": { - "description": "The field type of `value` and `field` do not need to match to be\nconsidered equal, but not all comparisons are possible.\n\nA `value` of type:\n\n- `string` can be compared against all other types\n- `boolean` can only be compared against other booleans\n- `integer` can be compared against doubles or a string if the string value\ncan be parsed as an integer.\n- `double` can be compared against integers or a string if the string can\nbe parsed as a double.\n- `Timestamp` can be compared against strings in RFC 3339 date string\nformat.\n- `TimeOfDay` can be compared against timestamps and strings in the format\nof 'HH:mm:ss'.\n\nIf we fail to compare do to type mismatch, a warning will be given and\nthe condition will evaluate to false.", - "id": "GooglePrivacyDlpV2beta2Condition", - "properties": { - "field": { - "$ref": "GooglePrivacyDlpV2beta2FieldId", - "description": "Field within the record this condition is evaluated against. [required]" - }, - "operator": { - "description": "Operator used to compare the field or infoType to the value. [required]", - "enum": [ - "RELATIONAL_OPERATOR_UNSPECIFIED", - "EQUAL_TO", - "NOT_EQUAL_TO", - "GREATER_THAN", - "LESS_THAN", - "GREATER_THAN_OR_EQUALS", - "LESS_THAN_OR_EQUALS", - "EXISTS" - ], - "enumDescriptions": [ - "", - "Equal.", - "Not equal to.", - "Greater than.", - "Less than.", - "Greater than or equals.", - "Less than or equals.", - "Exists" - ], - "type": "string" - }, - "value": { - "$ref": "GooglePrivacyDlpV2beta2Value", - "description": "Value to compare against. [Required, except for `EXISTS` tests.]" - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta2Conditions": { - "description": "A collection of conditions.", - "id": "GooglePrivacyDlpV2beta2Conditions", - "properties": { - "conditions": { - "items": { - "$ref": "GooglePrivacyDlpV2beta2Condition" - }, - "type": "array" - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta2ContentItem": { - "description": "Container structure for the content to inspect.", - "id": "GooglePrivacyDlpV2beta2ContentItem", - "properties": { - "data": { - "description": "Content data to inspect or redact.", - "format": "byte", - "type": "string" - }, - "table": { - "$ref": "GooglePrivacyDlpV2beta2Table", - "description": "Structured content for inspection." - }, - "type": { - "description": "Type of the content, as defined in Content-Type HTTP header.\nSupported types are: all \"text\" types, octet streams, PNG images,\nJPEG images.", - "type": "string" - }, - "value": { - "description": "String data to inspect or redact.", - "type": "string" - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta2CreateDeidentifyTemplateRequest": { - "description": "Request message for CreateDeidentifyTemplate.", - "id": "GooglePrivacyDlpV2beta2CreateDeidentifyTemplateRequest", - "properties": { - "deidentifyTemplate": { - "$ref": "GooglePrivacyDlpV2beta2DeidentifyTemplate", - "description": "The DeidentifyTemplate to create." - }, - "templateId": { - "description": "The template id can contain uppercase and lowercase letters,\nnumbers, and hyphens; that is, it must match the regular\nexpression: `[a-zA-Z\\\\d-]+`. The maximum length is 100\ncharacters. Can be empty to allow the system to generate one.", - "type": "string" - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta2CreateInspectTemplateRequest": { - "description": "Request message for CreateInspectTemplate.", - "id": "GooglePrivacyDlpV2beta2CreateInspectTemplateRequest", - "properties": { - "inspectTemplate": { - "$ref": "GooglePrivacyDlpV2beta2InspectTemplate", - "description": "The InspectTemplate to create." - }, - "templateId": { - "description": "The template id can contain uppercase and lowercase letters,\nnumbers, and hyphens; that is, it must match the regular\nexpression: `[a-zA-Z\\\\d-]+`. The maximum length is 100\ncharacters. Can be empty to allow the system to generate one.", - "type": "string" - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta2CreateJobTriggerRequest": { - "description": "Request message for CreateJobTrigger.", - "id": "GooglePrivacyDlpV2beta2CreateJobTriggerRequest", - "properties": { - "jobTrigger": { - "$ref": "GooglePrivacyDlpV2beta2JobTrigger", - "description": "The JobTrigger to create." - }, - "triggerId": { - "description": "The trigger id can contain uppercase and lowercase letters,\nnumbers, and hyphens; that is, it must match the regular\nexpression: `[a-zA-Z\\\\d-]+`. The maximum length is 100\ncharacters. Can be empty to allow the system to generate one.", - "type": "string" - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta2CryptoHashConfig": { - "description": "Pseudonymization method that generates surrogates via cryptographic hashing.\nUses SHA-256.\nThe key size must be either 32 or 64 bytes.\nOutputs a 32 byte digest as an uppercase hex string\n(for example, 41D1567F7F99F1DC2A5FAB886DEE5BEE).\nCurrently, only string and integer values can be hashed.", - "id": "GooglePrivacyDlpV2beta2CryptoHashConfig", - "properties": { - "cryptoKey": { - "$ref": "GooglePrivacyDlpV2beta2CryptoKey", - "description": "The key used by the hash function." - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta2CryptoKey": { - "description": "This is a data encryption key (DEK) (as opposed to\na key encryption key (KEK) stored by KMS).\nWhen using KMS to wrap/unwrap DEKs, be sure to set an appropriate\nIAM policy on the KMS CryptoKey (KEK) to ensure an attacker cannot\nunwrap the data crypto key.", - "id": "GooglePrivacyDlpV2beta2CryptoKey", - "properties": { - "kmsWrapped": { - "$ref": "GooglePrivacyDlpV2beta2KmsWrappedCryptoKey" - }, - "transient": { - "$ref": "GooglePrivacyDlpV2beta2TransientCryptoKey" - }, - "unwrapped": { - "$ref": "GooglePrivacyDlpV2beta2UnwrappedCryptoKey" - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta2CryptoReplaceFfxFpeConfig": { - "description": "Replaces an identifier with a surrogate using FPE with the FFX\nmode of operation; however when used in the `ReidentifyContent` API method,\nit serves the opposite function by reversing the surrogate back into\nthe original identifier.\nThe identifier must be encoded as ASCII.\nFor a given crypto key and context, the same identifier will be\nreplaced with the same surrogate.\nIdentifiers must be at least two characters long.\nIn the case that the identifier is the empty string, it will be skipped.\nSee [Pseudonymization](/dlp/docs/pseudonymization) for example usage.", - "id": "GooglePrivacyDlpV2beta2CryptoReplaceFfxFpeConfig", - "properties": { - "commonAlphabet": { - "enum": [ - "FFX_COMMON_NATIVE_ALPHABET_UNSPECIFIED", - "NUMERIC", - "HEXADECIMAL", - "UPPER_CASE_ALPHA_NUMERIC", - "ALPHA_NUMERIC" - ], - "enumDescriptions": [ - "", - "[0-9] (radix of 10)", - "[0-9A-F] (radix of 16)", - "[0-9A-Z] (radix of 36)", - "[0-9A-Za-z] (radix of 62)" - ], - "type": "string" - }, - "context": { - "$ref": "GooglePrivacyDlpV2beta2FieldId", - "description": "The 'tweak', a context may be used for higher security since the same\nidentifier in two different contexts won't be given the same surrogate. If\nthe context is not set, a default tweak will be used.\n\nIf the context is set but:\n\n1. there is no record present when transforming a given value or\n1. the field is not present when transforming a given value,\n\na default tweak will be used.\n\nNote that case (1) is expected when an `InfoTypeTransformation` is\napplied to both structured and non-structured `ContentItem`s.\nCurrently, the referenced field may be of value type integer or string.\n\nThe tweak is constructed as a sequence of bytes in big endian byte order\nsuch that:\n\n- a 64 bit integer is encoded followed by a single byte of value 1\n- a string is encoded in UTF-8 format followed by a single byte of value\n å 2" - }, - "cryptoKey": { - "$ref": "GooglePrivacyDlpV2beta2CryptoKey", - "description": "The key used by the encryption algorithm. [required]" - }, - "customAlphabet": { - "description": "This is supported by mapping these to the alphanumeric characters\nthat the FFX mode natively supports. This happens before/after\nencryption/decryption.\nEach character listed must appear only once.\nNumber of characters must be in the range [2, 62].\nThis must be encoded as ASCII.\nThe order of characters does not matter.", - "type": "string" - }, - "radix": { - "description": "The native way to select the alphabet. Must be in the range [2, 62].", - "format": "int32", - "type": "integer" - }, - "surrogateInfoType": { - "$ref": "GooglePrivacyDlpV2beta2InfoType", - "description": "The custom infoType to annotate the surrogate with.\nThis annotation will be applied to the surrogate by prefixing it with\nthe name of the custom infoType followed by the number of\ncharacters comprising the surrogate. The following scheme defines the\nformat: info_type_name(surrogate_character_count):surrogate\n\nFor example, if the name of custom infoType is 'MY_TOKEN_INFO_TYPE' and\nthe surrogate is 'abc', the full replacement value\nwill be: 'MY_TOKEN_INFO_TYPE(3):abc'\n\nThis annotation identifies the surrogate when inspecting content using the\ncustom infoType\n[`SurrogateType`](/dlp/docs/reference/rest/v2beta2/InspectConfig#surrogatetype).\nThis facilitates reversal of the surrogate when it occurs in free text.\n\nIn order for inspection to work properly, the name of this infoType must\nnot occur naturally anywhere in your data; otherwise, inspection may\nfind a surrogate that does not correspond to an actual identifier.\nTherefore, choose your custom infoType name carefully after considering\nwhat your data looks like. One way to select a name that has a high chance\nof yielding reliable detection is to include one or more unicode characters\nthat are highly improbable to exist in your data.\nFor example, assuming your data is entered from a regular ASCII keyboard,\nthe symbol with the hex code point 29DD might be used like so:\n⧝MY_TOKEN_TYPE" - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta2CustomInfoType": { - "description": "Custom information type provided by the user. Used to find domain-specific\nsensitive information configurable to the data in question.", - "id": "GooglePrivacyDlpV2beta2CustomInfoType", - "properties": { - "detectionRules": { - "description": "Set of detection rules to apply to all findings of this custom info type.\nRules are applied in order that they are specified. Not supported for the\n`surrogate_type` custom info type.", - "items": { - "$ref": "GooglePrivacyDlpV2beta2DetectionRule" - }, - "type": "array" - }, - "dictionary": { - "$ref": "GooglePrivacyDlpV2beta2Dictionary", - "description": "Dictionary-based custom info type." - }, - "infoType": { - "$ref": "GooglePrivacyDlpV2beta2InfoType", - "description": "Info type configuration. All custom info types must have configurations\nthat do not conflict with built-in info types or other custom info types." - }, - "likelihood": { - "description": "Likelihood to return for this custom info type. This base value can be\naltered by a detection rule if the finding meets the criteria specified by\nthe rule. Defaults to `VERY_LIKELY` if not specified.", - "enum": [ - "LIKELIHOOD_UNSPECIFIED", - "VERY_UNLIKELY", - "UNLIKELY", - "POSSIBLE", - "LIKELY", - "VERY_LIKELY" - ], - "enumDescriptions": [ - "Default value; information with all likelihoods is included.", - "Few matching elements.", - "", - "Some matching elements.", - "", - "Many matching elements." - ], - "type": "string" - }, - "regex": { - "$ref": "GooglePrivacyDlpV2beta2Regex", - "description": "Regex-based custom info type." - }, - "surrogateType": { - "$ref": "GooglePrivacyDlpV2beta2SurrogateType", - "description": "Surrogate info type." - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta2DatastoreKey": { - "description": "Record key for a finding in Cloud Datastore.", - "id": "GooglePrivacyDlpV2beta2DatastoreKey", - "properties": { - "entityKey": { - "$ref": "GooglePrivacyDlpV2beta2Key", - "description": "Datastore entity key." - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta2DatastoreOptions": { - "description": "Options defining a data set within Google Cloud Datastore.", - "id": "GooglePrivacyDlpV2beta2DatastoreOptions", - "properties": { - "kind": { - "$ref": "GooglePrivacyDlpV2beta2KindExpression", - "description": "The kind to process." - }, - "partitionId": { - "$ref": "GooglePrivacyDlpV2beta2PartitionId", - "description": "A partition ID identifies a grouping of entities. The grouping is always\nby project and namespace, however the namespace ID may be empty." - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta2DateShiftConfig": { - "description": "Shifts dates by random number of days, with option to be consistent for the\nsame context.", - "id": "GooglePrivacyDlpV2beta2DateShiftConfig", - "properties": { - "context": { - "$ref": "GooglePrivacyDlpV2beta2FieldId", - "description": "Points to the field that contains the context, for example, an entity id.\nIf set, must also set method. If set, shift will be consistent for the\ngiven context." - }, - "cryptoKey": { - "$ref": "GooglePrivacyDlpV2beta2CryptoKey", - "description": "Causes the shift to be computed based on this key and the context. This\nresults in the same shift for the same context and crypto_key." - }, - "lowerBoundDays": { - "description": "For example, -5 means shift date to at most 5 days back in the past.\n[Required]", - "format": "int32", - "type": "integer" - }, - "upperBoundDays": { - "description": "Range of shift in days. Actual shift will be selected at random within this\nrange (inclusive ends). Negative means shift to earlier in time. Must not\nbe more than 365250 days (1000 years) each direction.\n\nFor example, 3 means shift date to at most 3 days into the future.\n[Required]", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta2DateTime": { - "description": "Message for a date time object.", - "id": "GooglePrivacyDlpV2beta2DateTime", - "properties": { - "date": { - "$ref": "GoogleTypeDate", - "description": "One or more of the following must be set. All fields are optional, but\nwhen set must be valid date or time values." - }, - "dayOfWeek": { - "enum": [ - "DAY_OF_WEEK_UNSPECIFIED", - "MONDAY", - "TUESDAY", - "WEDNESDAY", - "THURSDAY", - "FRIDAY", - "SATURDAY", - "SUNDAY" - ], - "enumDescriptions": [ - "The unspecified day-of-week.", - "The day-of-week of Monday.", - "The day-of-week of Tuesday.", - "The day-of-week of Wednesday.", - "The day-of-week of Thursday.", - "The day-of-week of Friday.", - "The day-of-week of Saturday.", - "The day-of-week of Sunday." - ], - "type": "string" - }, - "time": { - "$ref": "GoogleTypeTimeOfDay" - }, - "timeZone": { - "$ref": "GooglePrivacyDlpV2beta2TimeZone" - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta2DeidentifyConfig": { - "description": "The configuration that controls how the data will change.", - "id": "GooglePrivacyDlpV2beta2DeidentifyConfig", - "properties": { - "infoTypeTransformations": { - "$ref": "GooglePrivacyDlpV2beta2InfoTypeTransformations", - "description": "Treat the dataset as free-form text and apply the same free text\ntransformation everywhere." - }, - "recordTransformations": { - "$ref": "GooglePrivacyDlpV2beta2RecordTransformations", - "description": "Treat the dataset as structured. Transformations can be applied to\nspecific locations within structured datasets, such as transforming\na column within a table." - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta2DeidentifyContentRequest": { - "description": "Request to de-identify a list of items.", - "id": "GooglePrivacyDlpV2beta2DeidentifyContentRequest", - "properties": { - "deidentifyConfig": { - "$ref": "GooglePrivacyDlpV2beta2DeidentifyConfig", - "description": "Configuration for the de-identification of the content item.\nItems specified here will override the template referenced by the\ndeidentify_template_name argument." - }, - "deidentifyTemplateName": { - "description": "Optional template to use. Any configuration directly specified in\ndeidentify_config will override those set in the template. Singular fields\nthat are set in this request will replace their corresponding fields in the\ntemplate. Repeated fields are appended. Singular sub-messages and groups\nare recursively merged.", - "type": "string" - }, - "inspectConfig": { - "$ref": "GooglePrivacyDlpV2beta2InspectConfig", - "description": "Configuration for the inspector.\nItems specified here will override the template referenced by the\ninspect_template_name argument." - }, - "inspectTemplateName": { - "description": "Optional template to use. Any configuration directly specified in\ninspect_config will override those set in the template. Singular fields\nthat are set in this request will replace their corresponding fields in the\ntemplate. Repeated fields are appended. Singular sub-messages and groups\nare recursively merged.", - "type": "string" - }, - "item": { - "$ref": "GooglePrivacyDlpV2beta2ContentItem", - "description": "The item to de-identify. Will be treated as text." - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta2DeidentifyContentResponse": { - "description": "Results of de-identifying a ContentItem.", - "id": "GooglePrivacyDlpV2beta2DeidentifyContentResponse", - "properties": { - "item": { - "$ref": "GooglePrivacyDlpV2beta2ContentItem", - "description": "The de-identified item." - }, - "overview": { - "$ref": "GooglePrivacyDlpV2beta2TransformationOverview", - "description": "An overview of the changes that were made on the `item`." - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta2DeidentifyTemplate": { - "description": "The DeidentifyTemplates contains instructions on how to deidentify content.", - "id": "GooglePrivacyDlpV2beta2DeidentifyTemplate", - "properties": { - "createTime": { - "description": "The creation timestamp of a inspectTemplate, output only field.", - "format": "google-datetime", - "type": "string" - }, - "deidentifyConfig": { - "$ref": "GooglePrivacyDlpV2beta2DeidentifyConfig", - "description": "///////////// // The core content of the template // ///////////////" - }, - "description": { - "description": "Short description (max 256 chars).", - "type": "string" - }, - "displayName": { - "description": "Display name (max 256 chars).", - "type": "string" - }, - "name": { - "description": "The template name. Output only.\n\nThe template will have one of the following formats:\n`projects/PROJECT_ID/deidentifyTemplates/TEMPLATE_ID` OR\n`organizations/ORGANIZATION_ID/deidentifyTemplates/TEMPLATE_ID`", - "type": "string" - }, - "updateTime": { - "description": "The last update timestamp of a inspectTemplate, output only field.", - "format": "google-datetime", - "type": "string" - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta2DetectionRule": { - "description": "Rule for modifying a custom info type to alter behavior under certain\ncircumstances, depending on the specific details of the rule. Not supported\nfor the `surrogate_type` custom info type.", - "id": "GooglePrivacyDlpV2beta2DetectionRule", - "properties": { - "hotwordRule": { - "$ref": "GooglePrivacyDlpV2beta2HotwordRule", - "description": "Hotword-based detection rule." - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta2Dictionary": { - "description": "Custom information type based on a dictionary of words or phrases. This can\nbe used to match sensitive information specific to the data, such as a list\nof employee IDs or job titles.\n\nDictionary words are case-insensitive and all characters other than letters\nand digits in the unicode [Basic Multilingual\nPlane](https://en.wikipedia.org/wiki/Plane_%28Unicode%29#Basic_Multilingual_Plane)\nwill be replaced with whitespace when scanning for matches, so the\ndictionary phrase \"Sam Johnson\" will match all three phrases \"sam johnson\",\n\"Sam, Johnson\", and \"Sam (Johnson)\". Additionally, the characters\nsurrounding any match must be of a different type than the adjacent\ncharacters within the word, so letters must be next to non-letters and\ndigits next to non-digits. For example, the dictionary word \"jen\" will\nmatch the first three letters of the text \"jen123\" but will return no\nmatches for \"jennifer\".\n\nDictionary words containing a large number of characters that are not\nletters or digits may result in unexpected findings because such characters\nare treated as whitespace.", - "id": "GooglePrivacyDlpV2beta2Dictionary", - "properties": { - "wordList": { - "$ref": "GooglePrivacyDlpV2beta2WordList", - "description": "List of words or phrases to search for." - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta2DlpJob": { - "description": "Combines all of the information about a DLP job.", - "id": "GooglePrivacyDlpV2beta2DlpJob", - "properties": { - "createTime": { - "description": "Time when the job was created.", - "format": "google-datetime", - "type": "string" - }, - "endTime": { - "description": "Time when the job finished.", - "format": "google-datetime", - "type": "string" - }, - "errorResults": { - "description": "A stream of errors encountered running the job.", - "items": { - "$ref": "GoogleRpcStatus" - }, - "type": "array" - }, - "inspectDetails": { - "$ref": "GooglePrivacyDlpV2beta2InspectDataSourceDetails", - "description": "Results from inspecting a data source." - }, - "jobTriggerName": { - "description": "If created by a job trigger, the resource name of the trigger that\ninstantiated the job.", - "type": "string" - }, - "name": { - "description": "The server-assigned name.", - "type": "string" - }, - "riskDetails": { - "$ref": "GooglePrivacyDlpV2beta2AnalyzeDataSourceRiskDetails", - "description": "Results from analyzing risk of a data source." - }, - "startTime": { - "description": "Time when the job started.", - "format": "google-datetime", - "type": "string" - }, - "state": { - "description": "State of a job.", - "enum": [ - "JOB_STATE_UNSPECIFIED", - "PENDING", - "RUNNING", - "DONE", - "CANCELED", - "FAILED" - ], - "enumDescriptions": [ - "", - "The job has not yet started.", - "The job is currently running.", - "The job is no longer running.", - "The job was canceled before it could complete.", - "The job had an error and did not complete." - ], - "type": "string" - }, - "type": { - "description": "The type of job.", - "enum": [ - "DLP_JOB_TYPE_UNSPECIFIED", - "INSPECT_JOB", - "RISK_ANALYSIS_JOB" - ], - "enumDescriptions": [ - "", - "The job inspected Google Cloud for sensitive data.", - "The job executed a Risk Analysis computation." - ], - "type": "string" - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta2EntityId": { - "description": "An entity in a dataset is a field or set of fields that correspond to a\nsingle person. For example, in medical records the `EntityId` might be\na patient identifier, or for financial records it might be an account\nidentifier. This message is used when generalizations or analysis must be\nconsistent across multiple rows pertaining to the same entity.", - "id": "GooglePrivacyDlpV2beta2EntityId", - "properties": { - "field": { - "$ref": "GooglePrivacyDlpV2beta2FieldId", - "description": "Composite key indicating which field contains the entity identifier." - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta2Error": { - "description": "The results of an unsuccessful activation of the JobTrigger.", - "id": "GooglePrivacyDlpV2beta2Error", - "properties": { - "details": { - "$ref": "GoogleRpcStatus" - }, - "timestamps": { - "description": "The times the error occurred.", - "items": { - "format": "google-datetime", - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta2Expressions": { - "description": "An expression, consisting or an operator and conditions.", - "id": "GooglePrivacyDlpV2beta2Expressions", - "properties": { - "conditions": { - "$ref": "GooglePrivacyDlpV2beta2Conditions" - }, - "logicalOperator": { - "description": "The operator to apply to the result of conditions. Default and currently\nonly supported value is `AND`.", - "enum": [ - "LOGICAL_OPERATOR_UNSPECIFIED", - "AND" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta2FieldId": { - "description": "General identifier of a data field in a storage service.", - "id": "GooglePrivacyDlpV2beta2FieldId", - "properties": { - "name": { - "description": "Name describing the field.", - "type": "string" - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta2FieldTransformation": { - "description": "The transformation to apply to the field.", - "id": "GooglePrivacyDlpV2beta2FieldTransformation", - "properties": { - "condition": { - "$ref": "GooglePrivacyDlpV2beta2RecordCondition", - "description": "Only apply the transformation if the condition evaluates to true for the\ngiven `RecordCondition`. The conditions are allowed to reference fields\nthat are not used in the actual transformation. [optional]\n\nExample Use Cases:\n\n- Apply a different bucket transformation to an age column if the zip code\ncolumn for the same record is within a specific range.\n- Redact a field if the date of birth field is greater than 85." - }, - "fields": { - "description": "Input field(s) to apply the transformation to. [required]", - "items": { - "$ref": "GooglePrivacyDlpV2beta2FieldId" - }, - "type": "array" - }, - "infoTypeTransformations": { - "$ref": "GooglePrivacyDlpV2beta2InfoTypeTransformations", - "description": "Treat the contents of the field as free text, and selectively\ntransform content that matches an `InfoType`." - }, - "primitiveTransformation": { - "$ref": "GooglePrivacyDlpV2beta2PrimitiveTransformation", - "description": "Apply the transformation to the entire field." - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta2FileSet": { - "description": "Set of files to scan.", - "id": "GooglePrivacyDlpV2beta2FileSet", - "properties": { - "url": { - "description": "The url, in the format `gs://\u003cbucket\u003e/\u003cpath\u003e`. Trailing wildcard in the\npath is allowed.", - "type": "string" - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta2Finding": { - "description": "Represents a piece of potentially sensitive content.", - "id": "GooglePrivacyDlpV2beta2Finding", - "properties": { - "createTime": { - "description": "Timestamp when finding was detected.", - "format": "google-datetime", - "type": "string" - }, - "infoType": { - "$ref": "GooglePrivacyDlpV2beta2InfoType", - "description": "The type of content that might have been found.\nProvided if requested by the `InspectConfig`." - }, - "likelihood": { - "description": "Estimate of how likely it is that the `info_type` is correct.", - "enum": [ - "LIKELIHOOD_UNSPECIFIED", - "VERY_UNLIKELY", - "UNLIKELY", - "POSSIBLE", - "LIKELY", - "VERY_LIKELY" - ], - "enumDescriptions": [ - "Default value; information with all likelihoods is included.", - "Few matching elements.", - "", - "Some matching elements.", - "", - "Many matching elements." - ], - "type": "string" - }, - "location": { - "$ref": "GooglePrivacyDlpV2beta2Location", - "description": "Where the content was found." - }, - "quote": { - "description": "The content that was found. Even if the content is not textual, it\nmay be converted to a textual representation here.\nProvided if requested by the `InspectConfig` and the finding is\nless than or equal to 4096 bytes long. If the finding exceeds 4096 bytes\nin length, the quote may be omitted.", - "type": "string" - }, - "quoteInfo": { - "$ref": "GooglePrivacyDlpV2beta2QuoteInfo", - "description": "Contains data parsed from quotes. Only populated if include_quote was set\nto true and a supported infoType was requested. Currently supported\ninfoTypes: DATE, DATE_OF_BIRTH and TIME." - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta2FindingLimits": { - "id": "GooglePrivacyDlpV2beta2FindingLimits", - "properties": { - "maxFindingsPerInfoType": { - "description": "Configuration of findings limit given for specified infoTypes.", - "items": { - "$ref": "GooglePrivacyDlpV2beta2InfoTypeLimit" - }, - "type": "array" - }, - "maxFindingsPerItem": { - "description": "Max number of findings that will be returned for each item scanned.\nWhen set within `InspectDataSourceRequest`,\nthe maximum returned is 1000 regardless if this is set higher.\nWhen set within `InspectContentRequest`, this field is ignored.", - "format": "int32", - "type": "integer" - }, - "maxFindingsPerRequest": { - "description": "Max number of findings that will be returned per request/job.\nWhen set within `InspectContentRequest`, the maximum returned is 1000\nregardless if this is set higher.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta2FixedSizeBucketingConfig": { - "description": "Buckets values based on fixed size ranges. The\nBucketing transformation can provide all of this functionality,\nbut requires more configuration. This message is provided as a convenience to\nthe user for simple bucketing strategies.\n\nThe transformed value will be a hyphenated string of\n\u003clower_bound\u003e-\u003cupper_bound\u003e, i.e if lower_bound = 10 and upper_bound = 20\nall values that are within this bucket will be replaced with \"10-20\".\n\nThis can be used on data of type: double, long.\n\nIf the bound Value type differs from the type of data\nbeing transformed, we will first attempt converting the type of the data to\nbe transformed to match the type of the bound before comparing.", - "id": "GooglePrivacyDlpV2beta2FixedSizeBucketingConfig", - "properties": { - "bucketSize": { - "description": "Size of each bucket (except for minimum and maximum buckets). So if\n`lower_bound` = 10, `upper_bound` = 89, and `bucket_size` = 10, then the\nfollowing buckets would be used: -10, 10-20, 20-30, 30-40, 40-50, 50-60,\n60-70, 70-80, 80-89, 89+. Precision up to 2 decimals works. [Required].", - "format": "double", - "type": "number" - }, - "lowerBound": { - "$ref": "GooglePrivacyDlpV2beta2Value", - "description": "Lower bound value of buckets. All values less than `lower_bound` are\ngrouped together into a single bucket; for example if `lower_bound` = 10,\nthen all values less than 10 are replaced with the value “-10”. [Required]." - }, - "upperBound": { - "$ref": "GooglePrivacyDlpV2beta2Value", - "description": "Upper bound value of buckets. All values greater than upper_bound are\ngrouped together into a single bucket; for example if `upper_bound` = 89,\nthen all values greater than 89 are replaced with the value “89+”.\n[Required]." - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta2HotwordRule": { - "description": "Detection rule that adjusts the likelihood of findings within a certain\nproximity of hotwords.", - "id": "GooglePrivacyDlpV2beta2HotwordRule", - "properties": { - "hotwordRegex": { - "$ref": "GooglePrivacyDlpV2beta2Regex", - "description": "Regex pattern defining what qualifies as a hotword." - }, - "likelihoodAdjustment": { - "$ref": "GooglePrivacyDlpV2beta2LikelihoodAdjustment", - "description": "Likelihood adjustment to apply to all matching findings." - }, - "proximity": { - "$ref": "GooglePrivacyDlpV2beta2Proximity", - "description": "Proximity of the finding within which the entire hotword must reside.\nThe total length of the window cannot exceed 1000 characters. Note that\nthe finding itself will be included in the window, so that hotwords may\nbe used to match substrings of the finding itself. For example, the\ncertainty of a phone number regex \"\\(\\d{3}\\) \\d{3}-\\d{4}\" could be\nadjusted upwards if the area code is known to be the local area code of\na company office using the hotword regex \"\\(xxx\\)\", where \"xxx\"\nis the area code in question." - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta2ImageLocation": { - "description": "Bounding box encompassing detected text within an image.", - "id": "GooglePrivacyDlpV2beta2ImageLocation", - "properties": { - "height": { - "description": "Height of the bounding box in pixels.", - "format": "int32", - "type": "integer" - }, - "left": { - "description": "Left coordinate of the bounding box. (0,0) is upper left.", - "format": "int32", - "type": "integer" - }, - "top": { - "description": "Top coordinate of the bounding box. (0,0) is upper left.", - "format": "int32", - "type": "integer" - }, - "width": { - "description": "Width of the bounding box in pixels.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta2ImageRedactionConfig": { - "description": "Configuration for determining how redaction of images should occur.", - "id": "GooglePrivacyDlpV2beta2ImageRedactionConfig", - "properties": { - "infoType": { - "$ref": "GooglePrivacyDlpV2beta2InfoType", - "description": "Only one per info_type should be provided per request. If not\nspecified, and redact_all_text is false, the DLP API will redact all\ntext that it matches against all info_types that are found, but not\nspecified in another ImageRedactionConfig." - }, - "redactAllText": { - "description": "If true, all text found in the image, regardless whether it matches an\ninfo_type, is redacted.", - "type": "boolean" - }, - "redactionColor": { - "$ref": "GooglePrivacyDlpV2beta2Color", - "description": "The color to use when redacting content from an image. If not specified,\nthe default is black." - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta2InfoType": { - "description": "Type of information detected by the API.", - "id": "GooglePrivacyDlpV2beta2InfoType", - "properties": { - "name": { - "description": "Name of the information type.", - "type": "string" - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta2InfoTypeDescription": { - "description": "InfoType description.", - "id": "GooglePrivacyDlpV2beta2InfoTypeDescription", - "properties": { - "displayName": { - "description": "Human readable form of the infoType name.", - "type": "string" - }, - "name": { - "description": "Internal name of the infoType.", - "type": "string" - }, - "supportedBy": { - "description": "Which parts of the API supports this InfoType.", - "enumDescriptions": [ - "", - "Supported by the inspect operations.", - "Supported by the risk analysis operations." - ], - "items": { - "enum": [ - "ENUM_TYPE_UNSPECIFIED", - "INSPECT", - "RISK_ANALYSIS" - ], - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta2InfoTypeLimit": { - "description": "Max findings configuration per infoType, per content item or long\nrunning DlpJob.", - "id": "GooglePrivacyDlpV2beta2InfoTypeLimit", - "properties": { - "infoType": { - "$ref": "GooglePrivacyDlpV2beta2InfoType", - "description": "Type of information the findings limit applies to. Only one limit per\ninfo_type should be provided. If InfoTypeLimit does not have an\ninfo_type, the DLP API applies the limit against all info_types that\nare found but not specified in another InfoTypeLimit." - }, - "maxFindings": { - "description": "Max findings limit for the given infoType.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta2InfoTypeStatistics": { - "description": "Statistics regarding a specific InfoType.", - "id": "GooglePrivacyDlpV2beta2InfoTypeStatistics", - "properties": { - "count": { - "description": "Number of findings for this infoType.", - "format": "int64", - "type": "string" - }, - "infoType": { - "$ref": "GooglePrivacyDlpV2beta2InfoType", - "description": "The type of finding this stat is for." - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta2InfoTypeTransformation": { - "description": "A transformation to apply to text that is identified as a specific\ninfo_type.", - "id": "GooglePrivacyDlpV2beta2InfoTypeTransformation", - "properties": { - "infoTypes": { - "description": "InfoTypes to apply the transformation to. Empty list will match all\navailable infoTypes for this transformation.", - "items": { - "$ref": "GooglePrivacyDlpV2beta2InfoType" - }, - "type": "array" - }, - "primitiveTransformation": { - "$ref": "GooglePrivacyDlpV2beta2PrimitiveTransformation", - "description": "Primitive transformation to apply to the infoType. [required]" - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta2InfoTypeTransformations": { - "description": "A type of transformation that will scan unstructured text and\napply various `PrimitiveTransformation`s to each finding, where the\ntransformation is applied to only values that were identified as a specific\ninfo_type.", - "id": "GooglePrivacyDlpV2beta2InfoTypeTransformations", - "properties": { - "transformations": { - "description": "Transformation for each infoType. Cannot specify more than one\nfor a given infoType. [required]", - "items": { - "$ref": "GooglePrivacyDlpV2beta2InfoTypeTransformation" - }, - "type": "array" - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta2InspectConfig": { - "description": "Configuration description of the scanning process.\nWhen used with redactContent only info_types and min_likelihood are currently\nused.", - "id": "GooglePrivacyDlpV2beta2InspectConfig", - "properties": { - "customInfoTypes": { - "description": "Custom infoTypes provided by the user.", - "items": { - "$ref": "GooglePrivacyDlpV2beta2CustomInfoType" - }, - "type": "array" - }, - "excludeInfoTypes": { - "description": "When true, excludes type information of the findings.", - "type": "boolean" - }, - "includeQuote": { - "description": "When true, a contextual quote from the data that triggered a finding is\nincluded in the response; see Finding.quote.", - "type": "boolean" - }, - "infoTypes": { - "description": "Restricts what info_types to look for. The values must correspond to\nInfoType values returned by ListInfoTypes or found in documentation.\nEmpty info_types runs all enabled detectors.", - "items": { - "$ref": "GooglePrivacyDlpV2beta2InfoType" - }, - "type": "array" - }, - "limits": { - "$ref": "GooglePrivacyDlpV2beta2FindingLimits" - }, - "minLikelihood": { - "description": "Only returns findings equal or above this threshold. The default is\nPOSSIBLE.", - "enum": [ - "LIKELIHOOD_UNSPECIFIED", - "VERY_UNLIKELY", - "UNLIKELY", - "POSSIBLE", - "LIKELY", - "VERY_LIKELY" - ], - "enumDescriptions": [ - "Default value; information with all likelihoods is included.", - "Few matching elements.", - "", - "Some matching elements.", - "", - "Many matching elements." - ], - "type": "string" - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta2InspectContentRequest": { - "description": "Request to search for potentially sensitive info in a ContentItem.", - "id": "GooglePrivacyDlpV2beta2InspectContentRequest", - "properties": { - "inspectConfig": { - "$ref": "GooglePrivacyDlpV2beta2InspectConfig", - "description": "Configuration for the inspector. What specified here will override\nthe template referenced by the inspect_template_name argument." - }, - "inspectTemplateName": { - "description": "Optional template to use. Any configuration directly specified in\ninspect_config will override those set in the template. Singular fields\nthat are set in this request will replace their corresponding fields in the\ntemplate. Repeated fields are appended. Singular sub-messages and groups\nare recursively merged.", - "type": "string" - }, - "item": { - "$ref": "GooglePrivacyDlpV2beta2ContentItem", - "description": "The item to inspect." - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta2InspectContentResponse": { - "description": "Results of inspecting an item.", - "id": "GooglePrivacyDlpV2beta2InspectContentResponse", - "properties": { - "result": { - "$ref": "GooglePrivacyDlpV2beta2InspectResult", - "description": "The findings." - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta2InspectDataSourceDetails": { - "description": "The results of an inspect DataSource job.", - "id": "GooglePrivacyDlpV2beta2InspectDataSourceDetails", - "properties": { - "requestedOptions": { - "$ref": "GooglePrivacyDlpV2beta2RequestedOptions", - "description": "The configuration used for this job." - }, - "result": { - "$ref": "GooglePrivacyDlpV2beta2Result", - "description": "A summary of the outcome of this inspect job." - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta2InspectDataSourceRequest": { - "description": "Request for scheduling a scan of a data subset from a Google Platform data\nrepository.", - "id": "GooglePrivacyDlpV2beta2InspectDataSourceRequest", - "properties": { - "jobConfig": { - "$ref": "GooglePrivacyDlpV2beta2InspectJobConfig", - "description": "A configuration for the job." - }, - "jobId": { - "description": "Optional job ID to use for the created job. If not provided, a job ID will\nautomatically be generated. Must be unique within the project. The job ID\ncan contain uppercase and lowercase letters, numbers, and hyphens; that is,\nit must match the regular expression: `[a-zA-Z\\\\d-]+`. The maximum length\nis 100 characters. Can be empty to allow the system to generate one.", - "type": "string" - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta2InspectJobConfig": { - "id": "GooglePrivacyDlpV2beta2InspectJobConfig", - "properties": { - "actions": { - "description": "Actions to execute at the completion of the job. Are executed in the order\nprovided.", - "items": { - "$ref": "GooglePrivacyDlpV2beta2Action" - }, - "type": "array" - }, - "inspectConfig": { - "$ref": "GooglePrivacyDlpV2beta2InspectConfig", - "description": "How and what to scan for." - }, - "inspectTemplateName": { - "description": "If provided, will be used as the default for all values in InspectConfig.\n`inspect_config` will be merged into the values persisted as part of the\ntemplate.", - "type": "string" - }, - "outputConfig": { - "$ref": "GooglePrivacyDlpV2beta2OutputStorageConfig", - "description": "Where to put the findings." - }, - "storageConfig": { - "$ref": "GooglePrivacyDlpV2beta2StorageConfig", - "description": "The data to scan." - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta2InspectResult": { - "description": "All the findings for a single scanned item.", - "id": "GooglePrivacyDlpV2beta2InspectResult", - "properties": { - "findings": { - "description": "List of findings for an item.", - "items": { - "$ref": "GooglePrivacyDlpV2beta2Finding" - }, - "type": "array" - }, - "findingsTruncated": { - "description": "If true, then this item might have more findings than were returned,\nand the findings returned are an arbitrary subset of all findings.\nThe findings list might be truncated because the input items were too\nlarge, or because the server reached the maximum amount of resources\nallowed for a single API call. For best results, divide the input into\nsmaller batches.", - "type": "boolean" - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta2InspectTemplate": { - "description": "The inspectTemplate contains a configuration (set of types of sensitive data\nto be detected) to be used anywhere you otherwise would normally specify\nInspectConfig.", - "id": "GooglePrivacyDlpV2beta2InspectTemplate", - "properties": { - "createTime": { - "description": "The creation timestamp of a inspectTemplate, output only field.", - "format": "google-datetime", - "type": "string" - }, - "description": { - "description": "Short description (max 256 chars).", - "type": "string" - }, - "displayName": { - "description": "Display name (max 256 chars).", - "type": "string" - }, - "inspectConfig": { - "$ref": "GooglePrivacyDlpV2beta2InspectConfig", - "description": "The core content of the template. Configuration of the scanning process." - }, - "name": { - "description": "The template name. Output only.\n\nThe template will have one of the following formats:\n`projects/PROJECT_ID/inspectTemplates/TEMPLATE_ID` OR\n`organizations/ORGANIZATION_ID/inspectTemplates/TEMPLATE_ID`", - "type": "string" - }, - "updateTime": { - "description": "The last update timestamp of a inspectTemplate, output only field.", - "format": "google-datetime", - "type": "string" - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta2JobTrigger": { - "description": "Contains a configuration to make dlp api calls on a repeating basis.", - "id": "GooglePrivacyDlpV2beta2JobTrigger", - "properties": { - "createTime": { - "description": "The creation timestamp of a triggeredJob, output only field.", - "format": "google-datetime", - "type": "string" - }, - "description": { - "description": "User provided description (max 256 chars)", - "type": "string" - }, - "displayName": { - "description": "Display name (max 100 chars)", - "type": "string" - }, - "errors": { - "description": "A stream of errors encountered when the trigger was activated. Repeated\nerrors may result in the JobTrigger automaticaly being paused.\nWill return the last 100 errors. Whenever the JobTrigger is modified\nthis list will be cleared. Output only field.", - "items": { - "$ref": "GooglePrivacyDlpV2beta2Error" - }, - "type": "array" - }, - "inspectJob": { - "$ref": "GooglePrivacyDlpV2beta2InspectJobConfig" - }, - "lastRunTime": { - "description": "The timestamp of the last time this trigger executed.", - "format": "google-datetime", - "type": "string" - }, - "name": { - "description": "Unique resource name for the triggeredJob, assigned by the service when the\ntriggeredJob is created, for example\n`projects/dlp-test-project/triggeredJobs/53234423`.", - "type": "string" - }, - "status": { - "description": "A status for this trigger. [required]", - "enum": [ - "STATUS_UNSPECIFIED", - "HEALTHY", - "PAUSED", - "CANCELLED" - ], - "enumDescriptions": [ - "", - "Trigger is healthy.", - "Trigger is temporarily paused.", - "Trigger is cancelled and can not be resumed." - ], - "type": "string" - }, - "triggers": { - "description": "A list of triggers which will be OR'ed together. Only one in the list\nneeds to trigger for a job to be started. The list may contain only\na single Schedule trigger and must have at least one object.", - "items": { - "$ref": "GooglePrivacyDlpV2beta2Trigger" - }, - "type": "array" - }, - "updateTime": { - "description": "The last update timestamp of a triggeredJob, output only field.", - "format": "google-datetime", - "type": "string" - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta2KAnonymityConfig": { - "description": "k-anonymity metric, used for analysis of reidentification risk.", - "id": "GooglePrivacyDlpV2beta2KAnonymityConfig", - "properties": { - "entityId": { - "$ref": "GooglePrivacyDlpV2beta2EntityId", - "description": "Optional message indicating that each distinct entity_id should not\ncontribute to the k-anonymity count more than once per equivalence class.\nIf an entity_id appears on several rows with different quasi-identifier\ntuples, it will contribute to each count exactly once.\n\nThis can lead to unexpected results. Consider a table where ID 1 is\nassociated to quasi-identifier \"foo\", ID 2 to \"bar\", and ID 3 to *both*\nquasi-identifiers \"foo\" and \"bar\" (on separate rows), and where this ID\nis used as entity_id. Then, the anonymity value associated to ID 3 will\nbe 2, even if it is the only ID to be associated to both values \"foo\" and\n\"bar\"." - }, - "quasiIds": { - "description": "Set of fields to compute k-anonymity over. When multiple fields are\nspecified, they are considered a single composite key. Structs and\nrepeated data types are not supported; however, nested fields are\nsupported so long as they are not structs themselves or nested within\na repeated field.", - "items": { - "$ref": "GooglePrivacyDlpV2beta2FieldId" - }, - "type": "array" - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta2KAnonymityEquivalenceClass": { - "description": "The set of columns' values that share the same ldiversity value", - "id": "GooglePrivacyDlpV2beta2KAnonymityEquivalenceClass", - "properties": { - "equivalenceClassSize": { - "description": "Size of the equivalence class, for example number of rows with the\nabove set of values.", - "format": "int64", - "type": "string" - }, - "quasiIdsValues": { - "description": "Set of values defining the equivalence class. One value per\nquasi-identifier column in the original KAnonymity metric message.\nThe order is always the same as the original request.", - "items": { - "$ref": "GooglePrivacyDlpV2beta2Value" - }, - "type": "array" - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta2KAnonymityHistogramBucket": { - "id": "GooglePrivacyDlpV2beta2KAnonymityHistogramBucket", - "properties": { - "bucketSize": { - "description": "Total number of equivalence classes in this bucket.", - "format": "int64", - "type": "string" - }, - "bucketValueCount": { - "description": "Total number of distinct equivalence classes in this bucket.", - "format": "int64", - "type": "string" - }, - "bucketValues": { - "description": "Sample of equivalence classes in this bucket. The total number of\nclasses returned per bucket is capped at 20.", - "items": { - "$ref": "GooglePrivacyDlpV2beta2KAnonymityEquivalenceClass" - }, - "type": "array" - }, - "equivalenceClassSizeLowerBound": { - "description": "Lower bound on the size of the equivalence classes in this bucket.", - "format": "int64", - "type": "string" - }, - "equivalenceClassSizeUpperBound": { - "description": "Upper bound on the size of the equivalence classes in this bucket.", - "format": "int64", - "type": "string" - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta2KAnonymityResult": { - "description": "Result of the k-anonymity computation.", - "id": "GooglePrivacyDlpV2beta2KAnonymityResult", - "properties": { - "equivalenceClassHistogramBuckets": { - "description": "Histogram of k-anonymity equivalence classes.", - "items": { - "$ref": "GooglePrivacyDlpV2beta2KAnonymityHistogramBucket" - }, - "type": "array" - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta2KMapEstimationConfig": { - "description": "Reidentifiability metric. This corresponds to a risk model similar to what\nis called \"journalist risk\" in the literature, except the attack dataset is\nstatistically modeled instead of being perfectly known. This can be done\nusing publicly available data (like the US Census), or using a custom\nstatistical model (indicated as one or several BigQuery tables), or by\nextrapolating from the distribution of values in the input dataset.", - "id": "GooglePrivacyDlpV2beta2KMapEstimationConfig", - "properties": { - "auxiliaryTables": { - "description": "Several auxiliary tables can be used in the analysis. Each custom_tag\nused to tag a quasi-identifiers column must appear in exactly one column\nof one auxiliary table.", - "items": { - "$ref": "GooglePrivacyDlpV2beta2AuxiliaryTable" - }, - "type": "array" - }, - "quasiIds": { - "description": "Fields considered to be quasi-identifiers. No two columns can have the\nsame tag. [required]", - "items": { - "$ref": "GooglePrivacyDlpV2beta2TaggedField" - }, - "type": "array" - }, - "regionCode": { - "description": "ISO 3166-1 alpha-2 region code to use in the statistical modeling.\nRequired if no column is tagged with a region-specific InfoType (like\nUS_ZIP_5) or a region code.", - "type": "string" - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta2KMapEstimationHistogramBucket": { - "description": "A KMapEstimationHistogramBucket message with the following values:\n min_anonymity: 3\n max_anonymity: 5\n frequency: 42\nmeans that there are 42 records whose quasi-identifier values correspond\nto 3, 4 or 5 people in the overlying population. An important particular\ncase is when min_anonymity = max_anonymity = 1: the frequency field then\ncorresponds to the number of uniquely identifiable records.", - "id": "GooglePrivacyDlpV2beta2KMapEstimationHistogramBucket", - "properties": { - "bucketSize": { - "description": "Number of records within these anonymity bounds.", - "format": "int64", - "type": "string" - }, - "bucketValueCount": { - "description": "Total number of distinct quasi-identifier tuple values in this bucket.", - "format": "int64", - "type": "string" - }, - "bucketValues": { - "description": "Sample of quasi-identifier tuple values in this bucket. The total\nnumber of classes returned per bucket is capped at 20.", - "items": { - "$ref": "GooglePrivacyDlpV2beta2KMapEstimationQuasiIdValues" - }, - "type": "array" - }, - "maxAnonymity": { - "description": "Always greater than or equal to min_anonymity.", - "format": "int64", - "type": "string" - }, - "minAnonymity": { - "description": "Always positive.", - "format": "int64", - "type": "string" - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta2KMapEstimationQuasiIdValues": { - "description": "A tuple of values for the quasi-identifier columns.", - "id": "GooglePrivacyDlpV2beta2KMapEstimationQuasiIdValues", - "properties": { - "estimatedAnonymity": { - "description": "The estimated anonymity for these quasi-identifier values.", - "format": "int64", - "type": "string" - }, - "quasiIdsValues": { - "description": "The quasi-identifier values.", - "items": { - "$ref": "GooglePrivacyDlpV2beta2Value" - }, - "type": "array" - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta2KMapEstimationResult": { - "description": "Result of the reidentifiability analysis. Note that these results are an\nestimation, not exact values.", - "id": "GooglePrivacyDlpV2beta2KMapEstimationResult", - "properties": { - "kMapEstimationHistogram": { - "description": "The intervals [min_anonymity, max_anonymity] do not overlap. If a value\ndoesn't correspond to any such interval, the associated frequency is\nzero. For example, the following records:\n {min_anonymity: 1, max_anonymity: 1, frequency: 17}\n {min_anonymity: 2, max_anonymity: 3, frequency: 42}\n {min_anonymity: 5, max_anonymity: 10, frequency: 99}\nmean that there are no record with an estimated anonymity of 4, 5, or\nlarger than 10.", - "items": { - "$ref": "GooglePrivacyDlpV2beta2KMapEstimationHistogramBucket" - }, - "type": "array" - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta2Key": { - "description": "A unique identifier for a Datastore entity.\nIf a key's partition ID or any of its path kinds or names are\nreserved/read-only, the key is reserved/read-only.\nA reserved/read-only key is forbidden in certain documented contexts.", - "id": "GooglePrivacyDlpV2beta2Key", - "properties": { - "partitionId": { - "$ref": "GooglePrivacyDlpV2beta2PartitionId", - "description": "Entities are partitioned into subsets, currently identified by a project\nID and namespace ID.\nQueries are scoped to a single partition." - }, - "path": { - "description": "The entity path.\nAn entity path consists of one or more elements composed of a kind and a\nstring or numerical identifier, which identify entities. The first\nelement identifies a _root entity_, the second element identifies\na _child_ of the root entity, the third element identifies a child of the\nsecond entity, and so forth. The entities identified by all prefixes of\nthe path are called the element's _ancestors_.\n\nA path can never be empty, and a path can have at most 100 elements.", - "items": { - "$ref": "GooglePrivacyDlpV2beta2PathElement" - }, - "type": "array" - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta2KindExpression": { - "description": "A representation of a Datastore kind.", - "id": "GooglePrivacyDlpV2beta2KindExpression", - "properties": { - "name": { - "description": "The name of the kind.", - "type": "string" - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta2KmsWrappedCryptoKey": { - "description": "Include to use an existing data crypto key wrapped by KMS.\nAuthorization requires the following IAM permissions when sending a request\nto perform a crypto transformation using a kms-wrapped crypto key:\ndlp.kms.encrypt", - "id": "GooglePrivacyDlpV2beta2KmsWrappedCryptoKey", - "properties": { - "cryptoKeyName": { - "description": "The resource name of the KMS CryptoKey to use for unwrapping. [required]", - "type": "string" - }, - "wrappedKey": { - "description": "The wrapped data crypto key. [required]", - "format": "byte", - "type": "string" - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta2LDiversityConfig": { - "description": "l-diversity metric, used for analysis of reidentification risk.", - "id": "GooglePrivacyDlpV2beta2LDiversityConfig", - "properties": { - "quasiIds": { - "description": "Set of quasi-identifiers indicating how equivalence classes are\ndefined for the l-diversity computation. When multiple fields are\nspecified, they are considered a single composite key.", - "items": { - "$ref": "GooglePrivacyDlpV2beta2FieldId" - }, - "type": "array" - }, - "sensitiveAttribute": { - "$ref": "GooglePrivacyDlpV2beta2FieldId", - "description": "Sensitive field for computing the l-value." - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta2LDiversityEquivalenceClass": { - "description": "The set of columns' values that share the same ldiversity value.", - "id": "GooglePrivacyDlpV2beta2LDiversityEquivalenceClass", - "properties": { - "equivalenceClassSize": { - "description": "Size of the k-anonymity equivalence class.", - "format": "int64", - "type": "string" - }, - "numDistinctSensitiveValues": { - "description": "Number of distinct sensitive values in this equivalence class.", - "format": "int64", - "type": "string" - }, - "quasiIdsValues": { - "description": "Quasi-identifier values defining the k-anonymity equivalence\nclass. The order is always the same as the original request.", - "items": { - "$ref": "GooglePrivacyDlpV2beta2Value" - }, - "type": "array" - }, - "topSensitiveValues": { - "description": "Estimated frequencies of top sensitive values.", - "items": { - "$ref": "GooglePrivacyDlpV2beta2ValueFrequency" - }, - "type": "array" - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta2LDiversityHistogramBucket": { - "id": "GooglePrivacyDlpV2beta2LDiversityHistogramBucket", - "properties": { - "bucketSize": { - "description": "Total number of equivalence classes in this bucket.", - "format": "int64", - "type": "string" - }, - "bucketValueCount": { - "description": "Total number of distinct equivalence classes in this bucket.", - "format": "int64", - "type": "string" - }, - "bucketValues": { - "description": "Sample of equivalence classes in this bucket. The total number of\nclasses returned per bucket is capped at 20.", - "items": { - "$ref": "GooglePrivacyDlpV2beta2LDiversityEquivalenceClass" - }, - "type": "array" - }, - "sensitiveValueFrequencyLowerBound": { - "description": "Lower bound on the sensitive value frequencies of the equivalence\nclasses in this bucket.", - "format": "int64", - "type": "string" - }, - "sensitiveValueFrequencyUpperBound": { - "description": "Upper bound on the sensitive value frequencies of the equivalence\nclasses in this bucket.", - "format": "int64", - "type": "string" - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta2LDiversityResult": { - "description": "Result of the l-diversity computation.", - "id": "GooglePrivacyDlpV2beta2LDiversityResult", - "properties": { - "sensitiveValueFrequencyHistogramBuckets": { - "description": "Histogram of l-diversity equivalence class sensitive value frequencies.", - "items": { - "$ref": "GooglePrivacyDlpV2beta2LDiversityHistogramBucket" - }, - "type": "array" - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta2LikelihoodAdjustment": { - "description": "Message for specifying an adjustment to the likelihood of a finding as\npart of a detection rule.", - "id": "GooglePrivacyDlpV2beta2LikelihoodAdjustment", - "properties": { - "fixedLikelihood": { - "description": "Set the likelihood of a finding to a fixed value.", - "enum": [ - "LIKELIHOOD_UNSPECIFIED", - "VERY_UNLIKELY", - "UNLIKELY", - "POSSIBLE", - "LIKELY", - "VERY_LIKELY" - ], - "enumDescriptions": [ - "Default value; information with all likelihoods is included.", - "Few matching elements.", - "", - "Some matching elements.", - "", - "Many matching elements." - ], - "type": "string" - }, - "relativeLikelihood": { - "description": "Increase or decrease the likelihood by the specified number of\nlevels. For example, if a finding would be `POSSIBLE` without the\ndetection rule and `relative_likelihood` is 1, then it is upgraded to\n`LIKELY`, while a value of -1 would downgrade it to `UNLIKELY`.\nLikelihood may never drop below `VERY_UNLIKELY` or exceed\n`VERY_LIKELY`, so applying an adjustment of 1 followed by an\nadjustment of -1 when base likelihood is `VERY_LIKELY` will result in\na final likelihood of `LIKELY`.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta2ListDeidentifyTemplatesResponse": { - "description": "Response message for ListDeidentifyTemplates.", - "id": "GooglePrivacyDlpV2beta2ListDeidentifyTemplatesResponse", - "properties": { - "deidentifyTemplates": { - "description": "List of deidentify templates, up to page_size in\nListDeidentifyTemplatesRequest.", - "items": { - "$ref": "GooglePrivacyDlpV2beta2DeidentifyTemplate" - }, - "type": "array" - }, - "nextPageToken": { - "description": "If the next page is available then the next page token to be used\nin following ListDeidentifyTemplates request.", - "type": "string" - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta2ListDlpJobsResponse": { - "description": "The response message for listing DLP jobs.", - "id": "GooglePrivacyDlpV2beta2ListDlpJobsResponse", - "properties": { - "jobs": { - "description": "A list of DlpJobs that matches the specified filter in the request.", - "items": { - "$ref": "GooglePrivacyDlpV2beta2DlpJob" - }, - "type": "array" - }, - "nextPageToken": { - "description": "The standard List next-page token.", - "type": "string" - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta2ListInfoTypesResponse": { - "description": "Response to the ListInfoTypes request.", - "id": "GooglePrivacyDlpV2beta2ListInfoTypesResponse", - "properties": { - "infoTypes": { - "description": "Set of sensitive infoTypes.", - "items": { - "$ref": "GooglePrivacyDlpV2beta2InfoTypeDescription" - }, - "type": "array" - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta2ListInspectTemplatesResponse": { - "description": "Response message for ListInspectTemplates.", - "id": "GooglePrivacyDlpV2beta2ListInspectTemplatesResponse", - "properties": { - "inspectTemplates": { - "description": "List of inspectTemplates, up to page_size in ListInspectTemplatesRequest.", - "items": { - "$ref": "GooglePrivacyDlpV2beta2InspectTemplate" - }, - "type": "array" - }, - "nextPageToken": { - "description": "If the next page is available then the next page token to be used\nin following ListInspectTemplates request.", - "type": "string" - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta2ListJobTriggersResponse": { - "description": "Response message for ListJobTriggers.", - "id": "GooglePrivacyDlpV2beta2ListJobTriggersResponse", - "properties": { - "jobTriggers": { - "description": "List of triggeredJobs, up to page_size in ListJobTriggersRequest.", - "items": { - "$ref": "GooglePrivacyDlpV2beta2JobTrigger" - }, - "type": "array" - }, - "nextPageToken": { - "description": "If the next page is available then the next page token to be used\nin following ListJobTriggers request.", - "type": "string" - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta2Location": { - "description": "Specifies the location of the finding.", - "id": "GooglePrivacyDlpV2beta2Location", - "properties": { - "byteRange": { - "$ref": "GooglePrivacyDlpV2beta2Range", - "description": "Zero-based byte offsets delimiting the finding.\nThese are relative to the finding's containing element.\nNote that when the content is not textual, this references\nthe UTF-8 encoded textual representation of the content.\nOmitted if content is an image." - }, - "codepointRange": { - "$ref": "GooglePrivacyDlpV2beta2Range", - "description": "Unicode character offsets delimiting the finding.\nThese are relative to the finding's containing element.\nProvided when the content is text." - }, - "fieldId": { - "$ref": "GooglePrivacyDlpV2beta2FieldId", - "description": "The pointer to the property or cell that contained the finding.\nProvided when the finding's containing element is a cell in a table\nor a property of storage object." - }, - "imageBoxes": { - "description": "The area within the image that contained the finding.\nProvided when the content is an image.", - "items": { - "$ref": "GooglePrivacyDlpV2beta2ImageLocation" - }, - "type": "array" - }, - "recordKey": { - "$ref": "GooglePrivacyDlpV2beta2RecordKey", - "description": "The pointer to the record in storage that contained the field the\nfinding was found in.\nProvided when the finding's containing element is a property\nof a storage object." - }, - "tableLocation": { - "$ref": "GooglePrivacyDlpV2beta2TableLocation", - "description": "The pointer to the row of the table that contained the finding.\nProvided when the finding's containing element is a cell of a table." - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta2NumericalStatsConfig": { - "description": "Compute numerical stats over an individual column, including\nmin, max, and quantiles.", - "id": "GooglePrivacyDlpV2beta2NumericalStatsConfig", - "properties": { - "field": { - "$ref": "GooglePrivacyDlpV2beta2FieldId", - "description": "Field to compute numerical stats on. Supported types are\ninteger, float, date, datetime, timestamp, time." - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta2NumericalStatsResult": { - "description": "Result of the numerical stats computation.", - "id": "GooglePrivacyDlpV2beta2NumericalStatsResult", - "properties": { - "maxValue": { - "$ref": "GooglePrivacyDlpV2beta2Value", - "description": "Maximum value appearing in the column." - }, - "minValue": { - "$ref": "GooglePrivacyDlpV2beta2Value", - "description": "Minimum value appearing in the column." - }, - "quantileValues": { - "description": "List of 99 values that partition the set of field values into 100 equal\nsized buckets.", - "items": { - "$ref": "GooglePrivacyDlpV2beta2Value" - }, - "type": "array" - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta2OutputStorageConfig": { - "description": "Cloud repository for storing output.", - "id": "GooglePrivacyDlpV2beta2OutputStorageConfig", - "properties": { - "outputSchema": { - "description": "Schema used for writing the findings. Columns are derived from the\n`Finding` object. If appending to an existing table, any columns from the\npredefined schema that are missing will be added. No columns in the\nexisting table will be deleted.\n\nIf unspecified, then all available columns will be used for a new table,\nand no changes will be made to an existing table.", - "enum": [ - "OUTPUT_SCHEMA_UNSPECIFIED", - "BASIC_COLUMNS", - "GCS_COLUMNS", - "DATASTORE_COLUMNS", - "BIG_QUERY_COLUMNS", - "ALL_COLUMNS" - ], - "enumDescriptions": [ - "", - "Basic schema including only `info_type`, `quote`, `certainty`, and\n`timestamp`.", - "Schema tailored to findings from scanning Google Cloud Storage.", - "Schema tailored to findings from scanning Google Datastore.", - "Schema tailored to findings from scanning Google BigQuery.", - "Schema containing all columns." - ], - "type": "string" - }, - "table": { - "$ref": "GooglePrivacyDlpV2beta2BigQueryTable", - "description": "Store findings in an existing table or a new table in an existing\ndataset. Each column in an existing table must have the same name, type,\nand mode of a field in the `Finding` object. If table_id is not set a new\none will be generated for you with the following format:\ndlp_googleapis_yyyy_mm_dd_[dlp_job_id]. Pacific timezone will be used for\ngenerating the date details." - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta2PartitionId": { - "description": "Datastore partition ID.\nA partition ID identifies a grouping of entities. The grouping is always\nby project and namespace, however the namespace ID may be empty.\n\nA partition ID contains several dimensions:\nproject ID and namespace ID.", - "id": "GooglePrivacyDlpV2beta2PartitionId", - "properties": { - "namespaceId": { - "description": "If not empty, the ID of the namespace to which the entities belong.", - "type": "string" - }, - "projectId": { - "description": "The ID of the project to which the entities belong.", - "type": "string" - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta2PathElement": { - "description": "A (kind, ID/name) pair used to construct a key path.\n\nIf either name or ID is set, the element is complete.\nIf neither is set, the element is incomplete.", - "id": "GooglePrivacyDlpV2beta2PathElement", - "properties": { - "id": { - "description": "The auto-allocated ID of the entity.\nNever equal to zero. Values less than zero are discouraged and may not\nbe supported in the future.", - "format": "int64", - "type": "string" - }, - "kind": { - "description": "The kind of the entity.\nA kind matching regex `__.*__` is reserved/read-only.\nA kind must not contain more than 1500 bytes when UTF-8 encoded.\nCannot be `\"\"`.", - "type": "string" - }, - "name": { - "description": "The name of the entity.\nA name matching regex `__.*__` is reserved/read-only.\nA name must not be more than 1500 bytes when UTF-8 encoded.\nCannot be `\"\"`.", - "type": "string" - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta2PrimitiveTransformation": { - "description": "A rule for transforming a value.", - "id": "GooglePrivacyDlpV2beta2PrimitiveTransformation", - "properties": { - "bucketingConfig": { - "$ref": "GooglePrivacyDlpV2beta2BucketingConfig" - }, - "characterMaskConfig": { - "$ref": "GooglePrivacyDlpV2beta2CharacterMaskConfig" - }, - "cryptoHashConfig": { - "$ref": "GooglePrivacyDlpV2beta2CryptoHashConfig" - }, - "cryptoReplaceFfxFpeConfig": { - "$ref": "GooglePrivacyDlpV2beta2CryptoReplaceFfxFpeConfig" - }, - "dateShiftConfig": { - "$ref": "GooglePrivacyDlpV2beta2DateShiftConfig" - }, - "fixedSizeBucketingConfig": { - "$ref": "GooglePrivacyDlpV2beta2FixedSizeBucketingConfig" - }, - "redactConfig": { - "$ref": "GooglePrivacyDlpV2beta2RedactConfig" - }, - "replaceConfig": { - "$ref": "GooglePrivacyDlpV2beta2ReplaceValueConfig" - }, - "replaceWithInfoTypeConfig": { - "$ref": "GooglePrivacyDlpV2beta2ReplaceWithInfoTypeConfig" - }, - "timePartConfig": { - "$ref": "GooglePrivacyDlpV2beta2TimePartConfig" - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta2PrivacyMetric": { - "description": "Privacy metric to compute for reidentification risk analysis.", - "id": "GooglePrivacyDlpV2beta2PrivacyMetric", - "properties": { - "categoricalStatsConfig": { - "$ref": "GooglePrivacyDlpV2beta2CategoricalStatsConfig" - }, - "kAnonymityConfig": { - "$ref": "GooglePrivacyDlpV2beta2KAnonymityConfig" - }, - "kMapEstimationConfig": { - "$ref": "GooglePrivacyDlpV2beta2KMapEstimationConfig" - }, - "lDiversityConfig": { - "$ref": "GooglePrivacyDlpV2beta2LDiversityConfig" - }, - "numericalStatsConfig": { - "$ref": "GooglePrivacyDlpV2beta2NumericalStatsConfig" - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta2Proximity": { - "description": "Message for specifying a window around a finding to apply a detection\nrule.", - "id": "GooglePrivacyDlpV2beta2Proximity", - "properties": { - "windowAfter": { - "description": "Number of characters after the finding to consider.", - "format": "int32", - "type": "integer" - }, - "windowBefore": { - "description": "Number of characters before the finding to consider.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta2PublishToPubSub": { - "description": "Publish the results of a DlpJob to a pub sub channel.\nCompatible with: Inpect, Risk", - "id": "GooglePrivacyDlpV2beta2PublishToPubSub", - "properties": { - "topic": { - "description": "Cloud Pub/Sub topic to send notifications to. The topic must have given\npublishing access rights to the DLP API service account executing\nthe long running DlpJob sending the notifications.\nFormat is projects/{project}/topics/{topic}.", - "type": "string" - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta2QuasiIdField": { - "description": "A quasi-identifier column has a custom_tag, used to know which column\nin the data corresponds to which column in the statistical model.", - "id": "GooglePrivacyDlpV2beta2QuasiIdField", - "properties": { - "customTag": { - "type": "string" - }, - "field": { - "$ref": "GooglePrivacyDlpV2beta2FieldId" - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta2QuoteInfo": { - "description": "Message for infoType-dependent details parsed from quote.", - "id": "GooglePrivacyDlpV2beta2QuoteInfo", - "properties": { - "dateTime": { - "$ref": "GooglePrivacyDlpV2beta2DateTime" - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta2Range": { - "description": "Generic half-open interval [start, end)", - "id": "GooglePrivacyDlpV2beta2Range", - "properties": { - "end": { - "description": "Index of the last character of the range (exclusive).", - "format": "int64", - "type": "string" - }, - "start": { - "description": "Index of the first character of the range (inclusive).", - "format": "int64", - "type": "string" - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta2RecordCondition": { - "description": "A condition for determining whether a transformation should be applied to\na field.", - "id": "GooglePrivacyDlpV2beta2RecordCondition", - "properties": { - "expressions": { - "$ref": "GooglePrivacyDlpV2beta2Expressions", - "description": "An expression." - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta2RecordKey": { - "description": "Message for a unique key indicating a record that contains a finding.", - "id": "GooglePrivacyDlpV2beta2RecordKey", - "properties": { - "bigQueryKey": { - "$ref": "GooglePrivacyDlpV2beta2BigQueryKey" - }, - "cloudStorageKey": { - "$ref": "GooglePrivacyDlpV2beta2CloudStorageKey" - }, - "datastoreKey": { - "$ref": "GooglePrivacyDlpV2beta2DatastoreKey" - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta2RecordSuppression": { - "description": "Configuration to suppress records whose suppression conditions evaluate to\ntrue.", - "id": "GooglePrivacyDlpV2beta2RecordSuppression", - "properties": { - "condition": { - "$ref": "GooglePrivacyDlpV2beta2RecordCondition", - "description": "A condition that when it evaluates to true will result in the record being\nevaluated to be suppressed from the transformed content." - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta2RecordTransformations": { - "description": "A type of transformation that is applied over structured data such as a\ntable.", - "id": "GooglePrivacyDlpV2beta2RecordTransformations", - "properties": { - "fieldTransformations": { - "description": "Transform the record by applying various field transformations.", - "items": { - "$ref": "GooglePrivacyDlpV2beta2FieldTransformation" - }, - "type": "array" - }, - "recordSuppressions": { - "description": "Configuration defining which records get suppressed entirely. Records that\nmatch any suppression rule are omitted from the output [optional].", - "items": { - "$ref": "GooglePrivacyDlpV2beta2RecordSuppression" - }, - "type": "array" - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta2RedactConfig": { - "description": "Redact a given value. For example, if used with an `InfoTypeTransformation`\ntransforming PHONE_NUMBER, and input 'My phone number is 206-555-0123', the\noutput would be 'My phone number is '.", - "id": "GooglePrivacyDlpV2beta2RedactConfig", - "properties": {}, - "type": "object" - }, - "GooglePrivacyDlpV2beta2RedactImageRequest": { - "description": "Request to search for potentially sensitive info in a list of items\nand replace it with a default or provided content.", - "id": "GooglePrivacyDlpV2beta2RedactImageRequest", - "properties": { - "imageData": { - "description": "The bytes of the image to redact.", - "format": "byte", - "type": "string" - }, - "imageRedactionConfigs": { - "description": "The configuration for specifying what content to redact from images.", - "items": { - "$ref": "GooglePrivacyDlpV2beta2ImageRedactionConfig" - }, - "type": "array" - }, - "imageType": { - "description": "Type of the content, as defined in Content-Type HTTP header.\nSupported types are: PNG, JPEG, SVG, \u0026 BMP.", - "type": "string" - }, - "inspectConfig": { - "$ref": "GooglePrivacyDlpV2beta2InspectConfig", - "description": "Configuration for the inspector." - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta2RedactImageResponse": { - "description": "Results of redacting an image.", - "id": "GooglePrivacyDlpV2beta2RedactImageResponse", - "properties": { - "extractedText": { - "description": "If an image was being inspected and the InspectConfig's include_quote was\nset to true, then this field will include all text, if any, that was found\nin the image.", - "type": "string" - }, - "redactedImage": { - "description": "The redacted image. The type will be the same as the original image.", - "format": "byte", - "type": "string" - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta2Regex": { - "description": "Message defining a custom regular expression.", - "id": "GooglePrivacyDlpV2beta2Regex", - "properties": { - "pattern": { - "description": "Pattern defining the regular expression.", - "type": "string" - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta2ReidentifyContentRequest": { - "description": "Request to re-identify an item.", - "id": "GooglePrivacyDlpV2beta2ReidentifyContentRequest", - "properties": { - "inspectConfig": { - "$ref": "GooglePrivacyDlpV2beta2InspectConfig", - "description": "Configuration for the inspector." - }, - "inspectTemplateName": { - "description": "Optional template to use. Any configuration directly specified in\n`inspect_config` will override those set in the template. Singular fields\nthat are set in this request will replace their corresponding fields in the\ntemplate. Repeated fields are appended. Singular sub-messages and groups\nare recursively merged.", - "type": "string" - }, - "item": { - "$ref": "GooglePrivacyDlpV2beta2ContentItem", - "description": "The item to re-identify. Will be treated as text." - }, - "reidentifyConfig": { - "$ref": "GooglePrivacyDlpV2beta2DeidentifyConfig", - "description": "Configuration for the re-identification of the content item.\nThis field shares the same proto message type that is used for\nde-identification, however its usage here is for the reversal of the\nprevious de-identification. Re-identification is performed by examining\nthe transformations used to de-identify the items and executing the\nreverse. This requires that only reversible transformations\nbe provided here. The reversible transformations are:\n\n - `CryptoReplaceFfxFpeConfig`" - }, - "reidentifyTemplateName": { - "description": "Optional template to use. References an instance of `DeidentifyTemplate`.\nAny configuration directly specified in `reidentify_config` or\n`inspect_config` will override those set in the template. Singular fields\nthat are set in this request will replace their corresponding fields in the\ntemplate. Repeated fields are appended. Singular sub-messages and groups\nare recursively merged.", - "type": "string" - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta2ReidentifyContentResponse": { - "description": "Results of re-identifying a item.", - "id": "GooglePrivacyDlpV2beta2ReidentifyContentResponse", - "properties": { - "item": { - "$ref": "GooglePrivacyDlpV2beta2ContentItem", - "description": "The re-identified item." - }, - "overview": { - "$ref": "GooglePrivacyDlpV2beta2TransformationOverview", - "description": "An overview of the changes that were made to the `item`." - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta2ReplaceValueConfig": { - "description": "Replace each input value with a given `Value`.", - "id": "GooglePrivacyDlpV2beta2ReplaceValueConfig", - "properties": { - "newValue": { - "$ref": "GooglePrivacyDlpV2beta2Value", - "description": "Value to replace it with." - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta2ReplaceWithInfoTypeConfig": { - "description": "Replace each matching finding with the name of the info_type.", - "id": "GooglePrivacyDlpV2beta2ReplaceWithInfoTypeConfig", - "properties": {}, - "type": "object" - }, - "GooglePrivacyDlpV2beta2RequestedOptions": { - "id": "GooglePrivacyDlpV2beta2RequestedOptions", - "properties": { - "jobConfig": { - "$ref": "GooglePrivacyDlpV2beta2InspectJobConfig" - }, - "snapshotInspectTemplate": { - "$ref": "GooglePrivacyDlpV2beta2InspectTemplate", - "description": "If run with an inspect template, a snapshot of it's state at the time of\nthis run." - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta2Result": { - "id": "GooglePrivacyDlpV2beta2Result", - "properties": { - "infoTypeStats": { - "description": "Statistics of how many instances of each info type were found during\ninspect job.", - "items": { - "$ref": "GooglePrivacyDlpV2beta2InfoTypeStatistics" - }, - "type": "array" - }, - "processedBytes": { - "description": "Total size in bytes that were processed.", - "format": "int64", - "type": "string" - }, - "totalEstimatedBytes": { - "description": "Estimate of the number of bytes to process.", - "format": "int64", - "type": "string" - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta2RiskAnalysisJobConfig": { - "description": "Configuration for a risk analysis job.", - "id": "GooglePrivacyDlpV2beta2RiskAnalysisJobConfig", - "properties": { - "actions": { - "description": "Actions to execute at the completion of the job. Are executed in the order\nprovided.", - "items": { - "$ref": "GooglePrivacyDlpV2beta2Action" - }, - "type": "array" - }, - "privacyMetric": { - "$ref": "GooglePrivacyDlpV2beta2PrivacyMetric", - "description": "Privacy metric to compute." - }, - "sourceTable": { - "$ref": "GooglePrivacyDlpV2beta2BigQueryTable", - "description": "Input dataset to compute metrics over." - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta2Row": { - "id": "GooglePrivacyDlpV2beta2Row", - "properties": { - "values": { - "items": { - "$ref": "GooglePrivacyDlpV2beta2Value" - }, - "type": "array" - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta2SaveFindings": { - "description": "If set, the detailed findings will be persisted to the specified\nOutputStorageConfig. Compatible with: Inspect", - "id": "GooglePrivacyDlpV2beta2SaveFindings", - "properties": { - "outputConfig": { - "$ref": "GooglePrivacyDlpV2beta2OutputStorageConfig" - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta2Schedule": { - "description": "Schedule for triggeredJobs.", - "id": "GooglePrivacyDlpV2beta2Schedule", - "properties": { - "reccurrencePeriodDuration": { - "description": "With this option a job is started a regular periodic basis. For\nexample: every 10 minutes.\n\nA scheduled start time will be skipped if the previous\nexecution has not ended when its scheduled time occurs.\n\nThis value must be set to a time duration greater than or equal\nto 60 minutes and can be no longer than 60 days.", - "format": "google-duration", - "type": "string" - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta2StorageConfig": { - "description": "Shared message indicating Cloud storage type.", - "id": "GooglePrivacyDlpV2beta2StorageConfig", - "properties": { - "bigQueryOptions": { - "$ref": "GooglePrivacyDlpV2beta2BigQueryOptions", - "description": "BigQuery options specification." - }, - "cloudStorageOptions": { - "$ref": "GooglePrivacyDlpV2beta2CloudStorageOptions", - "description": "Google Cloud Storage options specification." - }, - "datastoreOptions": { - "$ref": "GooglePrivacyDlpV2beta2DatastoreOptions", - "description": "Google Cloud Datastore options specification." - }, - "timespanConfig": { - "$ref": "GooglePrivacyDlpV2beta2TimespanConfig" - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta2SummaryResult": { - "description": "A collection that informs the user the number of times a particular\n`TransformationResultCode` and error details occurred.", - "id": "GooglePrivacyDlpV2beta2SummaryResult", - "properties": { - "code": { - "enum": [ - "TRANSFORMATION_RESULT_CODE_UNSPECIFIED", - "SUCCESS", - "ERROR" - ], - "enumDescriptions": [ - "", - "", - "" - ], - "type": "string" - }, - "count": { - "format": "int64", - "type": "string" - }, - "details": { - "description": "A place for warnings or errors to show up if a transformation didn't\nwork as expected.", - "type": "string" - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta2SurrogateType": { - "description": "Message for detecting output from deidentification transformations\nsuch as\n[`CryptoReplaceFfxFpeConfig`](/dlp/docs/reference/rest/v2beta1/content/deidentify#CryptoReplaceFfxFpeConfig).\nThese types of transformations are\nthose that perform pseudonymization, thereby producing a \"surrogate\" as\noutput. This should be used in conjunction with a field on the\ntransformation such as `surrogate_info_type`. This custom info type does\nnot support the use of `detection_rules`.", - "id": "GooglePrivacyDlpV2beta2SurrogateType", - "properties": {}, - "type": "object" - }, - "GooglePrivacyDlpV2beta2Table": { - "description": "Structured content to inspect. Up to 50,000 `Value`s per request allowed.", - "id": "GooglePrivacyDlpV2beta2Table", - "properties": { - "headers": { - "items": { - "$ref": "GooglePrivacyDlpV2beta2FieldId" - }, - "type": "array" - }, - "rows": { - "items": { - "$ref": "GooglePrivacyDlpV2beta2Row" - }, - "type": "array" - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta2TableLocation": { - "description": "Location of a finding within a table.", - "id": "GooglePrivacyDlpV2beta2TableLocation", - "properties": { - "rowIndex": { - "description": "The zero-based index of the row where the finding is located.", - "format": "int64", - "type": "string" - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta2TaggedField": { - "description": "A column with a semantic tag attached.", - "id": "GooglePrivacyDlpV2beta2TaggedField", - "properties": { - "customTag": { - "description": "A column can be tagged with a custom tag. In this case, the user must\nindicate an auxiliary table that contains statistical information on\nthe possible values of this column (below).", - "type": "string" - }, - "field": { - "$ref": "GooglePrivacyDlpV2beta2FieldId", - "description": "Identifies the column. [required]" - }, - "inferred": { - "$ref": "GoogleProtobufEmpty", - "description": "If no semantic tag is indicated, we infer the statistical model from\nthe distribution of values in the input data" - }, - "infoType": { - "$ref": "GooglePrivacyDlpV2beta2InfoType", - "description": "A column can be tagged with a InfoType to use the relevant public\ndataset as a statistical model of population, if available. We\ncurrently support US ZIP codes, region codes, ages and genders.\nTo programmatically obtain the list of supported InfoTypes, use\nListInfoTypes with the supported_by=RISK_ANALYSIS filter." - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta2TimePartConfig": { - "description": "For use with `Date`, `Timestamp`, and `TimeOfDay`, extract or preserve a\nportion of the value.", - "id": "GooglePrivacyDlpV2beta2TimePartConfig", - "properties": { - "partToExtract": { - "enum": [ - "TIME_PART_UNSPECIFIED", - "YEAR", - "MONTH", - "DAY_OF_MONTH", - "DAY_OF_WEEK", - "WEEK_OF_YEAR", - "HOUR_OF_DAY" - ], - "enumDescriptions": [ - "", - "[0-9999]", - "[1-12]", - "[1-31]", - "[1-7]", - "[1-52]", - "[0-23]" - ], - "type": "string" - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta2TimeZone": { - "id": "GooglePrivacyDlpV2beta2TimeZone", - "properties": { - "offsetMinutes": { - "description": "Set only if the offset can be determined. Positive for time ahead of UTC.\nE.g. For \"UTC-9\", this value is -540.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta2TimespanConfig": { - "description": "Configuration of the timespan of the items to include in scanning.\nCurrently only supported when inspecting Google Cloud Storage and BigQuery.", - "id": "GooglePrivacyDlpV2beta2TimespanConfig", - "properties": { - "enableAutoPopulationOfTimespanConfig": { - "description": "When the job is started by a JobTrigger we will automatically figure out\na valid start_time to avoid scanning files that have not been modified\nsince the last time the JobTrigger executed. This will be based on the\ntime of the execution of the last run of the JobTrigger.", - "type": "boolean" - }, - "endTime": { - "description": "Exclude files newer than this value.\nIf set to zero, no upper time limit is applied.", - "format": "google-datetime", - "type": "string" - }, - "startTime": { - "description": "Exclude files older than this value.", - "format": "google-datetime", - "type": "string" - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta2TransformationOverview": { - "description": "Overview of the modifications that occurred.", - "id": "GooglePrivacyDlpV2beta2TransformationOverview", - "properties": { - "transformationSummaries": { - "description": "Transformations applied to the dataset.", - "items": { - "$ref": "GooglePrivacyDlpV2beta2TransformationSummary" - }, - "type": "array" - }, - "transformedBytes": { - "description": "Total size in bytes that were transformed in some way.", - "format": "int64", - "type": "string" - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta2TransformationSummary": { - "description": "Summary of a single tranformation.\nOnly one of 'transformation', 'field_transformation', or 'record_suppress'\nwill be set.", - "id": "GooglePrivacyDlpV2beta2TransformationSummary", - "properties": { - "field": { - "$ref": "GooglePrivacyDlpV2beta2FieldId", - "description": "Set if the transformation was limited to a specific FieldId." - }, - "fieldTransformations": { - "description": "The field transformation that was applied.\nIf multiple field transformations are requested for a single field,\nthis list will contain all of them; otherwise, only one is supplied.", - "items": { - "$ref": "GooglePrivacyDlpV2beta2FieldTransformation" - }, - "type": "array" - }, - "infoType": { - "$ref": "GooglePrivacyDlpV2beta2InfoType", - "description": "Set if the transformation was limited to a specific info_type." - }, - "recordSuppress": { - "$ref": "GooglePrivacyDlpV2beta2RecordSuppression", - "description": "The specific suppression option these stats apply to." - }, - "results": { - "items": { - "$ref": "GooglePrivacyDlpV2beta2SummaryResult" - }, - "type": "array" - }, - "transformation": { - "$ref": "GooglePrivacyDlpV2beta2PrimitiveTransformation", - "description": "The specific transformation these stats apply to." - }, - "transformedBytes": { - "description": "Total size in bytes that were transformed in some way.", - "format": "int64", - "type": "string" - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta2TransientCryptoKey": { - "description": "Use this to have a random data crypto key generated.\nIt will be discarded after the request finishes.", - "id": "GooglePrivacyDlpV2beta2TransientCryptoKey", - "properties": { - "name": { - "description": "Name of the key. [required]\nThis is an arbitrary string used to differentiate different keys.\nA unique key is generated per name: two separate `TransientCryptoKey`\nprotos share the same generated key if their names are the same.\nWhen the data crypto key is generated, this name is not used in any way\n(repeating the api call will result in a different key being generated).", - "type": "string" - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta2Trigger": { - "description": "What event needs to occur for a new job to be started.", - "id": "GooglePrivacyDlpV2beta2Trigger", - "properties": { - "schedule": { - "$ref": "GooglePrivacyDlpV2beta2Schedule", - "description": "Create a job on a repeating basis based on the elapse of time." - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta2UnwrappedCryptoKey": { - "description": "Using raw keys is prone to security risks due to accidentally\nleaking the key. Choose another type of key if possible.", - "id": "GooglePrivacyDlpV2beta2UnwrappedCryptoKey", - "properties": { - "key": { - "description": "The AES 128/192/256 bit key. [required]", - "format": "byte", - "type": "string" - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta2UpdateDeidentifyTemplateRequest": { - "description": "Request message for UpdateDeidentifyTemplate.", - "id": "GooglePrivacyDlpV2beta2UpdateDeidentifyTemplateRequest", - "properties": { - "deidentifyTemplate": { - "$ref": "GooglePrivacyDlpV2beta2DeidentifyTemplate", - "description": "New DeidentifyTemplate value." - }, - "updateMask": { - "description": "Mask to control which fields get updated.", - "format": "google-fieldmask", - "type": "string" - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta2UpdateInspectTemplateRequest": { - "description": "Request message for UpdateInspectTemplate.", - "id": "GooglePrivacyDlpV2beta2UpdateInspectTemplateRequest", - "properties": { - "inspectTemplate": { - "$ref": "GooglePrivacyDlpV2beta2InspectTemplate", - "description": "New InspectTemplate value." - }, - "updateMask": { - "description": "Mask to control which fields get updated.", - "format": "google-fieldmask", - "type": "string" - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta2UpdateJobTriggerRequest": { - "description": "Request message for UpdateJobTrigger.", - "id": "GooglePrivacyDlpV2beta2UpdateJobTriggerRequest", - "properties": { - "jobTrigger": { - "$ref": "GooglePrivacyDlpV2beta2JobTrigger", - "description": "New JobTrigger value." - }, - "updateMask": { - "description": "Mask to control which fields get updated.", - "format": "google-fieldmask", - "type": "string" - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta2Value": { - "description": "Set of primitive values supported by the system.\nNote that for the purposes of inspection or transformation, the number\nof bytes considered to comprise a 'Value' is based on its representation\nas a UTF-8 encoded string. For example, if 'integer_value' is set to\n123456789, the number of bytes would be counted as 9, even though an\nint64 only holds up to 8 bytes of data.", - "id": "GooglePrivacyDlpV2beta2Value", - "properties": { - "booleanValue": { - "type": "boolean" - }, - "dateValue": { - "$ref": "GoogleTypeDate" - }, - "dayOfWeekValue": { - "enum": [ - "DAY_OF_WEEK_UNSPECIFIED", - "MONDAY", - "TUESDAY", - "WEDNESDAY", - "THURSDAY", - "FRIDAY", - "SATURDAY", - "SUNDAY" - ], - "enumDescriptions": [ - "The unspecified day-of-week.", - "The day-of-week of Monday.", - "The day-of-week of Tuesday.", - "The day-of-week of Wednesday.", - "The day-of-week of Thursday.", - "The day-of-week of Friday.", - "The day-of-week of Saturday.", - "The day-of-week of Sunday." - ], - "type": "string" - }, - "floatValue": { - "format": "double", - "type": "number" - }, - "integerValue": { - "format": "int64", - "type": "string" - }, - "stringValue": { - "type": "string" - }, - "timeValue": { - "$ref": "GoogleTypeTimeOfDay" - }, - "timestampValue": { - "format": "google-datetime", - "type": "string" - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta2ValueFrequency": { - "description": "A value of a field, including its frequency.", - "id": "GooglePrivacyDlpV2beta2ValueFrequency", - "properties": { - "count": { - "description": "How many times the value is contained in the field.", - "format": "int64", - "type": "string" - }, - "value": { - "$ref": "GooglePrivacyDlpV2beta2Value", - "description": "A value contained in the field in question." - } - }, - "type": "object" - }, - "GooglePrivacyDlpV2beta2WordList": { - "description": "Message defining a list of words or phrases to search for in the data.", - "id": "GooglePrivacyDlpV2beta2WordList", - "properties": { - "words": { - "description": "Words or phrases defining the dictionary. The dictionary must contain\nat least one phrase and every phrase must contain at least 2 characters\nthat are letters or digits. [required]", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "GoogleProtobufEmpty": { - "description": "A generic empty message that you can re-use to avoid defining duplicated\nempty messages in your APIs. A typical example is to use it as the request\nor the response type of an API method. For instance:\n\n service Foo {\n rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);\n }\n\nThe JSON representation for `Empty` is empty JSON object `{}`.", - "id": "GoogleProtobufEmpty", - "properties": {}, - "type": "object" - }, - "GoogleRpcStatus": { - "description": "The `Status` type defines a logical error model that is suitable for different\nprogramming environments, including REST APIs and RPC APIs. It is used by\n[gRPC](https://github.com/grpc). The error model is designed to be:\n\n- Simple to use and understand for most users\n- Flexible enough to meet unexpected needs\n\n# Overview\n\nThe `Status` message contains three pieces of data: error code, error message,\nand error details. The error code should be an enum value of\ngoogle.rpc.Code, but it may accept additional error codes if needed. The\nerror message should be a developer-facing English message that helps\ndevelopers *understand* and *resolve* the error. If a localized user-facing\nerror message is needed, put the localized message in the error details or\nlocalize it in the client. The optional error details may contain arbitrary\ninformation about the error. There is a predefined set of error detail types\nin the package `google.rpc` that can be used for common error conditions.\n\n# Language mapping\n\nThe `Status` message is the logical representation of the error model, but it\nis not necessarily the actual wire format. When the `Status` message is\nexposed in different client libraries and different wire protocols, it can be\nmapped differently. For example, it will likely be mapped to some exceptions\nin Java, but more likely mapped to some error codes in C.\n\n# Other uses\n\nThe error model and the `Status` message can be used in a variety of\nenvironments, either with or without APIs, to provide a\nconsistent developer experience across different environments.\n\nExample uses of this error model include:\n\n- Partial errors. If a service needs to return partial errors to the client,\n it may embed the `Status` in the normal response to indicate the partial\n errors.\n\n- Workflow errors. A typical workflow has multiple steps. Each step may\n have a `Status` message for error reporting.\n\n- Batch operations. If a client uses batch request and batch response, the\n `Status` message should be used directly inside batch response, one for\n each error sub-response.\n\n- Asynchronous operations. If an API call embeds asynchronous operation\n results in its response, the status of those operations should be\n represented directly using the `Status` message.\n\n- Logging. If some API errors are stored in logs, the message `Status` could\n be used directly after any stripping needed for security/privacy reasons.", - "id": "GoogleRpcStatus", - "properties": { - "code": { - "description": "The status code, which should be an enum value of google.rpc.Code.", - "format": "int32", - "type": "integer" - }, - "details": { - "description": "A list of messages that carry the error details. There is a common set of\nmessage types for APIs to use.", - "items": { - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "A developer-facing error message, which should be in English. Any\nuser-facing error message should be localized and sent in the\ngoogle.rpc.Status.details field, or localized by the client.", - "type": "string" - } - }, - "type": "object" - }, - "GoogleTypeDate": { - "description": "Represents a whole calendar date, e.g. date of birth. The time of day and\ntime zone are either specified elsewhere or are not significant. The date\nis relative to the Proleptic Gregorian Calendar. The day may be 0 to\nrepresent a year and month where the day is not significant, e.g. credit card\nexpiration date. The year may be 0 to represent a month and day independent\nof year, e.g. anniversary date. Related types are google.type.TimeOfDay\nand `google.protobuf.Timestamp`.", - "id": "GoogleTypeDate", - "properties": { - "day": { - "description": "Day of month. Must be from 1 to 31 and valid for the year and month, or 0\nif specifying a year/month where the day is not significant.", - "format": "int32", - "type": "integer" - }, - "month": { - "description": "Month of year. Must be from 1 to 12, or 0 if specifying a date without a\nmonth.", - "format": "int32", - "type": "integer" - }, - "year": { - "description": "Year of date. Must be from 1 to 9999, or 0 if specifying a date without\na year.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "GoogleTypeTimeOfDay": { - "description": "Represents a time of day. The date and time zone are either not significant\nor are specified elsewhere. An API may choose to allow leap seconds. Related\ntypes are google.type.Date and `google.protobuf.Timestamp`.", - "id": "GoogleTypeTimeOfDay", - "properties": { - "hours": { - "description": "Hours of day in 24 hour format. Should be from 0 to 23. An API may choose\nto allow the value \"24:00:00\" for scenarios like business closing time.", - "format": "int32", - "type": "integer" - }, - "minutes": { - "description": "Minutes of hour of day. Must be from 0 to 59.", - "format": "int32", - "type": "integer" - }, - "nanos": { - "description": "Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999.", - "format": "int32", - "type": "integer" - }, - "seconds": { - "description": "Seconds of minutes of the time. Must normally be from 0 to 59. An API may\nallow the value 60 if it allows leap-seconds.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - } - }, - "servicePath": "", - "title": "Cloud Data Loss Prevention (DLP) API", - "version": "v2beta2", - "version_module": true -} \ No newline at end of file
diff --git a/dlp/v2beta2/dlp-gen.go b/dlp/v2beta2/dlp-gen.go deleted file mode 100644 index 9b859fc..0000000 --- a/dlp/v2beta2/dlp-gen.go +++ /dev/null
@@ -1,13397 +0,0 @@ -// Package dlp provides access to the Cloud Data Loss Prevention (DLP) API. -// -// See https://cloud.google.com/dlp/docs/ -// -// Usage example: -// -// import "google.golang.org/api/dlp/v2beta2" -// ... -// dlpService, err := dlp.New(oauthHttpClient) -package dlp // import "google.golang.org/api/dlp/v2beta2" - -import ( - "bytes" - "context" - "encoding/json" - "errors" - "fmt" - "io" - "net/http" - "net/url" - "strconv" - "strings" - - gensupport "google.golang.org/api/gensupport" - googleapi "google.golang.org/api/googleapi" -) - -// Always reference these packages, just in case the auto-generated code -// below doesn't. -var _ = bytes.NewBuffer -var _ = strconv.Itoa -var _ = fmt.Sprintf -var _ = json.NewDecoder -var _ = io.Copy -var _ = url.Parse -var _ = gensupport.MarshalJSON -var _ = googleapi.Version -var _ = errors.New -var _ = strings.Replace -var _ = context.Canceled - -const apiId = "dlp:v2beta2" -const apiName = "dlp" -const apiVersion = "v2beta2" -const basePath = "https://dlp.googleapis.com/" - -// OAuth2 scopes used by this API. -const ( - // View and manage your data across Google Cloud Platform services - CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform" -) - -func New(client *http.Client) (*Service, error) { - if client == nil { - return nil, errors.New("client is nil") - } - s := &Service{client: client, BasePath: basePath} - s.InfoTypes = NewInfoTypesService(s) - s.Organizations = NewOrganizationsService(s) - s.Projects = NewProjectsService(s) - return s, nil -} - -type Service struct { - client *http.Client - BasePath string // API endpoint base URL - UserAgent string // optional additional User-Agent fragment - - InfoTypes *InfoTypesService - - Organizations *OrganizationsService - - Projects *ProjectsService -} - -func (s *Service) userAgent() string { - if s.UserAgent == "" { - return googleapi.UserAgent - } - return googleapi.UserAgent + " " + s.UserAgent -} - -func NewInfoTypesService(s *Service) *InfoTypesService { - rs := &InfoTypesService{s: s} - return rs -} - -type InfoTypesService struct { - s *Service -} - -func NewOrganizationsService(s *Service) *OrganizationsService { - rs := &OrganizationsService{s: s} - rs.DeidentifyTemplates = NewOrganizationsDeidentifyTemplatesService(s) - rs.InspectTemplates = NewOrganizationsInspectTemplatesService(s) - return rs -} - -type OrganizationsService struct { - s *Service - - DeidentifyTemplates *OrganizationsDeidentifyTemplatesService - - InspectTemplates *OrganizationsInspectTemplatesService -} - -func NewOrganizationsDeidentifyTemplatesService(s *Service) *OrganizationsDeidentifyTemplatesService { - rs := &OrganizationsDeidentifyTemplatesService{s: s} - return rs -} - -type OrganizationsDeidentifyTemplatesService struct { - s *Service -} - -func NewOrganizationsInspectTemplatesService(s *Service) *OrganizationsInspectTemplatesService { - rs := &OrganizationsInspectTemplatesService{s: s} - return rs -} - -type OrganizationsInspectTemplatesService struct { - s *Service -} - -func NewProjectsService(s *Service) *ProjectsService { - rs := &ProjectsService{s: s} - rs.Content = NewProjectsContentService(s) - rs.DataSource = NewProjectsDataSourceService(s) - rs.DeidentifyTemplates = NewProjectsDeidentifyTemplatesService(s) - rs.DlpJobs = NewProjectsDlpJobsService(s) - rs.Image = NewProjectsImageService(s) - rs.InspectTemplates = NewProjectsInspectTemplatesService(s) - rs.JobTriggers = NewProjectsJobTriggersService(s) - return rs -} - -type ProjectsService struct { - s *Service - - Content *ProjectsContentService - - DataSource *ProjectsDataSourceService - - DeidentifyTemplates *ProjectsDeidentifyTemplatesService - - DlpJobs *ProjectsDlpJobsService - - Image *ProjectsImageService - - InspectTemplates *ProjectsInspectTemplatesService - - JobTriggers *ProjectsJobTriggersService -} - -func NewProjectsContentService(s *Service) *ProjectsContentService { - rs := &ProjectsContentService{s: s} - return rs -} - -type ProjectsContentService struct { - s *Service -} - -func NewProjectsDataSourceService(s *Service) *ProjectsDataSourceService { - rs := &ProjectsDataSourceService{s: s} - return rs -} - -type ProjectsDataSourceService struct { - s *Service -} - -func NewProjectsDeidentifyTemplatesService(s *Service) *ProjectsDeidentifyTemplatesService { - rs := &ProjectsDeidentifyTemplatesService{s: s} - return rs -} - -type ProjectsDeidentifyTemplatesService struct { - s *Service -} - -func NewProjectsDlpJobsService(s *Service) *ProjectsDlpJobsService { - rs := &ProjectsDlpJobsService{s: s} - return rs -} - -type ProjectsDlpJobsService struct { - s *Service -} - -func NewProjectsImageService(s *Service) *ProjectsImageService { - rs := &ProjectsImageService{s: s} - return rs -} - -type ProjectsImageService struct { - s *Service -} - -func NewProjectsInspectTemplatesService(s *Service) *ProjectsInspectTemplatesService { - rs := &ProjectsInspectTemplatesService{s: s} - return rs -} - -type ProjectsInspectTemplatesService struct { - s *Service -} - -func NewProjectsJobTriggersService(s *Service) *ProjectsJobTriggersService { - rs := &ProjectsJobTriggersService{s: s} - return rs -} - -type ProjectsJobTriggersService struct { - s *Service -} - -// GooglePrivacyDlpV2beta1AuxiliaryTable: An auxiliary table contains -// statistical information on the relative -// frequency of different quasi-identifiers values. It has one or -// several -// quasi-identifiers columns, and one column that indicates the -// relative -// frequency of each quasi-identifier tuple. -// If a tuple is present in the data but not in the auxiliary table, -// the -// corresponding relative frequency is assumed to be zero (and thus, -// the -// tuple is highly reidentifiable). -type GooglePrivacyDlpV2beta1AuxiliaryTable struct { - // QuasiIds: Quasi-identifier columns. [required] - QuasiIds []*GooglePrivacyDlpV2beta1QuasiIdField `json:"quasiIds,omitempty"` - - // RelativeFrequency: The relative frequency column must contain a - // floating-point number - // between 0 and 1 (inclusive). Null values are assumed to be - // zero. - // [required] - RelativeFrequency *GooglePrivacyDlpV2beta1FieldId `json:"relativeFrequency,omitempty"` - - // Table: Auxiliary table location. [required] - Table *GooglePrivacyDlpV2beta1BigQueryTable `json:"table,omitempty"` - - // ForceSendFields is a list of field names (e.g. "QuasiIds") 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. "QuasiIds") 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 *GooglePrivacyDlpV2beta1AuxiliaryTable) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta1AuxiliaryTable - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta1BigQueryOptions: Options defining BigQuery -// table and row identifiers. -type GooglePrivacyDlpV2beta1BigQueryOptions struct { - // IdentifyingFields: References to fields uniquely identifying rows - // within the table. - // Nested fields in the format, like `person.birthdate.year`, are - // allowed. - IdentifyingFields []*GooglePrivacyDlpV2beta1FieldId `json:"identifyingFields,omitempty"` - - // TableReference: Complete BigQuery table reference. - TableReference *GooglePrivacyDlpV2beta1BigQueryTable `json:"tableReference,omitempty"` - - // ForceSendFields is a list of field names (e.g. "IdentifyingFields") - // 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. "IdentifyingFields") 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 *GooglePrivacyDlpV2beta1BigQueryOptions) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta1BigQueryOptions - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta1BigQueryTable: Message defining the location -// of a BigQuery table. A table is uniquely -// identified by its project_id, dataset_id, and table_name. Within a -// query -// a table is often referenced with a string in the format -// of: -// `<project_id>:<dataset_id>.<table_id>` -// or -// `<project_id>.<dataset_id>.<table_id>`. -type GooglePrivacyDlpV2beta1BigQueryTable struct { - // DatasetId: Dataset ID of the table. - DatasetId string `json:"datasetId,omitempty"` - - // ProjectId: The Google Cloud Platform project ID of the project - // containing the table. - // If omitted, project ID is inferred from the API call. - ProjectId string `json:"projectId,omitempty"` - - // TableId: Name of the table. - TableId string `json:"tableId,omitempty"` - - // ForceSendFields is a list of field names (e.g. "DatasetId") 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. "DatasetId") 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 *GooglePrivacyDlpV2beta1BigQueryTable) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta1BigQueryTable - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta1CategoricalStatsConfig: Compute numerical -// stats over an individual column, including -// number of distinct values and value count distribution. -type GooglePrivacyDlpV2beta1CategoricalStatsConfig struct { - // Field: Field to compute categorical stats on. All column types - // are - // supported except for arrays and structs. However, it may be - // more - // informative to use NumericalStats when the field type is - // supported, - // depending on the data. - Field *GooglePrivacyDlpV2beta1FieldId `json:"field,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Field") 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. "Field") 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 *GooglePrivacyDlpV2beta1CategoricalStatsConfig) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta1CategoricalStatsConfig - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta1CategoricalStatsHistogramBucket: Histogram -// bucket of value frequencies in the column. -type GooglePrivacyDlpV2beta1CategoricalStatsHistogramBucket struct { - // BucketSize: Total number of records in this bucket. - BucketSize int64 `json:"bucketSize,omitempty,string"` - - // BucketValues: Sample of value frequencies in this bucket. The total - // number of - // values returned per bucket is capped at 20. - BucketValues []*GooglePrivacyDlpV2beta1ValueFrequency `json:"bucketValues,omitempty"` - - // ValueFrequencyLowerBound: Lower bound on the value frequency of the - // values in this bucket. - ValueFrequencyLowerBound int64 `json:"valueFrequencyLowerBound,omitempty,string"` - - // ValueFrequencyUpperBound: Upper bound on the value frequency of the - // values in this bucket. - ValueFrequencyUpperBound int64 `json:"valueFrequencyUpperBound,omitempty,string"` - - // ForceSendFields is a list of field names (e.g. "BucketSize") 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. "BucketSize") 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 *GooglePrivacyDlpV2beta1CategoricalStatsHistogramBucket) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta1CategoricalStatsHistogramBucket - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta1CategoricalStatsResult: Result of the -// categorical stats computation. -type GooglePrivacyDlpV2beta1CategoricalStatsResult struct { - // ValueFrequencyHistogramBuckets: Histogram of value frequencies in the - // column. - ValueFrequencyHistogramBuckets []*GooglePrivacyDlpV2beta1CategoricalStatsHistogramBucket `json:"valueFrequencyHistogramBuckets,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "ValueFrequencyHistogramBuckets") 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. - // "ValueFrequencyHistogramBuckets") 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 *GooglePrivacyDlpV2beta1CategoricalStatsResult) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta1CategoricalStatsResult - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta1CloudStorageOptions: Options defining a file -// or a set of files (path ending with *) within -// a Google Cloud Storage bucket. -type GooglePrivacyDlpV2beta1CloudStorageOptions struct { - FileSet *GooglePrivacyDlpV2beta1FileSet `json:"fileSet,omitempty"` - - // ForceSendFields is a list of field names (e.g. "FileSet") 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. "FileSet") 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 *GooglePrivacyDlpV2beta1CloudStorageOptions) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta1CloudStorageOptions - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta1CloudStoragePath: A location in Cloud Storage. -type GooglePrivacyDlpV2beta1CloudStoragePath struct { - // Path: The url, in the format of `gs://bucket/<path>`. - Path string `json:"path,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Path") 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. "Path") 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 *GooglePrivacyDlpV2beta1CloudStoragePath) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta1CloudStoragePath - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta1CustomInfoType: Custom information type -// provided by the user. Used to find domain-specific -// sensitive information configurable to the data in question. -type GooglePrivacyDlpV2beta1CustomInfoType struct { - // Dictionary: Dictionary-based custom info type. - Dictionary *GooglePrivacyDlpV2beta1Dictionary `json:"dictionary,omitempty"` - - // InfoType: Info type configuration. All custom info types must have - // configurations - // that do not conflict with built-in info types or other custom info - // types. - InfoType *GooglePrivacyDlpV2beta1InfoType `json:"infoType,omitempty"` - - // SurrogateType: Surrogate info type. - SurrogateType *GooglePrivacyDlpV2beta1SurrogateType `json:"surrogateType,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Dictionary") 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. "Dictionary") 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 *GooglePrivacyDlpV2beta1CustomInfoType) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta1CustomInfoType - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta1DatastoreOptions: Options defining a data set -// within Google Cloud Datastore. -type GooglePrivacyDlpV2beta1DatastoreOptions struct { - // Kind: The kind to process. - Kind *GooglePrivacyDlpV2beta1KindExpression `json:"kind,omitempty"` - - // PartitionId: A partition ID identifies a grouping of entities. The - // grouping is always - // by project and namespace, however the namespace ID may be empty. - PartitionId *GooglePrivacyDlpV2beta1PartitionId `json:"partitionId,omitempty"` - - // Projection: Properties to scan. If none are specified, all properties - // will be scanned - // by default. - Projection []*GooglePrivacyDlpV2beta1Projection `json:"projection,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Kind") 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. "Kind") 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 *GooglePrivacyDlpV2beta1DatastoreOptions) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta1DatastoreOptions - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta1Dictionary: Custom information type based on a -// dictionary of words or phrases. This can -// be used to match sensitive information specific to the data, such as -// a list -// of employee IDs or job titles. -// -// Dictionary words are case-insensitive and all characters other than -// letters -// and digits in the unicode [Basic -// Multilingual -// Plane](https://en.wikipedia.org/wiki/Plane_%28Unicode%29# -// Basic_Multilingual_Plane) -// will be replaced with whitespace when scanning for matches, so -// the -// dictionary phrase "Sam Johnson" will match all three phrases "sam -// johnson", -// "Sam, Johnson", and "Sam (Johnson)". Additionally, the -// characters -// surrounding any match must be of a different type than the -// adjacent -// characters within the word, so letters must be next to non-letters -// and -// digits next to non-digits. For example, the dictionary word "jen" -// will -// match the first three letters of the text "jen123" but will return -// no -// matches for "jennifer". -// -// Dictionary words containing a large number of characters that are -// not -// letters or digits may result in unexpected findings because such -// characters -// are treated as whitespace. -type GooglePrivacyDlpV2beta1Dictionary struct { - // WordList: List of words or phrases to search for. - WordList *GooglePrivacyDlpV2beta1WordList `json:"wordList,omitempty"` - - // ForceSendFields is a list of field names (e.g. "WordList") 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. "WordList") 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 *GooglePrivacyDlpV2beta1Dictionary) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta1Dictionary - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta1EntityId: An entity in a dataset is a field or -// set of fields that correspond to a -// single person. For example, in medical records the `EntityId` might -// be -// a patient identifier, or for financial records it might be an -// account -// identifier. This message is used when generalizations or analysis -// must be -// consistent across multiple rows pertaining to the same entity. -type GooglePrivacyDlpV2beta1EntityId struct { - // Field: Composite key indicating which field contains the entity - // identifier. - Field *GooglePrivacyDlpV2beta1FieldId `json:"field,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Field") 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. "Field") 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 *GooglePrivacyDlpV2beta1EntityId) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta1EntityId - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta1FieldId: General identifier of a data field in -// a storage service. -type GooglePrivacyDlpV2beta1FieldId struct { - // ColumnName: Name describing the field. - ColumnName string `json:"columnName,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ColumnName") 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. "ColumnName") 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 *GooglePrivacyDlpV2beta1FieldId) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta1FieldId - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta1FileSet: Set of files to scan. -type GooglePrivacyDlpV2beta1FileSet struct { - // Url: The url, in the format `gs://<bucket>/<path>`. Trailing wildcard - // in the - // path is allowed. - Url string `json:"url,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Url") 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. "Url") 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 *GooglePrivacyDlpV2beta1FileSet) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta1FileSet - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta1InfoType: Type of information detected by the -// API. -type GooglePrivacyDlpV2beta1InfoType struct { - // Name: Name of the information type. - Name string `json:"name,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Name") 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. "Name") 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 *GooglePrivacyDlpV2beta1InfoType) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta1InfoType - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta1InfoTypeLimit: Max findings configuration per -// info type, per content item or long running -// operation. -type GooglePrivacyDlpV2beta1InfoTypeLimit struct { - // InfoType: Type of information the findings limit applies to. Only one - // limit per - // info_type should be provided. If InfoTypeLimit does not have - // an - // info_type, the DLP API applies the limit against all info_types that - // are - // found but not specified in another InfoTypeLimit. - InfoType *GooglePrivacyDlpV2beta1InfoType `json:"infoType,omitempty"` - - // MaxFindings: Max findings limit for the given infoType. - MaxFindings int64 `json:"maxFindings,omitempty"` - - // ForceSendFields is a list of field names (e.g. "InfoType") 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. "InfoType") 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 *GooglePrivacyDlpV2beta1InfoTypeLimit) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta1InfoTypeLimit - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta1InfoTypeStatistics: Statistics regarding a -// specific InfoType. -type GooglePrivacyDlpV2beta1InfoTypeStatistics struct { - // Count: Number of findings for this info type. - Count int64 `json:"count,omitempty,string"` - - // InfoType: The type of finding this stat is for. - InfoType *GooglePrivacyDlpV2beta1InfoType `json:"infoType,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Count") 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. "Count") 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 *GooglePrivacyDlpV2beta1InfoTypeStatistics) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta1InfoTypeStatistics - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta1InspectConfig: Configuration description of -// the scanning process. -// When used with redactContent only info_types and min_likelihood are -// currently -// used. -type GooglePrivacyDlpV2beta1InspectConfig struct { - // CustomInfoTypes: Custom info types provided by the user. - CustomInfoTypes []*GooglePrivacyDlpV2beta1CustomInfoType `json:"customInfoTypes,omitempty"` - - // ExcludeTypes: When true, excludes type information of the findings. - ExcludeTypes bool `json:"excludeTypes,omitempty"` - - // IncludeQuote: When true, a contextual quote from the data that - // triggered a finding is - // included in the response; see Finding.quote. - IncludeQuote bool `json:"includeQuote,omitempty"` - - // InfoTypeLimits: Configuration of findings limit given for specified - // info types. - InfoTypeLimits []*GooglePrivacyDlpV2beta1InfoTypeLimit `json:"infoTypeLimits,omitempty"` - - // InfoTypes: Restricts what info_types to look for. The values must - // correspond to - // InfoType values returned by ListInfoTypes or found in - // documentation. - // Empty info_types runs all enabled detectors. - InfoTypes []*GooglePrivacyDlpV2beta1InfoType `json:"infoTypes,omitempty"` - - // MaxFindings: Limits the number of findings per content item or long - // running operation. - MaxFindings int64 `json:"maxFindings,omitempty"` - - // MinLikelihood: Only returns findings equal or above this threshold. - // - // Possible values: - // "LIKELIHOOD_UNSPECIFIED" - Default value; information with all - // likelihoods is included. - // "VERY_UNLIKELY" - Few matching elements. - // "UNLIKELY" - // "POSSIBLE" - Some matching elements. - // "LIKELY" - // "VERY_LIKELY" - Many matching elements. - MinLikelihood string `json:"minLikelihood,omitempty"` - - // ForceSendFields is a list of field names (e.g. "CustomInfoTypes") 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. "CustomInfoTypes") 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 *GooglePrivacyDlpV2beta1InspectConfig) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta1InspectConfig - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta1InspectOperationMetadata: Metadata returned -// within GetOperation for an inspect request. -type GooglePrivacyDlpV2beta1InspectOperationMetadata struct { - // CreateTime: The time which this request was started. - CreateTime string `json:"createTime,omitempty"` - - InfoTypeStats []*GooglePrivacyDlpV2beta1InfoTypeStatistics `json:"infoTypeStats,omitempty"` - - // ProcessedBytes: Total size in bytes that were processed. - ProcessedBytes int64 `json:"processedBytes,omitempty,string"` - - // RequestInspectConfig: The inspect config used to create the - // Operation. - RequestInspectConfig *GooglePrivacyDlpV2beta1InspectConfig `json:"requestInspectConfig,omitempty"` - - // RequestOutputConfig: Optional location to store findings. - RequestOutputConfig *GooglePrivacyDlpV2beta1OutputStorageConfig `json:"requestOutputConfig,omitempty"` - - // RequestStorageConfig: The storage config used to create the - // Operation. - RequestStorageConfig *GooglePrivacyDlpV2beta1StorageConfig `json:"requestStorageConfig,omitempty"` - - // TotalEstimatedBytes: Estimate of the number of bytes to process. - TotalEstimatedBytes int64 `json:"totalEstimatedBytes,omitempty,string"` - - // ForceSendFields is a list of field names (e.g. "CreateTime") 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. "CreateTime") 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 *GooglePrivacyDlpV2beta1InspectOperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta1InspectOperationMetadata - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta1InspectOperationResult: The operational data. -type GooglePrivacyDlpV2beta1InspectOperationResult struct { - // Name: The server-assigned name, which is only unique within the same - // service that - // originally returns it. If you use the default HTTP mapping, - // the - // `name` should have the format of `inspect/results/{id}`. - Name string `json:"name,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Name") 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. "Name") 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 *GooglePrivacyDlpV2beta1InspectOperationResult) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta1InspectOperationResult - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta1KAnonymityConfig: k-anonymity metric, used for -// analysis of reidentification risk. -type GooglePrivacyDlpV2beta1KAnonymityConfig struct { - // EntityId: Optional message indicating that each distinct entity_id - // should not - // contribute to the k-anonymity count more than once per equivalence - // class. - // If an entity_id appears on several rows with different - // quasi-identifier - // tuples, it will contribute to each count exactly once. - // - // This can lead to unexpected results. Consider a table where ID 1 - // is - // associated to quasi-identifier "foo", ID 2 to "bar", and ID 3 to - // *both* - // quasi-identifiers "foo" and "bar" (on separate rows), and where this - // ID - // is used as entity_id. Then, the anonymity value associated to ID 3 - // will - // be 2, even if it is the only ID to be associated to both values "foo" - // and - // "bar". - EntityId *GooglePrivacyDlpV2beta1EntityId `json:"entityId,omitempty"` - - // QuasiIds: Set of fields to compute k-anonymity over. When multiple - // fields are - // specified, they are considered a single composite key. Structs - // and - // repeated data types are not supported; however, nested fields - // are - // supported so long as they are not structs themselves or nested - // within - // a repeated field. - QuasiIds []*GooglePrivacyDlpV2beta1FieldId `json:"quasiIds,omitempty"` - - // ForceSendFields is a list of field names (e.g. "EntityId") 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. "EntityId") 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 *GooglePrivacyDlpV2beta1KAnonymityConfig) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta1KAnonymityConfig - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta1KAnonymityEquivalenceClass: The set of -// columns' values that share the same k-anonymity value. -type GooglePrivacyDlpV2beta1KAnonymityEquivalenceClass struct { - // EquivalenceClassSize: Size of the equivalence class, for example - // number of rows with the - // above set of values. - EquivalenceClassSize int64 `json:"equivalenceClassSize,omitempty,string"` - - // QuasiIdsValues: Set of values defining the equivalence class. One - // value per - // quasi-identifier column in the original KAnonymity metric - // message. - // The order is always the same as the original request. - QuasiIdsValues []*GooglePrivacyDlpV2beta1Value `json:"quasiIdsValues,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "EquivalenceClassSize") 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. "EquivalenceClassSize") 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 *GooglePrivacyDlpV2beta1KAnonymityEquivalenceClass) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta1KAnonymityEquivalenceClass - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta1KAnonymityHistogramBucket: Histogram bucket of -// equivalence class sizes in the table. -type GooglePrivacyDlpV2beta1KAnonymityHistogramBucket struct { - // BucketSize: Total number of records in this bucket. - BucketSize int64 `json:"bucketSize,omitempty,string"` - - // BucketValues: Sample of equivalence classes in this bucket. The total - // number of - // classes returned per bucket is capped at 20. - BucketValues []*GooglePrivacyDlpV2beta1KAnonymityEquivalenceClass `json:"bucketValues,omitempty"` - - // EquivalenceClassSizeLowerBound: Lower bound on the size of the - // equivalence classes in this bucket. - EquivalenceClassSizeLowerBound int64 `json:"equivalenceClassSizeLowerBound,omitempty,string"` - - // EquivalenceClassSizeUpperBound: Upper bound on the size of the - // equivalence classes in this bucket. - EquivalenceClassSizeUpperBound int64 `json:"equivalenceClassSizeUpperBound,omitempty,string"` - - // ForceSendFields is a list of field names (e.g. "BucketSize") 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. "BucketSize") 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 *GooglePrivacyDlpV2beta1KAnonymityHistogramBucket) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta1KAnonymityHistogramBucket - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta1KAnonymityResult: Result of the k-anonymity -// computation. -type GooglePrivacyDlpV2beta1KAnonymityResult struct { - // EquivalenceClassHistogramBuckets: Histogram of k-anonymity - // equivalence classes. - EquivalenceClassHistogramBuckets []*GooglePrivacyDlpV2beta1KAnonymityHistogramBucket `json:"equivalenceClassHistogramBuckets,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "EquivalenceClassHistogramBuckets") 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. - // "EquivalenceClassHistogramBuckets") 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 *GooglePrivacyDlpV2beta1KAnonymityResult) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta1KAnonymityResult - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta1KMapEstimationConfig: Reidentifiability -// metric. This corresponds to a risk model similar to what -// is called "journalist risk" in the literature, except the attack -// dataset is -// statistically modeled instead of being perfectly known. This can be -// done -// using publicly available data (like the US Census), or using a -// custom -// statistical model (indicated as one or several BigQuery tables), or -// by -// extrapolating from the distribution of values in the input dataset. -type GooglePrivacyDlpV2beta1KMapEstimationConfig struct { - // AuxiliaryTables: Several auxiliary tables can be used in the - // analysis. Each custom_tag - // used to tag a quasi-identifiers column must appear in exactly one - // column - // of one auxiliary table. - AuxiliaryTables []*GooglePrivacyDlpV2beta1AuxiliaryTable `json:"auxiliaryTables,omitempty"` - - // QuasiIds: Fields considered to be quasi-identifiers. No two columns - // can have the - // same tag. [required] - QuasiIds []*GooglePrivacyDlpV2beta1TaggedField `json:"quasiIds,omitempty"` - - // RegionCode: ISO 3166-1 alpha-2 region code to use in the statistical - // modeling. - // Required if no column is tagged with a region-specific InfoType - // (like - // US_ZIP_5) or a region code. - RegionCode string `json:"regionCode,omitempty"` - - // ForceSendFields is a list of field names (e.g. "AuxiliaryTables") 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. "AuxiliaryTables") 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 *GooglePrivacyDlpV2beta1KMapEstimationConfig) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta1KMapEstimationConfig - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta1KMapEstimationHistogramBucket: A -// KMapEstimationHistogramBucket message with the following values: -// min_anonymity: 3 -// max_anonymity: 5 -// frequency: 42 -// means that there are 42 records whose quasi-identifier values -// correspond -// to 3, 4 or 5 people in the overlying population. An important -// particular -// case is when min_anonymity = max_anonymity = 1: the frequency field -// then -// corresponds to the number of uniquely identifiable records. -type GooglePrivacyDlpV2beta1KMapEstimationHistogramBucket struct { - // BucketSize: Number of records within these anonymity bounds. - BucketSize int64 `json:"bucketSize,omitempty,string"` - - // BucketValues: Sample of quasi-identifier tuple values in this bucket. - // The total - // number of classes returned per bucket is capped at 20. - BucketValues []*GooglePrivacyDlpV2beta1KMapEstimationQuasiIdValues `json:"bucketValues,omitempty"` - - // MaxAnonymity: Always greater than or equal to min_anonymity. - MaxAnonymity int64 `json:"maxAnonymity,omitempty,string"` - - // MinAnonymity: Always positive. - MinAnonymity int64 `json:"minAnonymity,omitempty,string"` - - // ForceSendFields is a list of field names (e.g. "BucketSize") 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. "BucketSize") 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 *GooglePrivacyDlpV2beta1KMapEstimationHistogramBucket) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta1KMapEstimationHistogramBucket - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta1KMapEstimationQuasiIdValues: A tuple of values -// for the quasi-identifier columns. -type GooglePrivacyDlpV2beta1KMapEstimationQuasiIdValues struct { - // EstimatedAnonymity: The estimated anonymity for these - // quasi-identifier values. - EstimatedAnonymity int64 `json:"estimatedAnonymity,omitempty,string"` - - // QuasiIdsValues: The quasi-identifier values. - QuasiIdsValues []*GooglePrivacyDlpV2beta1Value `json:"quasiIdsValues,omitempty"` - - // ForceSendFields is a list of field names (e.g. "EstimatedAnonymity") - // 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. "EstimatedAnonymity") 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 *GooglePrivacyDlpV2beta1KMapEstimationQuasiIdValues) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta1KMapEstimationQuasiIdValues - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta1KMapEstimationResult: Result of the -// reidentifiability analysis. Note that these results are -// an -// estimation, not exact values. -type GooglePrivacyDlpV2beta1KMapEstimationResult struct { - // KMapEstimationHistogram: The intervals [min_anonymity, max_anonymity] - // do not overlap. If a value - // doesn't correspond to any such interval, the associated frequency - // is - // zero. For example, the following records: - // {min_anonymity: 1, max_anonymity: 1, frequency: 17} - // {min_anonymity: 2, max_anonymity: 3, frequency: 42} - // {min_anonymity: 5, max_anonymity: 10, frequency: 99} - // mean that there are no record with an estimated anonymity of 4, 5, - // or - // larger than 10. - KMapEstimationHistogram []*GooglePrivacyDlpV2beta1KMapEstimationHistogramBucket `json:"kMapEstimationHistogram,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "KMapEstimationHistogram") 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. "KMapEstimationHistogram") - // 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 *GooglePrivacyDlpV2beta1KMapEstimationResult) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta1KMapEstimationResult - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta1KindExpression: A representation of a -// Datastore kind. -type GooglePrivacyDlpV2beta1KindExpression struct { - // Name: The name of the kind. - Name string `json:"name,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Name") 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. "Name") 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 *GooglePrivacyDlpV2beta1KindExpression) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta1KindExpression - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta1LDiversityConfig: l-diversity metric, used for -// analysis of reidentification risk. -type GooglePrivacyDlpV2beta1LDiversityConfig struct { - // QuasiIds: Set of quasi-identifiers indicating how equivalence classes - // are - // defined for the l-diversity computation. When multiple fields - // are - // specified, they are considered a single composite key. - QuasiIds []*GooglePrivacyDlpV2beta1FieldId `json:"quasiIds,omitempty"` - - // SensitiveAttribute: Sensitive field for computing the l-value. - SensitiveAttribute *GooglePrivacyDlpV2beta1FieldId `json:"sensitiveAttribute,omitempty"` - - // ForceSendFields is a list of field names (e.g. "QuasiIds") 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. "QuasiIds") 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 *GooglePrivacyDlpV2beta1LDiversityConfig) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta1LDiversityConfig - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta1LDiversityEquivalenceClass: The set of -// columns' values that share the same l-diversity value. -type GooglePrivacyDlpV2beta1LDiversityEquivalenceClass struct { - // EquivalenceClassSize: Size of the k-anonymity equivalence class. - EquivalenceClassSize int64 `json:"equivalenceClassSize,omitempty,string"` - - // NumDistinctSensitiveValues: Number of distinct sensitive values in - // this equivalence class. - NumDistinctSensitiveValues int64 `json:"numDistinctSensitiveValues,omitempty,string"` - - // QuasiIdsValues: Quasi-identifier values defining the k-anonymity - // equivalence - // class. The order is always the same as the original request. - QuasiIdsValues []*GooglePrivacyDlpV2beta1Value `json:"quasiIdsValues,omitempty"` - - // TopSensitiveValues: Estimated frequencies of top sensitive values. - TopSensitiveValues []*GooglePrivacyDlpV2beta1ValueFrequency `json:"topSensitiveValues,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "EquivalenceClassSize") 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. "EquivalenceClassSize") 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 *GooglePrivacyDlpV2beta1LDiversityEquivalenceClass) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta1LDiversityEquivalenceClass - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta1LDiversityHistogramBucket: Histogram bucket of -// sensitive value frequencies in the table. -type GooglePrivacyDlpV2beta1LDiversityHistogramBucket struct { - // BucketSize: Total number of records in this bucket. - BucketSize int64 `json:"bucketSize,omitempty,string"` - - // BucketValues: Sample of equivalence classes in this bucket. The total - // number of - // classes returned per bucket is capped at 20. - BucketValues []*GooglePrivacyDlpV2beta1LDiversityEquivalenceClass `json:"bucketValues,omitempty"` - - // SensitiveValueFrequencyLowerBound: Lower bound on the sensitive value - // frequencies of the equivalence - // classes in this bucket. - SensitiveValueFrequencyLowerBound int64 `json:"sensitiveValueFrequencyLowerBound,omitempty,string"` - - // SensitiveValueFrequencyUpperBound: Upper bound on the sensitive value - // frequencies of the equivalence - // classes in this bucket. - SensitiveValueFrequencyUpperBound int64 `json:"sensitiveValueFrequencyUpperBound,omitempty,string"` - - // ForceSendFields is a list of field names (e.g. "BucketSize") 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. "BucketSize") 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 *GooglePrivacyDlpV2beta1LDiversityHistogramBucket) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta1LDiversityHistogramBucket - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta1LDiversityResult: Result of the l-diversity -// computation. -type GooglePrivacyDlpV2beta1LDiversityResult struct { - // SensitiveValueFrequencyHistogramBuckets: Histogram of l-diversity - // equivalence class sensitive value frequencies. - SensitiveValueFrequencyHistogramBuckets []*GooglePrivacyDlpV2beta1LDiversityHistogramBucket `json:"sensitiveValueFrequencyHistogramBuckets,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "SensitiveValueFrequencyHistogramBuckets") 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. - // "SensitiveValueFrequencyHistogramBuckets") 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 *GooglePrivacyDlpV2beta1LDiversityResult) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta1LDiversityResult - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta1NumericalStatsConfig: Compute numerical stats -// over an individual column, including -// min, max, and quantiles. -type GooglePrivacyDlpV2beta1NumericalStatsConfig struct { - // Field: Field to compute numerical stats on. Supported types - // are - // integer, float, date, datetime, timestamp, time. - Field *GooglePrivacyDlpV2beta1FieldId `json:"field,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Field") 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. "Field") 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 *GooglePrivacyDlpV2beta1NumericalStatsConfig) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta1NumericalStatsConfig - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta1NumericalStatsResult: Result of the numerical -// stats computation. -type GooglePrivacyDlpV2beta1NumericalStatsResult struct { - // MaxValue: Maximum value appearing in the column. - MaxValue *GooglePrivacyDlpV2beta1Value `json:"maxValue,omitempty"` - - // MinValue: Minimum value appearing in the column. - MinValue *GooglePrivacyDlpV2beta1Value `json:"minValue,omitempty"` - - // QuantileValues: List of 99 values that partition the set of field - // values into 100 equal - // sized buckets. - QuantileValues []*GooglePrivacyDlpV2beta1Value `json:"quantileValues,omitempty"` - - // ForceSendFields is a list of field names (e.g. "MaxValue") 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. "MaxValue") 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 *GooglePrivacyDlpV2beta1NumericalStatsResult) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta1NumericalStatsResult - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta1OutputStorageConfig: Cloud repository for -// storing output. -type GooglePrivacyDlpV2beta1OutputStorageConfig struct { - // StoragePath: The path to a Google Cloud Storage location to store - // output. - // The bucket must already exist and - // the Google APIs service account for DLP must have write permission - // to - // write to the given bucket. - // Results are split over multiple csv files with each file name - // matching - // the pattern "[operation_id]_[count].csv", for - // example - // `3094877188788974909_1.csv`. The `operation_id` matches - // the - // identifier for the Operation, and the `count` is a counter used - // for - // tracking the number of files written. - // - // The CSV file(s) contain the following columns regardless of storage - // type - // scanned: - // - id - // - info_type - // - likelihood - // - byte size of finding - // - quote - // - timestamp - // - // For Cloud Storage the next columns are: - // - // - file_path - // - start_offset - // - // For Cloud Datastore the next columns are: - // - // - project_id - // - namespace_id - // - path - // - column_name - // - offset - // - // For BigQuery the next columns are: - // - // - row_number - // - project_id - // - dataset_id - // - table_id - StoragePath *GooglePrivacyDlpV2beta1CloudStoragePath `json:"storagePath,omitempty"` - - // Table: Store findings in a new table in the dataset. - Table *GooglePrivacyDlpV2beta1BigQueryTable `json:"table,omitempty"` - - // ForceSendFields is a list of field names (e.g. "StoragePath") 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. "StoragePath") 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 *GooglePrivacyDlpV2beta1OutputStorageConfig) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta1OutputStorageConfig - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta1PartitionId: Datastore partition ID. -// A partition ID identifies a grouping of entities. The grouping is -// always -// by project and namespace, however the namespace ID may be empty. -// -// A partition ID contains several dimensions: -// project ID and namespace ID. -type GooglePrivacyDlpV2beta1PartitionId struct { - // NamespaceId: If not empty, the ID of the namespace to which the - // entities belong. - NamespaceId string `json:"namespaceId,omitempty"` - - // ProjectId: The ID of the project to which the entities belong. - ProjectId string `json:"projectId,omitempty"` - - // ForceSendFields is a list of field names (e.g. "NamespaceId") 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. "NamespaceId") 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 *GooglePrivacyDlpV2beta1PartitionId) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta1PartitionId - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta1PrivacyMetric: Privacy metric to compute for -// reidentification risk analysis. -type GooglePrivacyDlpV2beta1PrivacyMetric struct { - CategoricalStatsConfig *GooglePrivacyDlpV2beta1CategoricalStatsConfig `json:"categoricalStatsConfig,omitempty"` - - KAnonymityConfig *GooglePrivacyDlpV2beta1KAnonymityConfig `json:"kAnonymityConfig,omitempty"` - - KMapEstimationConfig *GooglePrivacyDlpV2beta1KMapEstimationConfig `json:"kMapEstimationConfig,omitempty"` - - LDiversityConfig *GooglePrivacyDlpV2beta1LDiversityConfig `json:"lDiversityConfig,omitempty"` - - NumericalStatsConfig *GooglePrivacyDlpV2beta1NumericalStatsConfig `json:"numericalStatsConfig,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "CategoricalStatsConfig") 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. "CategoricalStatsConfig") - // 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 *GooglePrivacyDlpV2beta1PrivacyMetric) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta1PrivacyMetric - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta1Projection: A representation of a Datastore -// property in a projection. -type GooglePrivacyDlpV2beta1Projection struct { - // Property: The property to project. - Property *GooglePrivacyDlpV2beta1PropertyReference `json:"property,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Property") 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. "Property") 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 *GooglePrivacyDlpV2beta1Projection) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta1Projection - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta1PropertyReference: A reference to a property -// relative to the Datastore kind expressions. -type GooglePrivacyDlpV2beta1PropertyReference struct { - // Name: The name of the property. - // If name includes "."s, it may be interpreted as a property name path. - Name string `json:"name,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Name") 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. "Name") 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 *GooglePrivacyDlpV2beta1PropertyReference) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta1PropertyReference - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta1QuasiIdField: A quasi-identifier column has a -// custom_tag, used to know which column -// in the data corresponds to which column in the statistical model. -type GooglePrivacyDlpV2beta1QuasiIdField struct { - CustomTag string `json:"customTag,omitempty"` - - Field *GooglePrivacyDlpV2beta1FieldId `json:"field,omitempty"` - - // ForceSendFields is a list of field names (e.g. "CustomTag") 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. "CustomTag") 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 *GooglePrivacyDlpV2beta1QuasiIdField) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta1QuasiIdField - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta1RiskAnalysisOperationMetadata: Metadata -// returned within -// the -// [`riskAnalysis.operations.get`](/dlp/docs/reference/rest/v2beta1/r -// iskAnalysis.operations/get) -// for risk analysis. -type GooglePrivacyDlpV2beta1RiskAnalysisOperationMetadata struct { - // CreateTime: The time which this request was started. - CreateTime string `json:"createTime,omitempty"` - - // RequestedPrivacyMetric: Privacy metric to compute. - RequestedPrivacyMetric *GooglePrivacyDlpV2beta1PrivacyMetric `json:"requestedPrivacyMetric,omitempty"` - - // RequestedSourceTable: Input dataset to compute metrics over. - RequestedSourceTable *GooglePrivacyDlpV2beta1BigQueryTable `json:"requestedSourceTable,omitempty"` - - // ForceSendFields is a list of field names (e.g. "CreateTime") 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. "CreateTime") 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 *GooglePrivacyDlpV2beta1RiskAnalysisOperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta1RiskAnalysisOperationMetadata - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta1RiskAnalysisOperationResult: Result of a risk -// analysis -// [`Operation`](/dlp/docs/reference/rest/v2beta1/inspect.operat -// ions) -// request. -type GooglePrivacyDlpV2beta1RiskAnalysisOperationResult struct { - CategoricalStatsResult *GooglePrivacyDlpV2beta1CategoricalStatsResult `json:"categoricalStatsResult,omitempty"` - - KAnonymityResult *GooglePrivacyDlpV2beta1KAnonymityResult `json:"kAnonymityResult,omitempty"` - - KMapEstimationResult *GooglePrivacyDlpV2beta1KMapEstimationResult `json:"kMapEstimationResult,omitempty"` - - LDiversityResult *GooglePrivacyDlpV2beta1LDiversityResult `json:"lDiversityResult,omitempty"` - - NumericalStatsResult *GooglePrivacyDlpV2beta1NumericalStatsResult `json:"numericalStatsResult,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "CategoricalStatsResult") 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. "CategoricalStatsResult") - // 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 *GooglePrivacyDlpV2beta1RiskAnalysisOperationResult) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta1RiskAnalysisOperationResult - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta1StorageConfig: Shared message indicating Cloud -// storage type. -type GooglePrivacyDlpV2beta1StorageConfig struct { - // BigQueryOptions: BigQuery options specification. - BigQueryOptions *GooglePrivacyDlpV2beta1BigQueryOptions `json:"bigQueryOptions,omitempty"` - - // CloudStorageOptions: Google Cloud Storage options specification. - CloudStorageOptions *GooglePrivacyDlpV2beta1CloudStorageOptions `json:"cloudStorageOptions,omitempty"` - - // DatastoreOptions: Google Cloud Datastore options specification. - DatastoreOptions *GooglePrivacyDlpV2beta1DatastoreOptions `json:"datastoreOptions,omitempty"` - - // ForceSendFields is a list of field names (e.g. "BigQueryOptions") 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. "BigQueryOptions") 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 *GooglePrivacyDlpV2beta1StorageConfig) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta1StorageConfig - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta1SurrogateType: Message for detecting output -// from deidentification transformations -// such -// as -// [`CryptoReplaceFfxFpeConfig`](/dlp/docs/reference/rest/v2beta1/cont -// ent/deidentify#CryptoReplaceFfxFpeConfig). -// These types of transformations are -// those that perform pseudonymization, thereby producing a "surrogate" -// as -// output. This should be used in conjunction with a field on -// the -// transformation such as `surrogate_info_type`. This custom info type -// does -// not support the use of `detection_rules`. -type GooglePrivacyDlpV2beta1SurrogateType struct { -} - -// GooglePrivacyDlpV2beta1TaggedField: A column with a semantic tag -// attached. -type GooglePrivacyDlpV2beta1TaggedField struct { - // CustomTag: A column can be tagged with a custom tag. In this case, - // the user must - // indicate an auxiliary table that contains statistical information - // on - // the possible values of this column (below). - CustomTag string `json:"customTag,omitempty"` - - // Field: Identifies the column. [required] - Field *GooglePrivacyDlpV2beta1FieldId `json:"field,omitempty"` - - // Inferred: If no semantic tag is indicated, we infer the statistical - // model from - // the distribution of values in the input data - Inferred *GoogleProtobufEmpty `json:"inferred,omitempty"` - - // InfoType: A column can be tagged with a InfoType to use the relevant - // public - // dataset as a statistical model of population, if available. - // We - // currently support US ZIP codes, region codes, ages and genders. - InfoType *GooglePrivacyDlpV2beta1InfoType `json:"infoType,omitempty"` - - // ForceSendFields is a list of field names (e.g. "CustomTag") 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. "CustomTag") 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 *GooglePrivacyDlpV2beta1TaggedField) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta1TaggedField - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta1Value: Set of primitive values supported by -// the system. -// Note that for the purposes of inspection or transformation, the -// number -// of bytes considered to comprise a 'Value' is based on its -// representation -// as a UTF-8 encoded string. For example, if 'integer_value' is set -// to -// 123456789, the number of bytes would be counted as 9, even though -// an -// int64 only holds up to 8 bytes of data. -type GooglePrivacyDlpV2beta1Value struct { - BooleanValue bool `json:"booleanValue,omitempty"` - - DateValue *GoogleTypeDate `json:"dateValue,omitempty"` - - FloatValue float64 `json:"floatValue,omitempty"` - - IntegerValue int64 `json:"integerValue,omitempty,string"` - - StringValue string `json:"stringValue,omitempty"` - - TimeValue *GoogleTypeTimeOfDay `json:"timeValue,omitempty"` - - TimestampValue string `json:"timestampValue,omitempty"` - - // ForceSendFields is a list of field names (e.g. "BooleanValue") 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. "BooleanValue") 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 *GooglePrivacyDlpV2beta1Value) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta1Value - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *GooglePrivacyDlpV2beta1Value) UnmarshalJSON(data []byte) error { - type NoMethod GooglePrivacyDlpV2beta1Value - var s1 struct { - FloatValue gensupport.JSONFloat64 `json:"floatValue"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.FloatValue = float64(s1.FloatValue) - return nil -} - -// GooglePrivacyDlpV2beta1ValueFrequency: A value of a field, including -// its frequency. -type GooglePrivacyDlpV2beta1ValueFrequency struct { - // Count: How many times the value is contained in the field. - Count int64 `json:"count,omitempty,string"` - - // Value: A value contained in the field in question. - Value *GooglePrivacyDlpV2beta1Value `json:"value,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Count") 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. "Count") 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 *GooglePrivacyDlpV2beta1ValueFrequency) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta1ValueFrequency - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta1WordList: Message defining a list of words or -// phrases to search for in the data. -type GooglePrivacyDlpV2beta1WordList struct { - // Words: Words or phrases defining the dictionary. The dictionary must - // contain - // at least one phrase and every phrase must contain at least 2 - // characters - // that are letters or digits. [required] - Words []string `json:"words,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Words") 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. "Words") 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 *GooglePrivacyDlpV2beta1WordList) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta1WordList - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta2Action: A task to execute on the completion of -// a job. -type GooglePrivacyDlpV2beta2Action struct { - // PubSub: Publish a notification to a pubsub topic. - PubSub *GooglePrivacyDlpV2beta2PublishToPubSub `json:"pubSub,omitempty"` - - // SaveFindings: Save resulting findings in a provided location. - SaveFindings *GooglePrivacyDlpV2beta2SaveFindings `json:"saveFindings,omitempty"` - - // ForceSendFields is a list of field names (e.g. "PubSub") 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. "PubSub") 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 *GooglePrivacyDlpV2beta2Action) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta2Action - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta2AnalyzeDataSourceRiskDetails: Result of a risk -// analysis operation request. -type GooglePrivacyDlpV2beta2AnalyzeDataSourceRiskDetails struct { - CategoricalStatsResult *GooglePrivacyDlpV2beta2CategoricalStatsResult `json:"categoricalStatsResult,omitempty"` - - KAnonymityResult *GooglePrivacyDlpV2beta2KAnonymityResult `json:"kAnonymityResult,omitempty"` - - KMapEstimationResult *GooglePrivacyDlpV2beta2KMapEstimationResult `json:"kMapEstimationResult,omitempty"` - - LDiversityResult *GooglePrivacyDlpV2beta2LDiversityResult `json:"lDiversityResult,omitempty"` - - NumericalStatsResult *GooglePrivacyDlpV2beta2NumericalStatsResult `json:"numericalStatsResult,omitempty"` - - // RequestedPrivacyMetric: Privacy metric to compute. - RequestedPrivacyMetric *GooglePrivacyDlpV2beta2PrivacyMetric `json:"requestedPrivacyMetric,omitempty"` - - // RequestedSourceTable: Input dataset to compute metrics over. - RequestedSourceTable *GooglePrivacyDlpV2beta2BigQueryTable `json:"requestedSourceTable,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "CategoricalStatsResult") 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. "CategoricalStatsResult") - // 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 *GooglePrivacyDlpV2beta2AnalyzeDataSourceRiskDetails) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta2AnalyzeDataSourceRiskDetails - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta2AnalyzeDataSourceRiskRequest: Request for -// creating a risk analysis DlpJob. -type GooglePrivacyDlpV2beta2AnalyzeDataSourceRiskRequest struct { - // JobConfig: Configuration for this risk analysis job. - JobConfig *GooglePrivacyDlpV2beta2RiskAnalysisJobConfig `json:"jobConfig,omitempty"` - - // JobId: Optional job ID to use for the created job. If not provided, a - // job ID will - // automatically be generated. Must be unique within the project. The - // job ID - // can contain uppercase and lowercase letters, numbers, and hyphens; - // that is, - // it must match the regular expression: `[a-zA-Z\\d-]+`. The maximum - // length - // is 100 characters. Can be empty to allow the system to generate one. - JobId string `json:"jobId,omitempty"` - - // ForceSendFields is a list of field names (e.g. "JobConfig") 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. "JobConfig") 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 *GooglePrivacyDlpV2beta2AnalyzeDataSourceRiskRequest) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta2AnalyzeDataSourceRiskRequest - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta2AuxiliaryTable: An auxiliary table contains -// statistical information on the relative -// frequency of different quasi-identifiers values. It has one or -// several -// quasi-identifiers columns, and one column that indicates the -// relative -// frequency of each quasi-identifier tuple. -// If a tuple is present in the data but not in the auxiliary table, -// the -// corresponding relative frequency is assumed to be zero (and thus, -// the -// tuple is highly reidentifiable). -type GooglePrivacyDlpV2beta2AuxiliaryTable struct { - // QuasiIds: Quasi-identifier columns. [required] - QuasiIds []*GooglePrivacyDlpV2beta2QuasiIdField `json:"quasiIds,omitempty"` - - // RelativeFrequency: The relative frequency column must contain a - // floating-point number - // between 0 and 1 (inclusive). Null values are assumed to be - // zero. - // [required] - RelativeFrequency *GooglePrivacyDlpV2beta2FieldId `json:"relativeFrequency,omitempty"` - - // Table: Auxiliary table location. [required] - Table *GooglePrivacyDlpV2beta2BigQueryTable `json:"table,omitempty"` - - // ForceSendFields is a list of field names (e.g. "QuasiIds") 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. "QuasiIds") 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 *GooglePrivacyDlpV2beta2AuxiliaryTable) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta2AuxiliaryTable - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta2BigQueryKey: Row key for identifying a record -// in BigQuery table. -type GooglePrivacyDlpV2beta2BigQueryKey struct { - // RowNumber: Absolute number of the row from the beginning of the table - // at the time - // of scanning. - RowNumber int64 `json:"rowNumber,omitempty,string"` - - // TableReference: Complete BigQuery table reference. - TableReference *GooglePrivacyDlpV2beta2BigQueryTable `json:"tableReference,omitempty"` - - // ForceSendFields is a list of field names (e.g. "RowNumber") 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. "RowNumber") 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 *GooglePrivacyDlpV2beta2BigQueryKey) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta2BigQueryKey - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta2BigQueryOptions: Options defining BigQuery -// table and row identifiers. -type GooglePrivacyDlpV2beta2BigQueryOptions struct { - // IdentifyingFields: References to fields uniquely identifying rows - // within the table. - // Nested fields in the format, like `person.birthdate.year`, are - // allowed. - IdentifyingFields []*GooglePrivacyDlpV2beta2FieldId `json:"identifyingFields,omitempty"` - - // TableReference: Complete BigQuery table reference. - TableReference *GooglePrivacyDlpV2beta2BigQueryTable `json:"tableReference,omitempty"` - - // ForceSendFields is a list of field names (e.g. "IdentifyingFields") - // 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. "IdentifyingFields") 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 *GooglePrivacyDlpV2beta2BigQueryOptions) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta2BigQueryOptions - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta2BigQueryTable: Message defining the location -// of a BigQuery table. A table is uniquely -// identified by its project_id, dataset_id, and table_name. Within a -// query -// a table is often referenced with a string in the format -// of: -// `<project_id>:<dataset_id>.<table_id>` -// or -// `<project_id>.<dataset_id>.<table_id>`. -type GooglePrivacyDlpV2beta2BigQueryTable struct { - // DatasetId: Dataset ID of the table. - DatasetId string `json:"datasetId,omitempty"` - - // ProjectId: The Google Cloud Platform project ID of the project - // containing the table. - // If omitted, project ID is inferred from the API call. - ProjectId string `json:"projectId,omitempty"` - - // TableId: Name of the table. - TableId string `json:"tableId,omitempty"` - - // ForceSendFields is a list of field names (e.g. "DatasetId") 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. "DatasetId") 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 *GooglePrivacyDlpV2beta2BigQueryTable) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta2BigQueryTable - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta2Bucket: Bucket is represented as a range, -// along with replacement values. -type GooglePrivacyDlpV2beta2Bucket struct { - // Max: Upper bound of the range, exclusive; type must match min. - Max *GooglePrivacyDlpV2beta2Value `json:"max,omitempty"` - - // Min: Lower bound of the range, inclusive. Type should be the same as - // max if - // used. - Min *GooglePrivacyDlpV2beta2Value `json:"min,omitempty"` - - // ReplacementValue: Replacement value for this bucket. If not - // provided - // the default behavior will be to hyphenate the min-max range. - ReplacementValue *GooglePrivacyDlpV2beta2Value `json:"replacementValue,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Max") 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. "Max") 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 *GooglePrivacyDlpV2beta2Bucket) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta2Bucket - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta2BucketingConfig: Generalization function that -// buckets values based on ranges. The ranges and -// replacement values are dynamically provided by the user for custom -// behavior, -// such as 1-30 -> LOW 31-65 -> MEDIUM 66-100 -> HIGH -// This can be used on -// data of type: number, long, string, timestamp. -// If the bound `Value` type differs from the type of data being -// transformed, we -// will first attempt converting the type of the data to be transformed -// to match -// the type of the bound before comparing. -type GooglePrivacyDlpV2beta2BucketingConfig struct { - // Buckets: Set of buckets. Ranges must be non-overlapping. - Buckets []*GooglePrivacyDlpV2beta2Bucket `json:"buckets,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Buckets") 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. "Buckets") 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 *GooglePrivacyDlpV2beta2BucketingConfig) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta2BucketingConfig - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta2CancelDlpJobRequest: The request message for -// canceling a DLP job. -type GooglePrivacyDlpV2beta2CancelDlpJobRequest struct { -} - -// GooglePrivacyDlpV2beta2CategoricalStatsConfig: Compute numerical -// stats over an individual column, including -// number of distinct values and value count distribution. -type GooglePrivacyDlpV2beta2CategoricalStatsConfig struct { - // Field: Field to compute categorical stats on. All column types - // are - // supported except for arrays and structs. However, it may be - // more - // informative to use NumericalStats when the field type is - // supported, - // depending on the data. - Field *GooglePrivacyDlpV2beta2FieldId `json:"field,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Field") 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. "Field") 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 *GooglePrivacyDlpV2beta2CategoricalStatsConfig) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta2CategoricalStatsConfig - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type GooglePrivacyDlpV2beta2CategoricalStatsHistogramBucket struct { - // BucketSize: Total number of values in this bucket. - BucketSize int64 `json:"bucketSize,omitempty,string"` - - // BucketValueCount: Total number of distinct values in this bucket. - BucketValueCount int64 `json:"bucketValueCount,omitempty,string"` - - // BucketValues: Sample of value frequencies in this bucket. The total - // number of - // values returned per bucket is capped at 20. - BucketValues []*GooglePrivacyDlpV2beta2ValueFrequency `json:"bucketValues,omitempty"` - - // ValueFrequencyLowerBound: Lower bound on the value frequency of the - // values in this bucket. - ValueFrequencyLowerBound int64 `json:"valueFrequencyLowerBound,omitempty,string"` - - // ValueFrequencyUpperBound: Upper bound on the value frequency of the - // values in this bucket. - ValueFrequencyUpperBound int64 `json:"valueFrequencyUpperBound,omitempty,string"` - - // ForceSendFields is a list of field names (e.g. "BucketSize") 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. "BucketSize") 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 *GooglePrivacyDlpV2beta2CategoricalStatsHistogramBucket) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta2CategoricalStatsHistogramBucket - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta2CategoricalStatsResult: Result of the -// categorical stats computation. -type GooglePrivacyDlpV2beta2CategoricalStatsResult struct { - // ValueFrequencyHistogramBuckets: Histogram of value frequencies in the - // column. - ValueFrequencyHistogramBuckets []*GooglePrivacyDlpV2beta2CategoricalStatsHistogramBucket `json:"valueFrequencyHistogramBuckets,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "ValueFrequencyHistogramBuckets") 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. - // "ValueFrequencyHistogramBuckets") 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 *GooglePrivacyDlpV2beta2CategoricalStatsResult) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta2CategoricalStatsResult - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta2CharacterMaskConfig: Partially mask a string -// by replacing a given number of characters with a -// fixed character. Masking can start from the beginning or end of the -// string. -// This can be used on data of any type (numbers, longs, and so on) and -// when -// de-identifying structured data we'll attempt to preserve the original -// data's -// type. (This allows you to take a long like 123 and modify it to a -// string like -// **3. -type GooglePrivacyDlpV2beta2CharacterMaskConfig struct { - // CharactersToIgnore: When masking a string, items in this list will be - // skipped when replacing. - // For example, if your string is 555-555-5555 and you ask us to skip - // `-` and - // mask 5 chars with * we would produce ***-*55-5555. - CharactersToIgnore []*GooglePrivacyDlpV2beta2CharsToIgnore `json:"charactersToIgnore,omitempty"` - - // MaskingCharacter: Character to mask the sensitive values—for - // example, "*" for an - // alphabetic string such as name, or "0" for a numeric string such as - // ZIP - // code or credit card number. String must have length 1. If not - // supplied, we - // will default to "*" for strings, 0 for digits. - MaskingCharacter string `json:"maskingCharacter,omitempty"` - - // NumberToMask: Number of characters to mask. If not set, all matching - // chars will be - // masked. Skipped characters do not count towards this tally. - NumberToMask int64 `json:"numberToMask,omitempty"` - - // ReverseOrder: Mask characters in reverse order. For example, if - // `masking_character` is - // '0', number_to_mask is 14, and `reverse_order` is false, - // then - // 1234-5678-9012-3456 -> 00000000000000-3456 - // If `masking_character` is '*', `number_to_mask` is 3, and - // `reverse_order` - // is true, then 12345 -> 12*** - ReverseOrder bool `json:"reverseOrder,omitempty"` - - // ForceSendFields is a list of field names (e.g. "CharactersToIgnore") - // 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. "CharactersToIgnore") 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 *GooglePrivacyDlpV2beta2CharacterMaskConfig) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta2CharacterMaskConfig - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta2CharsToIgnore: Characters to skip when doing -// deidentification of a value. These will be left -// alone and skipped. -type GooglePrivacyDlpV2beta2CharsToIgnore struct { - CharactersToSkip string `json:"charactersToSkip,omitempty"` - - // Possible values: - // "COMMON_CHARS_TO_IGNORE_UNSPECIFIED" - // "NUMERIC" - 0-9 - // "ALPHA_UPPER_CASE" - A-Z - // "ALPHA_LOWER_CASE" - a-z - // "PUNCTUATION" - US Punctuation, one of - // !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~ - // "WHITESPACE" - Whitespace character, one of [ \t\n\x0B\f\r] - CommonCharactersToIgnore string `json:"commonCharactersToIgnore,omitempty"` - - // ForceSendFields is a list of field names (e.g. "CharactersToSkip") 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. "CharactersToSkip") 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 *GooglePrivacyDlpV2beta2CharsToIgnore) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta2CharsToIgnore - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta2CloudStorageKey: Record key for a finding in a -// Cloud Storage file. -type GooglePrivacyDlpV2beta2CloudStorageKey struct { - // FilePath: Path to the file. - FilePath string `json:"filePath,omitempty"` - - // StartOffset: Byte offset of the referenced data in the file. - StartOffset int64 `json:"startOffset,omitempty,string"` - - // ForceSendFields is a list of field names (e.g. "FilePath") 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. "FilePath") 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 *GooglePrivacyDlpV2beta2CloudStorageKey) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta2CloudStorageKey - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta2CloudStorageOptions: Options defining a file -// or a set of files (path ending with *) within -// a Google Cloud Storage bucket. -type GooglePrivacyDlpV2beta2CloudStorageOptions struct { - // BytesLimitPerFile: Max number of bytes to scan from a file. If a - // scanned file's size is bigger - // than this value then the rest of the bytes are omitted. - BytesLimitPerFile int64 `json:"bytesLimitPerFile,omitempty,string"` - - FileSet *GooglePrivacyDlpV2beta2FileSet `json:"fileSet,omitempty"` - - // ForceSendFields is a list of field names (e.g. "BytesLimitPerFile") - // 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. "BytesLimitPerFile") 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 *GooglePrivacyDlpV2beta2CloudStorageOptions) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta2CloudStorageOptions - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta2Color: Represents a color in the RGB color -// space. -type GooglePrivacyDlpV2beta2Color struct { - // Blue: The amount of blue in the color as a value in the interval [0, - // 1]. - Blue float64 `json:"blue,omitempty"` - - // Green: The amount of green in the color as a value in the interval - // [0, 1]. - Green float64 `json:"green,omitempty"` - - // Red: The amount of red in the color as a value in the interval [0, - // 1]. - Red float64 `json:"red,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Blue") 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. "Blue") 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 *GooglePrivacyDlpV2beta2Color) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta2Color - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *GooglePrivacyDlpV2beta2Color) UnmarshalJSON(data []byte) error { - type NoMethod GooglePrivacyDlpV2beta2Color - var s1 struct { - Blue gensupport.JSONFloat64 `json:"blue"` - Green gensupport.JSONFloat64 `json:"green"` - Red gensupport.JSONFloat64 `json:"red"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.Blue = float64(s1.Blue) - s.Green = float64(s1.Green) - s.Red = float64(s1.Red) - return nil -} - -// GooglePrivacyDlpV2beta2Condition: The field type of `value` and -// `field` do not need to match to be -// considered equal, but not all comparisons are possible. -// -// A `value` of type: -// -// - `string` can be compared against all other types -// - `boolean` can only be compared against other booleans -// - `integer` can be compared against doubles or a string if the string -// value -// can be parsed as an integer. -// - `double` can be compared against integers or a string if the string -// can -// be parsed as a double. -// - `Timestamp` can be compared against strings in RFC 3339 date -// string -// format. -// - `TimeOfDay` can be compared against timestamps and strings in the -// format -// of 'HH:mm:ss'. -// -// If we fail to compare do to type mismatch, a warning will be given -// and -// the condition will evaluate to false. -type GooglePrivacyDlpV2beta2Condition struct { - // Field: Field within the record this condition is evaluated against. - // [required] - Field *GooglePrivacyDlpV2beta2FieldId `json:"field,omitempty"` - - // Operator: Operator used to compare the field or infoType to the - // value. [required] - // - // Possible values: - // "RELATIONAL_OPERATOR_UNSPECIFIED" - // "EQUAL_TO" - Equal. - // "NOT_EQUAL_TO" - Not equal to. - // "GREATER_THAN" - Greater than. - // "LESS_THAN" - Less than. - // "GREATER_THAN_OR_EQUALS" - Greater than or equals. - // "LESS_THAN_OR_EQUALS" - Less than or equals. - // "EXISTS" - Exists - Operator string `json:"operator,omitempty"` - - // Value: Value to compare against. [Required, except for `EXISTS` - // tests.] - Value *GooglePrivacyDlpV2beta2Value `json:"value,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Field") 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. "Field") 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 *GooglePrivacyDlpV2beta2Condition) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta2Condition - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta2Conditions: A collection of conditions. -type GooglePrivacyDlpV2beta2Conditions struct { - Conditions []*GooglePrivacyDlpV2beta2Condition `json:"conditions,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Conditions") 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. "Conditions") 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 *GooglePrivacyDlpV2beta2Conditions) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta2Conditions - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta2ContentItem: Container structure for the -// content to inspect. -type GooglePrivacyDlpV2beta2ContentItem struct { - // Data: Content data to inspect or redact. - Data string `json:"data,omitempty"` - - // Table: Structured content for inspection. - Table *GooglePrivacyDlpV2beta2Table `json:"table,omitempty"` - - // Type: Type of the content, as defined in Content-Type HTTP - // header. - // Supported types are: all "text" types, octet streams, PNG - // images, - // JPEG images. - Type string `json:"type,omitempty"` - - // Value: String data to inspect or redact. - Value string `json:"value,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Data") 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. "Data") 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 *GooglePrivacyDlpV2beta2ContentItem) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta2ContentItem - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta2CreateDeidentifyTemplateRequest: Request -// message for CreateDeidentifyTemplate. -type GooglePrivacyDlpV2beta2CreateDeidentifyTemplateRequest struct { - // DeidentifyTemplate: The DeidentifyTemplate to create. - DeidentifyTemplate *GooglePrivacyDlpV2beta2DeidentifyTemplate `json:"deidentifyTemplate,omitempty"` - - // TemplateId: The template id can contain uppercase and lowercase - // letters, - // numbers, and hyphens; that is, it must match the regular - // expression: `[a-zA-Z\\d-]+`. The maximum length is 100 - // characters. Can be empty to allow the system to generate one. - TemplateId string `json:"templateId,omitempty"` - - // ForceSendFields is a list of field names (e.g. "DeidentifyTemplate") - // 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. "DeidentifyTemplate") 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 *GooglePrivacyDlpV2beta2CreateDeidentifyTemplateRequest) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta2CreateDeidentifyTemplateRequest - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta2CreateInspectTemplateRequest: Request message -// for CreateInspectTemplate. -type GooglePrivacyDlpV2beta2CreateInspectTemplateRequest struct { - // InspectTemplate: The InspectTemplate to create. - InspectTemplate *GooglePrivacyDlpV2beta2InspectTemplate `json:"inspectTemplate,omitempty"` - - // TemplateId: The template id can contain uppercase and lowercase - // letters, - // numbers, and hyphens; that is, it must match the regular - // expression: `[a-zA-Z\\d-]+`. The maximum length is 100 - // characters. Can be empty to allow the system to generate one. - TemplateId string `json:"templateId,omitempty"` - - // ForceSendFields is a list of field names (e.g. "InspectTemplate") 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. "InspectTemplate") 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 *GooglePrivacyDlpV2beta2CreateInspectTemplateRequest) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta2CreateInspectTemplateRequest - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta2CreateJobTriggerRequest: Request message for -// CreateJobTrigger. -type GooglePrivacyDlpV2beta2CreateJobTriggerRequest struct { - // JobTrigger: The JobTrigger to create. - JobTrigger *GooglePrivacyDlpV2beta2JobTrigger `json:"jobTrigger,omitempty"` - - // TriggerId: The trigger id can contain uppercase and lowercase - // letters, - // numbers, and hyphens; that is, it must match the regular - // expression: `[a-zA-Z\\d-]+`. The maximum length is 100 - // characters. Can be empty to allow the system to generate one. - TriggerId string `json:"triggerId,omitempty"` - - // ForceSendFields is a list of field names (e.g. "JobTrigger") 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. "JobTrigger") 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 *GooglePrivacyDlpV2beta2CreateJobTriggerRequest) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta2CreateJobTriggerRequest - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta2CryptoHashConfig: Pseudonymization method that -// generates surrogates via cryptographic hashing. -// Uses SHA-256. -// The key size must be either 32 or 64 bytes. -// Outputs a 32 byte digest as an uppercase hex string -// (for example, 41D1567F7F99F1DC2A5FAB886DEE5BEE). -// Currently, only string and integer values can be hashed. -type GooglePrivacyDlpV2beta2CryptoHashConfig struct { - // CryptoKey: The key used by the hash function. - CryptoKey *GooglePrivacyDlpV2beta2CryptoKey `json:"cryptoKey,omitempty"` - - // ForceSendFields is a list of field names (e.g. "CryptoKey") 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. "CryptoKey") 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 *GooglePrivacyDlpV2beta2CryptoHashConfig) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta2CryptoHashConfig - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta2CryptoKey: This is a data encryption key (DEK) -// (as opposed to -// a key encryption key (KEK) stored by KMS). -// When using KMS to wrap/unwrap DEKs, be sure to set an appropriate -// IAM policy on the KMS CryptoKey (KEK) to ensure an attacker -// cannot -// unwrap the data crypto key. -type GooglePrivacyDlpV2beta2CryptoKey struct { - KmsWrapped *GooglePrivacyDlpV2beta2KmsWrappedCryptoKey `json:"kmsWrapped,omitempty"` - - Transient *GooglePrivacyDlpV2beta2TransientCryptoKey `json:"transient,omitempty"` - - Unwrapped *GooglePrivacyDlpV2beta2UnwrappedCryptoKey `json:"unwrapped,omitempty"` - - // ForceSendFields is a list of field names (e.g. "KmsWrapped") 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. "KmsWrapped") 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 *GooglePrivacyDlpV2beta2CryptoKey) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta2CryptoKey - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta2CryptoReplaceFfxFpeConfig: Replaces an -// identifier with a surrogate using FPE with the FFX -// mode of operation; however when used in the `ReidentifyContent` API -// method, -// it serves the opposite function by reversing the surrogate back -// into -// the original identifier. -// The identifier must be encoded as ASCII. -// For a given crypto key and context, the same identifier will -// be -// replaced with the same surrogate. -// Identifiers must be at least two characters long. -// In the case that the identifier is the empty string, it will be -// skipped. -// See [Pseudonymization](/dlp/docs/pseudonymization) for example usage. -type GooglePrivacyDlpV2beta2CryptoReplaceFfxFpeConfig struct { - // Possible values: - // "FFX_COMMON_NATIVE_ALPHABET_UNSPECIFIED" - // "NUMERIC" - [0-9] (radix of 10) - // "HEXADECIMAL" - [0-9A-F] (radix of 16) - // "UPPER_CASE_ALPHA_NUMERIC" - [0-9A-Z] (radix of 36) - // "ALPHA_NUMERIC" - [0-9A-Za-z] (radix of 62) - CommonAlphabet string `json:"commonAlphabet,omitempty"` - - // Context: The 'tweak', a context may be used for higher security since - // the same - // identifier in two different contexts won't be given the same - // surrogate. If - // the context is not set, a default tweak will be used. - // - // If the context is set but: - // - // 1. there is no record present when transforming a given value or - // 1. the field is not present when transforming a given value, - // - // a default tweak will be used. - // - // Note that case (1) is expected when an `InfoTypeTransformation` - // is - // applied to both structured and non-structured - // `ContentItem`s. - // Currently, the referenced field may be of value type integer or - // string. - // - // The tweak is constructed as a sequence of bytes in big endian byte - // order - // such that: - // - // - a 64 bit integer is encoded followed by a single byte of value 1 - // - a string is encoded in UTF-8 format followed by a single byte of - // value - // å 2 - Context *GooglePrivacyDlpV2beta2FieldId `json:"context,omitempty"` - - // CryptoKey: The key used by the encryption algorithm. [required] - CryptoKey *GooglePrivacyDlpV2beta2CryptoKey `json:"cryptoKey,omitempty"` - - // CustomAlphabet: This is supported by mapping these to the - // alphanumeric characters - // that the FFX mode natively supports. This happens - // before/after - // encryption/decryption. - // Each character listed must appear only once. - // Number of characters must be in the range [2, 62]. - // This must be encoded as ASCII. - // The order of characters does not matter. - CustomAlphabet string `json:"customAlphabet,omitempty"` - - // Radix: The native way to select the alphabet. Must be in the range - // [2, 62]. - Radix int64 `json:"radix,omitempty"` - - // SurrogateInfoType: The custom infoType to annotate the surrogate - // with. - // This annotation will be applied to the surrogate by prefixing it - // with - // the name of the custom infoType followed by the number of - // characters comprising the surrogate. The following scheme defines - // the - // format: info_type_name(surrogate_character_count):surrogate - // - // For example, if the name of custom infoType is 'MY_TOKEN_INFO_TYPE' - // and - // the surrogate is 'abc', the full replacement value - // will be: 'MY_TOKEN_INFO_TYPE(3):abc' - // - // This annotation identifies the surrogate when inspecting content - // using the - // custom - // infoType - // [`SurrogateType`](/dlp/docs/reference/rest/v2beta2/InspectCon - // fig#surrogatetype). - // This facilitates reversal of the surrogate when it occurs in free - // text. - // - // In order for inspection to work properly, the name of this infoType - // must - // not occur naturally anywhere in your data; otherwise, inspection - // may - // find a surrogate that does not correspond to an actual - // identifier. - // Therefore, choose your custom infoType name carefully after - // considering - // what your data looks like. One way to select a name that has a high - // chance - // of yielding reliable detection is to include one or more unicode - // characters - // that are highly improbable to exist in your data. - // For example, assuming your data is entered from a regular ASCII - // keyboard, - // the symbol with the hex code point 29DD might be used like - // so: - // ⧝MY_TOKEN_TYPE - SurrogateInfoType *GooglePrivacyDlpV2beta2InfoType `json:"surrogateInfoType,omitempty"` - - // ForceSendFields is a list of field names (e.g. "CommonAlphabet") 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. "CommonAlphabet") 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 *GooglePrivacyDlpV2beta2CryptoReplaceFfxFpeConfig) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta2CryptoReplaceFfxFpeConfig - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta2CustomInfoType: Custom information type -// provided by the user. Used to find domain-specific -// sensitive information configurable to the data in question. -type GooglePrivacyDlpV2beta2CustomInfoType struct { - // DetectionRules: Set of detection rules to apply to all findings of - // this custom info type. - // Rules are applied in order that they are specified. Not supported for - // the - // `surrogate_type` custom info type. - DetectionRules []*GooglePrivacyDlpV2beta2DetectionRule `json:"detectionRules,omitempty"` - - // Dictionary: Dictionary-based custom info type. - Dictionary *GooglePrivacyDlpV2beta2Dictionary `json:"dictionary,omitempty"` - - // InfoType: Info type configuration. All custom info types must have - // configurations - // that do not conflict with built-in info types or other custom info - // types. - InfoType *GooglePrivacyDlpV2beta2InfoType `json:"infoType,omitempty"` - - // Likelihood: Likelihood to return for this custom info type. This base - // value can be - // altered by a detection rule if the finding meets the criteria - // specified by - // the rule. Defaults to `VERY_LIKELY` if not specified. - // - // Possible values: - // "LIKELIHOOD_UNSPECIFIED" - Default value; information with all - // likelihoods is included. - // "VERY_UNLIKELY" - Few matching elements. - // "UNLIKELY" - // "POSSIBLE" - Some matching elements. - // "LIKELY" - // "VERY_LIKELY" - Many matching elements. - Likelihood string `json:"likelihood,omitempty"` - - // Regex: Regex-based custom info type. - Regex *GooglePrivacyDlpV2beta2Regex `json:"regex,omitempty"` - - // SurrogateType: Surrogate info type. - SurrogateType *GooglePrivacyDlpV2beta2SurrogateType `json:"surrogateType,omitempty"` - - // ForceSendFields is a list of field names (e.g. "DetectionRules") 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. "DetectionRules") 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 *GooglePrivacyDlpV2beta2CustomInfoType) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta2CustomInfoType - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta2DatastoreKey: Record key for a finding in -// Cloud Datastore. -type GooglePrivacyDlpV2beta2DatastoreKey struct { - // EntityKey: Datastore entity key. - EntityKey *GooglePrivacyDlpV2beta2Key `json:"entityKey,omitempty"` - - // ForceSendFields is a list of field names (e.g. "EntityKey") 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. "EntityKey") 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 *GooglePrivacyDlpV2beta2DatastoreKey) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta2DatastoreKey - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta2DatastoreOptions: Options defining a data set -// within Google Cloud Datastore. -type GooglePrivacyDlpV2beta2DatastoreOptions struct { - // Kind: The kind to process. - Kind *GooglePrivacyDlpV2beta2KindExpression `json:"kind,omitempty"` - - // PartitionId: A partition ID identifies a grouping of entities. The - // grouping is always - // by project and namespace, however the namespace ID may be empty. - PartitionId *GooglePrivacyDlpV2beta2PartitionId `json:"partitionId,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Kind") 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. "Kind") 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 *GooglePrivacyDlpV2beta2DatastoreOptions) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta2DatastoreOptions - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta2DateShiftConfig: Shifts dates by random number -// of days, with option to be consistent for the -// same context. -type GooglePrivacyDlpV2beta2DateShiftConfig struct { - // Context: Points to the field that contains the context, for example, - // an entity id. - // If set, must also set method. If set, shift will be consistent for - // the - // given context. - Context *GooglePrivacyDlpV2beta2FieldId `json:"context,omitempty"` - - // CryptoKey: Causes the shift to be computed based on this key and the - // context. This - // results in the same shift for the same context and crypto_key. - CryptoKey *GooglePrivacyDlpV2beta2CryptoKey `json:"cryptoKey,omitempty"` - - // LowerBoundDays: For example, -5 means shift date to at most 5 days - // back in the past. - // [Required] - LowerBoundDays int64 `json:"lowerBoundDays,omitempty"` - - // UpperBoundDays: Range of shift in days. Actual shift will be selected - // at random within this - // range (inclusive ends). Negative means shift to earlier in time. Must - // not - // be more than 365250 days (1000 years) each direction. - // - // For example, 3 means shift date to at most 3 days into the - // future. - // [Required] - UpperBoundDays int64 `json:"upperBoundDays,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Context") 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. "Context") 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 *GooglePrivacyDlpV2beta2DateShiftConfig) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta2DateShiftConfig - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta2DateTime: Message for a date time object. -type GooglePrivacyDlpV2beta2DateTime struct { - // Date: One or more of the following must be set. All fields are - // optional, but - // when set must be valid date or time values. - Date *GoogleTypeDate `json:"date,omitempty"` - - // Possible values: - // "DAY_OF_WEEK_UNSPECIFIED" - The unspecified day-of-week. - // "MONDAY" - The day-of-week of Monday. - // "TUESDAY" - The day-of-week of Tuesday. - // "WEDNESDAY" - The day-of-week of Wednesday. - // "THURSDAY" - The day-of-week of Thursday. - // "FRIDAY" - The day-of-week of Friday. - // "SATURDAY" - The day-of-week of Saturday. - // "SUNDAY" - The day-of-week of Sunday. - DayOfWeek string `json:"dayOfWeek,omitempty"` - - Time *GoogleTypeTimeOfDay `json:"time,omitempty"` - - TimeZone *GooglePrivacyDlpV2beta2TimeZone `json:"timeZone,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Date") 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. "Date") 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 *GooglePrivacyDlpV2beta2DateTime) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta2DateTime - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta2DeidentifyConfig: The configuration that -// controls how the data will change. -type GooglePrivacyDlpV2beta2DeidentifyConfig struct { - // InfoTypeTransformations: Treat the dataset as free-form text and - // apply the same free text - // transformation everywhere. - InfoTypeTransformations *GooglePrivacyDlpV2beta2InfoTypeTransformations `json:"infoTypeTransformations,omitempty"` - - // RecordTransformations: Treat the dataset as structured. - // Transformations can be applied to - // specific locations within structured datasets, such as transforming - // a column within a table. - RecordTransformations *GooglePrivacyDlpV2beta2RecordTransformations `json:"recordTransformations,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "InfoTypeTransformations") 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. "InfoTypeTransformations") - // 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 *GooglePrivacyDlpV2beta2DeidentifyConfig) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta2DeidentifyConfig - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta2DeidentifyContentRequest: Request to -// de-identify a list of items. -type GooglePrivacyDlpV2beta2DeidentifyContentRequest struct { - // DeidentifyConfig: Configuration for the de-identification of the - // content item. - // Items specified here will override the template referenced by - // the - // deidentify_template_name argument. - DeidentifyConfig *GooglePrivacyDlpV2beta2DeidentifyConfig `json:"deidentifyConfig,omitempty"` - - // DeidentifyTemplateName: Optional template to use. Any configuration - // directly specified in - // deidentify_config will override those set in the template. Singular - // fields - // that are set in this request will replace their corresponding fields - // in the - // template. Repeated fields are appended. Singular sub-messages and - // groups - // are recursively merged. - DeidentifyTemplateName string `json:"deidentifyTemplateName,omitempty"` - - // InspectConfig: Configuration for the inspector. - // Items specified here will override the template referenced by - // the - // inspect_template_name argument. - InspectConfig *GooglePrivacyDlpV2beta2InspectConfig `json:"inspectConfig,omitempty"` - - // InspectTemplateName: Optional template to use. Any configuration - // directly specified in - // inspect_config will override those set in the template. Singular - // fields - // that are set in this request will replace their corresponding fields - // in the - // template. Repeated fields are appended. Singular sub-messages and - // groups - // are recursively merged. - InspectTemplateName string `json:"inspectTemplateName,omitempty"` - - // Item: The item to de-identify. Will be treated as text. - Item *GooglePrivacyDlpV2beta2ContentItem `json:"item,omitempty"` - - // ForceSendFields is a list of field names (e.g. "DeidentifyConfig") 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. "DeidentifyConfig") 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 *GooglePrivacyDlpV2beta2DeidentifyContentRequest) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta2DeidentifyContentRequest - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta2DeidentifyContentResponse: Results of -// de-identifying a ContentItem. -type GooglePrivacyDlpV2beta2DeidentifyContentResponse struct { - // Item: The de-identified item. - Item *GooglePrivacyDlpV2beta2ContentItem `json:"item,omitempty"` - - // Overview: An overview of the changes that were made on the `item`. - Overview *GooglePrivacyDlpV2beta2TransformationOverview `json:"overview,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Item") 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. "Item") 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 *GooglePrivacyDlpV2beta2DeidentifyContentResponse) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta2DeidentifyContentResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta2DeidentifyTemplate: The DeidentifyTemplates -// contains instructions on how to deidentify content. -type GooglePrivacyDlpV2beta2DeidentifyTemplate struct { - // CreateTime: The creation timestamp of a inspectTemplate, output only - // field. - CreateTime string `json:"createTime,omitempty"` - - // DeidentifyConfig: ///////////// // The core content of the template - // // /////////////// - DeidentifyConfig *GooglePrivacyDlpV2beta2DeidentifyConfig `json:"deidentifyConfig,omitempty"` - - // Description: Short description (max 256 chars). - Description string `json:"description,omitempty"` - - // DisplayName: Display name (max 256 chars). - DisplayName string `json:"displayName,omitempty"` - - // Name: The template name. Output only. - // - // The template will have one of the following - // formats: - // `projects/PROJECT_ID/deidentifyTemplates/TEMPLATE_ID` - // OR - // `organizations/ORGANIZATION_ID/deidentifyTemplates/TEMPLATE_ID` - Name string `json:"name,omitempty"` - - // UpdateTime: The last update timestamp of a inspectTemplate, output - // only field. - UpdateTime string `json:"updateTime,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "CreateTime") 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. "CreateTime") 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 *GooglePrivacyDlpV2beta2DeidentifyTemplate) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta2DeidentifyTemplate - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta2DetectionRule: Rule for modifying a custom -// info type to alter behavior under certain -// circumstances, depending on the specific details of the rule. Not -// supported -// for the `surrogate_type` custom info type. -type GooglePrivacyDlpV2beta2DetectionRule struct { - // HotwordRule: Hotword-based detection rule. - HotwordRule *GooglePrivacyDlpV2beta2HotwordRule `json:"hotwordRule,omitempty"` - - // ForceSendFields is a list of field names (e.g. "HotwordRule") 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. "HotwordRule") 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 *GooglePrivacyDlpV2beta2DetectionRule) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta2DetectionRule - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta2Dictionary: Custom information type based on a -// dictionary of words or phrases. This can -// be used to match sensitive information specific to the data, such as -// a list -// of employee IDs or job titles. -// -// Dictionary words are case-insensitive and all characters other than -// letters -// and digits in the unicode [Basic -// Multilingual -// Plane](https://en.wikipedia.org/wiki/Plane_%28Unicode%29# -// Basic_Multilingual_Plane) -// will be replaced with whitespace when scanning for matches, so -// the -// dictionary phrase "Sam Johnson" will match all three phrases "sam -// johnson", -// "Sam, Johnson", and "Sam (Johnson)". Additionally, the -// characters -// surrounding any match must be of a different type than the -// adjacent -// characters within the word, so letters must be next to non-letters -// and -// digits next to non-digits. For example, the dictionary word "jen" -// will -// match the first three letters of the text "jen123" but will return -// no -// matches for "jennifer". -// -// Dictionary words containing a large number of characters that are -// not -// letters or digits may result in unexpected findings because such -// characters -// are treated as whitespace. -type GooglePrivacyDlpV2beta2Dictionary struct { - // WordList: List of words or phrases to search for. - WordList *GooglePrivacyDlpV2beta2WordList `json:"wordList,omitempty"` - - // ForceSendFields is a list of field names (e.g. "WordList") 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. "WordList") 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 *GooglePrivacyDlpV2beta2Dictionary) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta2Dictionary - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta2DlpJob: Combines all of the information about -// a DLP job. -type GooglePrivacyDlpV2beta2DlpJob struct { - // CreateTime: Time when the job was created. - CreateTime string `json:"createTime,omitempty"` - - // EndTime: Time when the job finished. - EndTime string `json:"endTime,omitempty"` - - // ErrorResults: A stream of errors encountered running the job. - ErrorResults []*GoogleRpcStatus `json:"errorResults,omitempty"` - - // InspectDetails: Results from inspecting a data source. - InspectDetails *GooglePrivacyDlpV2beta2InspectDataSourceDetails `json:"inspectDetails,omitempty"` - - // JobTriggerName: If created by a job trigger, the resource name of the - // trigger that - // instantiated the job. - JobTriggerName string `json:"jobTriggerName,omitempty"` - - // Name: The server-assigned name. - Name string `json:"name,omitempty"` - - // RiskDetails: Results from analyzing risk of a data source. - RiskDetails *GooglePrivacyDlpV2beta2AnalyzeDataSourceRiskDetails `json:"riskDetails,omitempty"` - - // StartTime: Time when the job started. - StartTime string `json:"startTime,omitempty"` - - // State: State of a job. - // - // Possible values: - // "JOB_STATE_UNSPECIFIED" - // "PENDING" - The job has not yet started. - // "RUNNING" - The job is currently running. - // "DONE" - The job is no longer running. - // "CANCELED" - The job was canceled before it could complete. - // "FAILED" - The job had an error and did not complete. - State string `json:"state,omitempty"` - - // Type: The type of job. - // - // Possible values: - // "DLP_JOB_TYPE_UNSPECIFIED" - // "INSPECT_JOB" - The job inspected Google Cloud for sensitive data. - // "RISK_ANALYSIS_JOB" - The job executed a Risk Analysis computation. - Type string `json:"type,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "CreateTime") 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. "CreateTime") 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 *GooglePrivacyDlpV2beta2DlpJob) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta2DlpJob - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta2EntityId: An entity in a dataset is a field or -// set of fields that correspond to a -// single person. For example, in medical records the `EntityId` might -// be -// a patient identifier, or for financial records it might be an -// account -// identifier. This message is used when generalizations or analysis -// must be -// consistent across multiple rows pertaining to the same entity. -type GooglePrivacyDlpV2beta2EntityId struct { - // Field: Composite key indicating which field contains the entity - // identifier. - Field *GooglePrivacyDlpV2beta2FieldId `json:"field,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Field") 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. "Field") 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 *GooglePrivacyDlpV2beta2EntityId) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta2EntityId - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta2Error: The results of an unsuccessful -// activation of the JobTrigger. -type GooglePrivacyDlpV2beta2Error struct { - Details *GoogleRpcStatus `json:"details,omitempty"` - - // Timestamps: The times the error occurred. - Timestamps []string `json:"timestamps,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Details") 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. "Details") 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 *GooglePrivacyDlpV2beta2Error) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta2Error - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta2Expressions: An expression, consisting or an -// operator and conditions. -type GooglePrivacyDlpV2beta2Expressions struct { - Conditions *GooglePrivacyDlpV2beta2Conditions `json:"conditions,omitempty"` - - // LogicalOperator: The operator to apply to the result of conditions. - // Default and currently - // only supported value is `AND`. - // - // Possible values: - // "LOGICAL_OPERATOR_UNSPECIFIED" - // "AND" - LogicalOperator string `json:"logicalOperator,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Conditions") 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. "Conditions") 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 *GooglePrivacyDlpV2beta2Expressions) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta2Expressions - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta2FieldId: General identifier of a data field in -// a storage service. -type GooglePrivacyDlpV2beta2FieldId struct { - // Name: Name describing the field. - Name string `json:"name,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Name") 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. "Name") 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 *GooglePrivacyDlpV2beta2FieldId) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta2FieldId - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta2FieldTransformation: The transformation to -// apply to the field. -type GooglePrivacyDlpV2beta2FieldTransformation struct { - // Condition: Only apply the transformation if the condition evaluates - // to true for the - // given `RecordCondition`. The conditions are allowed to reference - // fields - // that are not used in the actual transformation. [optional] - // - // Example Use Cases: - // - // - Apply a different bucket transformation to an age column if the zip - // code - // column for the same record is within a specific range. - // - Redact a field if the date of birth field is greater than 85. - Condition *GooglePrivacyDlpV2beta2RecordCondition `json:"condition,omitempty"` - - // Fields: Input field(s) to apply the transformation to. [required] - Fields []*GooglePrivacyDlpV2beta2FieldId `json:"fields,omitempty"` - - // InfoTypeTransformations: Treat the contents of the field as free - // text, and selectively - // transform content that matches an `InfoType`. - InfoTypeTransformations *GooglePrivacyDlpV2beta2InfoTypeTransformations `json:"infoTypeTransformations,omitempty"` - - // PrimitiveTransformation: Apply the transformation to the entire - // field. - PrimitiveTransformation *GooglePrivacyDlpV2beta2PrimitiveTransformation `json:"primitiveTransformation,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Condition") 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. "Condition") 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 *GooglePrivacyDlpV2beta2FieldTransformation) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta2FieldTransformation - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta2FileSet: Set of files to scan. -type GooglePrivacyDlpV2beta2FileSet struct { - // Url: The url, in the format `gs://<bucket>/<path>`. Trailing wildcard - // in the - // path is allowed. - Url string `json:"url,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Url") 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. "Url") 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 *GooglePrivacyDlpV2beta2FileSet) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta2FileSet - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta2Finding: Represents a piece of potentially -// sensitive content. -type GooglePrivacyDlpV2beta2Finding struct { - // CreateTime: Timestamp when finding was detected. - CreateTime string `json:"createTime,omitempty"` - - // InfoType: The type of content that might have been found. - // Provided if requested by the `InspectConfig`. - InfoType *GooglePrivacyDlpV2beta2InfoType `json:"infoType,omitempty"` - - // Likelihood: Estimate of how likely it is that the `info_type` is - // correct. - // - // Possible values: - // "LIKELIHOOD_UNSPECIFIED" - Default value; information with all - // likelihoods is included. - // "VERY_UNLIKELY" - Few matching elements. - // "UNLIKELY" - // "POSSIBLE" - Some matching elements. - // "LIKELY" - // "VERY_LIKELY" - Many matching elements. - Likelihood string `json:"likelihood,omitempty"` - - // Location: Where the content was found. - Location *GooglePrivacyDlpV2beta2Location `json:"location,omitempty"` - - // Quote: The content that was found. Even if the content is not - // textual, it - // may be converted to a textual representation here. - // Provided if requested by the `InspectConfig` and the finding is - // less than or equal to 4096 bytes long. If the finding exceeds 4096 - // bytes - // in length, the quote may be omitted. - Quote string `json:"quote,omitempty"` - - // QuoteInfo: Contains data parsed from quotes. Only populated if - // include_quote was set - // to true and a supported infoType was requested. Currently - // supported - // infoTypes: DATE, DATE_OF_BIRTH and TIME. - QuoteInfo *GooglePrivacyDlpV2beta2QuoteInfo `json:"quoteInfo,omitempty"` - - // ForceSendFields is a list of field names (e.g. "CreateTime") 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. "CreateTime") 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 *GooglePrivacyDlpV2beta2Finding) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta2Finding - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type GooglePrivacyDlpV2beta2FindingLimits struct { - // MaxFindingsPerInfoType: Configuration of findings limit given for - // specified infoTypes. - MaxFindingsPerInfoType []*GooglePrivacyDlpV2beta2InfoTypeLimit `json:"maxFindingsPerInfoType,omitempty"` - - // MaxFindingsPerItem: Max number of findings that will be returned for - // each item scanned. - // When set within `InspectDataSourceRequest`, - // the maximum returned is 1000 regardless if this is set higher. - // When set within `InspectContentRequest`, this field is ignored. - MaxFindingsPerItem int64 `json:"maxFindingsPerItem,omitempty"` - - // MaxFindingsPerRequest: Max number of findings that will be returned - // per request/job. - // When set within `InspectContentRequest`, the maximum returned is - // 1000 - // regardless if this is set higher. - MaxFindingsPerRequest int64 `json:"maxFindingsPerRequest,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "MaxFindingsPerInfoType") 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. "MaxFindingsPerInfoType") - // 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 *GooglePrivacyDlpV2beta2FindingLimits) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta2FindingLimits - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta2FixedSizeBucketingConfig: Buckets values based -// on fixed size ranges. The -// Bucketing transformation can provide all of this functionality, -// but requires more configuration. This message is provided as a -// convenience to -// the user for simple bucketing strategies. -// -// The transformed value will be a hyphenated string -// of -// <lower_bound>-<upper_bound>, i.e if lower_bound = 10 and upper_bound -// = 20 -// all values that are within this bucket will be replaced with -// "10-20". -// -// This can be used on data of type: double, long. -// -// If the bound Value type differs from the type of data -// being transformed, we will first attempt converting the type of the -// data to -// be transformed to match the type of the bound before comparing. -type GooglePrivacyDlpV2beta2FixedSizeBucketingConfig struct { - // BucketSize: Size of each bucket (except for minimum and maximum - // buckets). So if - // `lower_bound` = 10, `upper_bound` = 89, and `bucket_size` = 10, then - // the - // following buckets would be used: -10, 10-20, 20-30, 30-40, 40-50, - // 50-60, - // 60-70, 70-80, 80-89, 89+. Precision up to 2 decimals works. - // [Required]. - BucketSize float64 `json:"bucketSize,omitempty"` - - // LowerBound: Lower bound value of buckets. All values less than - // `lower_bound` are - // grouped together into a single bucket; for example if `lower_bound` = - // 10, - // then all values less than 10 are replaced with the value “-10”. - // [Required]. - LowerBound *GooglePrivacyDlpV2beta2Value `json:"lowerBound,omitempty"` - - // UpperBound: Upper bound value of buckets. All values greater than - // upper_bound are - // grouped together into a single bucket; for example if `upper_bound` = - // 89, - // then all values greater than 89 are replaced with the value - // “89+”. - // [Required]. - UpperBound *GooglePrivacyDlpV2beta2Value `json:"upperBound,omitempty"` - - // ForceSendFields is a list of field names (e.g. "BucketSize") 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. "BucketSize") 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 *GooglePrivacyDlpV2beta2FixedSizeBucketingConfig) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta2FixedSizeBucketingConfig - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *GooglePrivacyDlpV2beta2FixedSizeBucketingConfig) UnmarshalJSON(data []byte) error { - type NoMethod GooglePrivacyDlpV2beta2FixedSizeBucketingConfig - var s1 struct { - BucketSize gensupport.JSONFloat64 `json:"bucketSize"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.BucketSize = float64(s1.BucketSize) - return nil -} - -// GooglePrivacyDlpV2beta2HotwordRule: Detection rule that adjusts the -// likelihood of findings within a certain -// proximity of hotwords. -type GooglePrivacyDlpV2beta2HotwordRule struct { - // HotwordRegex: Regex pattern defining what qualifies as a hotword. - HotwordRegex *GooglePrivacyDlpV2beta2Regex `json:"hotwordRegex,omitempty"` - - // LikelihoodAdjustment: Likelihood adjustment to apply to all matching - // findings. - LikelihoodAdjustment *GooglePrivacyDlpV2beta2LikelihoodAdjustment `json:"likelihoodAdjustment,omitempty"` - - // Proximity: Proximity of the finding within which the entire hotword - // must reside. - // The total length of the window cannot exceed 1000 characters. Note - // that - // the finding itself will be included in the window, so that hotwords - // may - // be used to match substrings of the finding itself. For example, - // the - // certainty of a phone number regex "\(\d{3}\) \d{3}-\d{4}" could - // be - // adjusted upwards if the area code is known to be the local area code - // of - // a company office using the hotword regex "\(xxx\)", where "xxx" - // is the area code in question. - Proximity *GooglePrivacyDlpV2beta2Proximity `json:"proximity,omitempty"` - - // ForceSendFields is a list of field names (e.g. "HotwordRegex") 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. "HotwordRegex") 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 *GooglePrivacyDlpV2beta2HotwordRule) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta2HotwordRule - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta2ImageLocation: Bounding box encompassing -// detected text within an image. -type GooglePrivacyDlpV2beta2ImageLocation struct { - // Height: Height of the bounding box in pixels. - Height int64 `json:"height,omitempty"` - - // Left: Left coordinate of the bounding box. (0,0) is upper left. - Left int64 `json:"left,omitempty"` - - // Top: Top coordinate of the bounding box. (0,0) is upper left. - Top int64 `json:"top,omitempty"` - - // Width: Width of the bounding box in pixels. - Width int64 `json:"width,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Height") 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. "Height") 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 *GooglePrivacyDlpV2beta2ImageLocation) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta2ImageLocation - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta2ImageRedactionConfig: Configuration for -// determining how redaction of images should occur. -type GooglePrivacyDlpV2beta2ImageRedactionConfig struct { - // InfoType: Only one per info_type should be provided per request. If - // not - // specified, and redact_all_text is false, the DLP API will redact - // all - // text that it matches against all info_types that are found, but - // not - // specified in another ImageRedactionConfig. - InfoType *GooglePrivacyDlpV2beta2InfoType `json:"infoType,omitempty"` - - // RedactAllText: If true, all text found in the image, regardless - // whether it matches an - // info_type, is redacted. - RedactAllText bool `json:"redactAllText,omitempty"` - - // RedactionColor: The color to use when redacting content from an - // image. If not specified, - // the default is black. - RedactionColor *GooglePrivacyDlpV2beta2Color `json:"redactionColor,omitempty"` - - // ForceSendFields is a list of field names (e.g. "InfoType") 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. "InfoType") 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 *GooglePrivacyDlpV2beta2ImageRedactionConfig) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta2ImageRedactionConfig - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta2InfoType: Type of information detected by the -// API. -type GooglePrivacyDlpV2beta2InfoType struct { - // Name: Name of the information type. - Name string `json:"name,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Name") 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. "Name") 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 *GooglePrivacyDlpV2beta2InfoType) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta2InfoType - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta2InfoTypeDescription: InfoType description. -type GooglePrivacyDlpV2beta2InfoTypeDescription struct { - // DisplayName: Human readable form of the infoType name. - DisplayName string `json:"displayName,omitempty"` - - // Name: Internal name of the infoType. - Name string `json:"name,omitempty"` - - // SupportedBy: Which parts of the API supports this InfoType. - // - // Possible values: - // "ENUM_TYPE_UNSPECIFIED" - // "INSPECT" - Supported by the inspect operations. - // "RISK_ANALYSIS" - Supported by the risk analysis operations. - SupportedBy []string `json:"supportedBy,omitempty"` - - // ForceSendFields is a list of field names (e.g. "DisplayName") 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. "DisplayName") 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 *GooglePrivacyDlpV2beta2InfoTypeDescription) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta2InfoTypeDescription - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta2InfoTypeLimit: Max findings configuration per -// infoType, per content item or long -// running DlpJob. -type GooglePrivacyDlpV2beta2InfoTypeLimit struct { - // InfoType: Type of information the findings limit applies to. Only one - // limit per - // info_type should be provided. If InfoTypeLimit does not have - // an - // info_type, the DLP API applies the limit against all info_types - // that - // are found but not specified in another InfoTypeLimit. - InfoType *GooglePrivacyDlpV2beta2InfoType `json:"infoType,omitempty"` - - // MaxFindings: Max findings limit for the given infoType. - MaxFindings int64 `json:"maxFindings,omitempty"` - - // ForceSendFields is a list of field names (e.g. "InfoType") 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. "InfoType") 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 *GooglePrivacyDlpV2beta2InfoTypeLimit) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta2InfoTypeLimit - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta2InfoTypeStatistics: Statistics regarding a -// specific InfoType. -type GooglePrivacyDlpV2beta2InfoTypeStatistics struct { - // Count: Number of findings for this infoType. - Count int64 `json:"count,omitempty,string"` - - // InfoType: The type of finding this stat is for. - InfoType *GooglePrivacyDlpV2beta2InfoType `json:"infoType,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Count") 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. "Count") 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 *GooglePrivacyDlpV2beta2InfoTypeStatistics) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta2InfoTypeStatistics - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta2InfoTypeTransformation: A transformation to -// apply to text that is identified as a specific -// info_type. -type GooglePrivacyDlpV2beta2InfoTypeTransformation struct { - // InfoTypes: InfoTypes to apply the transformation to. Empty list will - // match all - // available infoTypes for this transformation. - InfoTypes []*GooglePrivacyDlpV2beta2InfoType `json:"infoTypes,omitempty"` - - // PrimitiveTransformation: Primitive transformation to apply to the - // infoType. [required] - PrimitiveTransformation *GooglePrivacyDlpV2beta2PrimitiveTransformation `json:"primitiveTransformation,omitempty"` - - // ForceSendFields is a list of field names (e.g. "InfoTypes") 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. "InfoTypes") 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 *GooglePrivacyDlpV2beta2InfoTypeTransformation) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta2InfoTypeTransformation - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta2InfoTypeTransformations: A type of -// transformation that will scan unstructured text and -// apply various `PrimitiveTransformation`s to each finding, where -// the -// transformation is applied to only values that were identified as a -// specific -// info_type. -type GooglePrivacyDlpV2beta2InfoTypeTransformations struct { - // Transformations: Transformation for each infoType. Cannot specify - // more than one - // for a given infoType. [required] - Transformations []*GooglePrivacyDlpV2beta2InfoTypeTransformation `json:"transformations,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Transformations") 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. "Transformations") 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 *GooglePrivacyDlpV2beta2InfoTypeTransformations) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta2InfoTypeTransformations - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta2InspectConfig: Configuration description of -// the scanning process. -// When used with redactContent only info_types and min_likelihood are -// currently -// used. -type GooglePrivacyDlpV2beta2InspectConfig struct { - // CustomInfoTypes: Custom infoTypes provided by the user. - CustomInfoTypes []*GooglePrivacyDlpV2beta2CustomInfoType `json:"customInfoTypes,omitempty"` - - // ExcludeInfoTypes: When true, excludes type information of the - // findings. - ExcludeInfoTypes bool `json:"excludeInfoTypes,omitempty"` - - // IncludeQuote: When true, a contextual quote from the data that - // triggered a finding is - // included in the response; see Finding.quote. - IncludeQuote bool `json:"includeQuote,omitempty"` - - // InfoTypes: Restricts what info_types to look for. The values must - // correspond to - // InfoType values returned by ListInfoTypes or found in - // documentation. - // Empty info_types runs all enabled detectors. - InfoTypes []*GooglePrivacyDlpV2beta2InfoType `json:"infoTypes,omitempty"` - - Limits *GooglePrivacyDlpV2beta2FindingLimits `json:"limits,omitempty"` - - // MinLikelihood: Only returns findings equal or above this threshold. - // The default is - // POSSIBLE. - // - // Possible values: - // "LIKELIHOOD_UNSPECIFIED" - Default value; information with all - // likelihoods is included. - // "VERY_UNLIKELY" - Few matching elements. - // "UNLIKELY" - // "POSSIBLE" - Some matching elements. - // "LIKELY" - // "VERY_LIKELY" - Many matching elements. - MinLikelihood string `json:"minLikelihood,omitempty"` - - // ForceSendFields is a list of field names (e.g. "CustomInfoTypes") 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. "CustomInfoTypes") 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 *GooglePrivacyDlpV2beta2InspectConfig) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta2InspectConfig - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta2InspectContentRequest: Request to search for -// potentially sensitive info in a ContentItem. -type GooglePrivacyDlpV2beta2InspectContentRequest struct { - // InspectConfig: Configuration for the inspector. What specified here - // will override - // the template referenced by the inspect_template_name argument. - InspectConfig *GooglePrivacyDlpV2beta2InspectConfig `json:"inspectConfig,omitempty"` - - // InspectTemplateName: Optional template to use. Any configuration - // directly specified in - // inspect_config will override those set in the template. Singular - // fields - // that are set in this request will replace their corresponding fields - // in the - // template. Repeated fields are appended. Singular sub-messages and - // groups - // are recursively merged. - InspectTemplateName string `json:"inspectTemplateName,omitempty"` - - // Item: The item to inspect. - Item *GooglePrivacyDlpV2beta2ContentItem `json:"item,omitempty"` - - // ForceSendFields is a list of field names (e.g. "InspectConfig") 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. "InspectConfig") 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 *GooglePrivacyDlpV2beta2InspectContentRequest) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta2InspectContentRequest - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta2InspectContentResponse: Results of inspecting -// an item. -type GooglePrivacyDlpV2beta2InspectContentResponse struct { - // Result: The findings. - Result *GooglePrivacyDlpV2beta2InspectResult `json:"result,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Result") 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. "Result") 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 *GooglePrivacyDlpV2beta2InspectContentResponse) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta2InspectContentResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta2InspectDataSourceDetails: The results of an -// inspect DataSource job. -type GooglePrivacyDlpV2beta2InspectDataSourceDetails struct { - // RequestedOptions: The configuration used for this job. - RequestedOptions *GooglePrivacyDlpV2beta2RequestedOptions `json:"requestedOptions,omitempty"` - - // Result: A summary of the outcome of this inspect job. - Result *GooglePrivacyDlpV2beta2Result `json:"result,omitempty"` - - // ForceSendFields is a list of field names (e.g. "RequestedOptions") 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. "RequestedOptions") 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 *GooglePrivacyDlpV2beta2InspectDataSourceDetails) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta2InspectDataSourceDetails - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta2InspectDataSourceRequest: Request for -// scheduling a scan of a data subset from a Google Platform -// data -// repository. -type GooglePrivacyDlpV2beta2InspectDataSourceRequest struct { - // JobConfig: A configuration for the job. - JobConfig *GooglePrivacyDlpV2beta2InspectJobConfig `json:"jobConfig,omitempty"` - - // JobId: Optional job ID to use for the created job. If not provided, a - // job ID will - // automatically be generated. Must be unique within the project. The - // job ID - // can contain uppercase and lowercase letters, numbers, and hyphens; - // that is, - // it must match the regular expression: `[a-zA-Z\\d-]+`. The maximum - // length - // is 100 characters. Can be empty to allow the system to generate one. - JobId string `json:"jobId,omitempty"` - - // ForceSendFields is a list of field names (e.g. "JobConfig") 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. "JobConfig") 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 *GooglePrivacyDlpV2beta2InspectDataSourceRequest) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta2InspectDataSourceRequest - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type GooglePrivacyDlpV2beta2InspectJobConfig struct { - // Actions: Actions to execute at the completion of the job. Are - // executed in the order - // provided. - Actions []*GooglePrivacyDlpV2beta2Action `json:"actions,omitempty"` - - // InspectConfig: How and what to scan for. - InspectConfig *GooglePrivacyDlpV2beta2InspectConfig `json:"inspectConfig,omitempty"` - - // InspectTemplateName: If provided, will be used as the default for all - // values in InspectConfig. - // `inspect_config` will be merged into the values persisted as part of - // the - // template. - InspectTemplateName string `json:"inspectTemplateName,omitempty"` - - // OutputConfig: Where to put the findings. - OutputConfig *GooglePrivacyDlpV2beta2OutputStorageConfig `json:"outputConfig,omitempty"` - - // StorageConfig: The data to scan. - StorageConfig *GooglePrivacyDlpV2beta2StorageConfig `json:"storageConfig,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Actions") 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. "Actions") 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 *GooglePrivacyDlpV2beta2InspectJobConfig) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta2InspectJobConfig - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta2InspectResult: All the findings for a single -// scanned item. -type GooglePrivacyDlpV2beta2InspectResult struct { - // Findings: List of findings for an item. - Findings []*GooglePrivacyDlpV2beta2Finding `json:"findings,omitempty"` - - // FindingsTruncated: If true, then this item might have more findings - // than were returned, - // and the findings returned are an arbitrary subset of all - // findings. - // The findings list might be truncated because the input items were - // too - // large, or because the server reached the maximum amount of - // resources - // allowed for a single API call. For best results, divide the input - // into - // smaller batches. - FindingsTruncated bool `json:"findingsTruncated,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Findings") 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. "Findings") 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 *GooglePrivacyDlpV2beta2InspectResult) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta2InspectResult - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta2InspectTemplate: The inspectTemplate contains -// a configuration (set of types of sensitive data -// to be detected) to be used anywhere you otherwise would normally -// specify -// InspectConfig. -type GooglePrivacyDlpV2beta2InspectTemplate struct { - // CreateTime: The creation timestamp of a inspectTemplate, output only - // field. - CreateTime string `json:"createTime,omitempty"` - - // Description: Short description (max 256 chars). - Description string `json:"description,omitempty"` - - // DisplayName: Display name (max 256 chars). - DisplayName string `json:"displayName,omitempty"` - - // InspectConfig: The core content of the template. Configuration of the - // scanning process. - InspectConfig *GooglePrivacyDlpV2beta2InspectConfig `json:"inspectConfig,omitempty"` - - // Name: The template name. Output only. - // - // The template will have one of the following - // formats: - // `projects/PROJECT_ID/inspectTemplates/TEMPLATE_ID` - // OR - // `organizations/ORGANIZATION_ID/inspectTemplates/TEMPLATE_ID` - Name string `json:"name,omitempty"` - - // UpdateTime: The last update timestamp of a inspectTemplate, output - // only field. - UpdateTime string `json:"updateTime,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "CreateTime") 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. "CreateTime") 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 *GooglePrivacyDlpV2beta2InspectTemplate) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta2InspectTemplate - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta2JobTrigger: Contains a configuration to make -// dlp api calls on a repeating basis. -type GooglePrivacyDlpV2beta2JobTrigger struct { - // CreateTime: The creation timestamp of a triggeredJob, output only - // field. - CreateTime string `json:"createTime,omitempty"` - - // Description: User provided description (max 256 chars) - Description string `json:"description,omitempty"` - - // DisplayName: Display name (max 100 chars) - DisplayName string `json:"displayName,omitempty"` - - // Errors: A stream of errors encountered when the trigger was - // activated. Repeated - // errors may result in the JobTrigger automaticaly being paused. - // Will return the last 100 errors. Whenever the JobTrigger is - // modified - // this list will be cleared. Output only field. - Errors []*GooglePrivacyDlpV2beta2Error `json:"errors,omitempty"` - - InspectJob *GooglePrivacyDlpV2beta2InspectJobConfig `json:"inspectJob,omitempty"` - - // LastRunTime: The timestamp of the last time this trigger executed. - LastRunTime string `json:"lastRunTime,omitempty"` - - // Name: Unique resource name for the triggeredJob, assigned by the - // service when the - // triggeredJob is created, for - // example - // `projects/dlp-test-project/triggeredJobs/53234423`. - Name string `json:"name,omitempty"` - - // Status: A status for this trigger. [required] - // - // Possible values: - // "STATUS_UNSPECIFIED" - // "HEALTHY" - Trigger is healthy. - // "PAUSED" - Trigger is temporarily paused. - // "CANCELLED" - Trigger is cancelled and can not be resumed. - Status string `json:"status,omitempty"` - - // Triggers: A list of triggers which will be OR'ed together. Only one - // in the list - // needs to trigger for a job to be started. The list may contain only - // a single Schedule trigger and must have at least one object. - Triggers []*GooglePrivacyDlpV2beta2Trigger `json:"triggers,omitempty"` - - // UpdateTime: The last update timestamp of a triggeredJob, output only - // field. - UpdateTime string `json:"updateTime,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "CreateTime") 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. "CreateTime") 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 *GooglePrivacyDlpV2beta2JobTrigger) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta2JobTrigger - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta2KAnonymityConfig: k-anonymity metric, used for -// analysis of reidentification risk. -type GooglePrivacyDlpV2beta2KAnonymityConfig struct { - // EntityId: Optional message indicating that each distinct entity_id - // should not - // contribute to the k-anonymity count more than once per equivalence - // class. - // If an entity_id appears on several rows with different - // quasi-identifier - // tuples, it will contribute to each count exactly once. - // - // This can lead to unexpected results. Consider a table where ID 1 - // is - // associated to quasi-identifier "foo", ID 2 to "bar", and ID 3 to - // *both* - // quasi-identifiers "foo" and "bar" (on separate rows), and where this - // ID - // is used as entity_id. Then, the anonymity value associated to ID 3 - // will - // be 2, even if it is the only ID to be associated to both values "foo" - // and - // "bar". - EntityId *GooglePrivacyDlpV2beta2EntityId `json:"entityId,omitempty"` - - // QuasiIds: Set of fields to compute k-anonymity over. When multiple - // fields are - // specified, they are considered a single composite key. Structs - // and - // repeated data types are not supported; however, nested fields - // are - // supported so long as they are not structs themselves or nested - // within - // a repeated field. - QuasiIds []*GooglePrivacyDlpV2beta2FieldId `json:"quasiIds,omitempty"` - - // ForceSendFields is a list of field names (e.g. "EntityId") 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. "EntityId") 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 *GooglePrivacyDlpV2beta2KAnonymityConfig) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta2KAnonymityConfig - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta2KAnonymityEquivalenceClass: The set of -// columns' values that share the same ldiversity value -type GooglePrivacyDlpV2beta2KAnonymityEquivalenceClass struct { - // EquivalenceClassSize: Size of the equivalence class, for example - // number of rows with the - // above set of values. - EquivalenceClassSize int64 `json:"equivalenceClassSize,omitempty,string"` - - // QuasiIdsValues: Set of values defining the equivalence class. One - // value per - // quasi-identifier column in the original KAnonymity metric - // message. - // The order is always the same as the original request. - QuasiIdsValues []*GooglePrivacyDlpV2beta2Value `json:"quasiIdsValues,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "EquivalenceClassSize") 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. "EquivalenceClassSize") 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 *GooglePrivacyDlpV2beta2KAnonymityEquivalenceClass) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta2KAnonymityEquivalenceClass - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type GooglePrivacyDlpV2beta2KAnonymityHistogramBucket struct { - // BucketSize: Total number of equivalence classes in this bucket. - BucketSize int64 `json:"bucketSize,omitempty,string"` - - // BucketValueCount: Total number of distinct equivalence classes in - // this bucket. - BucketValueCount int64 `json:"bucketValueCount,omitempty,string"` - - // BucketValues: Sample of equivalence classes in this bucket. The total - // number of - // classes returned per bucket is capped at 20. - BucketValues []*GooglePrivacyDlpV2beta2KAnonymityEquivalenceClass `json:"bucketValues,omitempty"` - - // EquivalenceClassSizeLowerBound: Lower bound on the size of the - // equivalence classes in this bucket. - EquivalenceClassSizeLowerBound int64 `json:"equivalenceClassSizeLowerBound,omitempty,string"` - - // EquivalenceClassSizeUpperBound: Upper bound on the size of the - // equivalence classes in this bucket. - EquivalenceClassSizeUpperBound int64 `json:"equivalenceClassSizeUpperBound,omitempty,string"` - - // ForceSendFields is a list of field names (e.g. "BucketSize") 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. "BucketSize") 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 *GooglePrivacyDlpV2beta2KAnonymityHistogramBucket) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta2KAnonymityHistogramBucket - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta2KAnonymityResult: Result of the k-anonymity -// computation. -type GooglePrivacyDlpV2beta2KAnonymityResult struct { - // EquivalenceClassHistogramBuckets: Histogram of k-anonymity - // equivalence classes. - EquivalenceClassHistogramBuckets []*GooglePrivacyDlpV2beta2KAnonymityHistogramBucket `json:"equivalenceClassHistogramBuckets,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "EquivalenceClassHistogramBuckets") 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. - // "EquivalenceClassHistogramBuckets") 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 *GooglePrivacyDlpV2beta2KAnonymityResult) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta2KAnonymityResult - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta2KMapEstimationConfig: Reidentifiability -// metric. This corresponds to a risk model similar to what -// is called "journalist risk" in the literature, except the attack -// dataset is -// statistically modeled instead of being perfectly known. This can be -// done -// using publicly available data (like the US Census), or using a -// custom -// statistical model (indicated as one or several BigQuery tables), or -// by -// extrapolating from the distribution of values in the input dataset. -type GooglePrivacyDlpV2beta2KMapEstimationConfig struct { - // AuxiliaryTables: Several auxiliary tables can be used in the - // analysis. Each custom_tag - // used to tag a quasi-identifiers column must appear in exactly one - // column - // of one auxiliary table. - AuxiliaryTables []*GooglePrivacyDlpV2beta2AuxiliaryTable `json:"auxiliaryTables,omitempty"` - - // QuasiIds: Fields considered to be quasi-identifiers. No two columns - // can have the - // same tag. [required] - QuasiIds []*GooglePrivacyDlpV2beta2TaggedField `json:"quasiIds,omitempty"` - - // RegionCode: ISO 3166-1 alpha-2 region code to use in the statistical - // modeling. - // Required if no column is tagged with a region-specific InfoType - // (like - // US_ZIP_5) or a region code. - RegionCode string `json:"regionCode,omitempty"` - - // ForceSendFields is a list of field names (e.g. "AuxiliaryTables") 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. "AuxiliaryTables") 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 *GooglePrivacyDlpV2beta2KMapEstimationConfig) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta2KMapEstimationConfig - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta2KMapEstimationHistogramBucket: A -// KMapEstimationHistogramBucket message with the following values: -// min_anonymity: 3 -// max_anonymity: 5 -// frequency: 42 -// means that there are 42 records whose quasi-identifier values -// correspond -// to 3, 4 or 5 people in the overlying population. An important -// particular -// case is when min_anonymity = max_anonymity = 1: the frequency field -// then -// corresponds to the number of uniquely identifiable records. -type GooglePrivacyDlpV2beta2KMapEstimationHistogramBucket struct { - // BucketSize: Number of records within these anonymity bounds. - BucketSize int64 `json:"bucketSize,omitempty,string"` - - // BucketValueCount: Total number of distinct quasi-identifier tuple - // values in this bucket. - BucketValueCount int64 `json:"bucketValueCount,omitempty,string"` - - // BucketValues: Sample of quasi-identifier tuple values in this bucket. - // The total - // number of classes returned per bucket is capped at 20. - BucketValues []*GooglePrivacyDlpV2beta2KMapEstimationQuasiIdValues `json:"bucketValues,omitempty"` - - // MaxAnonymity: Always greater than or equal to min_anonymity. - MaxAnonymity int64 `json:"maxAnonymity,omitempty,string"` - - // MinAnonymity: Always positive. - MinAnonymity int64 `json:"minAnonymity,omitempty,string"` - - // ForceSendFields is a list of field names (e.g. "BucketSize") 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. "BucketSize") 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 *GooglePrivacyDlpV2beta2KMapEstimationHistogramBucket) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta2KMapEstimationHistogramBucket - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta2KMapEstimationQuasiIdValues: A tuple of values -// for the quasi-identifier columns. -type GooglePrivacyDlpV2beta2KMapEstimationQuasiIdValues struct { - // EstimatedAnonymity: The estimated anonymity for these - // quasi-identifier values. - EstimatedAnonymity int64 `json:"estimatedAnonymity,omitempty,string"` - - // QuasiIdsValues: The quasi-identifier values. - QuasiIdsValues []*GooglePrivacyDlpV2beta2Value `json:"quasiIdsValues,omitempty"` - - // ForceSendFields is a list of field names (e.g. "EstimatedAnonymity") - // 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. "EstimatedAnonymity") 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 *GooglePrivacyDlpV2beta2KMapEstimationQuasiIdValues) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta2KMapEstimationQuasiIdValues - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta2KMapEstimationResult: Result of the -// reidentifiability analysis. Note that these results are -// an -// estimation, not exact values. -type GooglePrivacyDlpV2beta2KMapEstimationResult struct { - // KMapEstimationHistogram: The intervals [min_anonymity, max_anonymity] - // do not overlap. If a value - // doesn't correspond to any such interval, the associated frequency - // is - // zero. For example, the following records: - // {min_anonymity: 1, max_anonymity: 1, frequency: 17} - // {min_anonymity: 2, max_anonymity: 3, frequency: 42} - // {min_anonymity: 5, max_anonymity: 10, frequency: 99} - // mean that there are no record with an estimated anonymity of 4, 5, - // or - // larger than 10. - KMapEstimationHistogram []*GooglePrivacyDlpV2beta2KMapEstimationHistogramBucket `json:"kMapEstimationHistogram,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "KMapEstimationHistogram") 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. "KMapEstimationHistogram") - // 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 *GooglePrivacyDlpV2beta2KMapEstimationResult) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta2KMapEstimationResult - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta2Key: A unique identifier for a Datastore -// entity. -// If a key's partition ID or any of its path kinds or names -// are -// reserved/read-only, the key is reserved/read-only. -// A reserved/read-only key is forbidden in certain documented contexts. -type GooglePrivacyDlpV2beta2Key struct { - // PartitionId: Entities are partitioned into subsets, currently - // identified by a project - // ID and namespace ID. - // Queries are scoped to a single partition. - PartitionId *GooglePrivacyDlpV2beta2PartitionId `json:"partitionId,omitempty"` - - // Path: The entity path. - // An entity path consists of one or more elements composed of a kind - // and a - // string or numerical identifier, which identify entities. The - // first - // element identifies a _root entity_, the second element identifies - // a _child_ of the root entity, the third element identifies a child of - // the - // second entity, and so forth. The entities identified by all prefixes - // of - // the path are called the element's _ancestors_. - // - // A path can never be empty, and a path can have at most 100 elements. - Path []*GooglePrivacyDlpV2beta2PathElement `json:"path,omitempty"` - - // ForceSendFields is a list of field names (e.g. "PartitionId") 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. "PartitionId") 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 *GooglePrivacyDlpV2beta2Key) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta2Key - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta2KindExpression: A representation of a -// Datastore kind. -type GooglePrivacyDlpV2beta2KindExpression struct { - // Name: The name of the kind. - Name string `json:"name,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Name") 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. "Name") 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 *GooglePrivacyDlpV2beta2KindExpression) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta2KindExpression - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta2KmsWrappedCryptoKey: Include to use an -// existing data crypto key wrapped by KMS. -// Authorization requires the following IAM permissions when sending a -// request -// to perform a crypto transformation using a kms-wrapped crypto -// key: -// dlp.kms.encrypt -type GooglePrivacyDlpV2beta2KmsWrappedCryptoKey struct { - // CryptoKeyName: The resource name of the KMS CryptoKey to use for - // unwrapping. [required] - CryptoKeyName string `json:"cryptoKeyName,omitempty"` - - // WrappedKey: The wrapped data crypto key. [required] - WrappedKey string `json:"wrappedKey,omitempty"` - - // ForceSendFields is a list of field names (e.g. "CryptoKeyName") 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. "CryptoKeyName") 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 *GooglePrivacyDlpV2beta2KmsWrappedCryptoKey) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta2KmsWrappedCryptoKey - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta2LDiversityConfig: l-diversity metric, used for -// analysis of reidentification risk. -type GooglePrivacyDlpV2beta2LDiversityConfig struct { - // QuasiIds: Set of quasi-identifiers indicating how equivalence classes - // are - // defined for the l-diversity computation. When multiple fields - // are - // specified, they are considered a single composite key. - QuasiIds []*GooglePrivacyDlpV2beta2FieldId `json:"quasiIds,omitempty"` - - // SensitiveAttribute: Sensitive field for computing the l-value. - SensitiveAttribute *GooglePrivacyDlpV2beta2FieldId `json:"sensitiveAttribute,omitempty"` - - // ForceSendFields is a list of field names (e.g. "QuasiIds") 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. "QuasiIds") 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 *GooglePrivacyDlpV2beta2LDiversityConfig) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta2LDiversityConfig - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta2LDiversityEquivalenceClass: The set of -// columns' values that share the same ldiversity value. -type GooglePrivacyDlpV2beta2LDiversityEquivalenceClass struct { - // EquivalenceClassSize: Size of the k-anonymity equivalence class. - EquivalenceClassSize int64 `json:"equivalenceClassSize,omitempty,string"` - - // NumDistinctSensitiveValues: Number of distinct sensitive values in - // this equivalence class. - NumDistinctSensitiveValues int64 `json:"numDistinctSensitiveValues,omitempty,string"` - - // QuasiIdsValues: Quasi-identifier values defining the k-anonymity - // equivalence - // class. The order is always the same as the original request. - QuasiIdsValues []*GooglePrivacyDlpV2beta2Value `json:"quasiIdsValues,omitempty"` - - // TopSensitiveValues: Estimated frequencies of top sensitive values. - TopSensitiveValues []*GooglePrivacyDlpV2beta2ValueFrequency `json:"topSensitiveValues,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "EquivalenceClassSize") 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. "EquivalenceClassSize") 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 *GooglePrivacyDlpV2beta2LDiversityEquivalenceClass) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta2LDiversityEquivalenceClass - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type GooglePrivacyDlpV2beta2LDiversityHistogramBucket struct { - // BucketSize: Total number of equivalence classes in this bucket. - BucketSize int64 `json:"bucketSize,omitempty,string"` - - // BucketValueCount: Total number of distinct equivalence classes in - // this bucket. - BucketValueCount int64 `json:"bucketValueCount,omitempty,string"` - - // BucketValues: Sample of equivalence classes in this bucket. The total - // number of - // classes returned per bucket is capped at 20. - BucketValues []*GooglePrivacyDlpV2beta2LDiversityEquivalenceClass `json:"bucketValues,omitempty"` - - // SensitiveValueFrequencyLowerBound: Lower bound on the sensitive value - // frequencies of the equivalence - // classes in this bucket. - SensitiveValueFrequencyLowerBound int64 `json:"sensitiveValueFrequencyLowerBound,omitempty,string"` - - // SensitiveValueFrequencyUpperBound: Upper bound on the sensitive value - // frequencies of the equivalence - // classes in this bucket. - SensitiveValueFrequencyUpperBound int64 `json:"sensitiveValueFrequencyUpperBound,omitempty,string"` - - // ForceSendFields is a list of field names (e.g. "BucketSize") 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. "BucketSize") 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 *GooglePrivacyDlpV2beta2LDiversityHistogramBucket) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta2LDiversityHistogramBucket - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta2LDiversityResult: Result of the l-diversity -// computation. -type GooglePrivacyDlpV2beta2LDiversityResult struct { - // SensitiveValueFrequencyHistogramBuckets: Histogram of l-diversity - // equivalence class sensitive value frequencies. - SensitiveValueFrequencyHistogramBuckets []*GooglePrivacyDlpV2beta2LDiversityHistogramBucket `json:"sensitiveValueFrequencyHistogramBuckets,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "SensitiveValueFrequencyHistogramBuckets") 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. - // "SensitiveValueFrequencyHistogramBuckets") 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 *GooglePrivacyDlpV2beta2LDiversityResult) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta2LDiversityResult - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta2LikelihoodAdjustment: Message for specifying -// an adjustment to the likelihood of a finding as -// part of a detection rule. -type GooglePrivacyDlpV2beta2LikelihoodAdjustment struct { - // FixedLikelihood: Set the likelihood of a finding to a fixed value. - // - // Possible values: - // "LIKELIHOOD_UNSPECIFIED" - Default value; information with all - // likelihoods is included. - // "VERY_UNLIKELY" - Few matching elements. - // "UNLIKELY" - // "POSSIBLE" - Some matching elements. - // "LIKELY" - // "VERY_LIKELY" - Many matching elements. - FixedLikelihood string `json:"fixedLikelihood,omitempty"` - - // RelativeLikelihood: Increase or decrease the likelihood by the - // specified number of - // levels. For example, if a finding would be `POSSIBLE` without - // the - // detection rule and `relative_likelihood` is 1, then it is upgraded - // to - // `LIKELY`, while a value of -1 would downgrade it to - // `UNLIKELY`. - // Likelihood may never drop below `VERY_UNLIKELY` or - // exceed - // `VERY_LIKELY`, so applying an adjustment of 1 followed by - // an - // adjustment of -1 when base likelihood is `VERY_LIKELY` will result - // in - // a final likelihood of `LIKELY`. - RelativeLikelihood int64 `json:"relativeLikelihood,omitempty"` - - // ForceSendFields is a list of field names (e.g. "FixedLikelihood") 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. "FixedLikelihood") 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 *GooglePrivacyDlpV2beta2LikelihoodAdjustment) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta2LikelihoodAdjustment - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta2ListDeidentifyTemplatesResponse: Response -// message for ListDeidentifyTemplates. -type GooglePrivacyDlpV2beta2ListDeidentifyTemplatesResponse struct { - // DeidentifyTemplates: List of deidentify templates, up to page_size - // in - // ListDeidentifyTemplatesRequest. - DeidentifyTemplates []*GooglePrivacyDlpV2beta2DeidentifyTemplate `json:"deidentifyTemplates,omitempty"` - - // NextPageToken: If the next page is available then the next page token - // to be used - // in following ListDeidentifyTemplates request. - 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. "DeidentifyTemplates") - // 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. "DeidentifyTemplates") 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 *GooglePrivacyDlpV2beta2ListDeidentifyTemplatesResponse) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta2ListDeidentifyTemplatesResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta2ListDlpJobsResponse: The response message for -// listing DLP jobs. -type GooglePrivacyDlpV2beta2ListDlpJobsResponse struct { - // Jobs: A list of DlpJobs that matches the specified filter in the - // request. - Jobs []*GooglePrivacyDlpV2beta2DlpJob `json:"jobs,omitempty"` - - // NextPageToken: The standard List next-page token. - 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. "Jobs") 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. "Jobs") 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 *GooglePrivacyDlpV2beta2ListDlpJobsResponse) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta2ListDlpJobsResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta2ListInfoTypesResponse: Response to the -// ListInfoTypes request. -type GooglePrivacyDlpV2beta2ListInfoTypesResponse struct { - // InfoTypes: Set of sensitive infoTypes. - InfoTypes []*GooglePrivacyDlpV2beta2InfoTypeDescription `json:"infoTypes,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "InfoTypes") 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. "InfoTypes") 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 *GooglePrivacyDlpV2beta2ListInfoTypesResponse) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta2ListInfoTypesResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta2ListInspectTemplatesResponse: Response message -// for ListInspectTemplates. -type GooglePrivacyDlpV2beta2ListInspectTemplatesResponse struct { - // InspectTemplates: List of inspectTemplates, up to page_size in - // ListInspectTemplatesRequest. - InspectTemplates []*GooglePrivacyDlpV2beta2InspectTemplate `json:"inspectTemplates,omitempty"` - - // NextPageToken: If the next page is available then the next page token - // to be used - // in following ListInspectTemplates request. - 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. "InspectTemplates") 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. "InspectTemplates") 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 *GooglePrivacyDlpV2beta2ListInspectTemplatesResponse) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta2ListInspectTemplatesResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta2ListJobTriggersResponse: Response message for -// ListJobTriggers. -type GooglePrivacyDlpV2beta2ListJobTriggersResponse struct { - // JobTriggers: List of triggeredJobs, up to page_size in - // ListJobTriggersRequest. - JobTriggers []*GooglePrivacyDlpV2beta2JobTrigger `json:"jobTriggers,omitempty"` - - // NextPageToken: If the next page is available then the next page token - // to be used - // in following ListJobTriggers request. - 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. "JobTriggers") 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. "JobTriggers") 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 *GooglePrivacyDlpV2beta2ListJobTriggersResponse) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta2ListJobTriggersResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta2Location: Specifies the location of the -// finding. -type GooglePrivacyDlpV2beta2Location struct { - // ByteRange: Zero-based byte offsets delimiting the finding. - // These are relative to the finding's containing element. - // Note that when the content is not textual, this references - // the UTF-8 encoded textual representation of the content. - // Omitted if content is an image. - ByteRange *GooglePrivacyDlpV2beta2Range `json:"byteRange,omitempty"` - - // CodepointRange: Unicode character offsets delimiting the - // finding. - // These are relative to the finding's containing element. - // Provided when the content is text. - CodepointRange *GooglePrivacyDlpV2beta2Range `json:"codepointRange,omitempty"` - - // FieldId: The pointer to the property or cell that contained the - // finding. - // Provided when the finding's containing element is a cell in a - // table - // or a property of storage object. - FieldId *GooglePrivacyDlpV2beta2FieldId `json:"fieldId,omitempty"` - - // ImageBoxes: The area within the image that contained the - // finding. - // Provided when the content is an image. - ImageBoxes []*GooglePrivacyDlpV2beta2ImageLocation `json:"imageBoxes,omitempty"` - - // RecordKey: The pointer to the record in storage that contained the - // field the - // finding was found in. - // Provided when the finding's containing element is a property - // of a storage object. - RecordKey *GooglePrivacyDlpV2beta2RecordKey `json:"recordKey,omitempty"` - - // TableLocation: The pointer to the row of the table that contained the - // finding. - // Provided when the finding's containing element is a cell of a table. - TableLocation *GooglePrivacyDlpV2beta2TableLocation `json:"tableLocation,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ByteRange") 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. "ByteRange") 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 *GooglePrivacyDlpV2beta2Location) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta2Location - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta2NumericalStatsConfig: Compute numerical stats -// over an individual column, including -// min, max, and quantiles. -type GooglePrivacyDlpV2beta2NumericalStatsConfig struct { - // Field: Field to compute numerical stats on. Supported types - // are - // integer, float, date, datetime, timestamp, time. - Field *GooglePrivacyDlpV2beta2FieldId `json:"field,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Field") 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. "Field") 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 *GooglePrivacyDlpV2beta2NumericalStatsConfig) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta2NumericalStatsConfig - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta2NumericalStatsResult: Result of the numerical -// stats computation. -type GooglePrivacyDlpV2beta2NumericalStatsResult struct { - // MaxValue: Maximum value appearing in the column. - MaxValue *GooglePrivacyDlpV2beta2Value `json:"maxValue,omitempty"` - - // MinValue: Minimum value appearing in the column. - MinValue *GooglePrivacyDlpV2beta2Value `json:"minValue,omitempty"` - - // QuantileValues: List of 99 values that partition the set of field - // values into 100 equal - // sized buckets. - QuantileValues []*GooglePrivacyDlpV2beta2Value `json:"quantileValues,omitempty"` - - // ForceSendFields is a list of field names (e.g. "MaxValue") 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. "MaxValue") 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 *GooglePrivacyDlpV2beta2NumericalStatsResult) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta2NumericalStatsResult - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta2OutputStorageConfig: Cloud repository for -// storing output. -type GooglePrivacyDlpV2beta2OutputStorageConfig struct { - // OutputSchema: Schema used for writing the findings. Columns are - // derived from the - // `Finding` object. If appending to an existing table, any columns from - // the - // predefined schema that are missing will be added. No columns in - // the - // existing table will be deleted. - // - // If unspecified, then all available columns will be used for a new - // table, - // and no changes will be made to an existing table. - // - // Possible values: - // "OUTPUT_SCHEMA_UNSPECIFIED" - // "BASIC_COLUMNS" - Basic schema including only `info_type`, `quote`, - // `certainty`, and - // `timestamp`. - // "GCS_COLUMNS" - Schema tailored to findings from scanning Google - // Cloud Storage. - // "DATASTORE_COLUMNS" - Schema tailored to findings from scanning - // Google Datastore. - // "BIG_QUERY_COLUMNS" - Schema tailored to findings from scanning - // Google BigQuery. - // "ALL_COLUMNS" - Schema containing all columns. - OutputSchema string `json:"outputSchema,omitempty"` - - // Table: Store findings in an existing table or a new table in an - // existing - // dataset. Each column in an existing table must have the same name, - // type, - // and mode of a field in the `Finding` object. If table_id is not set a - // new - // one will be generated for you with the following - // format: - // dlp_googleapis_yyyy_mm_dd_[dlp_job_id]. Pacific timezone will be used - // for - // generating the date details. - Table *GooglePrivacyDlpV2beta2BigQueryTable `json:"table,omitempty"` - - // ForceSendFields is a list of field names (e.g. "OutputSchema") 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. "OutputSchema") 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 *GooglePrivacyDlpV2beta2OutputStorageConfig) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta2OutputStorageConfig - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta2PartitionId: Datastore partition ID. -// A partition ID identifies a grouping of entities. The grouping is -// always -// by project and namespace, however the namespace ID may be empty. -// -// A partition ID contains several dimensions: -// project ID and namespace ID. -type GooglePrivacyDlpV2beta2PartitionId struct { - // NamespaceId: If not empty, the ID of the namespace to which the - // entities belong. - NamespaceId string `json:"namespaceId,omitempty"` - - // ProjectId: The ID of the project to which the entities belong. - ProjectId string `json:"projectId,omitempty"` - - // ForceSendFields is a list of field names (e.g. "NamespaceId") 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. "NamespaceId") 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 *GooglePrivacyDlpV2beta2PartitionId) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta2PartitionId - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta2PathElement: A (kind, ID/name) pair used to -// construct a key path. -// -// If either name or ID is set, the element is complete. -// If neither is set, the element is incomplete. -type GooglePrivacyDlpV2beta2PathElement struct { - // Id: The auto-allocated ID of the entity. - // Never equal to zero. Values less than zero are discouraged and may - // not - // be supported in the future. - Id int64 `json:"id,omitempty,string"` - - // Kind: The kind of the entity. - // A kind matching regex `__.*__` is reserved/read-only. - // A kind must not contain more than 1500 bytes when UTF-8 - // encoded. - // Cannot be "". - Kind string `json:"kind,omitempty"` - - // Name: The name of the entity. - // A name matching regex `__.*__` is reserved/read-only. - // A name must not be more than 1500 bytes when UTF-8 encoded. - // Cannot be "". - Name string `json:"name,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Id") 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. "Id") 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 *GooglePrivacyDlpV2beta2PathElement) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta2PathElement - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta2PrimitiveTransformation: A rule for -// transforming a value. -type GooglePrivacyDlpV2beta2PrimitiveTransformation struct { - BucketingConfig *GooglePrivacyDlpV2beta2BucketingConfig `json:"bucketingConfig,omitempty"` - - CharacterMaskConfig *GooglePrivacyDlpV2beta2CharacterMaskConfig `json:"characterMaskConfig,omitempty"` - - CryptoHashConfig *GooglePrivacyDlpV2beta2CryptoHashConfig `json:"cryptoHashConfig,omitempty"` - - CryptoReplaceFfxFpeConfig *GooglePrivacyDlpV2beta2CryptoReplaceFfxFpeConfig `json:"cryptoReplaceFfxFpeConfig,omitempty"` - - DateShiftConfig *GooglePrivacyDlpV2beta2DateShiftConfig `json:"dateShiftConfig,omitempty"` - - FixedSizeBucketingConfig *GooglePrivacyDlpV2beta2FixedSizeBucketingConfig `json:"fixedSizeBucketingConfig,omitempty"` - - RedactConfig *GooglePrivacyDlpV2beta2RedactConfig `json:"redactConfig,omitempty"` - - ReplaceConfig *GooglePrivacyDlpV2beta2ReplaceValueConfig `json:"replaceConfig,omitempty"` - - ReplaceWithInfoTypeConfig *GooglePrivacyDlpV2beta2ReplaceWithInfoTypeConfig `json:"replaceWithInfoTypeConfig,omitempty"` - - TimePartConfig *GooglePrivacyDlpV2beta2TimePartConfig `json:"timePartConfig,omitempty"` - - // ForceSendFields is a list of field names (e.g. "BucketingConfig") 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. "BucketingConfig") 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 *GooglePrivacyDlpV2beta2PrimitiveTransformation) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta2PrimitiveTransformation - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta2PrivacyMetric: Privacy metric to compute for -// reidentification risk analysis. -type GooglePrivacyDlpV2beta2PrivacyMetric struct { - CategoricalStatsConfig *GooglePrivacyDlpV2beta2CategoricalStatsConfig `json:"categoricalStatsConfig,omitempty"` - - KAnonymityConfig *GooglePrivacyDlpV2beta2KAnonymityConfig `json:"kAnonymityConfig,omitempty"` - - KMapEstimationConfig *GooglePrivacyDlpV2beta2KMapEstimationConfig `json:"kMapEstimationConfig,omitempty"` - - LDiversityConfig *GooglePrivacyDlpV2beta2LDiversityConfig `json:"lDiversityConfig,omitempty"` - - NumericalStatsConfig *GooglePrivacyDlpV2beta2NumericalStatsConfig `json:"numericalStatsConfig,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "CategoricalStatsConfig") 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. "CategoricalStatsConfig") - // 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 *GooglePrivacyDlpV2beta2PrivacyMetric) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta2PrivacyMetric - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta2Proximity: Message for specifying a window -// around a finding to apply a detection -// rule. -type GooglePrivacyDlpV2beta2Proximity struct { - // WindowAfter: Number of characters after the finding to consider. - WindowAfter int64 `json:"windowAfter,omitempty"` - - // WindowBefore: Number of characters before the finding to consider. - WindowBefore int64 `json:"windowBefore,omitempty"` - - // ForceSendFields is a list of field names (e.g. "WindowAfter") 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. "WindowAfter") 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 *GooglePrivacyDlpV2beta2Proximity) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta2Proximity - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta2PublishToPubSub: Publish the results of a -// DlpJob to a pub sub channel. -// Compatible with: Inpect, Risk -type GooglePrivacyDlpV2beta2PublishToPubSub struct { - // Topic: Cloud Pub/Sub topic to send notifications to. The topic must - // have given - // publishing access rights to the DLP API service account executing - // the long running DlpJob sending the notifications. - // Format is projects/{project}/topics/{topic}. - Topic string `json:"topic,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Topic") 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. "Topic") 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 *GooglePrivacyDlpV2beta2PublishToPubSub) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta2PublishToPubSub - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta2QuasiIdField: A quasi-identifier column has a -// custom_tag, used to know which column -// in the data corresponds to which column in the statistical model. -type GooglePrivacyDlpV2beta2QuasiIdField struct { - CustomTag string `json:"customTag,omitempty"` - - Field *GooglePrivacyDlpV2beta2FieldId `json:"field,omitempty"` - - // ForceSendFields is a list of field names (e.g. "CustomTag") 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. "CustomTag") 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 *GooglePrivacyDlpV2beta2QuasiIdField) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta2QuasiIdField - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta2QuoteInfo: Message for infoType-dependent -// details parsed from quote. -type GooglePrivacyDlpV2beta2QuoteInfo struct { - DateTime *GooglePrivacyDlpV2beta2DateTime `json:"dateTime,omitempty"` - - // ForceSendFields is a list of field names (e.g. "DateTime") 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. "DateTime") 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 *GooglePrivacyDlpV2beta2QuoteInfo) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta2QuoteInfo - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta2Range: Generic half-open interval [start, end) -type GooglePrivacyDlpV2beta2Range struct { - // End: Index of the last character of the range (exclusive). - End int64 `json:"end,omitempty,string"` - - // Start: Index of the first character of the range (inclusive). - Start int64 `json:"start,omitempty,string"` - - // ForceSendFields is a list of field names (e.g. "End") 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. "End") 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 *GooglePrivacyDlpV2beta2Range) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta2Range - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta2RecordCondition: A condition for determining -// whether a transformation should be applied to -// a field. -type GooglePrivacyDlpV2beta2RecordCondition struct { - // Expressions: An expression. - Expressions *GooglePrivacyDlpV2beta2Expressions `json:"expressions,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Expressions") 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. "Expressions") 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 *GooglePrivacyDlpV2beta2RecordCondition) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta2RecordCondition - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta2RecordKey: Message for a unique key indicating -// a record that contains a finding. -type GooglePrivacyDlpV2beta2RecordKey struct { - BigQueryKey *GooglePrivacyDlpV2beta2BigQueryKey `json:"bigQueryKey,omitempty"` - - CloudStorageKey *GooglePrivacyDlpV2beta2CloudStorageKey `json:"cloudStorageKey,omitempty"` - - DatastoreKey *GooglePrivacyDlpV2beta2DatastoreKey `json:"datastoreKey,omitempty"` - - // ForceSendFields is a list of field names (e.g. "BigQueryKey") 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. "BigQueryKey") 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 *GooglePrivacyDlpV2beta2RecordKey) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta2RecordKey - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta2RecordSuppression: Configuration to suppress -// records whose suppression conditions evaluate to -// true. -type GooglePrivacyDlpV2beta2RecordSuppression struct { - // Condition: A condition that when it evaluates to true will result in - // the record being - // evaluated to be suppressed from the transformed content. - Condition *GooglePrivacyDlpV2beta2RecordCondition `json:"condition,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Condition") 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. "Condition") 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 *GooglePrivacyDlpV2beta2RecordSuppression) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta2RecordSuppression - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta2RecordTransformations: A type of -// transformation that is applied over structured data such as a -// table. -type GooglePrivacyDlpV2beta2RecordTransformations struct { - // FieldTransformations: Transform the record by applying various field - // transformations. - FieldTransformations []*GooglePrivacyDlpV2beta2FieldTransformation `json:"fieldTransformations,omitempty"` - - // RecordSuppressions: Configuration defining which records get - // suppressed entirely. Records that - // match any suppression rule are omitted from the output [optional]. - RecordSuppressions []*GooglePrivacyDlpV2beta2RecordSuppression `json:"recordSuppressions,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "FieldTransformations") 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. "FieldTransformations") 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 *GooglePrivacyDlpV2beta2RecordTransformations) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta2RecordTransformations - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta2RedactConfig: Redact a given value. For -// example, if used with an `InfoTypeTransformation` -// transforming PHONE_NUMBER, and input 'My phone number is -// 206-555-0123', the -// output would be 'My phone number is '. -type GooglePrivacyDlpV2beta2RedactConfig struct { -} - -// GooglePrivacyDlpV2beta2RedactImageRequest: Request to search for -// potentially sensitive info in a list of items -// and replace it with a default or provided content. -type GooglePrivacyDlpV2beta2RedactImageRequest struct { - // ImageData: The bytes of the image to redact. - ImageData string `json:"imageData,omitempty"` - - // ImageRedactionConfigs: The configuration for specifying what content - // to redact from images. - ImageRedactionConfigs []*GooglePrivacyDlpV2beta2ImageRedactionConfig `json:"imageRedactionConfigs,omitempty"` - - // ImageType: Type of the content, as defined in Content-Type HTTP - // header. - // Supported types are: PNG, JPEG, SVG, & BMP. - ImageType string `json:"imageType,omitempty"` - - // InspectConfig: Configuration for the inspector. - InspectConfig *GooglePrivacyDlpV2beta2InspectConfig `json:"inspectConfig,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ImageData") 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. "ImageData") 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 *GooglePrivacyDlpV2beta2RedactImageRequest) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta2RedactImageRequest - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta2RedactImageResponse: Results of redacting an -// image. -type GooglePrivacyDlpV2beta2RedactImageResponse struct { - // ExtractedText: If an image was being inspected and the - // InspectConfig's include_quote was - // set to true, then this field will include all text, if any, that was - // found - // in the image. - ExtractedText string `json:"extractedText,omitempty"` - - // RedactedImage: The redacted image. The type will be the same as the - // original image. - RedactedImage string `json:"redactedImage,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "ExtractedText") 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. "ExtractedText") 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 *GooglePrivacyDlpV2beta2RedactImageResponse) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta2RedactImageResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta2Regex: Message defining a custom regular -// expression. -type GooglePrivacyDlpV2beta2Regex struct { - // Pattern: Pattern defining the regular expression. - Pattern string `json:"pattern,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Pattern") 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. "Pattern") 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 *GooglePrivacyDlpV2beta2Regex) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta2Regex - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta2ReidentifyContentRequest: Request to -// re-identify an item. -type GooglePrivacyDlpV2beta2ReidentifyContentRequest struct { - // InspectConfig: Configuration for the inspector. - InspectConfig *GooglePrivacyDlpV2beta2InspectConfig `json:"inspectConfig,omitempty"` - - // InspectTemplateName: Optional template to use. Any configuration - // directly specified in - // `inspect_config` will override those set in the template. Singular - // fields - // that are set in this request will replace their corresponding fields - // in the - // template. Repeated fields are appended. Singular sub-messages and - // groups - // are recursively merged. - InspectTemplateName string `json:"inspectTemplateName,omitempty"` - - // Item: The item to re-identify. Will be treated as text. - Item *GooglePrivacyDlpV2beta2ContentItem `json:"item,omitempty"` - - // ReidentifyConfig: Configuration for the re-identification of the - // content item. - // This field shares the same proto message type that is used - // for - // de-identification, however its usage here is for the reversal of - // the - // previous de-identification. Re-identification is performed by - // examining - // the transformations used to de-identify the items and executing - // the - // reverse. This requires that only reversible transformations - // be provided here. The reversible transformations are: - // - // - `CryptoReplaceFfxFpeConfig` - ReidentifyConfig *GooglePrivacyDlpV2beta2DeidentifyConfig `json:"reidentifyConfig,omitempty"` - - // ReidentifyTemplateName: Optional template to use. References an - // instance of `DeidentifyTemplate`. - // Any configuration directly specified in `reidentify_config` - // or - // `inspect_config` will override those set in the template. Singular - // fields - // that are set in this request will replace their corresponding fields - // in the - // template. Repeated fields are appended. Singular sub-messages and - // groups - // are recursively merged. - ReidentifyTemplateName string `json:"reidentifyTemplateName,omitempty"` - - // ForceSendFields is a list of field names (e.g. "InspectConfig") 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. "InspectConfig") 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 *GooglePrivacyDlpV2beta2ReidentifyContentRequest) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta2ReidentifyContentRequest - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta2ReidentifyContentResponse: Results of -// re-identifying a item. -type GooglePrivacyDlpV2beta2ReidentifyContentResponse struct { - // Item: The re-identified item. - Item *GooglePrivacyDlpV2beta2ContentItem `json:"item,omitempty"` - - // Overview: An overview of the changes that were made to the `item`. - Overview *GooglePrivacyDlpV2beta2TransformationOverview `json:"overview,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Item") 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. "Item") 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 *GooglePrivacyDlpV2beta2ReidentifyContentResponse) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta2ReidentifyContentResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta2ReplaceValueConfig: Replace each input value -// with a given `Value`. -type GooglePrivacyDlpV2beta2ReplaceValueConfig struct { - // NewValue: Value to replace it with. - NewValue *GooglePrivacyDlpV2beta2Value `json:"newValue,omitempty"` - - // ForceSendFields is a list of field names (e.g. "NewValue") 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. "NewValue") 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 *GooglePrivacyDlpV2beta2ReplaceValueConfig) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta2ReplaceValueConfig - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta2ReplaceWithInfoTypeConfig: Replace each -// matching finding with the name of the info_type. -type GooglePrivacyDlpV2beta2ReplaceWithInfoTypeConfig struct { -} - -type GooglePrivacyDlpV2beta2RequestedOptions struct { - JobConfig *GooglePrivacyDlpV2beta2InspectJobConfig `json:"jobConfig,omitempty"` - - // SnapshotInspectTemplate: If run with an inspect template, a snapshot - // of it's state at the time of - // this run. - SnapshotInspectTemplate *GooglePrivacyDlpV2beta2InspectTemplate `json:"snapshotInspectTemplate,omitempty"` - - // ForceSendFields is a list of field names (e.g. "JobConfig") 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. "JobConfig") 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 *GooglePrivacyDlpV2beta2RequestedOptions) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta2RequestedOptions - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type GooglePrivacyDlpV2beta2Result struct { - // InfoTypeStats: Statistics of how many instances of each info type - // were found during - // inspect job. - InfoTypeStats []*GooglePrivacyDlpV2beta2InfoTypeStatistics `json:"infoTypeStats,omitempty"` - - // ProcessedBytes: Total size in bytes that were processed. - ProcessedBytes int64 `json:"processedBytes,omitempty,string"` - - // TotalEstimatedBytes: Estimate of the number of bytes to process. - TotalEstimatedBytes int64 `json:"totalEstimatedBytes,omitempty,string"` - - // ForceSendFields is a list of field names (e.g. "InfoTypeStats") 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. "InfoTypeStats") 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 *GooglePrivacyDlpV2beta2Result) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta2Result - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta2RiskAnalysisJobConfig: Configuration for a -// risk analysis job. -type GooglePrivacyDlpV2beta2RiskAnalysisJobConfig struct { - // Actions: Actions to execute at the completion of the job. Are - // executed in the order - // provided. - Actions []*GooglePrivacyDlpV2beta2Action `json:"actions,omitempty"` - - // PrivacyMetric: Privacy metric to compute. - PrivacyMetric *GooglePrivacyDlpV2beta2PrivacyMetric `json:"privacyMetric,omitempty"` - - // SourceTable: Input dataset to compute metrics over. - SourceTable *GooglePrivacyDlpV2beta2BigQueryTable `json:"sourceTable,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Actions") 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. "Actions") 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 *GooglePrivacyDlpV2beta2RiskAnalysisJobConfig) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta2RiskAnalysisJobConfig - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type GooglePrivacyDlpV2beta2Row struct { - Values []*GooglePrivacyDlpV2beta2Value `json:"values,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Values") 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. "Values") 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 *GooglePrivacyDlpV2beta2Row) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta2Row - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta2SaveFindings: If set, the detailed findings -// will be persisted to the specified -// OutputStorageConfig. Compatible with: Inspect -type GooglePrivacyDlpV2beta2SaveFindings struct { - OutputConfig *GooglePrivacyDlpV2beta2OutputStorageConfig `json:"outputConfig,omitempty"` - - // ForceSendFields is a list of field names (e.g. "OutputConfig") 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. "OutputConfig") 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 *GooglePrivacyDlpV2beta2SaveFindings) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta2SaveFindings - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta2Schedule: Schedule for triggeredJobs. -type GooglePrivacyDlpV2beta2Schedule struct { - // ReccurrencePeriodDuration: With this option a job is started a - // regular periodic basis. For - // example: every 10 minutes. - // - // A scheduled start time will be skipped if the previous - // execution has not ended when its scheduled time occurs. - // - // This value must be set to a time duration greater than or equal - // to 60 minutes and can be no longer than 60 days. - ReccurrencePeriodDuration string `json:"reccurrencePeriodDuration,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "ReccurrencePeriodDuration") 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. - // "ReccurrencePeriodDuration") 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 *GooglePrivacyDlpV2beta2Schedule) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta2Schedule - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta2StorageConfig: Shared message indicating Cloud -// storage type. -type GooglePrivacyDlpV2beta2StorageConfig struct { - // BigQueryOptions: BigQuery options specification. - BigQueryOptions *GooglePrivacyDlpV2beta2BigQueryOptions `json:"bigQueryOptions,omitempty"` - - // CloudStorageOptions: Google Cloud Storage options specification. - CloudStorageOptions *GooglePrivacyDlpV2beta2CloudStorageOptions `json:"cloudStorageOptions,omitempty"` - - // DatastoreOptions: Google Cloud Datastore options specification. - DatastoreOptions *GooglePrivacyDlpV2beta2DatastoreOptions `json:"datastoreOptions,omitempty"` - - TimespanConfig *GooglePrivacyDlpV2beta2TimespanConfig `json:"timespanConfig,omitempty"` - - // ForceSendFields is a list of field names (e.g. "BigQueryOptions") 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. "BigQueryOptions") 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 *GooglePrivacyDlpV2beta2StorageConfig) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta2StorageConfig - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta2SummaryResult: A collection that informs the -// user the number of times a particular -// `TransformationResultCode` and error details occurred. -type GooglePrivacyDlpV2beta2SummaryResult struct { - // Possible values: - // "TRANSFORMATION_RESULT_CODE_UNSPECIFIED" - // "SUCCESS" - // "ERROR" - Code string `json:"code,omitempty"` - - Count int64 `json:"count,omitempty,string"` - - // Details: A place for warnings or errors to show up if a - // transformation didn't - // work as expected. - Details string `json:"details,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Code") 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. "Code") 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 *GooglePrivacyDlpV2beta2SummaryResult) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta2SummaryResult - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta2SurrogateType: Message for detecting output -// from deidentification transformations -// such -// as -// [`CryptoReplaceFfxFpeConfig`](/dlp/docs/reference/rest/v2beta1/cont -// ent/deidentify#CryptoReplaceFfxFpeConfig). -// These types of transformations are -// those that perform pseudonymization, thereby producing a "surrogate" -// as -// output. This should be used in conjunction with a field on -// the -// transformation such as `surrogate_info_type`. This custom info type -// does -// not support the use of `detection_rules`. -type GooglePrivacyDlpV2beta2SurrogateType struct { -} - -// GooglePrivacyDlpV2beta2Table: Structured content to inspect. Up to -// 50,000 `Value`s per request allowed. -type GooglePrivacyDlpV2beta2Table struct { - Headers []*GooglePrivacyDlpV2beta2FieldId `json:"headers,omitempty"` - - Rows []*GooglePrivacyDlpV2beta2Row `json:"rows,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Headers") 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. "Headers") 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 *GooglePrivacyDlpV2beta2Table) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta2Table - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta2TableLocation: Location of a finding within a -// table. -type GooglePrivacyDlpV2beta2TableLocation struct { - // RowIndex: The zero-based index of the row where the finding is - // located. - RowIndex int64 `json:"rowIndex,omitempty,string"` - - // ForceSendFields is a list of field names (e.g. "RowIndex") 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. "RowIndex") 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 *GooglePrivacyDlpV2beta2TableLocation) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta2TableLocation - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta2TaggedField: A column with a semantic tag -// attached. -type GooglePrivacyDlpV2beta2TaggedField struct { - // CustomTag: A column can be tagged with a custom tag. In this case, - // the user must - // indicate an auxiliary table that contains statistical information - // on - // the possible values of this column (below). - CustomTag string `json:"customTag,omitempty"` - - // Field: Identifies the column. [required] - Field *GooglePrivacyDlpV2beta2FieldId `json:"field,omitempty"` - - // Inferred: If no semantic tag is indicated, we infer the statistical - // model from - // the distribution of values in the input data - Inferred *GoogleProtobufEmpty `json:"inferred,omitempty"` - - // InfoType: A column can be tagged with a InfoType to use the relevant - // public - // dataset as a statistical model of population, if available. - // We - // currently support US ZIP codes, region codes, ages and genders. - // To programmatically obtain the list of supported InfoTypes, - // use - // ListInfoTypes with the supported_by=RISK_ANALYSIS filter. - InfoType *GooglePrivacyDlpV2beta2InfoType `json:"infoType,omitempty"` - - // ForceSendFields is a list of field names (e.g. "CustomTag") 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. "CustomTag") 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 *GooglePrivacyDlpV2beta2TaggedField) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta2TaggedField - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta2TimePartConfig: For use with `Date`, -// `Timestamp`, and `TimeOfDay`, extract or preserve a -// portion of the value. -type GooglePrivacyDlpV2beta2TimePartConfig struct { - // Possible values: - // "TIME_PART_UNSPECIFIED" - // "YEAR" - [0-9999] - // "MONTH" - [1-12] - // "DAY_OF_MONTH" - [1-31] - // "DAY_OF_WEEK" - [1-7] - // "WEEK_OF_YEAR" - [1-52] - // "HOUR_OF_DAY" - [0-23] - PartToExtract string `json:"partToExtract,omitempty"` - - // ForceSendFields is a list of field names (e.g. "PartToExtract") 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. "PartToExtract") 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 *GooglePrivacyDlpV2beta2TimePartConfig) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta2TimePartConfig - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type GooglePrivacyDlpV2beta2TimeZone struct { - // OffsetMinutes: Set only if the offset can be determined. Positive for - // time ahead of UTC. - // E.g. For "UTC-9", this value is -540. - OffsetMinutes int64 `json:"offsetMinutes,omitempty"` - - // ForceSendFields is a list of field names (e.g. "OffsetMinutes") 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. "OffsetMinutes") 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 *GooglePrivacyDlpV2beta2TimeZone) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta2TimeZone - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta2TimespanConfig: Configuration of the timespan -// of the items to include in scanning. -// Currently only supported when inspecting Google Cloud Storage and -// BigQuery. -type GooglePrivacyDlpV2beta2TimespanConfig struct { - // EnableAutoPopulationOfTimespanConfig: When the job is started by a - // JobTrigger we will automatically figure out - // a valid start_time to avoid scanning files that have not been - // modified - // since the last time the JobTrigger executed. This will be based on - // the - // time of the execution of the last run of the JobTrigger. - EnableAutoPopulationOfTimespanConfig bool `json:"enableAutoPopulationOfTimespanConfig,omitempty"` - - // EndTime: Exclude files newer than this value. - // If set to zero, no upper time limit is applied. - EndTime string `json:"endTime,omitempty"` - - // StartTime: Exclude files older than this value. - StartTime string `json:"startTime,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "EnableAutoPopulationOfTimespanConfig") 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. - // "EnableAutoPopulationOfTimespanConfig") 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 *GooglePrivacyDlpV2beta2TimespanConfig) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta2TimespanConfig - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta2TransformationOverview: Overview of the -// modifications that occurred. -type GooglePrivacyDlpV2beta2TransformationOverview struct { - // TransformationSummaries: Transformations applied to the dataset. - TransformationSummaries []*GooglePrivacyDlpV2beta2TransformationSummary `json:"transformationSummaries,omitempty"` - - // TransformedBytes: Total size in bytes that were transformed in some - // way. - TransformedBytes int64 `json:"transformedBytes,omitempty,string"` - - // ForceSendFields is a list of field names (e.g. - // "TransformationSummaries") 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. "TransformationSummaries") - // 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 *GooglePrivacyDlpV2beta2TransformationOverview) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta2TransformationOverview - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta2TransformationSummary: Summary of a single -// tranformation. -// Only one of 'transformation', 'field_transformation', or -// 'record_suppress' -// will be set. -type GooglePrivacyDlpV2beta2TransformationSummary struct { - // Field: Set if the transformation was limited to a specific FieldId. - Field *GooglePrivacyDlpV2beta2FieldId `json:"field,omitempty"` - - // FieldTransformations: The field transformation that was applied. - // If multiple field transformations are requested for a single - // field, - // this list will contain all of them; otherwise, only one is supplied. - FieldTransformations []*GooglePrivacyDlpV2beta2FieldTransformation `json:"fieldTransformations,omitempty"` - - // InfoType: Set if the transformation was limited to a specific - // info_type. - InfoType *GooglePrivacyDlpV2beta2InfoType `json:"infoType,omitempty"` - - // RecordSuppress: The specific suppression option these stats apply to. - RecordSuppress *GooglePrivacyDlpV2beta2RecordSuppression `json:"recordSuppress,omitempty"` - - Results []*GooglePrivacyDlpV2beta2SummaryResult `json:"results,omitempty"` - - // Transformation: The specific transformation these stats apply to. - Transformation *GooglePrivacyDlpV2beta2PrimitiveTransformation `json:"transformation,omitempty"` - - // TransformedBytes: Total size in bytes that were transformed in some - // way. - TransformedBytes int64 `json:"transformedBytes,omitempty,string"` - - // ForceSendFields is a list of field names (e.g. "Field") 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. "Field") 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 *GooglePrivacyDlpV2beta2TransformationSummary) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta2TransformationSummary - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta2TransientCryptoKey: Use this to have a random -// data crypto key generated. -// It will be discarded after the request finishes. -type GooglePrivacyDlpV2beta2TransientCryptoKey struct { - // Name: Name of the key. [required] - // This is an arbitrary string used to differentiate different keys. - // A unique key is generated per name: two separate - // `TransientCryptoKey` - // protos share the same generated key if their names are the same. - // When the data crypto key is generated, this name is not used in any - // way - // (repeating the api call will result in a different key being - // generated). - Name string `json:"name,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Name") 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. "Name") 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 *GooglePrivacyDlpV2beta2TransientCryptoKey) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta2TransientCryptoKey - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta2Trigger: What event needs to occur for a new -// job to be started. -type GooglePrivacyDlpV2beta2Trigger struct { - // Schedule: Create a job on a repeating basis based on the elapse of - // time. - Schedule *GooglePrivacyDlpV2beta2Schedule `json:"schedule,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Schedule") 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. "Schedule") 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 *GooglePrivacyDlpV2beta2Trigger) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta2Trigger - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta2UnwrappedCryptoKey: Using raw keys is prone to -// security risks due to accidentally -// leaking the key. Choose another type of key if possible. -type GooglePrivacyDlpV2beta2UnwrappedCryptoKey struct { - // Key: The AES 128/192/256 bit key. [required] - Key string `json:"key,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Key") 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. "Key") 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 *GooglePrivacyDlpV2beta2UnwrappedCryptoKey) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta2UnwrappedCryptoKey - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta2UpdateDeidentifyTemplateRequest: Request -// message for UpdateDeidentifyTemplate. -type GooglePrivacyDlpV2beta2UpdateDeidentifyTemplateRequest struct { - // DeidentifyTemplate: New DeidentifyTemplate value. - DeidentifyTemplate *GooglePrivacyDlpV2beta2DeidentifyTemplate `json:"deidentifyTemplate,omitempty"` - - // UpdateMask: Mask to control which fields get updated. - UpdateMask string `json:"updateMask,omitempty"` - - // ForceSendFields is a list of field names (e.g. "DeidentifyTemplate") - // 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. "DeidentifyTemplate") 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 *GooglePrivacyDlpV2beta2UpdateDeidentifyTemplateRequest) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta2UpdateDeidentifyTemplateRequest - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta2UpdateInspectTemplateRequest: Request message -// for UpdateInspectTemplate. -type GooglePrivacyDlpV2beta2UpdateInspectTemplateRequest struct { - // InspectTemplate: New InspectTemplate value. - InspectTemplate *GooglePrivacyDlpV2beta2InspectTemplate `json:"inspectTemplate,omitempty"` - - // UpdateMask: Mask to control which fields get updated. - UpdateMask string `json:"updateMask,omitempty"` - - // ForceSendFields is a list of field names (e.g. "InspectTemplate") 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. "InspectTemplate") 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 *GooglePrivacyDlpV2beta2UpdateInspectTemplateRequest) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta2UpdateInspectTemplateRequest - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta2UpdateJobTriggerRequest: Request message for -// UpdateJobTrigger. -type GooglePrivacyDlpV2beta2UpdateJobTriggerRequest struct { - // JobTrigger: New JobTrigger value. - JobTrigger *GooglePrivacyDlpV2beta2JobTrigger `json:"jobTrigger,omitempty"` - - // UpdateMask: Mask to control which fields get updated. - UpdateMask string `json:"updateMask,omitempty"` - - // ForceSendFields is a list of field names (e.g. "JobTrigger") 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. "JobTrigger") 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 *GooglePrivacyDlpV2beta2UpdateJobTriggerRequest) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta2UpdateJobTriggerRequest - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta2Value: Set of primitive values supported by -// the system. -// Note that for the purposes of inspection or transformation, the -// number -// of bytes considered to comprise a 'Value' is based on its -// representation -// as a UTF-8 encoded string. For example, if 'integer_value' is set -// to -// 123456789, the number of bytes would be counted as 9, even though -// an -// int64 only holds up to 8 bytes of data. -type GooglePrivacyDlpV2beta2Value struct { - BooleanValue bool `json:"booleanValue,omitempty"` - - DateValue *GoogleTypeDate `json:"dateValue,omitempty"` - - // Possible values: - // "DAY_OF_WEEK_UNSPECIFIED" - The unspecified day-of-week. - // "MONDAY" - The day-of-week of Monday. - // "TUESDAY" - The day-of-week of Tuesday. - // "WEDNESDAY" - The day-of-week of Wednesday. - // "THURSDAY" - The day-of-week of Thursday. - // "FRIDAY" - The day-of-week of Friday. - // "SATURDAY" - The day-of-week of Saturday. - // "SUNDAY" - The day-of-week of Sunday. - DayOfWeekValue string `json:"dayOfWeekValue,omitempty"` - - FloatValue float64 `json:"floatValue,omitempty"` - - IntegerValue int64 `json:"integerValue,omitempty,string"` - - StringValue string `json:"stringValue,omitempty"` - - TimeValue *GoogleTypeTimeOfDay `json:"timeValue,omitempty"` - - TimestampValue string `json:"timestampValue,omitempty"` - - // ForceSendFields is a list of field names (e.g. "BooleanValue") 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. "BooleanValue") 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 *GooglePrivacyDlpV2beta2Value) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta2Value - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *GooglePrivacyDlpV2beta2Value) UnmarshalJSON(data []byte) error { - type NoMethod GooglePrivacyDlpV2beta2Value - var s1 struct { - FloatValue gensupport.JSONFloat64 `json:"floatValue"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.FloatValue = float64(s1.FloatValue) - return nil -} - -// GooglePrivacyDlpV2beta2ValueFrequency: A value of a field, including -// its frequency. -type GooglePrivacyDlpV2beta2ValueFrequency struct { - // Count: How many times the value is contained in the field. - Count int64 `json:"count,omitempty,string"` - - // Value: A value contained in the field in question. - Value *GooglePrivacyDlpV2beta2Value `json:"value,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Count") 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. "Count") 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 *GooglePrivacyDlpV2beta2ValueFrequency) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta2ValueFrequency - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2beta2WordList: Message defining a list of words or -// phrases to search for in the data. -type GooglePrivacyDlpV2beta2WordList struct { - // Words: Words or phrases defining the dictionary. The dictionary must - // contain - // at least one phrase and every phrase must contain at least 2 - // characters - // that are letters or digits. [required] - Words []string `json:"words,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Words") 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. "Words") 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 *GooglePrivacyDlpV2beta2WordList) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2beta2WordList - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GoogleProtobufEmpty: A generic empty message that you can re-use to -// avoid defining duplicated -// empty messages in your APIs. A typical example is to use it as the -// request -// or the response type of an API method. For instance: -// -// service Foo { -// rpc Bar(google.protobuf.Empty) returns -// (google.protobuf.Empty); -// } -// -// The JSON representation for `Empty` is empty JSON object `{}`. -type GoogleProtobufEmpty struct { - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` -} - -// GoogleRpcStatus: The `Status` type defines a logical error model that -// is suitable for different -// programming environments, including REST APIs and RPC APIs. It is -// used by -// [gRPC](https://github.com/grpc). The error model is designed to -// be: -// -// - Simple to use and understand for most users -// - Flexible enough to meet unexpected needs -// -// # Overview -// -// The `Status` message contains three pieces of data: error code, error -// message, -// and error details. The error code should be an enum value -// of -// google.rpc.Code, but it may accept additional error codes if needed. -// The -// error message should be a developer-facing English message that -// helps -// developers *understand* and *resolve* the error. If a localized -// user-facing -// error message is needed, put the localized message in the error -// details or -// localize it in the client. The optional error details may contain -// arbitrary -// information about the error. There is a predefined set of error -// detail types -// in the package `google.rpc` that can be used for common error -// conditions. -// -// # Language mapping -// -// The `Status` message is the logical representation of the error -// model, but it -// is not necessarily the actual wire format. When the `Status` message -// is -// exposed in different client libraries and different wire protocols, -// it can be -// mapped differently. For example, it will likely be mapped to some -// exceptions -// in Java, but more likely mapped to some error codes in C. -// -// # Other uses -// -// The error model and the `Status` message can be used in a variety -// of -// environments, either with or without APIs, to provide a -// consistent developer experience across different -// environments. -// -// Example uses of this error model include: -// -// - Partial errors. If a service needs to return partial errors to the -// client, -// it may embed the `Status` in the normal response to indicate the -// partial -// errors. -// -// - Workflow errors. A typical workflow has multiple steps. Each step -// may -// have a `Status` message for error reporting. -// -// - Batch operations. If a client uses batch request and batch -// response, the -// `Status` message should be used directly inside batch response, -// one for -// each error sub-response. -// -// - Asynchronous operations. If an API call embeds asynchronous -// operation -// results in its response, the status of those operations should -// be -// represented directly using the `Status` message. -// -// - Logging. If some API errors are stored in logs, the message -// `Status` could -// be used directly after any stripping needed for security/privacy -// reasons. -type GoogleRpcStatus struct { - // Code: The status code, which should be an enum value of - // google.rpc.Code. - Code int64 `json:"code,omitempty"` - - // Details: A list of messages that carry the error details. There is a - // common set of - // message types for APIs to use. - Details []googleapi.RawMessage `json:"details,omitempty"` - - // Message: A developer-facing error message, which should be in - // English. Any - // user-facing error message should be localized and sent in - // the - // google.rpc.Status.details field, or localized by the client. - Message string `json:"message,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Code") 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. "Code") 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 *GoogleRpcStatus) MarshalJSON() ([]byte, error) { - type NoMethod GoogleRpcStatus - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GoogleTypeDate: Represents a whole calendar date, e.g. date of birth. -// The time of day and -// time zone are either specified elsewhere or are not significant. The -// date -// is relative to the Proleptic Gregorian Calendar. The day may be 0 -// to -// represent a year and month where the day is not significant, e.g. -// credit card -// expiration date. The year may be 0 to represent a month and day -// independent -// of year, e.g. anniversary date. Related types are -// google.type.TimeOfDay -// and `google.protobuf.Timestamp`. -type GoogleTypeDate struct { - // Day: Day of month. Must be from 1 to 31 and valid for the year and - // month, or 0 - // if specifying a year/month where the day is not significant. - Day int64 `json:"day,omitempty"` - - // Month: Month of year. Must be from 1 to 12, or 0 if specifying a date - // without a - // month. - Month int64 `json:"month,omitempty"` - - // Year: Year of date. Must be from 1 to 9999, or 0 if specifying a date - // without - // a year. - Year int64 `json:"year,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Day") 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. "Day") 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 *GoogleTypeDate) MarshalJSON() ([]byte, error) { - type NoMethod GoogleTypeDate - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GoogleTypeTimeOfDay: Represents a time of day. The date and time zone -// are either not significant -// or are specified elsewhere. An API may choose to allow leap seconds. -// Related -// types are google.type.Date and `google.protobuf.Timestamp`. -type GoogleTypeTimeOfDay struct { - // Hours: Hours of day in 24 hour format. Should be from 0 to 23. An API - // may choose - // to allow the value "24:00:00" for scenarios like business closing - // time. - Hours int64 `json:"hours,omitempty"` - - // Minutes: Minutes of hour of day. Must be from 0 to 59. - Minutes int64 `json:"minutes,omitempty"` - - // Nanos: Fractions of seconds in nanoseconds. Must be from 0 to - // 999,999,999. - Nanos int64 `json:"nanos,omitempty"` - - // Seconds: Seconds of minutes of the time. Must normally be from 0 to - // 59. An API may - // allow the value 60 if it allows leap-seconds. - Seconds int64 `json:"seconds,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Hours") 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. "Hours") 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 *GoogleTypeTimeOfDay) MarshalJSON() ([]byte, error) { - type NoMethod GoogleTypeTimeOfDay - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// method id "dlp.infoTypes.list": - -type InfoTypesListCall struct { - s *Service - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Returns sensitive information types DLP supports. -func (r *InfoTypesService) List() *InfoTypesListCall { - c := &InfoTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - return c -} - -// Filter sets the optional parameter "filter": Optional filter to only -// return infoTypes supported by certain parts of the -// API. Defaults to supported_by=INSPECT. -func (c *InfoTypesListCall) Filter(filter string) *InfoTypesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// LanguageCode sets the optional parameter "languageCode": Optional -// BCP-47 language code for localized infoType friendly -// names. If omitted, or if localized strings are not available, -// en-US strings will be returned. -func (c *InfoTypesListCall) LanguageCode(languageCode string) *InfoTypesListCall { - c.urlParams_.Set("languageCode", languageCode) - 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 *InfoTypesListCall) Fields(s ...googleapi.Field) *InfoTypesListCall { - 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 *InfoTypesListCall) IfNoneMatch(entityTag string) *InfoTypesListCall { - 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 *InfoTypesListCall) Context(ctx context.Context) *InfoTypesListCall { - 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 *InfoTypesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InfoTypesListCall) 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, "v2beta2/infoTypes") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "dlp.infoTypes.list" call. -// Exactly one of *GooglePrivacyDlpV2beta2ListInfoTypesResponse or error -// will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GooglePrivacyDlpV2beta2ListInfoTypesResponse.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 *InfoTypesListCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2beta2ListInfoTypesResponse, 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 := &GooglePrivacyDlpV2beta2ListInfoTypesResponse{ - 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": "Returns sensitive information types DLP supports.", - // "flatPath": "v2beta2/infoTypes", - // "httpMethod": "GET", - // "id": "dlp.infoTypes.list", - // "parameterOrder": [], - // "parameters": { - // "filter": { - // "description": "Optional filter to only return infoTypes supported by certain parts of the\nAPI. Defaults to supported_by=INSPECT.", - // "location": "query", - // "type": "string" - // }, - // "languageCode": { - // "description": "Optional BCP-47 language code for localized infoType friendly\nnames. If omitted, or if localized strings are not available,\nen-US strings will be returned.", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "v2beta2/infoTypes", - // "response": { - // "$ref": "GooglePrivacyDlpV2beta2ListInfoTypesResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "dlp.organizations.deidentifyTemplates.create": - -type OrganizationsDeidentifyTemplatesCreateCall struct { - s *Service - parent string - googleprivacydlpv2beta2createdeidentifytemplaterequest *GooglePrivacyDlpV2beta2CreateDeidentifyTemplateRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Create: Creates an Deidentify template for re-using frequently used -// configuration -// for Deidentifying content, images, and storage. -func (r *OrganizationsDeidentifyTemplatesService) Create(parent string, googleprivacydlpv2beta2createdeidentifytemplaterequest *GooglePrivacyDlpV2beta2CreateDeidentifyTemplateRequest) *OrganizationsDeidentifyTemplatesCreateCall { - c := &OrganizationsDeidentifyTemplatesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googleprivacydlpv2beta2createdeidentifytemplaterequest = googleprivacydlpv2beta2createdeidentifytemplaterequest - 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 *OrganizationsDeidentifyTemplatesCreateCall) Fields(s ...googleapi.Field) *OrganizationsDeidentifyTemplatesCreateCall { - 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 *OrganizationsDeidentifyTemplatesCreateCall) Context(ctx context.Context) *OrganizationsDeidentifyTemplatesCreateCall { - 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 *OrganizationsDeidentifyTemplatesCreateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *OrganizationsDeidentifyTemplatesCreateCall) 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.googleprivacydlpv2beta2createdeidentifytemplaterequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta2/{+parent}/deidentifyTemplates") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "dlp.organizations.deidentifyTemplates.create" call. -// Exactly one of *GooglePrivacyDlpV2beta2DeidentifyTemplate or error -// will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GooglePrivacyDlpV2beta2DeidentifyTemplate.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 *OrganizationsDeidentifyTemplatesCreateCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2beta2DeidentifyTemplate, 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 := &GooglePrivacyDlpV2beta2DeidentifyTemplate{ - 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": "Creates an Deidentify template for re-using frequently used configuration\nfor Deidentifying content, images, and storage.", - // "flatPath": "v2beta2/organizations/{organizationsId}/deidentifyTemplates", - // "httpMethod": "POST", - // "id": "dlp.organizations.deidentifyTemplates.create", - // "parameterOrder": [ - // "parent" - // ], - // "parameters": { - // "parent": { - // "description": "The parent resource name, for example projects/my-project-id or\norganizations/my-org-id.", - // "location": "path", - // "pattern": "^organizations/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v2beta2/{+parent}/deidentifyTemplates", - // "request": { - // "$ref": "GooglePrivacyDlpV2beta2CreateDeidentifyTemplateRequest" - // }, - // "response": { - // "$ref": "GooglePrivacyDlpV2beta2DeidentifyTemplate" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "dlp.organizations.deidentifyTemplates.delete": - -type OrganizationsDeidentifyTemplatesDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes inspect templates. -func (r *OrganizationsDeidentifyTemplatesService) Delete(name string) *OrganizationsDeidentifyTemplatesDeleteCall { - c := &OrganizationsDeidentifyTemplatesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - 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 *OrganizationsDeidentifyTemplatesDeleteCall) Fields(s ...googleapi.Field) *OrganizationsDeidentifyTemplatesDeleteCall { - 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 *OrganizationsDeidentifyTemplatesDeleteCall) Context(ctx context.Context) *OrganizationsDeidentifyTemplatesDeleteCall { - 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 *OrganizationsDeidentifyTemplatesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *OrganizationsDeidentifyTemplatesDeleteCall) 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 - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta2/{+name}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("DELETE", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "dlp.organizations.deidentifyTemplates.delete" call. -// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *GoogleProtobufEmpty.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 *OrganizationsDeidentifyTemplatesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, 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 := &GoogleProtobufEmpty{ - 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": "Deletes inspect templates.", - // "flatPath": "v2beta2/organizations/{organizationsId}/deidentifyTemplates/{deidentifyTemplatesId}", - // "httpMethod": "DELETE", - // "id": "dlp.organizations.deidentifyTemplates.delete", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "Resource name of the organization and deidentify template to be deleted,\nfor example `organizations/433245324/deidentifyTemplates/432452342` or\nprojects/project-id/deidentifyTemplates/432452342.", - // "location": "path", - // "pattern": "^organizations/[^/]+/deidentifyTemplates/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v2beta2/{+name}", - // "response": { - // "$ref": "GoogleProtobufEmpty" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "dlp.organizations.deidentifyTemplates.get": - -type OrganizationsDeidentifyTemplatesGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Gets an inspect template. -func (r *OrganizationsDeidentifyTemplatesService) Get(name string) *OrganizationsDeidentifyTemplatesGetCall { - c := &OrganizationsDeidentifyTemplatesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - 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 *OrganizationsDeidentifyTemplatesGetCall) Fields(s ...googleapi.Field) *OrganizationsDeidentifyTemplatesGetCall { - 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 *OrganizationsDeidentifyTemplatesGetCall) IfNoneMatch(entityTag string) *OrganizationsDeidentifyTemplatesGetCall { - 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 *OrganizationsDeidentifyTemplatesGetCall) Context(ctx context.Context) *OrganizationsDeidentifyTemplatesGetCall { - 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 *OrganizationsDeidentifyTemplatesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *OrganizationsDeidentifyTemplatesGetCall) 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, "v2beta2/{+name}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "dlp.organizations.deidentifyTemplates.get" call. -// Exactly one of *GooglePrivacyDlpV2beta2DeidentifyTemplate or error -// will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GooglePrivacyDlpV2beta2DeidentifyTemplate.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 *OrganizationsDeidentifyTemplatesGetCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2beta2DeidentifyTemplate, 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 := &GooglePrivacyDlpV2beta2DeidentifyTemplate{ - 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": "Gets an inspect template.", - // "flatPath": "v2beta2/organizations/{organizationsId}/deidentifyTemplates/{deidentifyTemplatesId}", - // "httpMethod": "GET", - // "id": "dlp.organizations.deidentifyTemplates.get", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "Resource name of the organization and deidentify template to be read, for\nexample `organizations/433245324/deidentifyTemplates/432452342` or\nprojects/project-id/deidentifyTemplates/432452342.", - // "location": "path", - // "pattern": "^organizations/[^/]+/deidentifyTemplates/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v2beta2/{+name}", - // "response": { - // "$ref": "GooglePrivacyDlpV2beta2DeidentifyTemplate" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "dlp.organizations.deidentifyTemplates.list": - -type OrganizationsDeidentifyTemplatesListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists inspect templates. -func (r *OrganizationsDeidentifyTemplatesService) List(parent string) *OrganizationsDeidentifyTemplatesListCall { - c := &OrganizationsDeidentifyTemplatesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// PageSize sets the optional parameter "pageSize": Optional size of the -// page, can be limited by server. If zero server returns -// a page of max size 100. -func (c *OrganizationsDeidentifyTemplatesListCall) PageSize(pageSize int64) *OrganizationsDeidentifyTemplatesListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": Optional page -// token to continue retrieval. Comes from previous call -// to `ListDeidentifyTemplates`. -func (c *OrganizationsDeidentifyTemplatesListCall) PageToken(pageToken string) *OrganizationsDeidentifyTemplatesListCall { - 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 *OrganizationsDeidentifyTemplatesListCall) Fields(s ...googleapi.Field) *OrganizationsDeidentifyTemplatesListCall { - 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 *OrganizationsDeidentifyTemplatesListCall) IfNoneMatch(entityTag string) *OrganizationsDeidentifyTemplatesListCall { - 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 *OrganizationsDeidentifyTemplatesListCall) Context(ctx context.Context) *OrganizationsDeidentifyTemplatesListCall { - 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 *OrganizationsDeidentifyTemplatesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *OrganizationsDeidentifyTemplatesListCall) 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, "v2beta2/{+parent}/deidentifyTemplates") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "dlp.organizations.deidentifyTemplates.list" call. -// Exactly one of -// *GooglePrivacyDlpV2beta2ListDeidentifyTemplatesResponse or error will -// be non-nil. Any non-2xx status code is an error. Response headers are -// in either -// *GooglePrivacyDlpV2beta2ListDeidentifyTemplatesResponse.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 *OrganizationsDeidentifyTemplatesListCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2beta2ListDeidentifyTemplatesResponse, 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 := &GooglePrivacyDlpV2beta2ListDeidentifyTemplatesResponse{ - 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": "Lists inspect templates.", - // "flatPath": "v2beta2/organizations/{organizationsId}/deidentifyTemplates", - // "httpMethod": "GET", - // "id": "dlp.organizations.deidentifyTemplates.list", - // "parameterOrder": [ - // "parent" - // ], - // "parameters": { - // "pageSize": { - // "description": "Optional size of the page, can be limited by server. If zero server returns\na page of max size 100.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "Optional page token to continue retrieval. Comes from previous call\nto `ListDeidentifyTemplates`.", - // "location": "query", - // "type": "string" - // }, - // "parent": { - // "description": "The parent resource name, for example projects/my-project-id or\norganizations/my-org-id.", - // "location": "path", - // "pattern": "^organizations/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v2beta2/{+parent}/deidentifyTemplates", - // "response": { - // "$ref": "GooglePrivacyDlpV2beta2ListDeidentifyTemplatesResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// 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 *OrganizationsDeidentifyTemplatesListCall) Pages(ctx context.Context, f func(*GooglePrivacyDlpV2beta2ListDeidentifyTemplatesResponse) 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 "dlp.organizations.deidentifyTemplates.patch": - -type OrganizationsDeidentifyTemplatesPatchCall struct { - s *Service - name string - googleprivacydlpv2beta2updatedeidentifytemplaterequest *GooglePrivacyDlpV2beta2UpdateDeidentifyTemplateRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Updates the inspect template. -func (r *OrganizationsDeidentifyTemplatesService) Patch(name string, googleprivacydlpv2beta2updatedeidentifytemplaterequest *GooglePrivacyDlpV2beta2UpdateDeidentifyTemplateRequest) *OrganizationsDeidentifyTemplatesPatchCall { - c := &OrganizationsDeidentifyTemplatesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googleprivacydlpv2beta2updatedeidentifytemplaterequest = googleprivacydlpv2beta2updatedeidentifytemplaterequest - 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 *OrganizationsDeidentifyTemplatesPatchCall) Fields(s ...googleapi.Field) *OrganizationsDeidentifyTemplatesPatchCall { - 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 *OrganizationsDeidentifyTemplatesPatchCall) Context(ctx context.Context) *OrganizationsDeidentifyTemplatesPatchCall { - 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 *OrganizationsDeidentifyTemplatesPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *OrganizationsDeidentifyTemplatesPatchCall) 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.googleprivacydlpv2beta2updatedeidentifytemplaterequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta2/{+name}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("PATCH", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "dlp.organizations.deidentifyTemplates.patch" call. -// Exactly one of *GooglePrivacyDlpV2beta2DeidentifyTemplate or error -// will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GooglePrivacyDlpV2beta2DeidentifyTemplate.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 *OrganizationsDeidentifyTemplatesPatchCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2beta2DeidentifyTemplate, 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 := &GooglePrivacyDlpV2beta2DeidentifyTemplate{ - 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": "Updates the inspect template.", - // "flatPath": "v2beta2/organizations/{organizationsId}/deidentifyTemplates/{deidentifyTemplatesId}", - // "httpMethod": "PATCH", - // "id": "dlp.organizations.deidentifyTemplates.patch", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "Resource name of organization and deidentify template to be updated, for\nexample `organizations/433245324/deidentifyTemplates/432452342` or\nprojects/project-id/deidentifyTemplates/432452342.", - // "location": "path", - // "pattern": "^organizations/[^/]+/deidentifyTemplates/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v2beta2/{+name}", - // "request": { - // "$ref": "GooglePrivacyDlpV2beta2UpdateDeidentifyTemplateRequest" - // }, - // "response": { - // "$ref": "GooglePrivacyDlpV2beta2DeidentifyTemplate" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "dlp.organizations.inspectTemplates.create": - -type OrganizationsInspectTemplatesCreateCall struct { - s *Service - parent string - googleprivacydlpv2beta2createinspecttemplaterequest *GooglePrivacyDlpV2beta2CreateInspectTemplateRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Create: Creates an inspect template for re-using frequently used -// configuration -// for inspecting content, images, and storage. -func (r *OrganizationsInspectTemplatesService) Create(parent string, googleprivacydlpv2beta2createinspecttemplaterequest *GooglePrivacyDlpV2beta2CreateInspectTemplateRequest) *OrganizationsInspectTemplatesCreateCall { - c := &OrganizationsInspectTemplatesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googleprivacydlpv2beta2createinspecttemplaterequest = googleprivacydlpv2beta2createinspecttemplaterequest - 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 *OrganizationsInspectTemplatesCreateCall) Fields(s ...googleapi.Field) *OrganizationsInspectTemplatesCreateCall { - 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 *OrganizationsInspectTemplatesCreateCall) Context(ctx context.Context) *OrganizationsInspectTemplatesCreateCall { - 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 *OrganizationsInspectTemplatesCreateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *OrganizationsInspectTemplatesCreateCall) 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.googleprivacydlpv2beta2createinspecttemplaterequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta2/{+parent}/inspectTemplates") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "dlp.organizations.inspectTemplates.create" call. -// Exactly one of *GooglePrivacyDlpV2beta2InspectTemplate or error will -// be non-nil. Any non-2xx status code is an error. Response headers are -// in either -// *GooglePrivacyDlpV2beta2InspectTemplate.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 *OrganizationsInspectTemplatesCreateCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2beta2InspectTemplate, 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 := &GooglePrivacyDlpV2beta2InspectTemplate{ - 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": "Creates an inspect template for re-using frequently used configuration\nfor inspecting content, images, and storage.", - // "flatPath": "v2beta2/organizations/{organizationsId}/inspectTemplates", - // "httpMethod": "POST", - // "id": "dlp.organizations.inspectTemplates.create", - // "parameterOrder": [ - // "parent" - // ], - // "parameters": { - // "parent": { - // "description": "The parent resource name, for example projects/my-project-id or\norganizations/my-org-id.", - // "location": "path", - // "pattern": "^organizations/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v2beta2/{+parent}/inspectTemplates", - // "request": { - // "$ref": "GooglePrivacyDlpV2beta2CreateInspectTemplateRequest" - // }, - // "response": { - // "$ref": "GooglePrivacyDlpV2beta2InspectTemplate" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "dlp.organizations.inspectTemplates.delete": - -type OrganizationsInspectTemplatesDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes inspect templates. -func (r *OrganizationsInspectTemplatesService) Delete(name string) *OrganizationsInspectTemplatesDeleteCall { - c := &OrganizationsInspectTemplatesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - 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 *OrganizationsInspectTemplatesDeleteCall) Fields(s ...googleapi.Field) *OrganizationsInspectTemplatesDeleteCall { - 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 *OrganizationsInspectTemplatesDeleteCall) Context(ctx context.Context) *OrganizationsInspectTemplatesDeleteCall { - 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 *OrganizationsInspectTemplatesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *OrganizationsInspectTemplatesDeleteCall) 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 - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta2/{+name}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("DELETE", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "dlp.organizations.inspectTemplates.delete" call. -// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *GoogleProtobufEmpty.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 *OrganizationsInspectTemplatesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, 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 := &GoogleProtobufEmpty{ - 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": "Deletes inspect templates.", - // "flatPath": "v2beta2/organizations/{organizationsId}/inspectTemplates/{inspectTemplatesId}", - // "httpMethod": "DELETE", - // "id": "dlp.organizations.inspectTemplates.delete", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "Resource name of the organization and inspectTemplate to be deleted, for\nexample `organizations/433245324/inspectTemplates/432452342` or\nprojects/project-id/inspectTemplates/432452342.", - // "location": "path", - // "pattern": "^organizations/[^/]+/inspectTemplates/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v2beta2/{+name}", - // "response": { - // "$ref": "GoogleProtobufEmpty" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "dlp.organizations.inspectTemplates.get": - -type OrganizationsInspectTemplatesGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Gets an inspect template. -func (r *OrganizationsInspectTemplatesService) Get(name string) *OrganizationsInspectTemplatesGetCall { - c := &OrganizationsInspectTemplatesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - 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 *OrganizationsInspectTemplatesGetCall) Fields(s ...googleapi.Field) *OrganizationsInspectTemplatesGetCall { - 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 *OrganizationsInspectTemplatesGetCall) IfNoneMatch(entityTag string) *OrganizationsInspectTemplatesGetCall { - 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 *OrganizationsInspectTemplatesGetCall) Context(ctx context.Context) *OrganizationsInspectTemplatesGetCall { - 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 *OrganizationsInspectTemplatesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *OrganizationsInspectTemplatesGetCall) 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, "v2beta2/{+name}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "dlp.organizations.inspectTemplates.get" call. -// Exactly one of *GooglePrivacyDlpV2beta2InspectTemplate or error will -// be non-nil. Any non-2xx status code is an error. Response headers are -// in either -// *GooglePrivacyDlpV2beta2InspectTemplate.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 *OrganizationsInspectTemplatesGetCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2beta2InspectTemplate, 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 := &GooglePrivacyDlpV2beta2InspectTemplate{ - 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": "Gets an inspect template.", - // "flatPath": "v2beta2/organizations/{organizationsId}/inspectTemplates/{inspectTemplatesId}", - // "httpMethod": "GET", - // "id": "dlp.organizations.inspectTemplates.get", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "Resource name of the organization and inspectTemplate to be read, for\nexample `organizations/433245324/inspectTemplates/432452342` or\nprojects/project-id/inspectTemplates/432452342.", - // "location": "path", - // "pattern": "^organizations/[^/]+/inspectTemplates/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v2beta2/{+name}", - // "response": { - // "$ref": "GooglePrivacyDlpV2beta2InspectTemplate" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "dlp.organizations.inspectTemplates.list": - -type OrganizationsInspectTemplatesListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists inspect templates. -func (r *OrganizationsInspectTemplatesService) List(parent string) *OrganizationsInspectTemplatesListCall { - c := &OrganizationsInspectTemplatesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// PageSize sets the optional parameter "pageSize": Optional size of the -// page, can be limited by server. If zero server returns -// a page of max size 100. -func (c *OrganizationsInspectTemplatesListCall) PageSize(pageSize int64) *OrganizationsInspectTemplatesListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": Optional page -// token to continue retrieval. Comes from previous call -// to `ListInspectTemplates`. -func (c *OrganizationsInspectTemplatesListCall) PageToken(pageToken string) *OrganizationsInspectTemplatesListCall { - 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 *OrganizationsInspectTemplatesListCall) Fields(s ...googleapi.Field) *OrganizationsInspectTemplatesListCall { - 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 *OrganizationsInspectTemplatesListCall) IfNoneMatch(entityTag string) *OrganizationsInspectTemplatesListCall { - 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 *OrganizationsInspectTemplatesListCall) Context(ctx context.Context) *OrganizationsInspectTemplatesListCall { - 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 *OrganizationsInspectTemplatesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *OrganizationsInspectTemplatesListCall) 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, "v2beta2/{+parent}/inspectTemplates") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "dlp.organizations.inspectTemplates.list" call. -// Exactly one of *GooglePrivacyDlpV2beta2ListInspectTemplatesResponse -// or error will be non-nil. Any non-2xx status code is an error. -// Response headers are in either -// *GooglePrivacyDlpV2beta2ListInspectTemplatesResponse.ServerResponse.He -// ader 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 *OrganizationsInspectTemplatesListCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2beta2ListInspectTemplatesResponse, 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 := &GooglePrivacyDlpV2beta2ListInspectTemplatesResponse{ - 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": "Lists inspect templates.", - // "flatPath": "v2beta2/organizations/{organizationsId}/inspectTemplates", - // "httpMethod": "GET", - // "id": "dlp.organizations.inspectTemplates.list", - // "parameterOrder": [ - // "parent" - // ], - // "parameters": { - // "pageSize": { - // "description": "Optional size of the page, can be limited by server. If zero server returns\na page of max size 100.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "Optional page token to continue retrieval. Comes from previous call\nto `ListInspectTemplates`.", - // "location": "query", - // "type": "string" - // }, - // "parent": { - // "description": "The parent resource name, for example projects/my-project-id or\norganizations/my-org-id.", - // "location": "path", - // "pattern": "^organizations/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v2beta2/{+parent}/inspectTemplates", - // "response": { - // "$ref": "GooglePrivacyDlpV2beta2ListInspectTemplatesResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// 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 *OrganizationsInspectTemplatesListCall) Pages(ctx context.Context, f func(*GooglePrivacyDlpV2beta2ListInspectTemplatesResponse) 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 "dlp.organizations.inspectTemplates.patch": - -type OrganizationsInspectTemplatesPatchCall struct { - s *Service - name string - googleprivacydlpv2beta2updateinspecttemplaterequest *GooglePrivacyDlpV2beta2UpdateInspectTemplateRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Updates the inspect template. -func (r *OrganizationsInspectTemplatesService) Patch(name string, googleprivacydlpv2beta2updateinspecttemplaterequest *GooglePrivacyDlpV2beta2UpdateInspectTemplateRequest) *OrganizationsInspectTemplatesPatchCall { - c := &OrganizationsInspectTemplatesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googleprivacydlpv2beta2updateinspecttemplaterequest = googleprivacydlpv2beta2updateinspecttemplaterequest - 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 *OrganizationsInspectTemplatesPatchCall) Fields(s ...googleapi.Field) *OrganizationsInspectTemplatesPatchCall { - 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 *OrganizationsInspectTemplatesPatchCall) Context(ctx context.Context) *OrganizationsInspectTemplatesPatchCall { - 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 *OrganizationsInspectTemplatesPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *OrganizationsInspectTemplatesPatchCall) 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.googleprivacydlpv2beta2updateinspecttemplaterequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta2/{+name}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("PATCH", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "dlp.organizations.inspectTemplates.patch" call. -// Exactly one of *GooglePrivacyDlpV2beta2InspectTemplate or error will -// be non-nil. Any non-2xx status code is an error. Response headers are -// in either -// *GooglePrivacyDlpV2beta2InspectTemplate.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 *OrganizationsInspectTemplatesPatchCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2beta2InspectTemplate, 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 := &GooglePrivacyDlpV2beta2InspectTemplate{ - 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": "Updates the inspect template.", - // "flatPath": "v2beta2/organizations/{organizationsId}/inspectTemplates/{inspectTemplatesId}", - // "httpMethod": "PATCH", - // "id": "dlp.organizations.inspectTemplates.patch", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "Resource name of organization and inspectTemplate to be updated, for\nexample `organizations/433245324/inspectTemplates/432452342` or\nprojects/project-id/inspectTemplates/432452342.", - // "location": "path", - // "pattern": "^organizations/[^/]+/inspectTemplates/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v2beta2/{+name}", - // "request": { - // "$ref": "GooglePrivacyDlpV2beta2UpdateInspectTemplateRequest" - // }, - // "response": { - // "$ref": "GooglePrivacyDlpV2beta2InspectTemplate" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "dlp.projects.content.deidentify": - -type ProjectsContentDeidentifyCall struct { - s *Service - parent string - googleprivacydlpv2beta2deidentifycontentrequest *GooglePrivacyDlpV2beta2DeidentifyContentRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Deidentify: De-identifies potentially sensitive info from a -// ContentItem. -// This method has limits on input size and output size. -// [How-to guide](/dlp/docs/deidentify-sensitive-data) -func (r *ProjectsContentService) Deidentify(parent string, googleprivacydlpv2beta2deidentifycontentrequest *GooglePrivacyDlpV2beta2DeidentifyContentRequest) *ProjectsContentDeidentifyCall { - c := &ProjectsContentDeidentifyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googleprivacydlpv2beta2deidentifycontentrequest = googleprivacydlpv2beta2deidentifycontentrequest - 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 *ProjectsContentDeidentifyCall) Fields(s ...googleapi.Field) *ProjectsContentDeidentifyCall { - 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 *ProjectsContentDeidentifyCall) Context(ctx context.Context) *ProjectsContentDeidentifyCall { - 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 *ProjectsContentDeidentifyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsContentDeidentifyCall) 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.googleprivacydlpv2beta2deidentifycontentrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta2/{+parent}/content:deidentify") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "dlp.projects.content.deidentify" call. -// Exactly one of *GooglePrivacyDlpV2beta2DeidentifyContentResponse or -// error will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GooglePrivacyDlpV2beta2DeidentifyContentResponse.ServerResponse.Heade -// r 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 *ProjectsContentDeidentifyCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2beta2DeidentifyContentResponse, 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 := &GooglePrivacyDlpV2beta2DeidentifyContentResponse{ - 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": "De-identifies potentially sensitive info from a ContentItem.\nThis method has limits on input size and output size.\n[How-to guide](/dlp/docs/deidentify-sensitive-data)", - // "flatPath": "v2beta2/projects/{projectsId}/content:deidentify", - // "httpMethod": "POST", - // "id": "dlp.projects.content.deidentify", - // "parameterOrder": [ - // "parent" - // ], - // "parameters": { - // "parent": { - // "description": "The parent resource name, for example projects/my-project-id.", - // "location": "path", - // "pattern": "^projects/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v2beta2/{+parent}/content:deidentify", - // "request": { - // "$ref": "GooglePrivacyDlpV2beta2DeidentifyContentRequest" - // }, - // "response": { - // "$ref": "GooglePrivacyDlpV2beta2DeidentifyContentResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "dlp.projects.content.inspect": - -type ProjectsContentInspectCall struct { - s *Service - parent string - googleprivacydlpv2beta2inspectcontentrequest *GooglePrivacyDlpV2beta2InspectContentRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Inspect: Finds potentially sensitive info in content. -// This method has limits on input size, processing time, and output -// size. -// [How-to guide for text](/dlp/docs/inspecting-text), [How-to guide -// for -// images](/dlp/docs/inspecting-images) -func (r *ProjectsContentService) Inspect(parent string, googleprivacydlpv2beta2inspectcontentrequest *GooglePrivacyDlpV2beta2InspectContentRequest) *ProjectsContentInspectCall { - c := &ProjectsContentInspectCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googleprivacydlpv2beta2inspectcontentrequest = googleprivacydlpv2beta2inspectcontentrequest - 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 *ProjectsContentInspectCall) Fields(s ...googleapi.Field) *ProjectsContentInspectCall { - 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 *ProjectsContentInspectCall) Context(ctx context.Context) *ProjectsContentInspectCall { - 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 *ProjectsContentInspectCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsContentInspectCall) 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.googleprivacydlpv2beta2inspectcontentrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta2/{+parent}/content:inspect") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "dlp.projects.content.inspect" call. -// Exactly one of *GooglePrivacyDlpV2beta2InspectContentResponse or -// error will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GooglePrivacyDlpV2beta2InspectContentResponse.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 *ProjectsContentInspectCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2beta2InspectContentResponse, 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 := &GooglePrivacyDlpV2beta2InspectContentResponse{ - 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": "Finds potentially sensitive info in content.\nThis method has limits on input size, processing time, and output size.\n[How-to guide for text](/dlp/docs/inspecting-text), [How-to guide for\nimages](/dlp/docs/inspecting-images)", - // "flatPath": "v2beta2/projects/{projectsId}/content:inspect", - // "httpMethod": "POST", - // "id": "dlp.projects.content.inspect", - // "parameterOrder": [ - // "parent" - // ], - // "parameters": { - // "parent": { - // "description": "The parent resource name, for example projects/my-project-id.", - // "location": "path", - // "pattern": "^projects/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v2beta2/{+parent}/content:inspect", - // "request": { - // "$ref": "GooglePrivacyDlpV2beta2InspectContentRequest" - // }, - // "response": { - // "$ref": "GooglePrivacyDlpV2beta2InspectContentResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "dlp.projects.content.reidentify": - -type ProjectsContentReidentifyCall struct { - s *Service - parent string - googleprivacydlpv2beta2reidentifycontentrequest *GooglePrivacyDlpV2beta2ReidentifyContentRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Reidentify: Re-identify content that has been de-identified. -func (r *ProjectsContentService) Reidentify(parent string, googleprivacydlpv2beta2reidentifycontentrequest *GooglePrivacyDlpV2beta2ReidentifyContentRequest) *ProjectsContentReidentifyCall { - c := &ProjectsContentReidentifyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googleprivacydlpv2beta2reidentifycontentrequest = googleprivacydlpv2beta2reidentifycontentrequest - 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 *ProjectsContentReidentifyCall) Fields(s ...googleapi.Field) *ProjectsContentReidentifyCall { - 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 *ProjectsContentReidentifyCall) Context(ctx context.Context) *ProjectsContentReidentifyCall { - 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 *ProjectsContentReidentifyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsContentReidentifyCall) 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.googleprivacydlpv2beta2reidentifycontentrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta2/{+parent}/content:reidentify") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "dlp.projects.content.reidentify" call. -// Exactly one of *GooglePrivacyDlpV2beta2ReidentifyContentResponse or -// error will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GooglePrivacyDlpV2beta2ReidentifyContentResponse.ServerResponse.Heade -// r 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 *ProjectsContentReidentifyCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2beta2ReidentifyContentResponse, 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 := &GooglePrivacyDlpV2beta2ReidentifyContentResponse{ - 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": "Re-identify content that has been de-identified.", - // "flatPath": "v2beta2/projects/{projectsId}/content:reidentify", - // "httpMethod": "POST", - // "id": "dlp.projects.content.reidentify", - // "parameterOrder": [ - // "parent" - // ], - // "parameters": { - // "parent": { - // "description": "The parent resource name.", - // "location": "path", - // "pattern": "^projects/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v2beta2/{+parent}/content:reidentify", - // "request": { - // "$ref": "GooglePrivacyDlpV2beta2ReidentifyContentRequest" - // }, - // "response": { - // "$ref": "GooglePrivacyDlpV2beta2ReidentifyContentResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "dlp.projects.dataSource.analyze": - -type ProjectsDataSourceAnalyzeCall struct { - s *Service - parent string - googleprivacydlpv2beta2analyzedatasourceriskrequest *GooglePrivacyDlpV2beta2AnalyzeDataSourceRiskRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Analyze: Schedules a job to compute risk analysis metrics over -// content in a Google -// Cloud Platform repository. [How-to -// guide](/dlp/docs/compute-risk-analysis) -func (r *ProjectsDataSourceService) Analyze(parent string, googleprivacydlpv2beta2analyzedatasourceriskrequest *GooglePrivacyDlpV2beta2AnalyzeDataSourceRiskRequest) *ProjectsDataSourceAnalyzeCall { - c := &ProjectsDataSourceAnalyzeCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googleprivacydlpv2beta2analyzedatasourceriskrequest = googleprivacydlpv2beta2analyzedatasourceriskrequest - 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 *ProjectsDataSourceAnalyzeCall) Fields(s ...googleapi.Field) *ProjectsDataSourceAnalyzeCall { - 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 *ProjectsDataSourceAnalyzeCall) Context(ctx context.Context) *ProjectsDataSourceAnalyzeCall { - 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 *ProjectsDataSourceAnalyzeCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsDataSourceAnalyzeCall) 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.googleprivacydlpv2beta2analyzedatasourceriskrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta2/{+parent}/dataSource:analyze") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "dlp.projects.dataSource.analyze" call. -// Exactly one of *GooglePrivacyDlpV2beta2DlpJob or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *GooglePrivacyDlpV2beta2DlpJob.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 *ProjectsDataSourceAnalyzeCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2beta2DlpJob, 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 := &GooglePrivacyDlpV2beta2DlpJob{ - 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": "Schedules a job to compute risk analysis metrics over content in a Google\nCloud Platform repository. [How-to guide](/dlp/docs/compute-risk-analysis)", - // "flatPath": "v2beta2/projects/{projectsId}/dataSource:analyze", - // "httpMethod": "POST", - // "id": "dlp.projects.dataSource.analyze", - // "parameterOrder": [ - // "parent" - // ], - // "parameters": { - // "parent": { - // "description": "The parent resource name, for example projects/my-project-id.", - // "location": "path", - // "pattern": "^projects/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v2beta2/{+parent}/dataSource:analyze", - // "request": { - // "$ref": "GooglePrivacyDlpV2beta2AnalyzeDataSourceRiskRequest" - // }, - // "response": { - // "$ref": "GooglePrivacyDlpV2beta2DlpJob" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "dlp.projects.dataSource.inspect": - -type ProjectsDataSourceInspectCall struct { - s *Service - parent string - googleprivacydlpv2beta2inspectdatasourcerequest *GooglePrivacyDlpV2beta2InspectDataSourceRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Inspect: Schedules a job scanning content in a Google Cloud Platform -// data -// repository. [How-to guide](/dlp/docs/inspecting-storage) -func (r *ProjectsDataSourceService) Inspect(parent string, googleprivacydlpv2beta2inspectdatasourcerequest *GooglePrivacyDlpV2beta2InspectDataSourceRequest) *ProjectsDataSourceInspectCall { - c := &ProjectsDataSourceInspectCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googleprivacydlpv2beta2inspectdatasourcerequest = googleprivacydlpv2beta2inspectdatasourcerequest - 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 *ProjectsDataSourceInspectCall) Fields(s ...googleapi.Field) *ProjectsDataSourceInspectCall { - 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 *ProjectsDataSourceInspectCall) Context(ctx context.Context) *ProjectsDataSourceInspectCall { - 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 *ProjectsDataSourceInspectCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsDataSourceInspectCall) 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.googleprivacydlpv2beta2inspectdatasourcerequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta2/{+parent}/dataSource:inspect") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "dlp.projects.dataSource.inspect" call. -// Exactly one of *GooglePrivacyDlpV2beta2DlpJob or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *GooglePrivacyDlpV2beta2DlpJob.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 *ProjectsDataSourceInspectCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2beta2DlpJob, 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 := &GooglePrivacyDlpV2beta2DlpJob{ - 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": "Schedules a job scanning content in a Google Cloud Platform data\nrepository. [How-to guide](/dlp/docs/inspecting-storage)", - // "flatPath": "v2beta2/projects/{projectsId}/dataSource:inspect", - // "httpMethod": "POST", - // "id": "dlp.projects.dataSource.inspect", - // "parameterOrder": [ - // "parent" - // ], - // "parameters": { - // "parent": { - // "description": "The parent resource name, for example projects/my-project-id.", - // "location": "path", - // "pattern": "^projects/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v2beta2/{+parent}/dataSource:inspect", - // "request": { - // "$ref": "GooglePrivacyDlpV2beta2InspectDataSourceRequest" - // }, - // "response": { - // "$ref": "GooglePrivacyDlpV2beta2DlpJob" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "dlp.projects.deidentifyTemplates.create": - -type ProjectsDeidentifyTemplatesCreateCall struct { - s *Service - parent string - googleprivacydlpv2beta2createdeidentifytemplaterequest *GooglePrivacyDlpV2beta2CreateDeidentifyTemplateRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Create: Creates an Deidentify template for re-using frequently used -// configuration -// for Deidentifying content, images, and storage. -func (r *ProjectsDeidentifyTemplatesService) Create(parent string, googleprivacydlpv2beta2createdeidentifytemplaterequest *GooglePrivacyDlpV2beta2CreateDeidentifyTemplateRequest) *ProjectsDeidentifyTemplatesCreateCall { - c := &ProjectsDeidentifyTemplatesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googleprivacydlpv2beta2createdeidentifytemplaterequest = googleprivacydlpv2beta2createdeidentifytemplaterequest - 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 *ProjectsDeidentifyTemplatesCreateCall) Fields(s ...googleapi.Field) *ProjectsDeidentifyTemplatesCreateCall { - 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 *ProjectsDeidentifyTemplatesCreateCall) Context(ctx context.Context) *ProjectsDeidentifyTemplatesCreateCall { - 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 *ProjectsDeidentifyTemplatesCreateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsDeidentifyTemplatesCreateCall) 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.googleprivacydlpv2beta2createdeidentifytemplaterequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta2/{+parent}/deidentifyTemplates") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "dlp.projects.deidentifyTemplates.create" call. -// Exactly one of *GooglePrivacyDlpV2beta2DeidentifyTemplate or error -// will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GooglePrivacyDlpV2beta2DeidentifyTemplate.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 *ProjectsDeidentifyTemplatesCreateCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2beta2DeidentifyTemplate, 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 := &GooglePrivacyDlpV2beta2DeidentifyTemplate{ - 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": "Creates an Deidentify template for re-using frequently used configuration\nfor Deidentifying content, images, and storage.", - // "flatPath": "v2beta2/projects/{projectsId}/deidentifyTemplates", - // "httpMethod": "POST", - // "id": "dlp.projects.deidentifyTemplates.create", - // "parameterOrder": [ - // "parent" - // ], - // "parameters": { - // "parent": { - // "description": "The parent resource name, for example projects/my-project-id or\norganizations/my-org-id.", - // "location": "path", - // "pattern": "^projects/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v2beta2/{+parent}/deidentifyTemplates", - // "request": { - // "$ref": "GooglePrivacyDlpV2beta2CreateDeidentifyTemplateRequest" - // }, - // "response": { - // "$ref": "GooglePrivacyDlpV2beta2DeidentifyTemplate" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "dlp.projects.deidentifyTemplates.delete": - -type ProjectsDeidentifyTemplatesDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes inspect templates. -func (r *ProjectsDeidentifyTemplatesService) Delete(name string) *ProjectsDeidentifyTemplatesDeleteCall { - c := &ProjectsDeidentifyTemplatesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - 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 *ProjectsDeidentifyTemplatesDeleteCall) Fields(s ...googleapi.Field) *ProjectsDeidentifyTemplatesDeleteCall { - 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 *ProjectsDeidentifyTemplatesDeleteCall) Context(ctx context.Context) *ProjectsDeidentifyTemplatesDeleteCall { - 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 *ProjectsDeidentifyTemplatesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsDeidentifyTemplatesDeleteCall) 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 - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta2/{+name}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("DELETE", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "dlp.projects.deidentifyTemplates.delete" call. -// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *GoogleProtobufEmpty.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 *ProjectsDeidentifyTemplatesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, 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 := &GoogleProtobufEmpty{ - 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": "Deletes inspect templates.", - // "flatPath": "v2beta2/projects/{projectsId}/deidentifyTemplates/{deidentifyTemplatesId}", - // "httpMethod": "DELETE", - // "id": "dlp.projects.deidentifyTemplates.delete", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "Resource name of the organization and deidentify template to be deleted,\nfor example `organizations/433245324/deidentifyTemplates/432452342` or\nprojects/project-id/deidentifyTemplates/432452342.", - // "location": "path", - // "pattern": "^projects/[^/]+/deidentifyTemplates/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v2beta2/{+name}", - // "response": { - // "$ref": "GoogleProtobufEmpty" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "dlp.projects.deidentifyTemplates.get": - -type ProjectsDeidentifyTemplatesGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Gets an inspect template. -func (r *ProjectsDeidentifyTemplatesService) Get(name string) *ProjectsDeidentifyTemplatesGetCall { - c := &ProjectsDeidentifyTemplatesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - 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 *ProjectsDeidentifyTemplatesGetCall) Fields(s ...googleapi.Field) *ProjectsDeidentifyTemplatesGetCall { - 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 *ProjectsDeidentifyTemplatesGetCall) IfNoneMatch(entityTag string) *ProjectsDeidentifyTemplatesGetCall { - 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 *ProjectsDeidentifyTemplatesGetCall) Context(ctx context.Context) *ProjectsDeidentifyTemplatesGetCall { - 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 *ProjectsDeidentifyTemplatesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsDeidentifyTemplatesGetCall) 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, "v2beta2/{+name}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "dlp.projects.deidentifyTemplates.get" call. -// Exactly one of *GooglePrivacyDlpV2beta2DeidentifyTemplate or error -// will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GooglePrivacyDlpV2beta2DeidentifyTemplate.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 *ProjectsDeidentifyTemplatesGetCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2beta2DeidentifyTemplate, 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 := &GooglePrivacyDlpV2beta2DeidentifyTemplate{ - 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": "Gets an inspect template.", - // "flatPath": "v2beta2/projects/{projectsId}/deidentifyTemplates/{deidentifyTemplatesId}", - // "httpMethod": "GET", - // "id": "dlp.projects.deidentifyTemplates.get", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "Resource name of the organization and deidentify template to be read, for\nexample `organizations/433245324/deidentifyTemplates/432452342` or\nprojects/project-id/deidentifyTemplates/432452342.", - // "location": "path", - // "pattern": "^projects/[^/]+/deidentifyTemplates/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v2beta2/{+name}", - // "response": { - // "$ref": "GooglePrivacyDlpV2beta2DeidentifyTemplate" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "dlp.projects.deidentifyTemplates.list": - -type ProjectsDeidentifyTemplatesListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists inspect templates. -func (r *ProjectsDeidentifyTemplatesService) List(parent string) *ProjectsDeidentifyTemplatesListCall { - c := &ProjectsDeidentifyTemplatesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// PageSize sets the optional parameter "pageSize": Optional size of the -// page, can be limited by server. If zero server returns -// a page of max size 100. -func (c *ProjectsDeidentifyTemplatesListCall) PageSize(pageSize int64) *ProjectsDeidentifyTemplatesListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": Optional page -// token to continue retrieval. Comes from previous call -// to `ListDeidentifyTemplates`. -func (c *ProjectsDeidentifyTemplatesListCall) PageToken(pageToken string) *ProjectsDeidentifyTemplatesListCall { - 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 *ProjectsDeidentifyTemplatesListCall) Fields(s ...googleapi.Field) *ProjectsDeidentifyTemplatesListCall { - 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 *ProjectsDeidentifyTemplatesListCall) IfNoneMatch(entityTag string) *ProjectsDeidentifyTemplatesListCall { - 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 *ProjectsDeidentifyTemplatesListCall) Context(ctx context.Context) *ProjectsDeidentifyTemplatesListCall { - 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 *ProjectsDeidentifyTemplatesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsDeidentifyTemplatesListCall) 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, "v2beta2/{+parent}/deidentifyTemplates") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "dlp.projects.deidentifyTemplates.list" call. -// Exactly one of -// *GooglePrivacyDlpV2beta2ListDeidentifyTemplatesResponse or error will -// be non-nil. Any non-2xx status code is an error. Response headers are -// in either -// *GooglePrivacyDlpV2beta2ListDeidentifyTemplatesResponse.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 *ProjectsDeidentifyTemplatesListCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2beta2ListDeidentifyTemplatesResponse, 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 := &GooglePrivacyDlpV2beta2ListDeidentifyTemplatesResponse{ - 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": "Lists inspect templates.", - // "flatPath": "v2beta2/projects/{projectsId}/deidentifyTemplates", - // "httpMethod": "GET", - // "id": "dlp.projects.deidentifyTemplates.list", - // "parameterOrder": [ - // "parent" - // ], - // "parameters": { - // "pageSize": { - // "description": "Optional size of the page, can be limited by server. If zero server returns\na page of max size 100.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "Optional page token to continue retrieval. Comes from previous call\nto `ListDeidentifyTemplates`.", - // "location": "query", - // "type": "string" - // }, - // "parent": { - // "description": "The parent resource name, for example projects/my-project-id or\norganizations/my-org-id.", - // "location": "path", - // "pattern": "^projects/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v2beta2/{+parent}/deidentifyTemplates", - // "response": { - // "$ref": "GooglePrivacyDlpV2beta2ListDeidentifyTemplatesResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// 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 *ProjectsDeidentifyTemplatesListCall) Pages(ctx context.Context, f func(*GooglePrivacyDlpV2beta2ListDeidentifyTemplatesResponse) 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 "dlp.projects.deidentifyTemplates.patch": - -type ProjectsDeidentifyTemplatesPatchCall struct { - s *Service - name string - googleprivacydlpv2beta2updatedeidentifytemplaterequest *GooglePrivacyDlpV2beta2UpdateDeidentifyTemplateRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Updates the inspect template. -func (r *ProjectsDeidentifyTemplatesService) Patch(name string, googleprivacydlpv2beta2updatedeidentifytemplaterequest *GooglePrivacyDlpV2beta2UpdateDeidentifyTemplateRequest) *ProjectsDeidentifyTemplatesPatchCall { - c := &ProjectsDeidentifyTemplatesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googleprivacydlpv2beta2updatedeidentifytemplaterequest = googleprivacydlpv2beta2updatedeidentifytemplaterequest - 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 *ProjectsDeidentifyTemplatesPatchCall) Fields(s ...googleapi.Field) *ProjectsDeidentifyTemplatesPatchCall { - 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 *ProjectsDeidentifyTemplatesPatchCall) Context(ctx context.Context) *ProjectsDeidentifyTemplatesPatchCall { - 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 *ProjectsDeidentifyTemplatesPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsDeidentifyTemplatesPatchCall) 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.googleprivacydlpv2beta2updatedeidentifytemplaterequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta2/{+name}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("PATCH", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "dlp.projects.deidentifyTemplates.patch" call. -// Exactly one of *GooglePrivacyDlpV2beta2DeidentifyTemplate or error -// will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GooglePrivacyDlpV2beta2DeidentifyTemplate.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 *ProjectsDeidentifyTemplatesPatchCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2beta2DeidentifyTemplate, 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 := &GooglePrivacyDlpV2beta2DeidentifyTemplate{ - 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": "Updates the inspect template.", - // "flatPath": "v2beta2/projects/{projectsId}/deidentifyTemplates/{deidentifyTemplatesId}", - // "httpMethod": "PATCH", - // "id": "dlp.projects.deidentifyTemplates.patch", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "Resource name of organization and deidentify template to be updated, for\nexample `organizations/433245324/deidentifyTemplates/432452342` or\nprojects/project-id/deidentifyTemplates/432452342.", - // "location": "path", - // "pattern": "^projects/[^/]+/deidentifyTemplates/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v2beta2/{+name}", - // "request": { - // "$ref": "GooglePrivacyDlpV2beta2UpdateDeidentifyTemplateRequest" - // }, - // "response": { - // "$ref": "GooglePrivacyDlpV2beta2DeidentifyTemplate" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "dlp.projects.dlpJobs.cancel": - -type ProjectsDlpJobsCancelCall struct { - s *Service - name string - googleprivacydlpv2beta2canceldlpjobrequest *GooglePrivacyDlpV2beta2CancelDlpJobRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Cancel: Starts asynchronous cancellation on a long-running DlpJob. -// The server -// makes a best effort to cancel the DlpJob, but success is -// not -// guaranteed. -func (r *ProjectsDlpJobsService) Cancel(name string, googleprivacydlpv2beta2canceldlpjobrequest *GooglePrivacyDlpV2beta2CancelDlpJobRequest) *ProjectsDlpJobsCancelCall { - c := &ProjectsDlpJobsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googleprivacydlpv2beta2canceldlpjobrequest = googleprivacydlpv2beta2canceldlpjobrequest - 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 *ProjectsDlpJobsCancelCall) Fields(s ...googleapi.Field) *ProjectsDlpJobsCancelCall { - 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 *ProjectsDlpJobsCancelCall) Context(ctx context.Context) *ProjectsDlpJobsCancelCall { - 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 *ProjectsDlpJobsCancelCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsDlpJobsCancelCall) 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.googleprivacydlpv2beta2canceldlpjobrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta2/{+name}:cancel") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "dlp.projects.dlpJobs.cancel" call. -// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *GoogleProtobufEmpty.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 *ProjectsDlpJobsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, 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 := &GoogleProtobufEmpty{ - 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": "Starts asynchronous cancellation on a long-running DlpJob. The server\nmakes a best effort to cancel the DlpJob, but success is not\nguaranteed.", - // "flatPath": "v2beta2/projects/{projectsId}/dlpJobs/{dlpJobsId}:cancel", - // "httpMethod": "POST", - // "id": "dlp.projects.dlpJobs.cancel", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "The name of the DlpJob resource to be cancelled.", - // "location": "path", - // "pattern": "^projects/[^/]+/dlpJobs/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v2beta2/{+name}:cancel", - // "request": { - // "$ref": "GooglePrivacyDlpV2beta2CancelDlpJobRequest" - // }, - // "response": { - // "$ref": "GoogleProtobufEmpty" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "dlp.projects.dlpJobs.delete": - -type ProjectsDlpJobsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes a long-running DlpJob. This method indicates that the -// client is -// no longer interested in the DlpJob result. The job will be cancelled -// if -// possible. -func (r *ProjectsDlpJobsService) Delete(name string) *ProjectsDlpJobsDeleteCall { - c := &ProjectsDlpJobsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - 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 *ProjectsDlpJobsDeleteCall) Fields(s ...googleapi.Field) *ProjectsDlpJobsDeleteCall { - 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 *ProjectsDlpJobsDeleteCall) Context(ctx context.Context) *ProjectsDlpJobsDeleteCall { - 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 *ProjectsDlpJobsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsDlpJobsDeleteCall) 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 - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta2/{+name}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("DELETE", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "dlp.projects.dlpJobs.delete" call. -// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *GoogleProtobufEmpty.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 *ProjectsDlpJobsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, 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 := &GoogleProtobufEmpty{ - 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": "Deletes a long-running DlpJob. This method indicates that the client is\nno longer interested in the DlpJob result. The job will be cancelled if\npossible.", - // "flatPath": "v2beta2/projects/{projectsId}/dlpJobs/{dlpJobsId}", - // "httpMethod": "DELETE", - // "id": "dlp.projects.dlpJobs.delete", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "The name of the DlpJob resource to be deleted.", - // "location": "path", - // "pattern": "^projects/[^/]+/dlpJobs/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v2beta2/{+name}", - // "response": { - // "$ref": "GoogleProtobufEmpty" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "dlp.projects.dlpJobs.get": - -type ProjectsDlpJobsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Gets the latest state of a long-running DlpJob. -func (r *ProjectsDlpJobsService) Get(name string) *ProjectsDlpJobsGetCall { - c := &ProjectsDlpJobsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - 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 *ProjectsDlpJobsGetCall) Fields(s ...googleapi.Field) *ProjectsDlpJobsGetCall { - 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 *ProjectsDlpJobsGetCall) IfNoneMatch(entityTag string) *ProjectsDlpJobsGetCall { - 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 *ProjectsDlpJobsGetCall) Context(ctx context.Context) *ProjectsDlpJobsGetCall { - 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 *ProjectsDlpJobsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsDlpJobsGetCall) 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, "v2beta2/{+name}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "dlp.projects.dlpJobs.get" call. -// Exactly one of *GooglePrivacyDlpV2beta2DlpJob or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *GooglePrivacyDlpV2beta2DlpJob.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 *ProjectsDlpJobsGetCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2beta2DlpJob, 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 := &GooglePrivacyDlpV2beta2DlpJob{ - 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": "Gets the latest state of a long-running DlpJob.", - // "flatPath": "v2beta2/projects/{projectsId}/dlpJobs/{dlpJobsId}", - // "httpMethod": "GET", - // "id": "dlp.projects.dlpJobs.get", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "The name of the DlpJob resource.", - // "location": "path", - // "pattern": "^projects/[^/]+/dlpJobs/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v2beta2/{+name}", - // "response": { - // "$ref": "GooglePrivacyDlpV2beta2DlpJob" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "dlp.projects.dlpJobs.list": - -type ProjectsDlpJobsListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists DlpJobs that match the specified filter in the request. -func (r *ProjectsDlpJobsService) List(parent string) *ProjectsDlpJobsListCall { - c := &ProjectsDlpJobsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// Filter sets the optional parameter "filter": Allows -// filtering. -// -// Supported syntax: -// -// * Filter expressions are made up of one or more restrictions. -// * Restrictions can be combined by `AND` or `OR` logical operators. -// A -// sequence of restrictions implicitly uses `AND`. -// * A restriction has the form of `<field> <operator> <value>`. -// * Supported fields/values for inspect jobs: -// - `state` - PENDING|RUNNING|CANCELED|FINISHED|FAILED -// - `inspected_storage` - DATASTORE|CLOUD_STORAGE|BIGQUERY -// - `trigger_name` - The resource name of the trigger that created -// job. -// * Supported fields for risk analysis jobs: -// - `state` - RUNNING|CANCELED|FINISHED|FAILED -// * The operator must be `=` or `!=`. -// -// Examples: -// -// * inspected_storage = cloud_storage AND state = done -// * inspected_storage = cloud_storage OR inspected_storage = bigquery -// * inspected_storage = cloud_storage AND (state = done OR state = -// canceled) -// -// The length of this field should be no more than 500 characters. -func (c *ProjectsDlpJobsListCall) Filter(filter string) *ProjectsDlpJobsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// PageSize sets the optional parameter "pageSize": The standard list -// page size. -func (c *ProjectsDlpJobsListCall) PageSize(pageSize int64) *ProjectsDlpJobsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": The standard list -// page token. -func (c *ProjectsDlpJobsListCall) PageToken(pageToken string) *ProjectsDlpJobsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Type sets the optional parameter "type": The type of job. Defaults to -// `DlpJobType.INSPECT` -// -// Possible values: -// "DLP_JOB_TYPE_UNSPECIFIED" -// "INSPECT_JOB" -// "RISK_ANALYSIS_JOB" -func (c *ProjectsDlpJobsListCall) Type(type_ string) *ProjectsDlpJobsListCall { - c.urlParams_.Set("type", type_) - 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 *ProjectsDlpJobsListCall) Fields(s ...googleapi.Field) *ProjectsDlpJobsListCall { - 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 *ProjectsDlpJobsListCall) IfNoneMatch(entityTag string) *ProjectsDlpJobsListCall { - 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 *ProjectsDlpJobsListCall) Context(ctx context.Context) *ProjectsDlpJobsListCall { - 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 *ProjectsDlpJobsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsDlpJobsListCall) 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, "v2beta2/{+parent}/dlpJobs") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "dlp.projects.dlpJobs.list" call. -// Exactly one of *GooglePrivacyDlpV2beta2ListDlpJobsResponse or error -// will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GooglePrivacyDlpV2beta2ListDlpJobsResponse.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 *ProjectsDlpJobsListCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2beta2ListDlpJobsResponse, 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 := &GooglePrivacyDlpV2beta2ListDlpJobsResponse{ - 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": "Lists DlpJobs that match the specified filter in the request.", - // "flatPath": "v2beta2/projects/{projectsId}/dlpJobs", - // "httpMethod": "GET", - // "id": "dlp.projects.dlpJobs.list", - // "parameterOrder": [ - // "parent" - // ], - // "parameters": { - // "filter": { - // "description": "Optional. Allows filtering.\n\nSupported syntax:\n\n* Filter expressions are made up of one or more restrictions.\n* Restrictions can be combined by `AND` or `OR` logical operators. A\nsequence of restrictions implicitly uses `AND`.\n* A restriction has the form of `\u003cfield\u003e \u003coperator\u003e \u003cvalue\u003e`.\n* Supported fields/values for inspect jobs:\n - `state` - PENDING|RUNNING|CANCELED|FINISHED|FAILED\n - `inspected_storage` - DATASTORE|CLOUD_STORAGE|BIGQUERY\n - `trigger_name` - The resource name of the trigger that created job.\n* Supported fields for risk analysis jobs:\n - `state` - RUNNING|CANCELED|FINISHED|FAILED\n* The operator must be `=` or `!=`.\n\nExamples:\n\n* inspected_storage = cloud_storage AND state = done\n* inspected_storage = cloud_storage OR inspected_storage = bigquery\n* inspected_storage = cloud_storage AND (state = done OR state = canceled)\n\nThe length of this field should be no more than 500 characters.", - // "location": "query", - // "type": "string" - // }, - // "pageSize": { - // "description": "The standard list page size.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "The standard list page token.", - // "location": "query", - // "type": "string" - // }, - // "parent": { - // "description": "The parent resource name, for example projects/my-project-id.", - // "location": "path", - // "pattern": "^projects/[^/]+$", - // "required": true, - // "type": "string" - // }, - // "type": { - // "description": "The type of job. Defaults to `DlpJobType.INSPECT`", - // "enum": [ - // "DLP_JOB_TYPE_UNSPECIFIED", - // "INSPECT_JOB", - // "RISK_ANALYSIS_JOB" - // ], - // "location": "query", - // "type": "string" - // } - // }, - // "path": "v2beta2/{+parent}/dlpJobs", - // "response": { - // "$ref": "GooglePrivacyDlpV2beta2ListDlpJobsResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// 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 *ProjectsDlpJobsListCall) Pages(ctx context.Context, f func(*GooglePrivacyDlpV2beta2ListDlpJobsResponse) 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 "dlp.projects.image.redact": - -type ProjectsImageRedactCall struct { - s *Service - parent string - googleprivacydlpv2beta2redactimagerequest *GooglePrivacyDlpV2beta2RedactImageRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Redact: Redacts potentially sensitive info from an image. -// This method has limits on input size, processing time, and output -// size. -// [How-to guide](/dlp/docs/redacting-sensitive-data-images) -func (r *ProjectsImageService) Redact(parent string, googleprivacydlpv2beta2redactimagerequest *GooglePrivacyDlpV2beta2RedactImageRequest) *ProjectsImageRedactCall { - c := &ProjectsImageRedactCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googleprivacydlpv2beta2redactimagerequest = googleprivacydlpv2beta2redactimagerequest - 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 *ProjectsImageRedactCall) Fields(s ...googleapi.Field) *ProjectsImageRedactCall { - 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 *ProjectsImageRedactCall) Context(ctx context.Context) *ProjectsImageRedactCall { - 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 *ProjectsImageRedactCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsImageRedactCall) 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.googleprivacydlpv2beta2redactimagerequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta2/{+parent}/image:redact") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "dlp.projects.image.redact" call. -// Exactly one of *GooglePrivacyDlpV2beta2RedactImageResponse or error -// will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GooglePrivacyDlpV2beta2RedactImageResponse.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 *ProjectsImageRedactCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2beta2RedactImageResponse, 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 := &GooglePrivacyDlpV2beta2RedactImageResponse{ - 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": "Redacts potentially sensitive info from an image.\nThis method has limits on input size, processing time, and output size.\n[How-to guide](/dlp/docs/redacting-sensitive-data-images)", - // "flatPath": "v2beta2/projects/{projectsId}/image:redact", - // "httpMethod": "POST", - // "id": "dlp.projects.image.redact", - // "parameterOrder": [ - // "parent" - // ], - // "parameters": { - // "parent": { - // "description": "The parent resource name, for example projects/my-project-id.", - // "location": "path", - // "pattern": "^projects/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v2beta2/{+parent}/image:redact", - // "request": { - // "$ref": "GooglePrivacyDlpV2beta2RedactImageRequest" - // }, - // "response": { - // "$ref": "GooglePrivacyDlpV2beta2RedactImageResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "dlp.projects.inspectTemplates.create": - -type ProjectsInspectTemplatesCreateCall struct { - s *Service - parent string - googleprivacydlpv2beta2createinspecttemplaterequest *GooglePrivacyDlpV2beta2CreateInspectTemplateRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Create: Creates an inspect template for re-using frequently used -// configuration -// for inspecting content, images, and storage. -func (r *ProjectsInspectTemplatesService) Create(parent string, googleprivacydlpv2beta2createinspecttemplaterequest *GooglePrivacyDlpV2beta2CreateInspectTemplateRequest) *ProjectsInspectTemplatesCreateCall { - c := &ProjectsInspectTemplatesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googleprivacydlpv2beta2createinspecttemplaterequest = googleprivacydlpv2beta2createinspecttemplaterequest - 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 *ProjectsInspectTemplatesCreateCall) Fields(s ...googleapi.Field) *ProjectsInspectTemplatesCreateCall { - 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 *ProjectsInspectTemplatesCreateCall) Context(ctx context.Context) *ProjectsInspectTemplatesCreateCall { - 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 *ProjectsInspectTemplatesCreateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsInspectTemplatesCreateCall) 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.googleprivacydlpv2beta2createinspecttemplaterequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta2/{+parent}/inspectTemplates") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "dlp.projects.inspectTemplates.create" call. -// Exactly one of *GooglePrivacyDlpV2beta2InspectTemplate or error will -// be non-nil. Any non-2xx status code is an error. Response headers are -// in either -// *GooglePrivacyDlpV2beta2InspectTemplate.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 *ProjectsInspectTemplatesCreateCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2beta2InspectTemplate, 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 := &GooglePrivacyDlpV2beta2InspectTemplate{ - 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": "Creates an inspect template for re-using frequently used configuration\nfor inspecting content, images, and storage.", - // "flatPath": "v2beta2/projects/{projectsId}/inspectTemplates", - // "httpMethod": "POST", - // "id": "dlp.projects.inspectTemplates.create", - // "parameterOrder": [ - // "parent" - // ], - // "parameters": { - // "parent": { - // "description": "The parent resource name, for example projects/my-project-id or\norganizations/my-org-id.", - // "location": "path", - // "pattern": "^projects/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v2beta2/{+parent}/inspectTemplates", - // "request": { - // "$ref": "GooglePrivacyDlpV2beta2CreateInspectTemplateRequest" - // }, - // "response": { - // "$ref": "GooglePrivacyDlpV2beta2InspectTemplate" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "dlp.projects.inspectTemplates.delete": - -type ProjectsInspectTemplatesDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes inspect templates. -func (r *ProjectsInspectTemplatesService) Delete(name string) *ProjectsInspectTemplatesDeleteCall { - c := &ProjectsInspectTemplatesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - 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 *ProjectsInspectTemplatesDeleteCall) Fields(s ...googleapi.Field) *ProjectsInspectTemplatesDeleteCall { - 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 *ProjectsInspectTemplatesDeleteCall) Context(ctx context.Context) *ProjectsInspectTemplatesDeleteCall { - 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 *ProjectsInspectTemplatesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsInspectTemplatesDeleteCall) 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 - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta2/{+name}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("DELETE", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "dlp.projects.inspectTemplates.delete" call. -// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *GoogleProtobufEmpty.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 *ProjectsInspectTemplatesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, 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 := &GoogleProtobufEmpty{ - 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": "Deletes inspect templates.", - // "flatPath": "v2beta2/projects/{projectsId}/inspectTemplates/{inspectTemplatesId}", - // "httpMethod": "DELETE", - // "id": "dlp.projects.inspectTemplates.delete", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "Resource name of the organization and inspectTemplate to be deleted, for\nexample `organizations/433245324/inspectTemplates/432452342` or\nprojects/project-id/inspectTemplates/432452342.", - // "location": "path", - // "pattern": "^projects/[^/]+/inspectTemplates/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v2beta2/{+name}", - // "response": { - // "$ref": "GoogleProtobufEmpty" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "dlp.projects.inspectTemplates.get": - -type ProjectsInspectTemplatesGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Gets an inspect template. -func (r *ProjectsInspectTemplatesService) Get(name string) *ProjectsInspectTemplatesGetCall { - c := &ProjectsInspectTemplatesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - 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 *ProjectsInspectTemplatesGetCall) Fields(s ...googleapi.Field) *ProjectsInspectTemplatesGetCall { - 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 *ProjectsInspectTemplatesGetCall) IfNoneMatch(entityTag string) *ProjectsInspectTemplatesGetCall { - 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 *ProjectsInspectTemplatesGetCall) Context(ctx context.Context) *ProjectsInspectTemplatesGetCall { - 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 *ProjectsInspectTemplatesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsInspectTemplatesGetCall) 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, "v2beta2/{+name}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "dlp.projects.inspectTemplates.get" call. -// Exactly one of *GooglePrivacyDlpV2beta2InspectTemplate or error will -// be non-nil. Any non-2xx status code is an error. Response headers are -// in either -// *GooglePrivacyDlpV2beta2InspectTemplate.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 *ProjectsInspectTemplatesGetCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2beta2InspectTemplate, 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 := &GooglePrivacyDlpV2beta2InspectTemplate{ - 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": "Gets an inspect template.", - // "flatPath": "v2beta2/projects/{projectsId}/inspectTemplates/{inspectTemplatesId}", - // "httpMethod": "GET", - // "id": "dlp.projects.inspectTemplates.get", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "Resource name of the organization and inspectTemplate to be read, for\nexample `organizations/433245324/inspectTemplates/432452342` or\nprojects/project-id/inspectTemplates/432452342.", - // "location": "path", - // "pattern": "^projects/[^/]+/inspectTemplates/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v2beta2/{+name}", - // "response": { - // "$ref": "GooglePrivacyDlpV2beta2InspectTemplate" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "dlp.projects.inspectTemplates.list": - -type ProjectsInspectTemplatesListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists inspect templates. -func (r *ProjectsInspectTemplatesService) List(parent string) *ProjectsInspectTemplatesListCall { - c := &ProjectsInspectTemplatesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// PageSize sets the optional parameter "pageSize": Optional size of the -// page, can be limited by server. If zero server returns -// a page of max size 100. -func (c *ProjectsInspectTemplatesListCall) PageSize(pageSize int64) *ProjectsInspectTemplatesListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": Optional page -// token to continue retrieval. Comes from previous call -// to `ListInspectTemplates`. -func (c *ProjectsInspectTemplatesListCall) PageToken(pageToken string) *ProjectsInspectTemplatesListCall { - 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 *ProjectsInspectTemplatesListCall) Fields(s ...googleapi.Field) *ProjectsInspectTemplatesListCall { - 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 *ProjectsInspectTemplatesListCall) IfNoneMatch(entityTag string) *ProjectsInspectTemplatesListCall { - 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 *ProjectsInspectTemplatesListCall) Context(ctx context.Context) *ProjectsInspectTemplatesListCall { - 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 *ProjectsInspectTemplatesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsInspectTemplatesListCall) 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, "v2beta2/{+parent}/inspectTemplates") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "dlp.projects.inspectTemplates.list" call. -// Exactly one of *GooglePrivacyDlpV2beta2ListInspectTemplatesResponse -// or error will be non-nil. Any non-2xx status code is an error. -// Response headers are in either -// *GooglePrivacyDlpV2beta2ListInspectTemplatesResponse.ServerResponse.He -// ader 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 *ProjectsInspectTemplatesListCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2beta2ListInspectTemplatesResponse, 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 := &GooglePrivacyDlpV2beta2ListInspectTemplatesResponse{ - 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": "Lists inspect templates.", - // "flatPath": "v2beta2/projects/{projectsId}/inspectTemplates", - // "httpMethod": "GET", - // "id": "dlp.projects.inspectTemplates.list", - // "parameterOrder": [ - // "parent" - // ], - // "parameters": { - // "pageSize": { - // "description": "Optional size of the page, can be limited by server. If zero server returns\na page of max size 100.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "Optional page token to continue retrieval. Comes from previous call\nto `ListInspectTemplates`.", - // "location": "query", - // "type": "string" - // }, - // "parent": { - // "description": "The parent resource name, for example projects/my-project-id or\norganizations/my-org-id.", - // "location": "path", - // "pattern": "^projects/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v2beta2/{+parent}/inspectTemplates", - // "response": { - // "$ref": "GooglePrivacyDlpV2beta2ListInspectTemplatesResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// 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 *ProjectsInspectTemplatesListCall) Pages(ctx context.Context, f func(*GooglePrivacyDlpV2beta2ListInspectTemplatesResponse) 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 "dlp.projects.inspectTemplates.patch": - -type ProjectsInspectTemplatesPatchCall struct { - s *Service - name string - googleprivacydlpv2beta2updateinspecttemplaterequest *GooglePrivacyDlpV2beta2UpdateInspectTemplateRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Updates the inspect template. -func (r *ProjectsInspectTemplatesService) Patch(name string, googleprivacydlpv2beta2updateinspecttemplaterequest *GooglePrivacyDlpV2beta2UpdateInspectTemplateRequest) *ProjectsInspectTemplatesPatchCall { - c := &ProjectsInspectTemplatesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googleprivacydlpv2beta2updateinspecttemplaterequest = googleprivacydlpv2beta2updateinspecttemplaterequest - 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 *ProjectsInspectTemplatesPatchCall) Fields(s ...googleapi.Field) *ProjectsInspectTemplatesPatchCall { - 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 *ProjectsInspectTemplatesPatchCall) Context(ctx context.Context) *ProjectsInspectTemplatesPatchCall { - 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 *ProjectsInspectTemplatesPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsInspectTemplatesPatchCall) 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.googleprivacydlpv2beta2updateinspecttemplaterequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta2/{+name}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("PATCH", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "dlp.projects.inspectTemplates.patch" call. -// Exactly one of *GooglePrivacyDlpV2beta2InspectTemplate or error will -// be non-nil. Any non-2xx status code is an error. Response headers are -// in either -// *GooglePrivacyDlpV2beta2InspectTemplate.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 *ProjectsInspectTemplatesPatchCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2beta2InspectTemplate, 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 := &GooglePrivacyDlpV2beta2InspectTemplate{ - 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": "Updates the inspect template.", - // "flatPath": "v2beta2/projects/{projectsId}/inspectTemplates/{inspectTemplatesId}", - // "httpMethod": "PATCH", - // "id": "dlp.projects.inspectTemplates.patch", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "Resource name of organization and inspectTemplate to be updated, for\nexample `organizations/433245324/inspectTemplates/432452342` or\nprojects/project-id/inspectTemplates/432452342.", - // "location": "path", - // "pattern": "^projects/[^/]+/inspectTemplates/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v2beta2/{+name}", - // "request": { - // "$ref": "GooglePrivacyDlpV2beta2UpdateInspectTemplateRequest" - // }, - // "response": { - // "$ref": "GooglePrivacyDlpV2beta2InspectTemplate" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "dlp.projects.jobTriggers.create": - -type ProjectsJobTriggersCreateCall struct { - s *Service - parent string - googleprivacydlpv2beta2createjobtriggerrequest *GooglePrivacyDlpV2beta2CreateJobTriggerRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Create: Creates a job to run DLP actions such as scanning storage for -// sensitive -// information on a set schedule. -func (r *ProjectsJobTriggersService) Create(parent string, googleprivacydlpv2beta2createjobtriggerrequest *GooglePrivacyDlpV2beta2CreateJobTriggerRequest) *ProjectsJobTriggersCreateCall { - c := &ProjectsJobTriggersCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googleprivacydlpv2beta2createjobtriggerrequest = googleprivacydlpv2beta2createjobtriggerrequest - 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 *ProjectsJobTriggersCreateCall) Fields(s ...googleapi.Field) *ProjectsJobTriggersCreateCall { - 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 *ProjectsJobTriggersCreateCall) Context(ctx context.Context) *ProjectsJobTriggersCreateCall { - 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 *ProjectsJobTriggersCreateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsJobTriggersCreateCall) 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.googleprivacydlpv2beta2createjobtriggerrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta2/{+parent}/jobTriggers") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "dlp.projects.jobTriggers.create" call. -// Exactly one of *GooglePrivacyDlpV2beta2JobTrigger or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *GooglePrivacyDlpV2beta2JobTrigger.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 *ProjectsJobTriggersCreateCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2beta2JobTrigger, 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 := &GooglePrivacyDlpV2beta2JobTrigger{ - 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": "Creates a job to run DLP actions such as scanning storage for sensitive\ninformation on a set schedule.", - // "flatPath": "v2beta2/projects/{projectsId}/jobTriggers", - // "httpMethod": "POST", - // "id": "dlp.projects.jobTriggers.create", - // "parameterOrder": [ - // "parent" - // ], - // "parameters": { - // "parent": { - // "description": "The parent resource name, for example projects/my-project-id.", - // "location": "path", - // "pattern": "^projects/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v2beta2/{+parent}/jobTriggers", - // "request": { - // "$ref": "GooglePrivacyDlpV2beta2CreateJobTriggerRequest" - // }, - // "response": { - // "$ref": "GooglePrivacyDlpV2beta2JobTrigger" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "dlp.projects.jobTriggers.delete": - -type ProjectsJobTriggersDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes a job trigger. -func (r *ProjectsJobTriggersService) Delete(name string) *ProjectsJobTriggersDeleteCall { - c := &ProjectsJobTriggersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - 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 *ProjectsJobTriggersDeleteCall) Fields(s ...googleapi.Field) *ProjectsJobTriggersDeleteCall { - 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 *ProjectsJobTriggersDeleteCall) Context(ctx context.Context) *ProjectsJobTriggersDeleteCall { - 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 *ProjectsJobTriggersDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsJobTriggersDeleteCall) 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 - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta2/{+name}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("DELETE", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "dlp.projects.jobTriggers.delete" call. -// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *GoogleProtobufEmpty.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 *ProjectsJobTriggersDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, 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 := &GoogleProtobufEmpty{ - 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": "Deletes a job trigger.", - // "flatPath": "v2beta2/projects/{projectsId}/jobTriggers/{jobTriggersId}", - // "httpMethod": "DELETE", - // "id": "dlp.projects.jobTriggers.delete", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "Resource name of the project and the triggeredJob, for example\n`projects/dlp-test-project/jobTriggers/53234423`.", - // "location": "path", - // "pattern": "^projects/[^/]+/jobTriggers/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v2beta2/{+name}", - // "response": { - // "$ref": "GoogleProtobufEmpty" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "dlp.projects.jobTriggers.get": - -type ProjectsJobTriggersGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Gets a job trigger. -func (r *ProjectsJobTriggersService) Get(name string) *ProjectsJobTriggersGetCall { - c := &ProjectsJobTriggersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - 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 *ProjectsJobTriggersGetCall) Fields(s ...googleapi.Field) *ProjectsJobTriggersGetCall { - 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 *ProjectsJobTriggersGetCall) IfNoneMatch(entityTag string) *ProjectsJobTriggersGetCall { - 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 *ProjectsJobTriggersGetCall) Context(ctx context.Context) *ProjectsJobTriggersGetCall { - 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 *ProjectsJobTriggersGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsJobTriggersGetCall) 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, "v2beta2/{+name}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "dlp.projects.jobTriggers.get" call. -// Exactly one of *GooglePrivacyDlpV2beta2JobTrigger or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *GooglePrivacyDlpV2beta2JobTrigger.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 *ProjectsJobTriggersGetCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2beta2JobTrigger, 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 := &GooglePrivacyDlpV2beta2JobTrigger{ - 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": "Gets a job trigger.", - // "flatPath": "v2beta2/projects/{projectsId}/jobTriggers/{jobTriggersId}", - // "httpMethod": "GET", - // "id": "dlp.projects.jobTriggers.get", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "Resource name of the project and the triggeredJob, for example\n`projects/dlp-test-project/jobTriggers/53234423`.", - // "location": "path", - // "pattern": "^projects/[^/]+/jobTriggers/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v2beta2/{+name}", - // "response": { - // "$ref": "GooglePrivacyDlpV2beta2JobTrigger" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "dlp.projects.jobTriggers.list": - -type ProjectsJobTriggersListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists job triggers. -func (r *ProjectsJobTriggersService) List(parent string) *ProjectsJobTriggersListCall { - c := &ProjectsJobTriggersListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// OrderBy sets the optional parameter "orderBy": Optional comma -// separated list of triggeredJob fields to order by, -// followed by 'asc/desc' postfix, i.e. -// "create_time asc,name desc,schedule_mode asc". This list -// is -// case-insensitive. -// -// Example: "name asc,schedule_mode desc, status desc" -// -// Supported filters keys and values are: -// -// - `create_time`: corresponds to time the triggeredJob was created. -// - `update_time`: corresponds to time the triggeredJob was last -// updated. -// - `name`: corresponds to JobTrigger's display name. -// - `status`: corresponds to the triggeredJob status. -func (c *ProjectsJobTriggersListCall) OrderBy(orderBy string) *ProjectsJobTriggersListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageSize sets the optional parameter "pageSize": Optional size of the -// page, can be limited by a server. -func (c *ProjectsJobTriggersListCall) PageSize(pageSize int64) *ProjectsJobTriggersListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": Optional page -// token to continue retrieval. Comes from previous call -// to ListJobTriggers. `order_by` and `filter` should not change -// for -// subsequent calls, but can be omitted if token is specified. -func (c *ProjectsJobTriggersListCall) PageToken(pageToken string) *ProjectsJobTriggersListCall { - 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 *ProjectsJobTriggersListCall) Fields(s ...googleapi.Field) *ProjectsJobTriggersListCall { - 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 *ProjectsJobTriggersListCall) IfNoneMatch(entityTag string) *ProjectsJobTriggersListCall { - 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 *ProjectsJobTriggersListCall) Context(ctx context.Context) *ProjectsJobTriggersListCall { - 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 *ProjectsJobTriggersListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsJobTriggersListCall) 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, "v2beta2/{+parent}/jobTriggers") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "dlp.projects.jobTriggers.list" call. -// Exactly one of *GooglePrivacyDlpV2beta2ListJobTriggersResponse or -// error will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GooglePrivacyDlpV2beta2ListJobTriggersResponse.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 *ProjectsJobTriggersListCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2beta2ListJobTriggersResponse, 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 := &GooglePrivacyDlpV2beta2ListJobTriggersResponse{ - 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": "Lists job triggers.", - // "flatPath": "v2beta2/projects/{projectsId}/jobTriggers", - // "httpMethod": "GET", - // "id": "dlp.projects.jobTriggers.list", - // "parameterOrder": [ - // "parent" - // ], - // "parameters": { - // "orderBy": { - // "description": "Optional comma separated list of triggeredJob fields to order by,\nfollowed by 'asc/desc' postfix, i.e.\n`\"create_time asc,name desc,schedule_mode asc\"`. This list is\ncase-insensitive.\n\nExample: `\"name asc,schedule_mode desc, status desc\"`\n\nSupported filters keys and values are:\n\n- `create_time`: corresponds to time the triggeredJob was created.\n- `update_time`: corresponds to time the triggeredJob was last updated.\n- `name`: corresponds to JobTrigger's display name.\n- `status`: corresponds to the triggeredJob status.", - // "location": "query", - // "type": "string" - // }, - // "pageSize": { - // "description": "Optional size of the page, can be limited by a server.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "Optional page token to continue retrieval. Comes from previous call\nto ListJobTriggers. `order_by` and `filter` should not change for\nsubsequent calls, but can be omitted if token is specified.", - // "location": "query", - // "type": "string" - // }, - // "parent": { - // "description": "The parent resource name, for example projects/my-project-id.", - // "location": "path", - // "pattern": "^projects/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v2beta2/{+parent}/jobTriggers", - // "response": { - // "$ref": "GooglePrivacyDlpV2beta2ListJobTriggersResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// 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 *ProjectsJobTriggersListCall) Pages(ctx context.Context, f func(*GooglePrivacyDlpV2beta2ListJobTriggersResponse) 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 "dlp.projects.jobTriggers.patch": - -type ProjectsJobTriggersPatchCall struct { - s *Service - name string - googleprivacydlpv2beta2updatejobtriggerrequest *GooglePrivacyDlpV2beta2UpdateJobTriggerRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Updates a job trigger. -func (r *ProjectsJobTriggersService) Patch(name string, googleprivacydlpv2beta2updatejobtriggerrequest *GooglePrivacyDlpV2beta2UpdateJobTriggerRequest) *ProjectsJobTriggersPatchCall { - c := &ProjectsJobTriggersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googleprivacydlpv2beta2updatejobtriggerrequest = googleprivacydlpv2beta2updatejobtriggerrequest - 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 *ProjectsJobTriggersPatchCall) Fields(s ...googleapi.Field) *ProjectsJobTriggersPatchCall { - 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 *ProjectsJobTriggersPatchCall) Context(ctx context.Context) *ProjectsJobTriggersPatchCall { - 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 *ProjectsJobTriggersPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsJobTriggersPatchCall) 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.googleprivacydlpv2beta2updatejobtriggerrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta2/{+name}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("PATCH", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "dlp.projects.jobTriggers.patch" call. -// Exactly one of *GooglePrivacyDlpV2beta2JobTrigger or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *GooglePrivacyDlpV2beta2JobTrigger.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 *ProjectsJobTriggersPatchCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2beta2JobTrigger, 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 := &GooglePrivacyDlpV2beta2JobTrigger{ - 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": "Updates a job trigger.", - // "flatPath": "v2beta2/projects/{projectsId}/jobTriggers/{jobTriggersId}", - // "httpMethod": "PATCH", - // "id": "dlp.projects.jobTriggers.patch", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "Resource name of the project and the triggeredJob, for example\n`projects/dlp-test-project/jobTriggers/53234423`.", - // "location": "path", - // "pattern": "^projects/[^/]+/jobTriggers/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v2beta2/{+name}", - // "request": { - // "$ref": "GooglePrivacyDlpV2beta2UpdateJobTriggerRequest" - // }, - // "response": { - // "$ref": "GooglePrivacyDlpV2beta2JobTrigger" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -}
diff --git a/replicapool/v1beta2/replicapool-api.json b/replicapool/v1beta2/replicapool-api.json deleted file mode 100644 index 146cac4..0000000 --- a/replicapool/v1beta2/replicapool-api.json +++ /dev/null
@@ -1,1064 +0,0 @@ -{ - "auth": { - "oauth2": { - "scopes": { - "https://www.googleapis.com/auth/cloud-platform": { - "description": "View and manage your data across Google Cloud Platform services" - }, - "https://www.googleapis.com/auth/cloud-platform.read-only": { - "description": "View your data across Google Cloud Platform services" - }, - "https://www.googleapis.com/auth/compute": { - "description": "View and manage your Google Compute Engine resources" - }, - "https://www.googleapis.com/auth/compute.readonly": { - "description": "View your Google Compute Engine resources" - } - } - } - }, - "basePath": "/replicapool/v1beta2/projects/", - "baseUrl": "https://www.googleapis.com/replicapool/v1beta2/projects/", - "batchPath": "batch/replicapool/v1beta2", - "description": "[Deprecated. Please use Instance Group Manager in Compute API] Provides groups of homogenous Compute Engine instances.", - "discoveryVersion": "v1", - "documentationLink": "https://developers.google.com/compute/docs/instance-groups/manager/v1beta2", - "etag": "\"Zkyw9ACJZUvcYmlFaKGChzhmtnE/iHkuiJpugjT1_Yp5ikwD4uaLgZ4\"", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "id": "replicapool:v1beta2", - "kind": "discovery#restDescription", - "labels": [ - "limited_availability" - ], - "name": "replicapool", - "ownerDomain": "google.com", - "ownerName": "Google", - "parameters": { - "alt": { - "default": "json", - "description": "Data format for the response.", - "enum": [ - "json" - ], - "enumDescriptions": [ - "Responses with Content-Type of application/json" - ], - "location": "query", - "type": "string" - }, - "fields": { - "description": "Selector specifying which fields to include in a partial response.", - "location": "query", - "type": "string" - }, - "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" - }, - "oauth_token": { - "description": "OAuth 2.0 token for the current user.", - "location": "query", - "type": "string" - }, - "prettyPrint": { - "default": "true", - "description": "Returns response with indentations and line breaks.", - "location": "query", - "type": "boolean" - }, - "quotaUser": { - "description": "An opaque string that represents a user for quota purposes. Must not exceed 40 characters.", - "location": "query", - "type": "string" - }, - "userIp": { - "description": "Deprecated. Please use quotaUser instead.", - "location": "query", - "type": "string" - } - }, - "protocol": "rest", - "resources": { - "instanceGroupManagers": { - "methods": { - "abandonInstances": { - "description": "Removes the specified instances from the managed instance group, and from any target pools of which they were members, without deleting the instances.", - "httpMethod": "POST", - "id": "replicapool.instanceGroupManagers.abandonInstances", - "parameterOrder": [ - "project", - "zone", - "instanceGroupManager" - ], - "parameters": { - "instanceGroupManager": { - "description": "The name of the instance group manager.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "project": { - "description": "The Google Developers Console project name.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "zone": { - "description": "The name of the zone in which the instance group manager resides.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/abandonInstances", - "request": { - "$ref": "InstanceGroupManagersAbandonInstancesRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "delete": { - "description": "Deletes the instance group manager and all instances contained within. If you'd like to delete the manager without deleting the instances, you must first abandon the instances to remove them from the group.", - "httpMethod": "DELETE", - "id": "replicapool.instanceGroupManagers.delete", - "parameterOrder": [ - "project", - "zone", - "instanceGroupManager" - ], - "parameters": { - "instanceGroupManager": { - "description": "Name of the Instance Group Manager resource to delete.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "project": { - "description": "The Google Developers Console project name.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "zone": { - "description": "The name of the zone in which the instance group manager resides.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "deleteInstances": { - "description": "Deletes the specified instances. The instances are deleted, then removed from the instance group and any target pools of which they were a member. The targetSize of the instance group manager is reduced by the number of instances deleted.", - "httpMethod": "POST", - "id": "replicapool.instanceGroupManagers.deleteInstances", - "parameterOrder": [ - "project", - "zone", - "instanceGroupManager" - ], - "parameters": { - "instanceGroupManager": { - "description": "The name of the instance group manager.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "project": { - "description": "The Google Developers Console project name.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "zone": { - "description": "The name of the zone in which the instance group manager resides.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/deleteInstances", - "request": { - "$ref": "InstanceGroupManagersDeleteInstancesRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Returns the specified Instance Group Manager resource.", - "httpMethod": "GET", - "id": "replicapool.instanceGroupManagers.get", - "parameterOrder": [ - "project", - "zone", - "instanceGroupManager" - ], - "parameters": { - "instanceGroupManager": { - "description": "Name of the instance resource to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "project": { - "description": "The Google Developers Console project name.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "zone": { - "description": "The name of the zone in which the instance group manager resides.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}", - "response": { - "$ref": "InstanceGroupManager" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates an instance group manager, as well as the instance group and the specified number of instances.", - "httpMethod": "POST", - "id": "replicapool.instanceGroupManagers.insert", - "parameterOrder": [ - "project", - "zone", - "size" - ], - "parameters": { - "project": { - "description": "The Google Developers Console project name.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "size": { - "description": "Number of instances that should exist.", - "format": "int32", - "location": "query", - "minimum": "0", - "required": true, - "type": "integer" - }, - "zone": { - "description": "The name of the zone in which the instance group manager resides.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "{project}/zones/{zone}/instanceGroupManagers", - "request": { - "$ref": "InstanceGroupManager" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Retrieves the list of Instance Group Manager resources contained within the specified zone.", - "httpMethod": "GET", - "id": "replicapool.instanceGroupManagers.list", - "parameterOrder": [ - "project", - "zone" - ], - "parameters": { - "filter": { - "description": "Optional. Filter expression for filtering listed resources.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500.", - "format": "uint32", - "location": "query", - "maximum": "500", - "minimum": "0", - "type": "integer" - }, - "pageToken": { - "description": "Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request.", - "location": "query", - "type": "string" - }, - "project": { - "description": "The Google Developers Console project name.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "zone": { - "description": "The name of the zone in which the instance group manager resides.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "{project}/zones/{zone}/instanceGroupManagers", - "response": { - "$ref": "InstanceGroupManagerList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "recreateInstances": { - "description": "Recreates the specified instances. The instances are deleted, then recreated using the instance group manager's current instance template.", - "httpMethod": "POST", - "id": "replicapool.instanceGroupManagers.recreateInstances", - "parameterOrder": [ - "project", - "zone", - "instanceGroupManager" - ], - "parameters": { - "instanceGroupManager": { - "description": "The name of the instance group manager.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "project": { - "description": "The Google Developers Console project name.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "zone": { - "description": "The name of the zone in which the instance group manager resides.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/recreateInstances", - "request": { - "$ref": "InstanceGroupManagersRecreateInstancesRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "resize": { - "description": "Resizes the managed instance group up or down. If resized up, new instances are created using the current instance template. If resized down, instances are removed in the order outlined in Resizing a managed instance group.", - "httpMethod": "POST", - "id": "replicapool.instanceGroupManagers.resize", - "parameterOrder": [ - "project", - "zone", - "instanceGroupManager", - "size" - ], - "parameters": { - "instanceGroupManager": { - "description": "The name of the instance group manager.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "project": { - "description": "The Google Developers Console project name.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "size": { - "description": "Number of instances that should exist in this Instance Group Manager.", - "format": "int32", - "location": "query", - "minimum": "0", - "required": true, - "type": "integer" - }, - "zone": { - "description": "The name of the zone in which the instance group manager resides.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/resize", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setInstanceTemplate": { - "description": "Sets the instance template to use when creating new instances in this group. Existing instances are not affected.", - "httpMethod": "POST", - "id": "replicapool.instanceGroupManagers.setInstanceTemplate", - "parameterOrder": [ - "project", - "zone", - "instanceGroupManager" - ], - "parameters": { - "instanceGroupManager": { - "description": "The name of the instance group manager.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "project": { - "description": "The Google Developers Console project name.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "zone": { - "description": "The name of the zone in which the instance group manager resides.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/setInstanceTemplate", - "request": { - "$ref": "InstanceGroupManagersSetInstanceTemplateRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setTargetPools": { - "description": "Modifies the target pools to which all new instances in this group are assigned. Existing instances in the group are not affected.", - "httpMethod": "POST", - "id": "replicapool.instanceGroupManagers.setTargetPools", - "parameterOrder": [ - "project", - "zone", - "instanceGroupManager" - ], - "parameters": { - "instanceGroupManager": { - "description": "The name of the instance group manager.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "project": { - "description": "The Google Developers Console project name.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "zone": { - "description": "The name of the zone in which the instance group manager resides.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/setTargetPools", - "request": { - "$ref": "InstanceGroupManagersSetTargetPoolsRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - } - } - }, - "zoneOperations": { - "methods": { - "get": { - "description": "Retrieves the specified zone-specific operation resource.", - "httpMethod": "GET", - "id": "replicapool.zoneOperations.get", - "parameterOrder": [ - "project", - "zone", - "operation" - ], - "parameters": { - "operation": { - "description": "Name of the operation resource to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "project": { - "description": "Name of the project scoping this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "zone": { - "description": "Name of the zone scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "{project}/zones/{zone}/operations/{operation}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Retrieves the list of operation resources contained within the specified zone.", - "httpMethod": "GET", - "id": "replicapool.zoneOperations.list", - "parameterOrder": [ - "project", - "zone" - ], - "parameters": { - "filter": { - "description": "Optional. Filter expression for filtering listed resources.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500.", - "format": "uint32", - "location": "query", - "maximum": "500", - "minimum": "0", - "type": "integer" - }, - "pageToken": { - "description": "Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Name of the project scoping this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "zone": { - "description": "Name of the zone scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "{project}/zones/{zone}/operations", - "response": { - "$ref": "OperationList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - } - } - } - }, - "revision": "20160512", - "rootUrl": "https://www.googleapis.com/", - "schemas": { - "InstanceGroupManager": { - "description": "An Instance Group Manager resource.", - "id": "InstanceGroupManager", - "properties": { - "autoHealingPolicies": { - "description": "The autohealing policy for this managed instance group. You can specify only one value.", - "items": { - "$ref": "ReplicaPoolAutoHealingPolicy" - }, - "type": "array" - }, - "baseInstanceName": { - "description": "The base instance name to use for instances in this group. The value must be a valid RFC1035 name. Supported characters are lowercase letters, numbers, and hyphens (-). Instances are named by appending a hyphen and a random four-character string to the base instance name.", - "type": "string" - }, - "creationTimestamp": { - "description": "[Output only] The time the instance group manager was created, in RFC3339 text format.", - "type": "string" - }, - "currentSize": { - "description": "[Output only] The number of instances that currently exist and are a part of this group. This includes instances that are starting but are not yet RUNNING, and instances that are in the process of being deleted or abandoned.", - "format": "int32", - "type": "integer" - }, - "description": { - "description": "An optional textual description of the instance group manager.", - "type": "string" - }, - "fingerprint": { - "description": "[Output only] Fingerprint of the instance group manager. This field is used for optimistic locking. An up-to-date fingerprint must be provided in order to modify the Instance Group Manager resource.", - "format": "byte", - "type": "string" - }, - "group": { - "description": "[Output only] The full URL of the instance group created by the manager. This group contains all of the instances being managed, and cannot contain non-managed instances.", - "type": "string" - }, - "id": { - "description": "[Output only] A server-assigned unique identifier for the resource.", - "format": "uint64", - "type": "string" - }, - "instanceTemplate": { - "description": "The full URL to an instance template from which all new instances will be created.", - "type": "string" - }, - "kind": { - "default": "replicapool#instanceGroupManager", - "description": "[Output only] The resource type. Always replicapool#instanceGroupManager.", - "type": "string" - }, - "name": { - "description": "The name of the instance group manager. Must be 1-63 characters long and comply with RFC1035. Supported characters include lowercase letters, numbers, and hyphens.", - "type": "string" - }, - "selfLink": { - "description": "[Output only] The fully qualified URL for this resource.", - "type": "string" - }, - "targetPools": { - "description": "The full URL of all target pools to which new instances in the group are added. Updating the target pool values does not affect existing instances.", - "items": { - "type": "string" - }, - "type": "array" - }, - "targetSize": { - "description": "[Output only] The number of instances that the manager is attempting to maintain. Deleting or abandoning instances affects this number, as does resizing the group.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "InstanceGroupManagerList": { - "id": "InstanceGroupManagerList", - "properties": { - "id": { - "description": "Unique identifier for the resource; defined by the server (output only).", - "type": "string" - }, - "items": { - "description": "A list of instance resources.", - "items": { - "$ref": "InstanceGroupManager" - }, - "type": "array" - }, - "kind": { - "default": "replicapool#instanceGroupManagerList", - "description": "Type of resource.", - "type": "string" - }, - "nextPageToken": { - "description": "A token used to continue a truncated list request (output only).", - "type": "string" - }, - "selfLink": { - "description": "Server defined URL for this resource (output only).", - "type": "string" - } - }, - "type": "object" - }, - "InstanceGroupManagersAbandonInstancesRequest": { - "id": "InstanceGroupManagersAbandonInstancesRequest", - "properties": { - "instances": { - "description": "The names of one or more instances to abandon. For example:\n{ 'instances': [ 'instance-c3po', 'instance-r2d2' ] }", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "InstanceGroupManagersDeleteInstancesRequest": { - "id": "InstanceGroupManagersDeleteInstancesRequest", - "properties": { - "instances": { - "description": "Names of instances to delete.\n\nExample: 'instance-foo', 'instance-bar'", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "InstanceGroupManagersRecreateInstancesRequest": { - "id": "InstanceGroupManagersRecreateInstancesRequest", - "properties": { - "instances": { - "description": "The names of one or more instances to recreate. For example:\n{ 'instances': [ 'instance-c3po', 'instance-r2d2' ] }", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "InstanceGroupManagersSetInstanceTemplateRequest": { - "id": "InstanceGroupManagersSetInstanceTemplateRequest", - "properties": { - "instanceTemplate": { - "description": "The full URL to an Instance Template from which all new instances will be created.", - "type": "string" - } - }, - "type": "object" - }, - "InstanceGroupManagersSetTargetPoolsRequest": { - "id": "InstanceGroupManagersSetTargetPoolsRequest", - "properties": { - "fingerprint": { - "description": "The current fingerprint of the Instance Group Manager resource. If this does not match the server-side fingerprint of the resource, then the request will be rejected.", - "format": "byte", - "type": "string" - }, - "targetPools": { - "description": "A list of fully-qualified URLs to existing Target Pool resources. New instances in the Instance Group Manager will be added to the specified target pools; existing instances are not affected.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "Operation": { - "description": "An operation resource, used to manage asynchronous API requests.", - "id": "Operation", - "properties": { - "clientOperationId": { - "description": "[Output only] An optional identifier specified by the client when the mutation was initiated. Must be unique for all operation resources in the project.", - "type": "string" - }, - "creationTimestamp": { - "description": "[Output Only] The time that this operation was requested, in RFC3339 text format.", - "type": "string" - }, - "endTime": { - "description": "[Output Only] The time that this operation was completed, in RFC3339 text format.", - "type": "string" - }, - "error": { - "description": "[Output Only] If errors occurred during processing of this operation, this field will be populated.", - "properties": { - "errors": { - "description": "[Output Only] The array of errors encountered while processing this operation.", - "items": { - "properties": { - "code": { - "description": "[Output Only] The error type identifier for this error.", - "type": "string" - }, - "location": { - "description": "[Output Only] Indicates the field in the request which caused the error. This property is optional.", - "type": "string" - }, - "message": { - "description": "[Output Only] An optional, human-readable error message.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - } - }, - "type": "object" - }, - "httpErrorMessage": { - "description": "[Output only] If operation fails, the HTTP error message returned.", - "type": "string" - }, - "httpErrorStatusCode": { - "description": "[Output only] If operation fails, the HTTP error status code returned.", - "format": "int32", - "type": "integer" - }, - "id": { - "description": "[Output Only] Unique identifier for the resource, generated by the server.", - "format": "uint64", - "type": "string" - }, - "insertTime": { - "description": "[Output Only] The time that this operation was requested, in RFC3339 text format.", - "type": "string" - }, - "kind": { - "default": "replicapool#operation", - "description": "[Output only] Type of the resource.", - "type": "string" - }, - "name": { - "description": "[Output Only] Name of the resource.", - "type": "string" - }, - "operationType": { - "description": "[Output only] Type of the operation. Operations include insert, update, and delete.", - "type": "string" - }, - "progress": { - "description": "[Output only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess at when the operation will be complete. This number should be monotonically increasing as the operation progresses.", - "format": "int32", - "type": "integer" - }, - "region": { - "description": "[Output Only] URL of the region where the operation resides. Only available when performing regional operations.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined fully-qualified URL for this resource.", - "type": "string" - }, - "startTime": { - "description": "[Output Only] The time that this operation was started by the server, in RFC3339 text format.", - "type": "string" - }, - "status": { - "description": "[Output Only] Status of the operation.", - "enum": [ - "DONE", - "PENDING", - "RUNNING" - ], - "enumDescriptions": [ - "", - "", - "" - ], - "type": "string" - }, - "statusMessage": { - "description": "[Output Only] An optional textual description of the current status of the operation.", - "type": "string" - }, - "targetId": { - "description": "[Output Only] Unique target ID which identifies a particular incarnation of the target.", - "format": "uint64", - "type": "string" - }, - "targetLink": { - "description": "[Output only] URL of the resource the operation is mutating.", - "type": "string" - }, - "user": { - "description": "[Output Only] User who requested the operation, for example: user@example.com.", - "type": "string" - }, - "warnings": { - "description": "[Output Only] If there are issues with this operation, a warning is returned.", - "items": { - "properties": { - "code": { - "description": "[Output only] The warning type identifier for this warning.", - "enum": [ - "DEPRECATED_RESOURCE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "INJECTED_KERNELS_DEPRECATED", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NO_RESULTS_ON_PAGE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_NOT_DELETED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNREACHABLE" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "" - ], - "type": "string" - }, - "data": { - "description": "[Output only] Metadata for this warning in key:value format.", - "items": { - "properties": { - "key": { - "description": "[Output Only] Metadata key for this warning.", - "type": "string" - }, - "value": { - "description": "[Output Only] Metadata value for this warning.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output only] Optional human-readable details for this warning.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "zone": { - "description": "[Output Only] URL of the zone where the operation resides. Only available when performing per-zone operations.", - "type": "string" - } - }, - "type": "object" - }, - "OperationList": { - "id": "OperationList", - "properties": { - "id": { - "description": "Unique identifier for the resource; defined by the server (output only).", - "type": "string" - }, - "items": { - "description": "The operation resources.", - "items": { - "$ref": "Operation" - }, - "type": "array" - }, - "kind": { - "default": "replicapool#operationList", - "description": "Type of resource.", - "type": "string" - }, - "nextPageToken": { - "description": "A token used to continue a truncated list request (output only).", - "type": "string" - }, - "selfLink": { - "description": "Server defined URL for this resource (output only).", - "type": "string" - } - }, - "type": "object" - }, - "ReplicaPoolAutoHealingPolicy": { - "id": "ReplicaPoolAutoHealingPolicy", - "properties": { - "actionType": { - "description": "The action to perform when an instance becomes unhealthy. Possible values are RECREATE or REBOOT. RECREATE replaces an unhealthy instance with a new instance that is based on the instance template for this managed instance group. REBOOT performs a soft reboot on an instance. If the instance cannot reboot, the instance performs a hard restart.", - "enum": [ - "REBOOT", - "RECREATE" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - }, - "healthCheck": { - "description": "The URL for the HealthCheck that signals autohealing.", - "type": "string" - } - }, - "type": "object" - } - }, - "servicePath": "replicapool/v1beta2/projects/", - "title": "Google Compute Engine Instance Group Manager API", - "version": "v1beta2" -} \ No newline at end of file
diff --git a/replicapool/v1beta2/replicapool-gen.go b/replicapool/v1beta2/replicapool-gen.go deleted file mode 100644 index 0137f84..0000000 --- a/replicapool/v1beta2/replicapool-gen.go +++ /dev/null
@@ -1,2764 +0,0 @@ -// Package replicapool provides access to the Google Compute Engine Instance Group Manager API. -// -// See https://developers.google.com/compute/docs/instance-groups/manager/v1beta2 -// -// Usage example: -// -// import "google.golang.org/api/replicapool/v1beta2" -// ... -// replicapoolService, err := replicapool.New(oauthHttpClient) -package replicapool // import "google.golang.org/api/replicapool/v1beta2" - -import ( - "bytes" - "context" - "encoding/json" - "errors" - "fmt" - "io" - "net/http" - "net/url" - "strconv" - "strings" - - gensupport "google.golang.org/api/gensupport" - googleapi "google.golang.org/api/googleapi" -) - -// Always reference these packages, just in case the auto-generated code -// below doesn't. -var _ = bytes.NewBuffer -var _ = strconv.Itoa -var _ = fmt.Sprintf -var _ = json.NewDecoder -var _ = io.Copy -var _ = url.Parse -var _ = gensupport.MarshalJSON -var _ = googleapi.Version -var _ = errors.New -var _ = strings.Replace -var _ = context.Canceled - -const apiId = "replicapool:v1beta2" -const apiName = "replicapool" -const apiVersion = "v1beta2" -const basePath = "https://www.googleapis.com/replicapool/v1beta2/projects/" - -// OAuth2 scopes used by this API. -const ( - // View and manage your data across Google Cloud Platform services - CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform" - - // View your data across Google Cloud Platform services - CloudPlatformReadOnlyScope = "https://www.googleapis.com/auth/cloud-platform.read-only" - - // View and manage your Google Compute Engine resources - ComputeScope = "https://www.googleapis.com/auth/compute" - - // View your Google Compute Engine resources - ComputeReadonlyScope = "https://www.googleapis.com/auth/compute.readonly" -) - -func New(client *http.Client) (*Service, error) { - if client == nil { - return nil, errors.New("client is nil") - } - s := &Service{client: client, BasePath: basePath} - s.InstanceGroupManagers = NewInstanceGroupManagersService(s) - s.ZoneOperations = NewZoneOperationsService(s) - return s, nil -} - -type Service struct { - client *http.Client - BasePath string // API endpoint base URL - UserAgent string // optional additional User-Agent fragment - - InstanceGroupManagers *InstanceGroupManagersService - - ZoneOperations *ZoneOperationsService -} - -func (s *Service) userAgent() string { - if s.UserAgent == "" { - return googleapi.UserAgent - } - return googleapi.UserAgent + " " + s.UserAgent -} - -func NewInstanceGroupManagersService(s *Service) *InstanceGroupManagersService { - rs := &InstanceGroupManagersService{s: s} - return rs -} - -type InstanceGroupManagersService struct { - s *Service -} - -func NewZoneOperationsService(s *Service) *ZoneOperationsService { - rs := &ZoneOperationsService{s: s} - return rs -} - -type ZoneOperationsService struct { - s *Service -} - -// InstanceGroupManager: An Instance Group Manager resource. -type InstanceGroupManager struct { - // AutoHealingPolicies: The autohealing policy for this managed instance - // group. You can specify only one value. - AutoHealingPolicies []*ReplicaPoolAutoHealingPolicy `json:"autoHealingPolicies,omitempty"` - - // BaseInstanceName: The base instance name to use for instances in this - // group. The value must be a valid RFC1035 name. Supported characters - // are lowercase letters, numbers, and hyphens (-). Instances are named - // by appending a hyphen and a random four-character string to the base - // instance name. - BaseInstanceName string `json:"baseInstanceName,omitempty"` - - // CreationTimestamp: [Output only] The time the instance group manager - // was created, in RFC3339 text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - - // CurrentSize: [Output only] The number of instances that currently - // exist and are a part of this group. This includes instances that are - // starting but are not yet RUNNING, and instances that are in the - // process of being deleted or abandoned. - CurrentSize int64 `json:"currentSize,omitempty"` - - // Description: An optional textual description of the instance group - // manager. - Description string `json:"description,omitempty"` - - // Fingerprint: [Output only] Fingerprint of the instance group manager. - // This field is used for optimistic locking. An up-to-date fingerprint - // must be provided in order to modify the Instance Group Manager - // resource. - Fingerprint string `json:"fingerprint,omitempty"` - - // Group: [Output only] The full URL of the instance group created by - // the manager. This group contains all of the instances being managed, - // and cannot contain non-managed instances. - Group string `json:"group,omitempty"` - - // Id: [Output only] A server-assigned unique identifier for the - // resource. - Id uint64 `json:"id,omitempty,string"` - - // InstanceTemplate: The full URL to an instance template from which all - // new instances will be created. - InstanceTemplate string `json:"instanceTemplate,omitempty"` - - // Kind: [Output only] The resource type. Always - // replicapool#instanceGroupManager. - Kind string `json:"kind,omitempty"` - - // Name: The name of the instance group manager. Must be 1-63 characters - // long and comply with RFC1035. Supported characters include lowercase - // letters, numbers, and hyphens. - Name string `json:"name,omitempty"` - - // SelfLink: [Output only] The fully qualified URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // TargetPools: The full URL of all target pools to which new instances - // in the group are added. Updating the target pool values does not - // affect existing instances. - TargetPools []string `json:"targetPools,omitempty"` - - // TargetSize: [Output only] The number of instances that the manager is - // attempting to maintain. Deleting or abandoning instances affects this - // number, as does resizing the group. - TargetSize int64 `json:"targetSize,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "AutoHealingPolicies") - // 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. "AutoHealingPolicies") 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 *InstanceGroupManager) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupManager - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type InstanceGroupManagerList struct { - // Id: Unique identifier for the resource; defined by the server (output - // only). - Id string `json:"id,omitempty"` - - // Items: A list of instance resources. - Items []*InstanceGroupManager `json:"items,omitempty"` - - // Kind: Type of resource. - Kind string `json:"kind,omitempty"` - - // NextPageToken: A token used to continue a truncated list request - // (output only). - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: Server defined URL for this resource (output only). - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") 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. "Id") 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 *InstanceGroupManagerList) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupManagerList - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type InstanceGroupManagersAbandonInstancesRequest struct { - // Instances: The names of one or more instances to abandon. For - // example: - // { 'instances': [ 'instance-c3po', 'instance-r2d2' ] } - Instances []string `json:"instances,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Instances") 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. "Instances") 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 *InstanceGroupManagersAbandonInstancesRequest) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupManagersAbandonInstancesRequest - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type InstanceGroupManagersDeleteInstancesRequest struct { - // Instances: Names of instances to delete. - // - // Example: 'instance-foo', 'instance-bar' - Instances []string `json:"instances,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Instances") 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. "Instances") 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 *InstanceGroupManagersDeleteInstancesRequest) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupManagersDeleteInstancesRequest - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type InstanceGroupManagersRecreateInstancesRequest struct { - // Instances: The names of one or more instances to recreate. For - // example: - // { 'instances': [ 'instance-c3po', 'instance-r2d2' ] } - Instances []string `json:"instances,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Instances") 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. "Instances") 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 *InstanceGroupManagersRecreateInstancesRequest) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupManagersRecreateInstancesRequest - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type InstanceGroupManagersSetInstanceTemplateRequest struct { - // InstanceTemplate: The full URL to an Instance Template from which all - // new instances will be created. - InstanceTemplate string `json:"instanceTemplate,omitempty"` - - // ForceSendFields is a list of field names (e.g. "InstanceTemplate") 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. "InstanceTemplate") 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 *InstanceGroupManagersSetInstanceTemplateRequest) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupManagersSetInstanceTemplateRequest - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type InstanceGroupManagersSetTargetPoolsRequest struct { - // Fingerprint: The current fingerprint of the Instance Group Manager - // resource. If this does not match the server-side fingerprint of the - // resource, then the request will be rejected. - Fingerprint string `json:"fingerprint,omitempty"` - - // TargetPools: A list of fully-qualified URLs to existing Target Pool - // resources. New instances in the Instance Group Manager will be added - // to the specified target pools; existing instances are not affected. - TargetPools []string `json:"targetPools,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Fingerprint") 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. "Fingerprint") 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 *InstanceGroupManagersSetTargetPoolsRequest) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupManagersSetTargetPoolsRequest - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// Operation: An operation resource, used to manage asynchronous API -// requests. -type Operation struct { - // ClientOperationId: [Output only] An optional identifier specified by - // the client when the mutation was initiated. Must be unique for all - // operation resources in the project. - ClientOperationId string `json:"clientOperationId,omitempty"` - - // CreationTimestamp: [Output Only] The time that this operation was - // requested, in RFC3339 text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - - // EndTime: [Output Only] The time that this operation was completed, in - // RFC3339 text format. - EndTime string `json:"endTime,omitempty"` - - // Error: [Output Only] If errors occurred during processing of this - // operation, this field will be populated. - Error *OperationError `json:"error,omitempty"` - - // HttpErrorMessage: [Output only] If operation fails, the HTTP error - // message returned. - HttpErrorMessage string `json:"httpErrorMessage,omitempty"` - - // HttpErrorStatusCode: [Output only] If operation fails, the HTTP error - // status code returned. - HttpErrorStatusCode int64 `json:"httpErrorStatusCode,omitempty"` - - // Id: [Output Only] Unique identifier for the resource, generated by - // the server. - Id uint64 `json:"id,omitempty,string"` - - // InsertTime: [Output Only] The time that this operation was requested, - // in RFC3339 text format. - InsertTime string `json:"insertTime,omitempty"` - - // Kind: [Output only] Type of the resource. - Kind string `json:"kind,omitempty"` - - // Name: [Output Only] Name of the resource. - Name string `json:"name,omitempty"` - - // OperationType: [Output only] Type of the operation. Operations - // include insert, update, and delete. - OperationType string `json:"operationType,omitempty"` - - // Progress: [Output only] An optional progress indicator that ranges - // from 0 to 100. There is no requirement that this be linear or support - // any granularity of operations. This should not be used to guess at - // when the operation will be complete. This number should be - // monotonically increasing as the operation progresses. - Progress int64 `json:"progress,omitempty"` - - // Region: [Output Only] URL of the region where the operation resides. - // Only available when performing regional operations. - Region string `json:"region,omitempty"` - - // SelfLink: [Output Only] Server-defined fully-qualified URL for this - // resource. - SelfLink string `json:"selfLink,omitempty"` - - // StartTime: [Output Only] The time that this operation was started by - // the server, in RFC3339 text format. - StartTime string `json:"startTime,omitempty"` - - // Status: [Output Only] Status of the operation. - // - // Possible values: - // "DONE" - // "PENDING" - // "RUNNING" - Status string `json:"status,omitempty"` - - // StatusMessage: [Output Only] An optional textual description of the - // current status of the operation. - StatusMessage string `json:"statusMessage,omitempty"` - - // TargetId: [Output Only] Unique target ID which identifies a - // particular incarnation of the target. - TargetId uint64 `json:"targetId,omitempty,string"` - - // TargetLink: [Output only] URL of the resource the operation is - // mutating. - TargetLink string `json:"targetLink,omitempty"` - - // User: [Output Only] User who requested the operation, for example: - // user@example.com. - User string `json:"user,omitempty"` - - // Warnings: [Output Only] If there are issues with this operation, a - // warning is returned. - Warnings []*OperationWarnings `json:"warnings,omitempty"` - - // Zone: [Output Only] URL of the zone where the operation resides. Only - // available when performing per-zone operations. - Zone string `json:"zone,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "ClientOperationId") - // 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. "ClientOperationId") 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 *Operation) MarshalJSON() ([]byte, error) { - type NoMethod Operation - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// OperationError: [Output Only] If errors occurred during processing of -// this operation, this field will be populated. -type OperationError struct { - // Errors: [Output Only] The array of errors encountered while - // processing this operation. - Errors []*OperationErrorErrors `json:"errors,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Errors") 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. "Errors") 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 *OperationError) MarshalJSON() ([]byte, error) { - type NoMethod OperationError - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type OperationErrorErrors struct { - // Code: [Output Only] The error type identifier for this error. - Code string `json:"code,omitempty"` - - // Location: [Output Only] Indicates the field in the request which - // caused the error. This property is optional. - Location string `json:"location,omitempty"` - - // Message: [Output Only] An optional, human-readable error message. - Message string `json:"message,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Code") 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. "Code") 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 *OperationErrorErrors) MarshalJSON() ([]byte, error) { - type NoMethod OperationErrorErrors - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type OperationWarnings struct { - // Code: [Output only] The warning type identifier for this warning. - // - // Possible values: - // "DEPRECATED_RESOURCE_USED" - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - // "INJECTED_KERNELS_DEPRECATED" - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - // "NEXT_HOP_CANNOT_IP_FORWARD" - // "NEXT_HOP_INSTANCE_NOT_FOUND" - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - // "NEXT_HOP_NOT_RUNNING" - // "NO_RESULTS_ON_PAGE" - // "REQUIRED_TOS_AGREEMENT" - // "RESOURCE_NOT_DELETED" - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - // "UNREACHABLE" - Code string `json:"code,omitempty"` - - // Data: [Output only] Metadata for this warning in key:value format. - Data []*OperationWarningsData `json:"data,omitempty"` - - // Message: [Output only] Optional human-readable details for this - // warning. - Message string `json:"message,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Code") 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. "Code") 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 *OperationWarnings) MarshalJSON() ([]byte, error) { - type NoMethod OperationWarnings - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type OperationWarningsData struct { - // Key: [Output Only] Metadata key for this warning. - Key string `json:"key,omitempty"` - - // Value: [Output Only] Metadata value for this warning. - Value string `json:"value,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Key") 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. "Key") 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 *OperationWarningsData) MarshalJSON() ([]byte, error) { - type NoMethod OperationWarningsData - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type OperationList struct { - // Id: Unique identifier for the resource; defined by the server (output - // only). - Id string `json:"id,omitempty"` - - // Items: The operation resources. - Items []*Operation `json:"items,omitempty"` - - // Kind: Type of resource. - Kind string `json:"kind,omitempty"` - - // NextPageToken: A token used to continue a truncated list request - // (output only). - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: Server defined URL for this resource (output only). - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") 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. "Id") 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 *OperationList) MarshalJSON() ([]byte, error) { - type NoMethod OperationList - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type ReplicaPoolAutoHealingPolicy struct { - // ActionType: The action to perform when an instance becomes unhealthy. - // Possible values are RECREATE or REBOOT. RECREATE replaces an - // unhealthy instance with a new instance that is based on the instance - // template for this managed instance group. REBOOT performs a soft - // reboot on an instance. If the instance cannot reboot, the instance - // performs a hard restart. - // - // Possible values: - // "REBOOT" - // "RECREATE" - ActionType string `json:"actionType,omitempty"` - - // HealthCheck: The URL for the HealthCheck that signals autohealing. - HealthCheck string `json:"healthCheck,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ActionType") 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. "ActionType") 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 *ReplicaPoolAutoHealingPolicy) MarshalJSON() ([]byte, error) { - type NoMethod ReplicaPoolAutoHealingPolicy - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// method id "replicapool.instanceGroupManagers.abandonInstances": - -type InstanceGroupManagersAbandonInstancesCall struct { - s *Service - project string - zone string - instanceGroupManager string - instancegroupmanagersabandoninstancesrequest *InstanceGroupManagersAbandonInstancesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// AbandonInstances: Removes the specified instances from the managed -// instance group, and from any target pools of which they were members, -// without deleting the instances. -func (r *InstanceGroupManagersService) AbandonInstances(project string, zone string, instanceGroupManager string, instancegroupmanagersabandoninstancesrequest *InstanceGroupManagersAbandonInstancesRequest) *InstanceGroupManagersAbandonInstancesCall { - c := &InstanceGroupManagersAbandonInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instanceGroupManager = instanceGroupManager - c.instancegroupmanagersabandoninstancesrequest = instancegroupmanagersabandoninstancesrequest - 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 *InstanceGroupManagersAbandonInstancesCall) Fields(s ...googleapi.Field) *InstanceGroupManagersAbandonInstancesCall { - 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 *InstanceGroupManagersAbandonInstancesCall) Context(ctx context.Context) *InstanceGroupManagersAbandonInstancesCall { - 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 *InstanceGroupManagersAbandonInstancesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupManagersAbandonInstancesCall) 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.instancegroupmanagersabandoninstancesrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/abandonInstances") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instanceGroupManager": c.instanceGroupManager, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "replicapool.instanceGroupManagers.abandonInstances" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.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 *InstanceGroupManagersAbandonInstancesCall) Do(opts ...googleapi.CallOption) (*Operation, 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 := &Operation{ - 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": "Removes the specified instances from the managed instance group, and from any target pools of which they were members, without deleting the instances.", - // "httpMethod": "POST", - // "id": "replicapool.instanceGroupManagers.abandonInstances", - // "parameterOrder": [ - // "project", - // "zone", - // "instanceGroupManager" - // ], - // "parameters": { - // "instanceGroupManager": { - // "description": "The name of the instance group manager.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "The Google Developers Console project name.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone in which the instance group manager resides.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/abandonInstances", - // "request": { - // "$ref": "InstanceGroupManagersAbandonInstancesRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "replicapool.instanceGroupManagers.delete": - -type InstanceGroupManagersDeleteCall struct { - s *Service - project string - zone string - instanceGroupManager string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the instance group manager and all instances -// contained within. If you'd like to delete the manager without -// deleting the instances, you must first abandon the instances to -// remove them from the group. -func (r *InstanceGroupManagersService) Delete(project string, zone string, instanceGroupManager string) *InstanceGroupManagersDeleteCall { - c := &InstanceGroupManagersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instanceGroupManager = instanceGroupManager - 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 *InstanceGroupManagersDeleteCall) Fields(s ...googleapi.Field) *InstanceGroupManagersDeleteCall { - 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 *InstanceGroupManagersDeleteCall) Context(ctx context.Context) *InstanceGroupManagersDeleteCall { - 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 *InstanceGroupManagersDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupManagersDeleteCall) 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 - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("DELETE", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instanceGroupManager": c.instanceGroupManager, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "replicapool.instanceGroupManagers.delete" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.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 *InstanceGroupManagersDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, 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 := &Operation{ - 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": "Deletes the instance group manager and all instances contained within. If you'd like to delete the manager without deleting the instances, you must first abandon the instances to remove them from the group.", - // "httpMethod": "DELETE", - // "id": "replicapool.instanceGroupManagers.delete", - // "parameterOrder": [ - // "project", - // "zone", - // "instanceGroupManager" - // ], - // "parameters": { - // "instanceGroupManager": { - // "description": "Name of the Instance Group Manager resource to delete.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "The Google Developers Console project name.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone in which the instance group manager resides.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "replicapool.instanceGroupManagers.deleteInstances": - -type InstanceGroupManagersDeleteInstancesCall struct { - s *Service - project string - zone string - instanceGroupManager string - instancegroupmanagersdeleteinstancesrequest *InstanceGroupManagersDeleteInstancesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// DeleteInstances: Deletes the specified instances. The instances are -// deleted, then removed from the instance group and any target pools of -// which they were a member. The targetSize of the instance group -// manager is reduced by the number of instances deleted. -func (r *InstanceGroupManagersService) DeleteInstances(project string, zone string, instanceGroupManager string, instancegroupmanagersdeleteinstancesrequest *InstanceGroupManagersDeleteInstancesRequest) *InstanceGroupManagersDeleteInstancesCall { - c := &InstanceGroupManagersDeleteInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instanceGroupManager = instanceGroupManager - c.instancegroupmanagersdeleteinstancesrequest = instancegroupmanagersdeleteinstancesrequest - 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 *InstanceGroupManagersDeleteInstancesCall) Fields(s ...googleapi.Field) *InstanceGroupManagersDeleteInstancesCall { - 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 *InstanceGroupManagersDeleteInstancesCall) Context(ctx context.Context) *InstanceGroupManagersDeleteInstancesCall { - 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 *InstanceGroupManagersDeleteInstancesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupManagersDeleteInstancesCall) 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.instancegroupmanagersdeleteinstancesrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/deleteInstances") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instanceGroupManager": c.instanceGroupManager, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "replicapool.instanceGroupManagers.deleteInstances" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.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 *InstanceGroupManagersDeleteInstancesCall) Do(opts ...googleapi.CallOption) (*Operation, 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 := &Operation{ - 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": "Deletes the specified instances. The instances are deleted, then removed from the instance group and any target pools of which they were a member. The targetSize of the instance group manager is reduced by the number of instances deleted.", - // "httpMethod": "POST", - // "id": "replicapool.instanceGroupManagers.deleteInstances", - // "parameterOrder": [ - // "project", - // "zone", - // "instanceGroupManager" - // ], - // "parameters": { - // "instanceGroupManager": { - // "description": "The name of the instance group manager.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "The Google Developers Console project name.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone in which the instance group manager resides.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/deleteInstances", - // "request": { - // "$ref": "InstanceGroupManagersDeleteInstancesRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "replicapool.instanceGroupManagers.get": - -type InstanceGroupManagersGetCall struct { - s *Service - project string - zone string - instanceGroupManager string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified Instance Group Manager resource. -func (r *InstanceGroupManagersService) Get(project string, zone string, instanceGroupManager string) *InstanceGroupManagersGetCall { - c := &InstanceGroupManagersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instanceGroupManager = instanceGroupManager - 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 *InstanceGroupManagersGetCall) Fields(s ...googleapi.Field) *InstanceGroupManagersGetCall { - 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 *InstanceGroupManagersGetCall) IfNoneMatch(entityTag string) *InstanceGroupManagersGetCall { - 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 *InstanceGroupManagersGetCall) Context(ctx context.Context) *InstanceGroupManagersGetCall { - 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 *InstanceGroupManagersGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupManagersGetCall) 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, "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instanceGroupManager": c.instanceGroupManager, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "replicapool.instanceGroupManagers.get" call. -// Exactly one of *InstanceGroupManager or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *InstanceGroupManager.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 *InstanceGroupManagersGetCall) Do(opts ...googleapi.CallOption) (*InstanceGroupManager, 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 := &InstanceGroupManager{ - 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": "Returns the specified Instance Group Manager resource.", - // "httpMethod": "GET", - // "id": "replicapool.instanceGroupManagers.get", - // "parameterOrder": [ - // "project", - // "zone", - // "instanceGroupManager" - // ], - // "parameters": { - // "instanceGroupManager": { - // "description": "Name of the instance resource to return.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "The Google Developers Console project name.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone in which the instance group manager resides.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}", - // "response": { - // "$ref": "InstanceGroupManager" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/cloud-platform.read-only", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "replicapool.instanceGroupManagers.insert": - -type InstanceGroupManagersInsertCall struct { - s *Service - project string - zone string - instancegroupmanager *InstanceGroupManager - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates an instance group manager, as well as the instance -// group and the specified number of instances. -func (r *InstanceGroupManagersService) Insert(project string, zone string, size int64, instancegroupmanager *InstanceGroupManager) *InstanceGroupManagersInsertCall { - c := &InstanceGroupManagersInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.urlParams_.Set("size", fmt.Sprint(size)) - c.instancegroupmanager = instancegroupmanager - 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 *InstanceGroupManagersInsertCall) Fields(s ...googleapi.Field) *InstanceGroupManagersInsertCall { - 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 *InstanceGroupManagersInsertCall) Context(ctx context.Context) *InstanceGroupManagersInsertCall { - 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 *InstanceGroupManagersInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupManagersInsertCall) 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.instancegroupmanager) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroupManagers") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "replicapool.instanceGroupManagers.insert" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.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 *InstanceGroupManagersInsertCall) Do(opts ...googleapi.CallOption) (*Operation, 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 := &Operation{ - 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": "Creates an instance group manager, as well as the instance group and the specified number of instances.", - // "httpMethod": "POST", - // "id": "replicapool.instanceGroupManagers.insert", - // "parameterOrder": [ - // "project", - // "zone", - // "size" - // ], - // "parameters": { - // "project": { - // "description": "The Google Developers Console project name.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "size": { - // "description": "Number of instances that should exist.", - // "format": "int32", - // "location": "query", - // "minimum": "0", - // "required": true, - // "type": "integer" - // }, - // "zone": { - // "description": "The name of the zone in which the instance group manager resides.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/instanceGroupManagers", - // "request": { - // "$ref": "InstanceGroupManager" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "replicapool.instanceGroupManagers.list": - -type InstanceGroupManagersListCall struct { - s *Service - project string - zone string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of Instance Group Manager resources -// contained within the specified zone. -func (r *InstanceGroupManagersService) List(project string, zone string) *InstanceGroupManagersListCall { - c := &InstanceGroupManagersListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - return c -} - -// Filter sets the optional parameter "filter": Filter expression for -// filtering listed resources. -func (c *InstanceGroupManagersListCall) Filter(filter string) *InstanceGroupManagersListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": Maximum count of -// results to be returned. Maximum value is 500 and default value is -// 500. -func (c *InstanceGroupManagersListCall) MaxResults(maxResults int64) *InstanceGroupManagersListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// PageToken sets the optional parameter "pageToken": Tag returned by a -// previous list request truncated by maxResults. Used to continue a -// previous list request. -func (c *InstanceGroupManagersListCall) PageToken(pageToken string) *InstanceGroupManagersListCall { - 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 *InstanceGroupManagersListCall) Fields(s ...googleapi.Field) *InstanceGroupManagersListCall { - 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 *InstanceGroupManagersListCall) IfNoneMatch(entityTag string) *InstanceGroupManagersListCall { - 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 *InstanceGroupManagersListCall) Context(ctx context.Context) *InstanceGroupManagersListCall { - 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 *InstanceGroupManagersListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupManagersListCall) 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, "{project}/zones/{zone}/instanceGroupManagers") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "replicapool.instanceGroupManagers.list" call. -// Exactly one of *InstanceGroupManagerList or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *InstanceGroupManagerList.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 *InstanceGroupManagersListCall) Do(opts ...googleapi.CallOption) (*InstanceGroupManagerList, 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 := &InstanceGroupManagerList{ - 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": "Retrieves the list of Instance Group Manager resources contained within the specified zone.", - // "httpMethod": "GET", - // "id": "replicapool.instanceGroupManagers.list", - // "parameterOrder": [ - // "project", - // "zone" - // ], - // "parameters": { - // "filter": { - // "description": "Optional. Filter expression for filtering listed resources.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500.", - // "format": "uint32", - // "location": "query", - // "maximum": "500", - // "minimum": "0", - // "type": "integer" - // }, - // "pageToken": { - // "description": "Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "The Google Developers Console project name.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone in which the instance group manager resides.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/instanceGroupManagers", - // "response": { - // "$ref": "InstanceGroupManagerList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/cloud-platform.read-only", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// 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 *InstanceGroupManagersListCall) Pages(ctx context.Context, f func(*InstanceGroupManagerList) 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 "replicapool.instanceGroupManagers.recreateInstances": - -type InstanceGroupManagersRecreateInstancesCall struct { - s *Service - project string - zone string - instanceGroupManager string - instancegroupmanagersrecreateinstancesrequest *InstanceGroupManagersRecreateInstancesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// RecreateInstances: Recreates the specified instances. The instances -// are deleted, then recreated using the instance group manager's -// current instance template. -func (r *InstanceGroupManagersService) RecreateInstances(project string, zone string, instanceGroupManager string, instancegroupmanagersrecreateinstancesrequest *InstanceGroupManagersRecreateInstancesRequest) *InstanceGroupManagersRecreateInstancesCall { - c := &InstanceGroupManagersRecreateInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instanceGroupManager = instanceGroupManager - c.instancegroupmanagersrecreateinstancesrequest = instancegroupmanagersrecreateinstancesrequest - 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 *InstanceGroupManagersRecreateInstancesCall) Fields(s ...googleapi.Field) *InstanceGroupManagersRecreateInstancesCall { - 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 *InstanceGroupManagersRecreateInstancesCall) Context(ctx context.Context) *InstanceGroupManagersRecreateInstancesCall { - 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 *InstanceGroupManagersRecreateInstancesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupManagersRecreateInstancesCall) 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.instancegroupmanagersrecreateinstancesrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/recreateInstances") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instanceGroupManager": c.instanceGroupManager, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "replicapool.instanceGroupManagers.recreateInstances" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.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 *InstanceGroupManagersRecreateInstancesCall) Do(opts ...googleapi.CallOption) (*Operation, 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 := &Operation{ - 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": "Recreates the specified instances. The instances are deleted, then recreated using the instance group manager's current instance template.", - // "httpMethod": "POST", - // "id": "replicapool.instanceGroupManagers.recreateInstances", - // "parameterOrder": [ - // "project", - // "zone", - // "instanceGroupManager" - // ], - // "parameters": { - // "instanceGroupManager": { - // "description": "The name of the instance group manager.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "The Google Developers Console project name.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone in which the instance group manager resides.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/recreateInstances", - // "request": { - // "$ref": "InstanceGroupManagersRecreateInstancesRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "replicapool.instanceGroupManagers.resize": - -type InstanceGroupManagersResizeCall struct { - s *Service - project string - zone string - instanceGroupManager string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Resize: Resizes the managed instance group up or down. If resized up, -// new instances are created using the current instance template. If -// resized down, instances are removed in the order outlined in Resizing -// a managed instance group. -func (r *InstanceGroupManagersService) Resize(project string, zone string, instanceGroupManager string, size int64) *InstanceGroupManagersResizeCall { - c := &InstanceGroupManagersResizeCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instanceGroupManager = instanceGroupManager - c.urlParams_.Set("size", fmt.Sprint(size)) - 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 *InstanceGroupManagersResizeCall) Fields(s ...googleapi.Field) *InstanceGroupManagersResizeCall { - 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 *InstanceGroupManagersResizeCall) Context(ctx context.Context) *InstanceGroupManagersResizeCall { - 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 *InstanceGroupManagersResizeCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupManagersResizeCall) 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 - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/resize") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instanceGroupManager": c.instanceGroupManager, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "replicapool.instanceGroupManagers.resize" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.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 *InstanceGroupManagersResizeCall) Do(opts ...googleapi.CallOption) (*Operation, 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 := &Operation{ - 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": "Resizes the managed instance group up or down. If resized up, new instances are created using the current instance template. If resized down, instances are removed in the order outlined in Resizing a managed instance group.", - // "httpMethod": "POST", - // "id": "replicapool.instanceGroupManagers.resize", - // "parameterOrder": [ - // "project", - // "zone", - // "instanceGroupManager", - // "size" - // ], - // "parameters": { - // "instanceGroupManager": { - // "description": "The name of the instance group manager.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "The Google Developers Console project name.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "size": { - // "description": "Number of instances that should exist in this Instance Group Manager.", - // "format": "int32", - // "location": "query", - // "minimum": "0", - // "required": true, - // "type": "integer" - // }, - // "zone": { - // "description": "The name of the zone in which the instance group manager resides.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/resize", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "replicapool.instanceGroupManagers.setInstanceTemplate": - -type InstanceGroupManagersSetInstanceTemplateCall struct { - s *Service - project string - zone string - instanceGroupManager string - instancegroupmanagerssetinstancetemplaterequest *InstanceGroupManagersSetInstanceTemplateRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetInstanceTemplate: Sets the instance template to use when creating -// new instances in this group. Existing instances are not affected. -func (r *InstanceGroupManagersService) SetInstanceTemplate(project string, zone string, instanceGroupManager string, instancegroupmanagerssetinstancetemplaterequest *InstanceGroupManagersSetInstanceTemplateRequest) *InstanceGroupManagersSetInstanceTemplateCall { - c := &InstanceGroupManagersSetInstanceTemplateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instanceGroupManager = instanceGroupManager - c.instancegroupmanagerssetinstancetemplaterequest = instancegroupmanagerssetinstancetemplaterequest - 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 *InstanceGroupManagersSetInstanceTemplateCall) Fields(s ...googleapi.Field) *InstanceGroupManagersSetInstanceTemplateCall { - 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 *InstanceGroupManagersSetInstanceTemplateCall) Context(ctx context.Context) *InstanceGroupManagersSetInstanceTemplateCall { - 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 *InstanceGroupManagersSetInstanceTemplateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupManagersSetInstanceTemplateCall) 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.instancegroupmanagerssetinstancetemplaterequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/setInstanceTemplate") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instanceGroupManager": c.instanceGroupManager, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "replicapool.instanceGroupManagers.setInstanceTemplate" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.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 *InstanceGroupManagersSetInstanceTemplateCall) Do(opts ...googleapi.CallOption) (*Operation, 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 := &Operation{ - 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": "Sets the instance template to use when creating new instances in this group. Existing instances are not affected.", - // "httpMethod": "POST", - // "id": "replicapool.instanceGroupManagers.setInstanceTemplate", - // "parameterOrder": [ - // "project", - // "zone", - // "instanceGroupManager" - // ], - // "parameters": { - // "instanceGroupManager": { - // "description": "The name of the instance group manager.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "The Google Developers Console project name.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone in which the instance group manager resides.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/setInstanceTemplate", - // "request": { - // "$ref": "InstanceGroupManagersSetInstanceTemplateRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "replicapool.instanceGroupManagers.setTargetPools": - -type InstanceGroupManagersSetTargetPoolsCall struct { - s *Service - project string - zone string - instanceGroupManager string - instancegroupmanagerssettargetpoolsrequest *InstanceGroupManagersSetTargetPoolsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetTargetPools: Modifies the target pools to which all new instances -// in this group are assigned. Existing instances in the group are not -// affected. -func (r *InstanceGroupManagersService) SetTargetPools(project string, zone string, instanceGroupManager string, instancegroupmanagerssettargetpoolsrequest *InstanceGroupManagersSetTargetPoolsRequest) *InstanceGroupManagersSetTargetPoolsCall { - c := &InstanceGroupManagersSetTargetPoolsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instanceGroupManager = instanceGroupManager - c.instancegroupmanagerssettargetpoolsrequest = instancegroupmanagerssettargetpoolsrequest - 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 *InstanceGroupManagersSetTargetPoolsCall) Fields(s ...googleapi.Field) *InstanceGroupManagersSetTargetPoolsCall { - 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 *InstanceGroupManagersSetTargetPoolsCall) Context(ctx context.Context) *InstanceGroupManagersSetTargetPoolsCall { - 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 *InstanceGroupManagersSetTargetPoolsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupManagersSetTargetPoolsCall) 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.instancegroupmanagerssettargetpoolsrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/setTargetPools") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instanceGroupManager": c.instanceGroupManager, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "replicapool.instanceGroupManagers.setTargetPools" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.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 *InstanceGroupManagersSetTargetPoolsCall) Do(opts ...googleapi.CallOption) (*Operation, 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 := &Operation{ - 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": "Modifies the target pools to which all new instances in this group are assigned. Existing instances in the group are not affected.", - // "httpMethod": "POST", - // "id": "replicapool.instanceGroupManagers.setTargetPools", - // "parameterOrder": [ - // "project", - // "zone", - // "instanceGroupManager" - // ], - // "parameters": { - // "instanceGroupManager": { - // "description": "The name of the instance group manager.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "The Google Developers Console project name.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone in which the instance group manager resides.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/setTargetPools", - // "request": { - // "$ref": "InstanceGroupManagersSetTargetPoolsRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "replicapool.zoneOperations.get": - -type ZoneOperationsGetCall struct { - s *Service - project string - zone string - operation string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Retrieves the specified zone-specific operation resource. -func (r *ZoneOperationsService) Get(project string, zone string, operation string) *ZoneOperationsGetCall { - c := &ZoneOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.operation = operation - 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 *ZoneOperationsGetCall) Fields(s ...googleapi.Field) *ZoneOperationsGetCall { - 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 *ZoneOperationsGetCall) IfNoneMatch(entityTag string) *ZoneOperationsGetCall { - 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 *ZoneOperationsGetCall) Context(ctx context.Context) *ZoneOperationsGetCall { - 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 *ZoneOperationsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ZoneOperationsGetCall) 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, "{project}/zones/{zone}/operations/{operation}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "operation": c.operation, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "replicapool.zoneOperations.get" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.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 *ZoneOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, 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 := &Operation{ - 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": "Retrieves the specified zone-specific operation resource.", - // "httpMethod": "GET", - // "id": "replicapool.zoneOperations.get", - // "parameterOrder": [ - // "project", - // "zone", - // "operation" - // ], - // "parameters": { - // "operation": { - // "description": "Name of the operation resource to return.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Name of the project scoping this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "Name of the zone scoping this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/operations/{operation}", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "replicapool.zoneOperations.list": - -type ZoneOperationsListCall struct { - s *Service - project string - zone string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of operation resources contained within the -// specified zone. -func (r *ZoneOperationsService) List(project string, zone string) *ZoneOperationsListCall { - c := &ZoneOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - return c -} - -// Filter sets the optional parameter "filter": Filter expression for -// filtering listed resources. -func (c *ZoneOperationsListCall) Filter(filter string) *ZoneOperationsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": Maximum count of -// results to be returned. Maximum value is 500 and default value is -// 500. -func (c *ZoneOperationsListCall) MaxResults(maxResults int64) *ZoneOperationsListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// PageToken sets the optional parameter "pageToken": Tag returned by a -// previous list request truncated by maxResults. Used to continue a -// previous list request. -func (c *ZoneOperationsListCall) PageToken(pageToken string) *ZoneOperationsListCall { - 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 *ZoneOperationsListCall) Fields(s ...googleapi.Field) *ZoneOperationsListCall { - 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 *ZoneOperationsListCall) IfNoneMatch(entityTag string) *ZoneOperationsListCall { - 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 *ZoneOperationsListCall) Context(ctx context.Context) *ZoneOperationsListCall { - 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 *ZoneOperationsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ZoneOperationsListCall) 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, "{project}/zones/{zone}/operations") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "replicapool.zoneOperations.list" call. -// Exactly one of *OperationList or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *OperationList.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 *ZoneOperationsListCall) Do(opts ...googleapi.CallOption) (*OperationList, 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 := &OperationList{ - 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": "Retrieves the list of operation resources contained within the specified zone.", - // "httpMethod": "GET", - // "id": "replicapool.zoneOperations.list", - // "parameterOrder": [ - // "project", - // "zone" - // ], - // "parameters": { - // "filter": { - // "description": "Optional. Filter expression for filtering listed resources.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500.", - // "format": "uint32", - // "location": "query", - // "maximum": "500", - // "minimum": "0", - // "type": "integer" - // }, - // "pageToken": { - // "description": "Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Name of the project scoping this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "Name of the zone scoping this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/operations", - // "response": { - // "$ref": "OperationList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// 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 *ZoneOperationsListCall) Pages(ctx context.Context, f func(*OperationList) 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) - } -}
diff --git a/resourceviews/v1beta1/resourceviews-api.json b/resourceviews/v1beta1/resourceviews-api.json deleted file mode 100644 index f03a063..0000000 --- a/resourceviews/v1beta1/resourceviews-api.json +++ /dev/null
@@ -1,920 +0,0 @@ -{ - "auth": { - "oauth2": { - "scopes": { - "https://www.googleapis.com/auth/cloud-platform": { - "description": "View and manage your data across Google Cloud Platform services" - }, - "https://www.googleapis.com/auth/cloud-platform.read-only": { - "description": "View your data across Google Cloud Platform services" - }, - "https://www.googleapis.com/auth/compute": { - "description": "View and manage your Google Compute Engine resources" - }, - "https://www.googleapis.com/auth/compute.readonly": { - "description": "View your Google Compute Engine resources" - }, - "https://www.googleapis.com/auth/ndev.cloudman": { - "description": "View and manage your Google Cloud Platform management resources and deployment status information" - }, - "https://www.googleapis.com/auth/ndev.cloudman.readonly": { - "description": "View your Google Cloud Platform management resources and deployment status information" - } - } - } - }, - "basePath": "/resourceviews/v1beta1/projects/", - "baseUrl": "https://www.googleapis.com/resourceviews/v1beta1/projects/", - "batchPath": "batch/resourceviews/v1beta1", - "description": "The Resource View API allows users to create and manage logical sets of Google Compute Engine instances.", - "discoveryVersion": "v1", - "documentationLink": "https://developers.google.com/compute/", - "etag": "\"Zkyw9ACJZUvcYmlFaKGChzhmtnE/Ro0aUXh28mPKBh7gAwjWlFWsvmw\"", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "id": "resourceviews:v1beta1", - "kind": "discovery#restDescription", - "labels": [ - "limited_availability" - ], - "name": "resourceviews", - "ownerDomain": "google.com", - "ownerName": "Google", - "parameters": { - "alt": { - "default": "json", - "description": "Data format for the response.", - "enum": [ - "json" - ], - "enumDescriptions": [ - "Responses with Content-Type of application/json" - ], - "location": "query", - "type": "string" - }, - "fields": { - "description": "Selector specifying which fields to include in a partial response.", - "location": "query", - "type": "string" - }, - "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" - }, - "oauth_token": { - "description": "OAuth 2.0 token for the current user.", - "location": "query", - "type": "string" - }, - "prettyPrint": { - "default": "true", - "description": "Returns response with indentations and line breaks.", - "location": "query", - "type": "boolean" - }, - "quotaUser": { - "description": "An opaque string that represents a user for quota purposes. Must not exceed 40 characters.", - "location": "query", - "type": "string" - }, - "userIp": { - "description": "Deprecated. Please use quotaUser instead.", - "location": "query", - "type": "string" - } - }, - "protocol": "rest", - "resources": { - "regionViews": { - "methods": { - "addresources": { - "description": "Add resources to the view.", - "httpMethod": "POST", - "id": "resourceviews.regionViews.addresources", - "parameterOrder": [ - "projectName", - "region", - "resourceViewName" - ], - "parameters": { - "projectName": { - "description": "The project name of the resource view.", - "location": "path", - "required": true, - "type": "string" - }, - "region": { - "description": "The region name of the resource view.", - "location": "path", - "required": true, - "type": "string" - }, - "resourceViewName": { - "description": "The name of the resource view.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "{projectName}/regions/{region}/resourceViews/{resourceViewName}/addResources", - "request": { - "$ref": "RegionViewsAddResourcesRequest" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/ndev.cloudman" - ] - }, - "delete": { - "description": "Delete a resource view.", - "httpMethod": "DELETE", - "id": "resourceviews.regionViews.delete", - "parameterOrder": [ - "projectName", - "region", - "resourceViewName" - ], - "parameters": { - "projectName": { - "description": "The project name of the resource view.", - "location": "path", - "required": true, - "type": "string" - }, - "region": { - "description": "The region name of the resource view.", - "location": "path", - "required": true, - "type": "string" - }, - "resourceViewName": { - "description": "The name of the resource view.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "{projectName}/regions/{region}/resourceViews/{resourceViewName}", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/ndev.cloudman" - ] - }, - "get": { - "description": "Get the information of a resource view.", - "httpMethod": "GET", - "id": "resourceviews.regionViews.get", - "parameterOrder": [ - "projectName", - "region", - "resourceViewName" - ], - "parameters": { - "projectName": { - "description": "The project name of the resource view.", - "location": "path", - "required": true, - "type": "string" - }, - "region": { - "description": "The region name of the resource view.", - "location": "path", - "required": true, - "type": "string" - }, - "resourceViewName": { - "description": "The name of the resource view.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "{projectName}/regions/{region}/resourceViews/{resourceViewName}", - "response": { - "$ref": "ResourceView" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly", - "https://www.googleapis.com/auth/ndev.cloudman", - "https://www.googleapis.com/auth/ndev.cloudman.readonly" - ] - }, - "insert": { - "description": "Create a resource view.", - "httpMethod": "POST", - "id": "resourceviews.regionViews.insert", - "parameterOrder": [ - "projectName", - "region" - ], - "parameters": { - "projectName": { - "description": "The project name of the resource view.", - "location": "path", - "required": true, - "type": "string" - }, - "region": { - "description": "The region name of the resource view.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "{projectName}/regions/{region}/resourceViews", - "request": { - "$ref": "ResourceView" - }, - "response": { - "$ref": "RegionViewsInsertResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/ndev.cloudman" - ] - }, - "list": { - "description": "List resource views.", - "httpMethod": "GET", - "id": "resourceviews.regionViews.list", - "parameterOrder": [ - "projectName", - "region" - ], - "parameters": { - "maxResults": { - "default": "5000", - "description": "Maximum count of results to be returned. Acceptable values are 0 to 5000, inclusive. (Default: 5000)", - "format": "int32", - "location": "query", - "maximum": "5000", - "minimum": "0", - "type": "integer" - }, - "pageToken": { - "description": "Specifies a nextPageToken returned by a previous list request. This token can be used to request the next page of results from a previous list request.", - "location": "query", - "type": "string" - }, - "projectName": { - "description": "The project name of the resource view.", - "location": "path", - "required": true, - "type": "string" - }, - "region": { - "description": "The region name of the resource view.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "{projectName}/regions/{region}/resourceViews", - "response": { - "$ref": "RegionViewsListResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly", - "https://www.googleapis.com/auth/ndev.cloudman", - "https://www.googleapis.com/auth/ndev.cloudman.readonly" - ] - }, - "listresources": { - "description": "List the resources in the view.", - "httpMethod": "POST", - "id": "resourceviews.regionViews.listresources", - "parameterOrder": [ - "projectName", - "region", - "resourceViewName" - ], - "parameters": { - "maxResults": { - "default": "5000", - "description": "Maximum count of results to be returned. Acceptable values are 0 to 5000, inclusive. (Default: 5000)", - "format": "int32", - "location": "query", - "maximum": "5000", - "minimum": "0", - "type": "integer" - }, - "pageToken": { - "description": "Specifies a nextPageToken returned by a previous list request. This token can be used to request the next page of results from a previous list request.", - "location": "query", - "type": "string" - }, - "projectName": { - "description": "The project name of the resource view.", - "location": "path", - "required": true, - "type": "string" - }, - "region": { - "description": "The region name of the resource view.", - "location": "path", - "required": true, - "type": "string" - }, - "resourceViewName": { - "description": "The name of the resource view.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "{projectName}/regions/{region}/resourceViews/{resourceViewName}/resources", - "response": { - "$ref": "RegionViewsListResourcesResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly", - "https://www.googleapis.com/auth/ndev.cloudman", - "https://www.googleapis.com/auth/ndev.cloudman.readonly" - ] - }, - "removeresources": { - "description": "Remove resources from the view.", - "httpMethod": "POST", - "id": "resourceviews.regionViews.removeresources", - "parameterOrder": [ - "projectName", - "region", - "resourceViewName" - ], - "parameters": { - "projectName": { - "description": "The project name of the resource view.", - "location": "path", - "required": true, - "type": "string" - }, - "region": { - "description": "The region name of the resource view.", - "location": "path", - "required": true, - "type": "string" - }, - "resourceViewName": { - "description": "The name of the resource view.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "{projectName}/regions/{region}/resourceViews/{resourceViewName}/removeResources", - "request": { - "$ref": "RegionViewsRemoveResourcesRequest" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/ndev.cloudman" - ] - } - } - }, - "zoneViews": { - "methods": { - "addresources": { - "description": "Add resources to the view.", - "httpMethod": "POST", - "id": "resourceviews.zoneViews.addresources", - "parameterOrder": [ - "projectName", - "zone", - "resourceViewName" - ], - "parameters": { - "projectName": { - "description": "The project name of the resource view.", - "location": "path", - "required": true, - "type": "string" - }, - "resourceViewName": { - "description": "The name of the resource view.", - "location": "path", - "required": true, - "type": "string" - }, - "zone": { - "description": "The zone name of the resource view.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "{projectName}/zones/{zone}/resourceViews/{resourceViewName}/addResources", - "request": { - "$ref": "ZoneViewsAddResourcesRequest" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/ndev.cloudman" - ] - }, - "delete": { - "description": "Delete a resource view.", - "httpMethod": "DELETE", - "id": "resourceviews.zoneViews.delete", - "parameterOrder": [ - "projectName", - "zone", - "resourceViewName" - ], - "parameters": { - "projectName": { - "description": "The project name of the resource view.", - "location": "path", - "required": true, - "type": "string" - }, - "resourceViewName": { - "description": "The name of the resource view.", - "location": "path", - "required": true, - "type": "string" - }, - "zone": { - "description": "The zone name of the resource view.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "{projectName}/zones/{zone}/resourceViews/{resourceViewName}", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/ndev.cloudman" - ] - }, - "get": { - "description": "Get the information of a zonal resource view.", - "httpMethod": "GET", - "id": "resourceviews.zoneViews.get", - "parameterOrder": [ - "projectName", - "zone", - "resourceViewName" - ], - "parameters": { - "projectName": { - "description": "The project name of the resource view.", - "location": "path", - "required": true, - "type": "string" - }, - "resourceViewName": { - "description": "The name of the resource view.", - "location": "path", - "required": true, - "type": "string" - }, - "zone": { - "description": "The zone name of the resource view.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "{projectName}/zones/{zone}/resourceViews/{resourceViewName}", - "response": { - "$ref": "ResourceView" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly", - "https://www.googleapis.com/auth/ndev.cloudman", - "https://www.googleapis.com/auth/ndev.cloudman.readonly" - ] - }, - "insert": { - "description": "Create a resource view.", - "httpMethod": "POST", - "id": "resourceviews.zoneViews.insert", - "parameterOrder": [ - "projectName", - "zone" - ], - "parameters": { - "projectName": { - "description": "The project name of the resource view.", - "location": "path", - "required": true, - "type": "string" - }, - "zone": { - "description": "The zone name of the resource view.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "{projectName}/zones/{zone}/resourceViews", - "request": { - "$ref": "ResourceView" - }, - "response": { - "$ref": "ZoneViewsInsertResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/ndev.cloudman" - ] - }, - "list": { - "description": "List resource views.", - "httpMethod": "GET", - "id": "resourceviews.zoneViews.list", - "parameterOrder": [ - "projectName", - "zone" - ], - "parameters": { - "maxResults": { - "default": "5000", - "description": "Maximum count of results to be returned. Acceptable values are 0 to 5000, inclusive. (Default: 5000)", - "format": "int32", - "location": "query", - "maximum": "5000", - "minimum": "0", - "type": "integer" - }, - "pageToken": { - "description": "Specifies a nextPageToken returned by a previous list request. This token can be used to request the next page of results from a previous list request.", - "location": "query", - "type": "string" - }, - "projectName": { - "description": "The project name of the resource view.", - "location": "path", - "required": true, - "type": "string" - }, - "zone": { - "description": "The zone name of the resource view.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "{projectName}/zones/{zone}/resourceViews", - "response": { - "$ref": "ZoneViewsListResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly", - "https://www.googleapis.com/auth/ndev.cloudman", - "https://www.googleapis.com/auth/ndev.cloudman.readonly" - ] - }, - "listresources": { - "description": "List the resources of the resource view.", - "httpMethod": "POST", - "id": "resourceviews.zoneViews.listresources", - "parameterOrder": [ - "projectName", - "zone", - "resourceViewName" - ], - "parameters": { - "maxResults": { - "default": "5000", - "description": "Maximum count of results to be returned. Acceptable values are 0 to 5000, inclusive. (Default: 5000)", - "format": "int32", - "location": "query", - "maximum": "5000", - "minimum": "0", - "type": "integer" - }, - "pageToken": { - "description": "Specifies a nextPageToken returned by a previous list request. This token can be used to request the next page of results from a previous list request.", - "location": "query", - "type": "string" - }, - "projectName": { - "description": "The project name of the resource view.", - "location": "path", - "required": true, - "type": "string" - }, - "resourceViewName": { - "description": "The name of the resource view.", - "location": "path", - "required": true, - "type": "string" - }, - "zone": { - "description": "The zone name of the resource view.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "{projectName}/zones/{zone}/resourceViews/{resourceViewName}/resources", - "response": { - "$ref": "ZoneViewsListResourcesResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly", - "https://www.googleapis.com/auth/ndev.cloudman", - "https://www.googleapis.com/auth/ndev.cloudman.readonly" - ] - }, - "removeresources": { - "description": "Remove resources from the view.", - "httpMethod": "POST", - "id": "resourceviews.zoneViews.removeresources", - "parameterOrder": [ - "projectName", - "zone", - "resourceViewName" - ], - "parameters": { - "projectName": { - "description": "The project name of the resource view.", - "location": "path", - "required": true, - "type": "string" - }, - "resourceViewName": { - "description": "The name of the resource view.", - "location": "path", - "required": true, - "type": "string" - }, - "zone": { - "description": "The zone name of the resource view.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "{projectName}/zones/{zone}/resourceViews/{resourceViewName}/removeResources", - "request": { - "$ref": "ZoneViewsRemoveResourcesRequest" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/ndev.cloudman" - ] - } - } - } - }, - "revision": "20160512", - "rootUrl": "https://www.googleapis.com/", - "schemas": { - "Label": { - "description": "The Label to be applied to the resource views.", - "id": "Label", - "properties": { - "key": { - "description": "Key of the label.", - "type": "string" - }, - "value": { - "description": "Value of the label.", - "type": "string" - } - }, - "type": "object" - }, - "RegionViewsAddResourcesRequest": { - "description": "The request to add resources to the resource view.", - "id": "RegionViewsAddResourcesRequest", - "properties": { - "resources": { - "description": "The list of resources to be added.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "RegionViewsInsertResponse": { - "description": "The response to a resource view insert request.", - "id": "RegionViewsInsertResponse", - "properties": { - "resource": { - "$ref": "ResourceView", - "description": "The resource view object inserted." - } - }, - "type": "object" - }, - "RegionViewsListResourcesResponse": { - "description": "The response to the list resource request.", - "id": "RegionViewsListResourcesResponse", - "properties": { - "members": { - "description": "The resources in the view.", - "items": { - "type": "string" - }, - "type": "array" - }, - "nextPageToken": { - "description": "A token used for pagination.", - "type": "string" - } - }, - "type": "object" - }, - "RegionViewsListResponse": { - "description": "The response to the list resource view request.", - "id": "RegionViewsListResponse", - "properties": { - "nextPageToken": { - "description": "A token used for pagination.", - "type": "string" - }, - "resourceViews": { - "description": "The list of resource views that meet the criteria.", - "items": { - "$ref": "ResourceView" - }, - "type": "array" - } - }, - "type": "object" - }, - "RegionViewsRemoveResourcesRequest": { - "description": "The request to remove resources from the resource view.", - "id": "RegionViewsRemoveResourcesRequest", - "properties": { - "resources": { - "description": "The list of resources to be removed.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "ResourceView": { - "description": "The resource view object.", - "id": "ResourceView", - "properties": { - "creationTime": { - "description": "The creation time of the resource view.", - "type": "string" - }, - "description": { - "description": "The detailed description of the resource view.", - "type": "string" - }, - "id": { - "description": "[Output Only] The ID of the resource view.", - "type": "string" - }, - "kind": { - "default": "resourceviews#resourceView", - "description": "Type of the resource.", - "type": "string" - }, - "labels": { - "description": "The labels for events.", - "items": { - "$ref": "Label" - }, - "type": "array" - }, - "lastModified": { - "description": "The last modified time of the view. Not supported yet.", - "type": "string" - }, - "members": { - "description": "A list of all resources in the resource view.", - "items": { - "type": "string" - }, - "type": "array" - }, - "name": { - "description": "The name of the resource view.", - "type": "string" - }, - "numMembers": { - "description": "The total number of resources in the resource view.", - "format": "uint32", - "type": "integer" - }, - "selfLink": { - "description": "[Output Only] A self-link to the resource view.", - "type": "string" - } - }, - "type": "object" - }, - "ZoneViewsAddResourcesRequest": { - "description": "The request to add resources to the resource view.", - "id": "ZoneViewsAddResourcesRequest", - "properties": { - "resources": { - "description": "The list of resources to be added.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "ZoneViewsInsertResponse": { - "description": "The response to an insert request.", - "id": "ZoneViewsInsertResponse", - "properties": { - "resource": { - "$ref": "ResourceView", - "description": "The resource view object that has been inserted." - } - }, - "type": "object" - }, - "ZoneViewsListResourcesResponse": { - "description": "The response to a list resource request.", - "id": "ZoneViewsListResourcesResponse", - "properties": { - "members": { - "description": "The full URL of resources in the view.", - "items": { - "type": "string" - }, - "type": "array" - }, - "nextPageToken": { - "description": "A token used for pagination.", - "type": "string" - } - }, - "type": "object" - }, - "ZoneViewsListResponse": { - "description": "The response to a list request.", - "id": "ZoneViewsListResponse", - "properties": { - "nextPageToken": { - "description": "A token used for pagination.", - "type": "string" - }, - "resourceViews": { - "description": "The result that contains all resource views that meet the criteria.", - "items": { - "$ref": "ResourceView" - }, - "type": "array" - } - }, - "type": "object" - }, - "ZoneViewsRemoveResourcesRequest": { - "description": "The request to remove resources from the resource view.", - "id": "ZoneViewsRemoveResourcesRequest", - "properties": { - "resources": { - "description": "The list of resources to be removed.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - } - }, - "servicePath": "resourceviews/v1beta1/projects/", - "title": "Resource Views API", - "version": "v1beta1" -} \ No newline at end of file
diff --git a/resourceviews/v1beta1/resourceviews-gen.go b/resourceviews/v1beta1/resourceviews-gen.go deleted file mode 100644 index 55ceaab..0000000 --- a/resourceviews/v1beta1/resourceviews-gen.go +++ /dev/null
@@ -1,2692 +0,0 @@ -// Package resourceviews provides access to the Resource Views API. -// -// See https://developers.google.com/compute/ -// -// Usage example: -// -// import "google.golang.org/api/resourceviews/v1beta1" -// ... -// resourceviewsService, err := resourceviews.New(oauthHttpClient) -package resourceviews // import "google.golang.org/api/resourceviews/v1beta1" - -import ( - "bytes" - "context" - "encoding/json" - "errors" - "fmt" - "io" - "net/http" - "net/url" - "strconv" - "strings" - - gensupport "google.golang.org/api/gensupport" - googleapi "google.golang.org/api/googleapi" -) - -// Always reference these packages, just in case the auto-generated code -// below doesn't. -var _ = bytes.NewBuffer -var _ = strconv.Itoa -var _ = fmt.Sprintf -var _ = json.NewDecoder -var _ = io.Copy -var _ = url.Parse -var _ = gensupport.MarshalJSON -var _ = googleapi.Version -var _ = errors.New -var _ = strings.Replace -var _ = context.Canceled - -const apiId = "resourceviews:v1beta1" -const apiName = "resourceviews" -const apiVersion = "v1beta1" -const basePath = "https://www.googleapis.com/resourceviews/v1beta1/projects/" - -// OAuth2 scopes used by this API. -const ( - // View and manage your data across Google Cloud Platform services - CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform" - - // View your data across Google Cloud Platform services - CloudPlatformReadOnlyScope = "https://www.googleapis.com/auth/cloud-platform.read-only" - - // View and manage your Google Compute Engine resources - ComputeScope = "https://www.googleapis.com/auth/compute" - - // View your Google Compute Engine resources - ComputeReadonlyScope = "https://www.googleapis.com/auth/compute.readonly" - - // View and manage your Google Cloud Platform management resources and - // deployment status information - NdevCloudmanScope = "https://www.googleapis.com/auth/ndev.cloudman" - - // View your Google Cloud Platform management resources and deployment - // status information - NdevCloudmanReadonlyScope = "https://www.googleapis.com/auth/ndev.cloudman.readonly" -) - -func New(client *http.Client) (*Service, error) { - if client == nil { - return nil, errors.New("client is nil") - } - s := &Service{client: client, BasePath: basePath} - s.RegionViews = NewRegionViewsService(s) - s.ZoneViews = NewZoneViewsService(s) - return s, nil -} - -type Service struct { - client *http.Client - BasePath string // API endpoint base URL - UserAgent string // optional additional User-Agent fragment - - RegionViews *RegionViewsService - - ZoneViews *ZoneViewsService -} - -func (s *Service) userAgent() string { - if s.UserAgent == "" { - return googleapi.UserAgent - } - return googleapi.UserAgent + " " + s.UserAgent -} - -func NewRegionViewsService(s *Service) *RegionViewsService { - rs := &RegionViewsService{s: s} - return rs -} - -type RegionViewsService struct { - s *Service -} - -func NewZoneViewsService(s *Service) *ZoneViewsService { - rs := &ZoneViewsService{s: s} - return rs -} - -type ZoneViewsService struct { - s *Service -} - -// Label: The Label to be applied to the resource views. -type Label struct { - // Key: Key of the label. - Key string `json:"key,omitempty"` - - // Value: Value of the label. - Value string `json:"value,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Key") 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. "Key") 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 *Label) MarshalJSON() ([]byte, error) { - type NoMethod Label - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// RegionViewsAddResourcesRequest: The request to add resources to the -// resource view. -type RegionViewsAddResourcesRequest struct { - // Resources: The list of resources to be added. - Resources []string `json:"resources,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Resources") 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. "Resources") 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 *RegionViewsAddResourcesRequest) MarshalJSON() ([]byte, error) { - type NoMethod RegionViewsAddResourcesRequest - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// RegionViewsInsertResponse: The response to a resource view insert -// request. -type RegionViewsInsertResponse struct { - // Resource: The resource view object inserted. - Resource *ResourceView `json:"resource,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Resource") 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. "Resource") 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 *RegionViewsInsertResponse) MarshalJSON() ([]byte, error) { - type NoMethod RegionViewsInsertResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// RegionViewsListResourcesResponse: The response to the list resource -// request. -type RegionViewsListResourcesResponse struct { - // Members: The resources in the view. - Members []string `json:"members,omitempty"` - - // NextPageToken: A token used for pagination. - 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. "Members") 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. "Members") 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 *RegionViewsListResourcesResponse) MarshalJSON() ([]byte, error) { - type NoMethod RegionViewsListResourcesResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// RegionViewsListResponse: The response to the list resource view -// request. -type RegionViewsListResponse struct { - // NextPageToken: A token used for pagination. - NextPageToken string `json:"nextPageToken,omitempty"` - - // ResourceViews: The list of resource views that meet the criteria. - ResourceViews []*ResourceView `json:"resourceViews,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "NextPageToken") 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. "NextPageToken") 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 *RegionViewsListResponse) MarshalJSON() ([]byte, error) { - type NoMethod RegionViewsListResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// RegionViewsRemoveResourcesRequest: The request to remove resources -// from the resource view. -type RegionViewsRemoveResourcesRequest struct { - // Resources: The list of resources to be removed. - Resources []string `json:"resources,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Resources") 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. "Resources") 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 *RegionViewsRemoveResourcesRequest) MarshalJSON() ([]byte, error) { - type NoMethod RegionViewsRemoveResourcesRequest - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// ResourceView: The resource view object. -type ResourceView struct { - // CreationTime: The creation time of the resource view. - CreationTime string `json:"creationTime,omitempty"` - - // Description: The detailed description of the resource view. - Description string `json:"description,omitempty"` - - // Id: [Output Only] The ID of the resource view. - Id string `json:"id,omitempty"` - - // Kind: Type of the resource. - Kind string `json:"kind,omitempty"` - - // Labels: The labels for events. - Labels []*Label `json:"labels,omitempty"` - - // LastModified: The last modified time of the view. Not supported yet. - LastModified string `json:"lastModified,omitempty"` - - // Members: A list of all resources in the resource view. - Members []string `json:"members,omitempty"` - - // Name: The name of the resource view. - Name string `json:"name,omitempty"` - - // NumMembers: The total number of resources in the resource view. - NumMembers int64 `json:"numMembers,omitempty"` - - // SelfLink: [Output Only] A self-link to the resource view. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "CreationTime") 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. "CreationTime") 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 *ResourceView) MarshalJSON() ([]byte, error) { - type NoMethod ResourceView - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// ZoneViewsAddResourcesRequest: The request to add resources to the -// resource view. -type ZoneViewsAddResourcesRequest struct { - // Resources: The list of resources to be added. - Resources []string `json:"resources,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Resources") 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. "Resources") 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 *ZoneViewsAddResourcesRequest) MarshalJSON() ([]byte, error) { - type NoMethod ZoneViewsAddResourcesRequest - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// ZoneViewsInsertResponse: The response to an insert request. -type ZoneViewsInsertResponse struct { - // Resource: The resource view object that has been inserted. - Resource *ResourceView `json:"resource,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Resource") 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. "Resource") 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 *ZoneViewsInsertResponse) MarshalJSON() ([]byte, error) { - type NoMethod ZoneViewsInsertResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// ZoneViewsListResourcesResponse: The response to a list resource -// request. -type ZoneViewsListResourcesResponse struct { - // Members: The full URL of resources in the view. - Members []string `json:"members,omitempty"` - - // NextPageToken: A token used for pagination. - 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. "Members") 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. "Members") 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 *ZoneViewsListResourcesResponse) MarshalJSON() ([]byte, error) { - type NoMethod ZoneViewsListResourcesResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// ZoneViewsListResponse: The response to a list request. -type ZoneViewsListResponse struct { - // NextPageToken: A token used for pagination. - NextPageToken string `json:"nextPageToken,omitempty"` - - // ResourceViews: The result that contains all resource views that meet - // the criteria. - ResourceViews []*ResourceView `json:"resourceViews,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "NextPageToken") 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. "NextPageToken") 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 *ZoneViewsListResponse) MarshalJSON() ([]byte, error) { - type NoMethod ZoneViewsListResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// ZoneViewsRemoveResourcesRequest: The request to remove resources from -// the resource view. -type ZoneViewsRemoveResourcesRequest struct { - // Resources: The list of resources to be removed. - Resources []string `json:"resources,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Resources") 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. "Resources") 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 *ZoneViewsRemoveResourcesRequest) MarshalJSON() ([]byte, error) { - type NoMethod ZoneViewsRemoveResourcesRequest - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// method id "resourceviews.regionViews.addresources": - -type RegionViewsAddresourcesCall struct { - s *Service - projectName string - region string - resourceViewName string - regionviewsaddresourcesrequest *RegionViewsAddResourcesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Addresources: Add resources to the view. -func (r *RegionViewsService) Addresources(projectName string, region string, resourceViewName string, regionviewsaddresourcesrequest *RegionViewsAddResourcesRequest) *RegionViewsAddresourcesCall { - c := &RegionViewsAddresourcesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.projectName = projectName - c.region = region - c.resourceViewName = resourceViewName - c.regionviewsaddresourcesrequest = regionviewsaddresourcesrequest - 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 *RegionViewsAddresourcesCall) Fields(s ...googleapi.Field) *RegionViewsAddresourcesCall { - 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 *RegionViewsAddresourcesCall) Context(ctx context.Context) *RegionViewsAddresourcesCall { - 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 *RegionViewsAddresourcesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionViewsAddresourcesCall) 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.regionviewsaddresourcesrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{projectName}/regions/{region}/resourceViews/{resourceViewName}/addResources") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "projectName": c.projectName, - "region": c.region, - "resourceViewName": c.resourceViewName, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "resourceviews.regionViews.addresources" call. -func (c *RegionViewsAddresourcesCall) Do(opts ...googleapi.CallOption) error { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if err != nil { - return err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return err - } - return nil - // { - // "description": "Add resources to the view.", - // "httpMethod": "POST", - // "id": "resourceviews.regionViews.addresources", - // "parameterOrder": [ - // "projectName", - // "region", - // "resourceViewName" - // ], - // "parameters": { - // "projectName": { - // "description": "The project name of the resource view.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "The region name of the resource view.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "resourceViewName": { - // "description": "The name of the resource view.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{projectName}/regions/{region}/resourceViews/{resourceViewName}/addResources", - // "request": { - // "$ref": "RegionViewsAddResourcesRequest" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/ndev.cloudman" - // ] - // } - -} - -// method id "resourceviews.regionViews.delete": - -type RegionViewsDeleteCall struct { - s *Service - projectName string - region string - resourceViewName string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Delete a resource view. -func (r *RegionViewsService) Delete(projectName string, region string, resourceViewName string) *RegionViewsDeleteCall { - c := &RegionViewsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.projectName = projectName - c.region = region - c.resourceViewName = resourceViewName - 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 *RegionViewsDeleteCall) Fields(s ...googleapi.Field) *RegionViewsDeleteCall { - 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 *RegionViewsDeleteCall) Context(ctx context.Context) *RegionViewsDeleteCall { - 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 *RegionViewsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionViewsDeleteCall) 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 - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{projectName}/regions/{region}/resourceViews/{resourceViewName}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("DELETE", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "projectName": c.projectName, - "region": c.region, - "resourceViewName": c.resourceViewName, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "resourceviews.regionViews.delete" call. -func (c *RegionViewsDeleteCall) Do(opts ...googleapi.CallOption) error { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if err != nil { - return err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return err - } - return nil - // { - // "description": "Delete a resource view.", - // "httpMethod": "DELETE", - // "id": "resourceviews.regionViews.delete", - // "parameterOrder": [ - // "projectName", - // "region", - // "resourceViewName" - // ], - // "parameters": { - // "projectName": { - // "description": "The project name of the resource view.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "The region name of the resource view.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "resourceViewName": { - // "description": "The name of the resource view.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{projectName}/regions/{region}/resourceViews/{resourceViewName}", - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/ndev.cloudman" - // ] - // } - -} - -// method id "resourceviews.regionViews.get": - -type RegionViewsGetCall struct { - s *Service - projectName string - region string - resourceViewName string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Get the information of a resource view. -func (r *RegionViewsService) Get(projectName string, region string, resourceViewName string) *RegionViewsGetCall { - c := &RegionViewsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.projectName = projectName - c.region = region - c.resourceViewName = resourceViewName - 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 *RegionViewsGetCall) Fields(s ...googleapi.Field) *RegionViewsGetCall { - 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 *RegionViewsGetCall) IfNoneMatch(entityTag string) *RegionViewsGetCall { - 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 *RegionViewsGetCall) Context(ctx context.Context) *RegionViewsGetCall { - 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 *RegionViewsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionViewsGetCall) 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, "{projectName}/regions/{region}/resourceViews/{resourceViewName}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "projectName": c.projectName, - "region": c.region, - "resourceViewName": c.resourceViewName, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "resourceviews.regionViews.get" call. -// Exactly one of *ResourceView or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *ResourceView.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 *RegionViewsGetCall) Do(opts ...googleapi.CallOption) (*ResourceView, 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 := &ResourceView{ - 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": "Get the information of a resource view.", - // "httpMethod": "GET", - // "id": "resourceviews.regionViews.get", - // "parameterOrder": [ - // "projectName", - // "region", - // "resourceViewName" - // ], - // "parameters": { - // "projectName": { - // "description": "The project name of the resource view.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "The region name of the resource view.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "resourceViewName": { - // "description": "The name of the resource view.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{projectName}/regions/{region}/resourceViews/{resourceViewName}", - // "response": { - // "$ref": "ResourceView" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/cloud-platform.read-only", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly", - // "https://www.googleapis.com/auth/ndev.cloudman", - // "https://www.googleapis.com/auth/ndev.cloudman.readonly" - // ] - // } - -} - -// method id "resourceviews.regionViews.insert": - -type RegionViewsInsertCall struct { - s *Service - projectName string - region string - resourceview *ResourceView - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Create a resource view. -func (r *RegionViewsService) Insert(projectName string, region string, resourceview *ResourceView) *RegionViewsInsertCall { - c := &RegionViewsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.projectName = projectName - c.region = region - c.resourceview = resourceview - 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 *RegionViewsInsertCall) Fields(s ...googleapi.Field) *RegionViewsInsertCall { - 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 *RegionViewsInsertCall) Context(ctx context.Context) *RegionViewsInsertCall { - 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 *RegionViewsInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionViewsInsertCall) 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.resourceview) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{projectName}/regions/{region}/resourceViews") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "projectName": c.projectName, - "region": c.region, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "resourceviews.regionViews.insert" call. -// Exactly one of *RegionViewsInsertResponse or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *RegionViewsInsertResponse.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 *RegionViewsInsertCall) Do(opts ...googleapi.CallOption) (*RegionViewsInsertResponse, 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 := &RegionViewsInsertResponse{ - 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": "Create a resource view.", - // "httpMethod": "POST", - // "id": "resourceviews.regionViews.insert", - // "parameterOrder": [ - // "projectName", - // "region" - // ], - // "parameters": { - // "projectName": { - // "description": "The project name of the resource view.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "The region name of the resource view.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{projectName}/regions/{region}/resourceViews", - // "request": { - // "$ref": "ResourceView" - // }, - // "response": { - // "$ref": "RegionViewsInsertResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/ndev.cloudman" - // ] - // } - -} - -// method id "resourceviews.regionViews.list": - -type RegionViewsListCall struct { - s *Service - projectName string - region string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: List resource views. -func (r *RegionViewsService) List(projectName string, region string) *RegionViewsListCall { - c := &RegionViewsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.projectName = projectName - c.region = region - return c -} - -// MaxResults sets the optional parameter "maxResults": Maximum count of -// results to be returned. Acceptable values are 0 to 5000, inclusive. -// (Default: 5000) -func (c *RegionViewsListCall) MaxResults(maxResults int64) *RegionViewsListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a -// nextPageToken returned by a previous list request. This token can be -// used to request the next page of results from a previous list -// request. -func (c *RegionViewsListCall) PageToken(pageToken string) *RegionViewsListCall { - 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 *RegionViewsListCall) Fields(s ...googleapi.Field) *RegionViewsListCall { - 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 *RegionViewsListCall) IfNoneMatch(entityTag string) *RegionViewsListCall { - 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 *RegionViewsListCall) Context(ctx context.Context) *RegionViewsListCall { - 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 *RegionViewsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionViewsListCall) 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, "{projectName}/regions/{region}/resourceViews") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "projectName": c.projectName, - "region": c.region, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "resourceviews.regionViews.list" call. -// Exactly one of *RegionViewsListResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *RegionViewsListResponse.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 *RegionViewsListCall) Do(opts ...googleapi.CallOption) (*RegionViewsListResponse, 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 := &RegionViewsListResponse{ - 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": "List resource views.", - // "httpMethod": "GET", - // "id": "resourceviews.regionViews.list", - // "parameterOrder": [ - // "projectName", - // "region" - // ], - // "parameters": { - // "maxResults": { - // "default": "5000", - // "description": "Maximum count of results to be returned. Acceptable values are 0 to 5000, inclusive. (Default: 5000)", - // "format": "int32", - // "location": "query", - // "maximum": "5000", - // "minimum": "0", - // "type": "integer" - // }, - // "pageToken": { - // "description": "Specifies a nextPageToken returned by a previous list request. This token can be used to request the next page of results from a previous list request.", - // "location": "query", - // "type": "string" - // }, - // "projectName": { - // "description": "The project name of the resource view.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "The region name of the resource view.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{projectName}/regions/{region}/resourceViews", - // "response": { - // "$ref": "RegionViewsListResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/cloud-platform.read-only", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly", - // "https://www.googleapis.com/auth/ndev.cloudman", - // "https://www.googleapis.com/auth/ndev.cloudman.readonly" - // ] - // } - -} - -// 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 *RegionViewsListCall) Pages(ctx context.Context, f func(*RegionViewsListResponse) 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 "resourceviews.regionViews.listresources": - -type RegionViewsListresourcesCall struct { - s *Service - projectName string - region string - resourceViewName string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Listresources: List the resources in the view. -func (r *RegionViewsService) Listresources(projectName string, region string, resourceViewName string) *RegionViewsListresourcesCall { - c := &RegionViewsListresourcesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.projectName = projectName - c.region = region - c.resourceViewName = resourceViewName - return c -} - -// MaxResults sets the optional parameter "maxResults": Maximum count of -// results to be returned. Acceptable values are 0 to 5000, inclusive. -// (Default: 5000) -func (c *RegionViewsListresourcesCall) MaxResults(maxResults int64) *RegionViewsListresourcesCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a -// nextPageToken returned by a previous list request. This token can be -// used to request the next page of results from a previous list -// request. -func (c *RegionViewsListresourcesCall) PageToken(pageToken string) *RegionViewsListresourcesCall { - 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 *RegionViewsListresourcesCall) Fields(s ...googleapi.Field) *RegionViewsListresourcesCall { - 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 *RegionViewsListresourcesCall) Context(ctx context.Context) *RegionViewsListresourcesCall { - 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 *RegionViewsListresourcesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionViewsListresourcesCall) 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 - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{projectName}/regions/{region}/resourceViews/{resourceViewName}/resources") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "projectName": c.projectName, - "region": c.region, - "resourceViewName": c.resourceViewName, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "resourceviews.regionViews.listresources" call. -// Exactly one of *RegionViewsListResourcesResponse or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *RegionViewsListResourcesResponse.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 *RegionViewsListresourcesCall) Do(opts ...googleapi.CallOption) (*RegionViewsListResourcesResponse, 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 := &RegionViewsListResourcesResponse{ - 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": "List the resources in the view.", - // "httpMethod": "POST", - // "id": "resourceviews.regionViews.listresources", - // "parameterOrder": [ - // "projectName", - // "region", - // "resourceViewName" - // ], - // "parameters": { - // "maxResults": { - // "default": "5000", - // "description": "Maximum count of results to be returned. Acceptable values are 0 to 5000, inclusive. (Default: 5000)", - // "format": "int32", - // "location": "query", - // "maximum": "5000", - // "minimum": "0", - // "type": "integer" - // }, - // "pageToken": { - // "description": "Specifies a nextPageToken returned by a previous list request. This token can be used to request the next page of results from a previous list request.", - // "location": "query", - // "type": "string" - // }, - // "projectName": { - // "description": "The project name of the resource view.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "The region name of the resource view.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "resourceViewName": { - // "description": "The name of the resource view.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{projectName}/regions/{region}/resourceViews/{resourceViewName}/resources", - // "response": { - // "$ref": "RegionViewsListResourcesResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/cloud-platform.read-only", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly", - // "https://www.googleapis.com/auth/ndev.cloudman", - // "https://www.googleapis.com/auth/ndev.cloudman.readonly" - // ] - // } - -} - -// 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 *RegionViewsListresourcesCall) Pages(ctx context.Context, f func(*RegionViewsListResourcesResponse) 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 "resourceviews.regionViews.removeresources": - -type RegionViewsRemoveresourcesCall struct { - s *Service - projectName string - region string - resourceViewName string - regionviewsremoveresourcesrequest *RegionViewsRemoveResourcesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Removeresources: Remove resources from the view. -func (r *RegionViewsService) Removeresources(projectName string, region string, resourceViewName string, regionviewsremoveresourcesrequest *RegionViewsRemoveResourcesRequest) *RegionViewsRemoveresourcesCall { - c := &RegionViewsRemoveresourcesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.projectName = projectName - c.region = region - c.resourceViewName = resourceViewName - c.regionviewsremoveresourcesrequest = regionviewsremoveresourcesrequest - 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 *RegionViewsRemoveresourcesCall) Fields(s ...googleapi.Field) *RegionViewsRemoveresourcesCall { - 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 *RegionViewsRemoveresourcesCall) Context(ctx context.Context) *RegionViewsRemoveresourcesCall { - 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 *RegionViewsRemoveresourcesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionViewsRemoveresourcesCall) 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.regionviewsremoveresourcesrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{projectName}/regions/{region}/resourceViews/{resourceViewName}/removeResources") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "projectName": c.projectName, - "region": c.region, - "resourceViewName": c.resourceViewName, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "resourceviews.regionViews.removeresources" call. -func (c *RegionViewsRemoveresourcesCall) Do(opts ...googleapi.CallOption) error { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if err != nil { - return err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return err - } - return nil - // { - // "description": "Remove resources from the view.", - // "httpMethod": "POST", - // "id": "resourceviews.regionViews.removeresources", - // "parameterOrder": [ - // "projectName", - // "region", - // "resourceViewName" - // ], - // "parameters": { - // "projectName": { - // "description": "The project name of the resource view.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "The region name of the resource view.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "resourceViewName": { - // "description": "The name of the resource view.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{projectName}/regions/{region}/resourceViews/{resourceViewName}/removeResources", - // "request": { - // "$ref": "RegionViewsRemoveResourcesRequest" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/ndev.cloudman" - // ] - // } - -} - -// method id "resourceviews.zoneViews.addresources": - -type ZoneViewsAddresourcesCall struct { - s *Service - projectName string - zone string - resourceViewName string - zoneviewsaddresourcesrequest *ZoneViewsAddResourcesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Addresources: Add resources to the view. -func (r *ZoneViewsService) Addresources(projectName string, zone string, resourceViewName string, zoneviewsaddresourcesrequest *ZoneViewsAddResourcesRequest) *ZoneViewsAddresourcesCall { - c := &ZoneViewsAddresourcesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.projectName = projectName - c.zone = zone - c.resourceViewName = resourceViewName - c.zoneviewsaddresourcesrequest = zoneviewsaddresourcesrequest - 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 *ZoneViewsAddresourcesCall) Fields(s ...googleapi.Field) *ZoneViewsAddresourcesCall { - 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 *ZoneViewsAddresourcesCall) Context(ctx context.Context) *ZoneViewsAddresourcesCall { - 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 *ZoneViewsAddresourcesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ZoneViewsAddresourcesCall) 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.zoneviewsaddresourcesrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{projectName}/zones/{zone}/resourceViews/{resourceViewName}/addResources") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "projectName": c.projectName, - "zone": c.zone, - "resourceViewName": c.resourceViewName, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "resourceviews.zoneViews.addresources" call. -func (c *ZoneViewsAddresourcesCall) Do(opts ...googleapi.CallOption) error { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if err != nil { - return err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return err - } - return nil - // { - // "description": "Add resources to the view.", - // "httpMethod": "POST", - // "id": "resourceviews.zoneViews.addresources", - // "parameterOrder": [ - // "projectName", - // "zone", - // "resourceViewName" - // ], - // "parameters": { - // "projectName": { - // "description": "The project name of the resource view.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "resourceViewName": { - // "description": "The name of the resource view.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "The zone name of the resource view.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{projectName}/zones/{zone}/resourceViews/{resourceViewName}/addResources", - // "request": { - // "$ref": "ZoneViewsAddResourcesRequest" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/ndev.cloudman" - // ] - // } - -} - -// method id "resourceviews.zoneViews.delete": - -type ZoneViewsDeleteCall struct { - s *Service - projectName string - zone string - resourceViewName string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Delete a resource view. -func (r *ZoneViewsService) Delete(projectName string, zone string, resourceViewName string) *ZoneViewsDeleteCall { - c := &ZoneViewsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.projectName = projectName - c.zone = zone - c.resourceViewName = resourceViewName - 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 *ZoneViewsDeleteCall) Fields(s ...googleapi.Field) *ZoneViewsDeleteCall { - 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 *ZoneViewsDeleteCall) Context(ctx context.Context) *ZoneViewsDeleteCall { - 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 *ZoneViewsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ZoneViewsDeleteCall) 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 - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{projectName}/zones/{zone}/resourceViews/{resourceViewName}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("DELETE", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "projectName": c.projectName, - "zone": c.zone, - "resourceViewName": c.resourceViewName, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "resourceviews.zoneViews.delete" call. -func (c *ZoneViewsDeleteCall) Do(opts ...googleapi.CallOption) error { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if err != nil { - return err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return err - } - return nil - // { - // "description": "Delete a resource view.", - // "httpMethod": "DELETE", - // "id": "resourceviews.zoneViews.delete", - // "parameterOrder": [ - // "projectName", - // "zone", - // "resourceViewName" - // ], - // "parameters": { - // "projectName": { - // "description": "The project name of the resource view.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "resourceViewName": { - // "description": "The name of the resource view.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "The zone name of the resource view.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{projectName}/zones/{zone}/resourceViews/{resourceViewName}", - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/ndev.cloudman" - // ] - // } - -} - -// method id "resourceviews.zoneViews.get": - -type ZoneViewsGetCall struct { - s *Service - projectName string - zone string - resourceViewName string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Get the information of a zonal resource view. -func (r *ZoneViewsService) Get(projectName string, zone string, resourceViewName string) *ZoneViewsGetCall { - c := &ZoneViewsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.projectName = projectName - c.zone = zone - c.resourceViewName = resourceViewName - 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 *ZoneViewsGetCall) Fields(s ...googleapi.Field) *ZoneViewsGetCall { - 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 *ZoneViewsGetCall) IfNoneMatch(entityTag string) *ZoneViewsGetCall { - 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 *ZoneViewsGetCall) Context(ctx context.Context) *ZoneViewsGetCall { - 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 *ZoneViewsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ZoneViewsGetCall) 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, "{projectName}/zones/{zone}/resourceViews/{resourceViewName}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "projectName": c.projectName, - "zone": c.zone, - "resourceViewName": c.resourceViewName, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "resourceviews.zoneViews.get" call. -// Exactly one of *ResourceView or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *ResourceView.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 *ZoneViewsGetCall) Do(opts ...googleapi.CallOption) (*ResourceView, 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 := &ResourceView{ - 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": "Get the information of a zonal resource view.", - // "httpMethod": "GET", - // "id": "resourceviews.zoneViews.get", - // "parameterOrder": [ - // "projectName", - // "zone", - // "resourceViewName" - // ], - // "parameters": { - // "projectName": { - // "description": "The project name of the resource view.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "resourceViewName": { - // "description": "The name of the resource view.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "The zone name of the resource view.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{projectName}/zones/{zone}/resourceViews/{resourceViewName}", - // "response": { - // "$ref": "ResourceView" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/cloud-platform.read-only", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly", - // "https://www.googleapis.com/auth/ndev.cloudman", - // "https://www.googleapis.com/auth/ndev.cloudman.readonly" - // ] - // } - -} - -// method id "resourceviews.zoneViews.insert": - -type ZoneViewsInsertCall struct { - s *Service - projectName string - zone string - resourceview *ResourceView - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Create a resource view. -func (r *ZoneViewsService) Insert(projectName string, zone string, resourceview *ResourceView) *ZoneViewsInsertCall { - c := &ZoneViewsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.projectName = projectName - c.zone = zone - c.resourceview = resourceview - 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 *ZoneViewsInsertCall) Fields(s ...googleapi.Field) *ZoneViewsInsertCall { - 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 *ZoneViewsInsertCall) Context(ctx context.Context) *ZoneViewsInsertCall { - 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 *ZoneViewsInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ZoneViewsInsertCall) 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.resourceview) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{projectName}/zones/{zone}/resourceViews") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "projectName": c.projectName, - "zone": c.zone, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "resourceviews.zoneViews.insert" call. -// Exactly one of *ZoneViewsInsertResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *ZoneViewsInsertResponse.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 *ZoneViewsInsertCall) Do(opts ...googleapi.CallOption) (*ZoneViewsInsertResponse, 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 := &ZoneViewsInsertResponse{ - 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": "Create a resource view.", - // "httpMethod": "POST", - // "id": "resourceviews.zoneViews.insert", - // "parameterOrder": [ - // "projectName", - // "zone" - // ], - // "parameters": { - // "projectName": { - // "description": "The project name of the resource view.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "The zone name of the resource view.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{projectName}/zones/{zone}/resourceViews", - // "request": { - // "$ref": "ResourceView" - // }, - // "response": { - // "$ref": "ZoneViewsInsertResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/ndev.cloudman" - // ] - // } - -} - -// method id "resourceviews.zoneViews.list": - -type ZoneViewsListCall struct { - s *Service - projectName string - zone string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: List resource views. -func (r *ZoneViewsService) List(projectName string, zone string) *ZoneViewsListCall { - c := &ZoneViewsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.projectName = projectName - c.zone = zone - return c -} - -// MaxResults sets the optional parameter "maxResults": Maximum count of -// results to be returned. Acceptable values are 0 to 5000, inclusive. -// (Default: 5000) -func (c *ZoneViewsListCall) MaxResults(maxResults int64) *ZoneViewsListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a -// nextPageToken returned by a previous list request. This token can be -// used to request the next page of results from a previous list -// request. -func (c *ZoneViewsListCall) PageToken(pageToken string) *ZoneViewsListCall { - 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 *ZoneViewsListCall) Fields(s ...googleapi.Field) *ZoneViewsListCall { - 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 *ZoneViewsListCall) IfNoneMatch(entityTag string) *ZoneViewsListCall { - 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 *ZoneViewsListCall) Context(ctx context.Context) *ZoneViewsListCall { - 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 *ZoneViewsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ZoneViewsListCall) 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, "{projectName}/zones/{zone}/resourceViews") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "projectName": c.projectName, - "zone": c.zone, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "resourceviews.zoneViews.list" call. -// Exactly one of *ZoneViewsListResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *ZoneViewsListResponse.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 *ZoneViewsListCall) Do(opts ...googleapi.CallOption) (*ZoneViewsListResponse, 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 := &ZoneViewsListResponse{ - 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": "List resource views.", - // "httpMethod": "GET", - // "id": "resourceviews.zoneViews.list", - // "parameterOrder": [ - // "projectName", - // "zone" - // ], - // "parameters": { - // "maxResults": { - // "default": "5000", - // "description": "Maximum count of results to be returned. Acceptable values are 0 to 5000, inclusive. (Default: 5000)", - // "format": "int32", - // "location": "query", - // "maximum": "5000", - // "minimum": "0", - // "type": "integer" - // }, - // "pageToken": { - // "description": "Specifies a nextPageToken returned by a previous list request. This token can be used to request the next page of results from a previous list request.", - // "location": "query", - // "type": "string" - // }, - // "projectName": { - // "description": "The project name of the resource view.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "The zone name of the resource view.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{projectName}/zones/{zone}/resourceViews", - // "response": { - // "$ref": "ZoneViewsListResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/cloud-platform.read-only", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly", - // "https://www.googleapis.com/auth/ndev.cloudman", - // "https://www.googleapis.com/auth/ndev.cloudman.readonly" - // ] - // } - -} - -// 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 *ZoneViewsListCall) Pages(ctx context.Context, f func(*ZoneViewsListResponse) 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 "resourceviews.zoneViews.listresources": - -type ZoneViewsListresourcesCall struct { - s *Service - projectName string - zone string - resourceViewName string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Listresources: List the resources of the resource view. -func (r *ZoneViewsService) Listresources(projectName string, zone string, resourceViewName string) *ZoneViewsListresourcesCall { - c := &ZoneViewsListresourcesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.projectName = projectName - c.zone = zone - c.resourceViewName = resourceViewName - return c -} - -// MaxResults sets the optional parameter "maxResults": Maximum count of -// results to be returned. Acceptable values are 0 to 5000, inclusive. -// (Default: 5000) -func (c *ZoneViewsListresourcesCall) MaxResults(maxResults int64) *ZoneViewsListresourcesCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a -// nextPageToken returned by a previous list request. This token can be -// used to request the next page of results from a previous list -// request. -func (c *ZoneViewsListresourcesCall) PageToken(pageToken string) *ZoneViewsListresourcesCall { - 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 *ZoneViewsListresourcesCall) Fields(s ...googleapi.Field) *ZoneViewsListresourcesCall { - 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 *ZoneViewsListresourcesCall) Context(ctx context.Context) *ZoneViewsListresourcesCall { - 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 *ZoneViewsListresourcesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ZoneViewsListresourcesCall) 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 - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{projectName}/zones/{zone}/resourceViews/{resourceViewName}/resources") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "projectName": c.projectName, - "zone": c.zone, - "resourceViewName": c.resourceViewName, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "resourceviews.zoneViews.listresources" call. -// Exactly one of *ZoneViewsListResourcesResponse or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *ZoneViewsListResourcesResponse.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 *ZoneViewsListresourcesCall) Do(opts ...googleapi.CallOption) (*ZoneViewsListResourcesResponse, 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 := &ZoneViewsListResourcesResponse{ - 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": "List the resources of the resource view.", - // "httpMethod": "POST", - // "id": "resourceviews.zoneViews.listresources", - // "parameterOrder": [ - // "projectName", - // "zone", - // "resourceViewName" - // ], - // "parameters": { - // "maxResults": { - // "default": "5000", - // "description": "Maximum count of results to be returned. Acceptable values are 0 to 5000, inclusive. (Default: 5000)", - // "format": "int32", - // "location": "query", - // "maximum": "5000", - // "minimum": "0", - // "type": "integer" - // }, - // "pageToken": { - // "description": "Specifies a nextPageToken returned by a previous list request. This token can be used to request the next page of results from a previous list request.", - // "location": "query", - // "type": "string" - // }, - // "projectName": { - // "description": "The project name of the resource view.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "resourceViewName": { - // "description": "The name of the resource view.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "The zone name of the resource view.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{projectName}/zones/{zone}/resourceViews/{resourceViewName}/resources", - // "response": { - // "$ref": "ZoneViewsListResourcesResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/cloud-platform.read-only", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly", - // "https://www.googleapis.com/auth/ndev.cloudman", - // "https://www.googleapis.com/auth/ndev.cloudman.readonly" - // ] - // } - -} - -// 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 *ZoneViewsListresourcesCall) Pages(ctx context.Context, f func(*ZoneViewsListResourcesResponse) 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 "resourceviews.zoneViews.removeresources": - -type ZoneViewsRemoveresourcesCall struct { - s *Service - projectName string - zone string - resourceViewName string - zoneviewsremoveresourcesrequest *ZoneViewsRemoveResourcesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Removeresources: Remove resources from the view. -func (r *ZoneViewsService) Removeresources(projectName string, zone string, resourceViewName string, zoneviewsremoveresourcesrequest *ZoneViewsRemoveResourcesRequest) *ZoneViewsRemoveresourcesCall { - c := &ZoneViewsRemoveresourcesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.projectName = projectName - c.zone = zone - c.resourceViewName = resourceViewName - c.zoneviewsremoveresourcesrequest = zoneviewsremoveresourcesrequest - 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 *ZoneViewsRemoveresourcesCall) Fields(s ...googleapi.Field) *ZoneViewsRemoveresourcesCall { - 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 *ZoneViewsRemoveresourcesCall) Context(ctx context.Context) *ZoneViewsRemoveresourcesCall { - 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 *ZoneViewsRemoveresourcesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ZoneViewsRemoveresourcesCall) 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.zoneviewsremoveresourcesrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{projectName}/zones/{zone}/resourceViews/{resourceViewName}/removeResources") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "projectName": c.projectName, - "zone": c.zone, - "resourceViewName": c.resourceViewName, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "resourceviews.zoneViews.removeresources" call. -func (c *ZoneViewsRemoveresourcesCall) Do(opts ...googleapi.CallOption) error { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if err != nil { - return err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return err - } - return nil - // { - // "description": "Remove resources from the view.", - // "httpMethod": "POST", - // "id": "resourceviews.zoneViews.removeresources", - // "parameterOrder": [ - // "projectName", - // "zone", - // "resourceViewName" - // ], - // "parameters": { - // "projectName": { - // "description": "The project name of the resource view.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "resourceViewName": { - // "description": "The name of the resource view.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "The zone name of the resource view.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{projectName}/zones/{zone}/resourceViews/{resourceViewName}/removeResources", - // "request": { - // "$ref": "ZoneViewsRemoveResourcesRequest" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/ndev.cloudman" - // ] - // } - -}
diff --git a/resourceviews/v1beta2/resourceviews-api.json b/resourceviews/v1beta2/resourceviews-api.json deleted file mode 100644 index 73dc5f6..0000000 --- a/resourceviews/v1beta2/resourceviews-api.json +++ /dev/null
@@ -1,1052 +0,0 @@ -{ - "auth": { - "oauth2": { - "scopes": { - "https://www.googleapis.com/auth/cloud-platform": { - "description": "View and manage your data across Google Cloud Platform services" - }, - "https://www.googleapis.com/auth/cloud-platform.read-only": { - "description": "View your data across Google Cloud Platform services" - }, - "https://www.googleapis.com/auth/compute": { - "description": "View and manage your Google Compute Engine resources" - }, - "https://www.googleapis.com/auth/compute.readonly": { - "description": "View your Google Compute Engine resources" - }, - "https://www.googleapis.com/auth/ndev.cloudman": { - "description": "View and manage your Google Cloud Platform management resources and deployment status information" - }, - "https://www.googleapis.com/auth/ndev.cloudman.readonly": { - "description": "View your Google Cloud Platform management resources and deployment status information" - } - } - } - }, - "basePath": "/resourceviews/v1beta2/projects/", - "baseUrl": "https://www.googleapis.com/resourceviews/v1beta2/projects/", - "batchPath": "batch/resourceviews/v1beta2", - "description": "The Resource View API allows users to create and manage logical sets of Google Compute Engine instances.", - "discoveryVersion": "v1", - "documentationLink": "https://developers.google.com/compute/", - "etag": "\"Zkyw9ACJZUvcYmlFaKGChzhmtnE/NTJxXPeLIjeT39FhZUufuT3wwcg\"", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "id": "resourceviews:v1beta2", - "kind": "discovery#restDescription", - "labels": [ - "limited_availability" - ], - "name": "resourceviews", - "ownerDomain": "google.com", - "ownerName": "Google", - "parameters": { - "alt": { - "default": "json", - "description": "Data format for the response.", - "enum": [ - "json" - ], - "enumDescriptions": [ - "Responses with Content-Type of application/json" - ], - "location": "query", - "type": "string" - }, - "fields": { - "description": "Selector specifying which fields to include in a partial response.", - "location": "query", - "type": "string" - }, - "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" - }, - "oauth_token": { - "description": "OAuth 2.0 token for the current user.", - "location": "query", - "type": "string" - }, - "prettyPrint": { - "default": "true", - "description": "Returns response with indentations and line breaks.", - "location": "query", - "type": "boolean" - }, - "quotaUser": { - "description": "An opaque string that represents a user for quota purposes. Must not exceed 40 characters.", - "location": "query", - "type": "string" - }, - "userIp": { - "description": "Deprecated. Please use quotaUser instead.", - "location": "query", - "type": "string" - } - }, - "protocol": "rest", - "resources": { - "zoneOperations": { - "methods": { - "get": { - "description": "Retrieves the specified zone-specific operation resource.", - "httpMethod": "GET", - "id": "resourceviews.zoneOperations.get", - "parameterOrder": [ - "project", - "zone", - "operation" - ], - "parameters": { - "operation": { - "description": "Name of the operation resource to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "project": { - "description": "Name of the project scoping this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "zone": { - "description": "Name of the zone scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "{project}/zones/{zone}/operations/{operation}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly", - "https://www.googleapis.com/auth/ndev.cloudman", - "https://www.googleapis.com/auth/ndev.cloudman.readonly" - ] - }, - "list": { - "description": "Retrieves the list of operation resources contained within the specified zone.", - "httpMethod": "GET", - "id": "resourceviews.zoneOperations.list", - "parameterOrder": [ - "project", - "zone" - ], - "parameters": { - "filter": { - "description": "Optional. Filter expression for filtering listed resources.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500.", - "format": "uint32", - "location": "query", - "maximum": "500", - "minimum": "0", - "type": "integer" - }, - "pageToken": { - "description": "Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Name of the project scoping this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "zone": { - "description": "Name of the zone scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "{project}/zones/{zone}/operations", - "response": { - "$ref": "OperationList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly", - "https://www.googleapis.com/auth/ndev.cloudman", - "https://www.googleapis.com/auth/ndev.cloudman.readonly" - ] - } - } - }, - "zoneViews": { - "methods": { - "addResources": { - "description": "Add resources to the view.", - "httpMethod": "POST", - "id": "resourceviews.zoneViews.addResources", - "parameterOrder": [ - "project", - "zone", - "resourceView" - ], - "parameters": { - "project": { - "description": "The project name of the resource view.", - "location": "path", - "required": true, - "type": "string" - }, - "resourceView": { - "description": "The name of the resource view.", - "location": "path", - "required": true, - "type": "string" - }, - "zone": { - "description": "The zone name of the resource view.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "{project}/zones/{zone}/resourceViews/{resourceView}/addResources", - "request": { - "$ref": "ZoneViewsAddResourcesRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/ndev.cloudman" - ] - }, - "delete": { - "description": "Delete a resource view.", - "httpMethod": "DELETE", - "id": "resourceviews.zoneViews.delete", - "parameterOrder": [ - "project", - "zone", - "resourceView" - ], - "parameters": { - "project": { - "description": "The project name of the resource view.", - "location": "path", - "required": true, - "type": "string" - }, - "resourceView": { - "description": "The name of the resource view.", - "location": "path", - "required": true, - "type": "string" - }, - "zone": { - "description": "The zone name of the resource view.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "{project}/zones/{zone}/resourceViews/{resourceView}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/ndev.cloudman" - ] - }, - "get": { - "description": "Get the information of a zonal resource view.", - "httpMethod": "GET", - "id": "resourceviews.zoneViews.get", - "parameterOrder": [ - "project", - "zone", - "resourceView" - ], - "parameters": { - "project": { - "description": "The project name of the resource view.", - "location": "path", - "required": true, - "type": "string" - }, - "resourceView": { - "description": "The name of the resource view.", - "location": "path", - "required": true, - "type": "string" - }, - "zone": { - "description": "The zone name of the resource view.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "{project}/zones/{zone}/resourceViews/{resourceView}", - "response": { - "$ref": "ResourceView" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly", - "https://www.googleapis.com/auth/ndev.cloudman", - "https://www.googleapis.com/auth/ndev.cloudman.readonly" - ] - }, - "getService": { - "description": "Get the service information of a resource view or a resource.", - "httpMethod": "POST", - "id": "resourceviews.zoneViews.getService", - "parameterOrder": [ - "project", - "zone", - "resourceView" - ], - "parameters": { - "project": { - "description": "The project name of the resource view.", - "location": "path", - "required": true, - "type": "string" - }, - "resourceName": { - "description": "The name of the resource if user wants to get the service information of the resource.", - "location": "query", - "type": "string" - }, - "resourceView": { - "description": "The name of the resource view.", - "location": "path", - "required": true, - "type": "string" - }, - "zone": { - "description": "The zone name of the resource view.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "{project}/zones/{zone}/resourceViews/{resourceView}/getService", - "response": { - "$ref": "ZoneViewsGetServiceResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/ndev.cloudman" - ] - }, - "insert": { - "description": "Create a resource view.", - "httpMethod": "POST", - "id": "resourceviews.zoneViews.insert", - "parameterOrder": [ - "project", - "zone" - ], - "parameters": { - "project": { - "description": "The project name of the resource view.", - "location": "path", - "required": true, - "type": "string" - }, - "zone": { - "description": "The zone name of the resource view.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "{project}/zones/{zone}/resourceViews", - "request": { - "$ref": "ResourceView" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/ndev.cloudman" - ] - }, - "list": { - "description": "List resource views.", - "httpMethod": "GET", - "id": "resourceviews.zoneViews.list", - "parameterOrder": [ - "project", - "zone" - ], - "parameters": { - "maxResults": { - "default": "5000", - "description": "Maximum count of results to be returned. Acceptable values are 0 to 5000, inclusive. (Default: 5000)", - "format": "int32", - "location": "query", - "maximum": "5000", - "minimum": "0", - "type": "integer" - }, - "pageToken": { - "description": "Specifies a nextPageToken returned by a previous list request. This token can be used to request the next page of results from a previous list request.", - "location": "query", - "type": "string" - }, - "project": { - "description": "The project name of the resource view.", - "location": "path", - "required": true, - "type": "string" - }, - "zone": { - "description": "The zone name of the resource view.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "{project}/zones/{zone}/resourceViews", - "response": { - "$ref": "ZoneViewsList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly", - "https://www.googleapis.com/auth/ndev.cloudman", - "https://www.googleapis.com/auth/ndev.cloudman.readonly" - ] - }, - "listResources": { - "description": "List the resources of the resource view.", - "httpMethod": "GET", - "id": "resourceviews.zoneViews.listResources", - "parameterOrder": [ - "project", - "zone", - "resourceView" - ], - "parameters": { - "format": { - "description": "The requested format of the return value. It can be URL or URL_PORT. A JSON object will be included in the response based on the format. The default format is NONE, which results in no JSON in the response.", - "enum": [ - "NONE", - "URL", - "URL_PORT" - ], - "enumDescriptions": [ - "", - "", - "" - ], - "location": "query", - "type": "string" - }, - "listState": { - "default": "ALL", - "description": "The state of the instance to list. By default, it lists all instances.", - "enum": [ - "ALL", - "RUNNING" - ], - "enumDescriptions": [ - "", - "" - ], - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "5000", - "description": "Maximum count of results to be returned. Acceptable values are 0 to 5000, inclusive. (Default: 5000)", - "format": "int32", - "location": "query", - "maximum": "5000", - "minimum": "0", - "type": "integer" - }, - "pageToken": { - "description": "Specifies a nextPageToken returned by a previous list request. This token can be used to request the next page of results from a previous list request.", - "location": "query", - "type": "string" - }, - "project": { - "description": "The project name of the resource view.", - "location": "path", - "required": true, - "type": "string" - }, - "resourceView": { - "description": "The name of the resource view.", - "location": "path", - "required": true, - "type": "string" - }, - "serviceName": { - "description": "The service name to return in the response. It is optional and if it is not set, all the service end points will be returned.", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The zone name of the resource view.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "{project}/zones/{zone}/resourceViews/{resourceView}/resources", - "response": { - "$ref": "ZoneViewsListResourcesResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly", - "https://www.googleapis.com/auth/ndev.cloudman", - "https://www.googleapis.com/auth/ndev.cloudman.readonly" - ] - }, - "removeResources": { - "description": "Remove resources from the view.", - "httpMethod": "POST", - "id": "resourceviews.zoneViews.removeResources", - "parameterOrder": [ - "project", - "zone", - "resourceView" - ], - "parameters": { - "project": { - "description": "The project name of the resource view.", - "location": "path", - "required": true, - "type": "string" - }, - "resourceView": { - "description": "The name of the resource view.", - "location": "path", - "required": true, - "type": "string" - }, - "zone": { - "description": "The zone name of the resource view.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "{project}/zones/{zone}/resourceViews/{resourceView}/removeResources", - "request": { - "$ref": "ZoneViewsRemoveResourcesRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/ndev.cloudman" - ] - }, - "setService": { - "description": "Update the service information of a resource view or a resource.", - "httpMethod": "POST", - "id": "resourceviews.zoneViews.setService", - "parameterOrder": [ - "project", - "zone", - "resourceView" - ], - "parameters": { - "project": { - "description": "The project name of the resource view.", - "location": "path", - "required": true, - "type": "string" - }, - "resourceView": { - "description": "The name of the resource view.", - "location": "path", - "required": true, - "type": "string" - }, - "zone": { - "description": "The zone name of the resource view.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "{project}/zones/{zone}/resourceViews/{resourceView}/setService", - "request": { - "$ref": "ZoneViewsSetServiceRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/ndev.cloudman" - ] - } - } - } - }, - "revision": "20160512", - "rootUrl": "https://www.googleapis.com/", - "schemas": { - "Label": { - "description": "The Label to be applied to the resource views.", - "id": "Label", - "properties": { - "key": { - "description": "Key of the label.", - "type": "string" - }, - "value": { - "description": "Value of the label.", - "type": "string" - } - }, - "type": "object" - }, - "ListResourceResponseItem": { - "description": "The list response item that contains the resource and end points information.", - "id": "ListResourceResponseItem", - "properties": { - "endpoints": { - "additionalProperties": { - "description": "The name of the service end point.", - "items": { - "format": "int32", - "type": "integer" - }, - "type": "array" - }, - "description": "The list of service end points on the resource.", - "type": "object" - }, - "resource": { - "description": "The full URL of the resource.", - "type": "string" - } - }, - "type": "object" - }, - "Operation": { - "description": "An operation resource, used to manage asynchronous API requests.", - "id": "Operation", - "properties": { - "clientOperationId": { - "description": "[Output only] An optional identifier specified by the client when the mutation was initiated. Must be unique for all operation resources in the project.", - "type": "string" - }, - "creationTimestamp": { - "description": "[Output Only] The time that this operation was requested, in RFC3339 text format.", - "type": "string" - }, - "endTime": { - "description": "[Output Only] The time that this operation was completed, in RFC3339 text format.", - "type": "string" - }, - "error": { - "description": "[Output Only] If errors occurred during processing of this operation, this field will be populated.", - "properties": { - "errors": { - "description": "[Output Only] The array of errors encountered while processing this operation.", - "items": { - "properties": { - "code": { - "description": "[Output Only] The error type identifier for this error.", - "type": "string" - }, - "location": { - "description": "[Output Only] Indicates the field in the request which caused the error. This property is optional.", - "type": "string" - }, - "message": { - "description": "[Output Only] An optional, human-readable error message.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - } - }, - "type": "object" - }, - "httpErrorMessage": { - "description": "[Output only] If operation fails, the HTTP error message returned.", - "type": "string" - }, - "httpErrorStatusCode": { - "description": "[Output only] If operation fails, the HTTP error status code returned.", - "format": "int32", - "type": "integer" - }, - "id": { - "description": "[Output Only] Unique identifier for the resource, generated by the server.", - "format": "uint64", - "type": "string" - }, - "insertTime": { - "description": "[Output Only] The time that this operation was requested, in RFC3339 text format.", - "type": "string" - }, - "kind": { - "default": "resourceviews#operation", - "description": "[Output only] Type of the resource.", - "type": "string" - }, - "name": { - "description": "[Output Only] Name of the resource.", - "type": "string" - }, - "operationType": { - "description": "[Output only] Type of the operation. Operations include insert, update, and delete.", - "type": "string" - }, - "progress": { - "description": "[Output only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess at when the operation will be complete. This number should be monotonically increasing as the operation progresses.", - "format": "int32", - "type": "integer" - }, - "region": { - "description": "[Output Only] URL of the region where the operation resides. Only available when performing regional operations.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined fully-qualified URL for this resource.", - "type": "string" - }, - "startTime": { - "description": "[Output Only] The time that this operation was started by the server, in RFC3339 text format.", - "type": "string" - }, - "status": { - "description": "[Output Only] Status of the operation.", - "type": "string" - }, - "statusMessage": { - "description": "[Output Only] An optional textual description of the current status of the operation.", - "type": "string" - }, - "targetId": { - "description": "[Output Only] Unique target ID which identifies a particular incarnation of the target.", - "format": "uint64", - "type": "string" - }, - "targetLink": { - "description": "[Output only] URL of the resource the operation is mutating.", - "type": "string" - }, - "user": { - "description": "[Output Only] User who requested the operation, for example: user@example.com.", - "type": "string" - }, - "warnings": { - "description": "[Output Only] If there are issues with this operation, a warning is returned.", - "items": { - "properties": { - "code": { - "description": "[Output only] The warning type identifier for this warning.", - "type": "string" - }, - "data": { - "description": "[Output only] Metadata for this warning in key:value format.", - "items": { - "properties": { - "key": { - "description": "[Output Only] Metadata key for this warning.", - "type": "string" - }, - "value": { - "description": "[Output Only] Metadata value for this warning.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output only] Optional human-readable details for this warning.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "zone": { - "description": "[Output Only] URL of the zone where the operation resides. Only available when performing per-zone operations.", - "type": "string" - } - }, - "type": "object" - }, - "OperationList": { - "id": "OperationList", - "properties": { - "id": { - "description": "Unique identifier for the resource; defined by the server (output only).", - "type": "string" - }, - "items": { - "description": "The operation resources.", - "items": { - "$ref": "Operation" - }, - "type": "array" - }, - "kind": { - "default": "resourceviews#operationList", - "description": "Type of resource.", - "type": "string" - }, - "nextPageToken": { - "description": "A token used to continue a truncated list request (output only).", - "type": "string" - }, - "selfLink": { - "description": "Server defined URL for this resource (output only).", - "type": "string" - } - }, - "type": "object" - }, - "ResourceView": { - "description": "The resource view object.", - "id": "ResourceView", - "properties": { - "creationTimestamp": { - "description": "The creation time of the resource view.", - "type": "string" - }, - "description": { - "description": "The detailed description of the resource view.", - "type": "string" - }, - "endpoints": { - "description": "Services endpoint information.", - "items": { - "$ref": "ServiceEndpoint" - }, - "type": "array" - }, - "fingerprint": { - "description": "The fingerprint of the service endpoint information.", - "type": "string" - }, - "id": { - "description": "[Output Only] The ID of the resource view.", - "type": "string" - }, - "kind": { - "default": "resourceviews#resourceView", - "description": "Type of the resource.", - "type": "string" - }, - "labels": { - "description": "The labels for events.", - "items": { - "$ref": "Label" - }, - "type": "array" - }, - "name": { - "description": "The name of the resource view.", - "type": "string" - }, - "network": { - "description": "The URL of a Compute Engine network to which the resources in the view belong.", - "type": "string" - }, - "resources": { - "description": "A list of all resources in the resource view.", - "items": { - "type": "string" - }, - "type": "array" - }, - "selfLink": { - "description": "[Output Only] A self-link to the resource view.", - "type": "string" - }, - "size": { - "description": "The total number of resources in the resource view.", - "format": "uint32", - "type": "integer" - } - }, - "type": "object" - }, - "ServiceEndpoint": { - "description": "The service endpoint that may be started in a VM.", - "id": "ServiceEndpoint", - "properties": { - "name": { - "description": "The name of the service endpoint.", - "type": "string" - }, - "port": { - "description": "The port of the service endpoint.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "ZoneViewsAddResourcesRequest": { - "description": "The request to add resources to the resource view.", - "id": "ZoneViewsAddResourcesRequest", - "properties": { - "resources": { - "description": "The list of resources to be added.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "ZoneViewsGetServiceResponse": { - "id": "ZoneViewsGetServiceResponse", - "properties": { - "endpoints": { - "description": "The service information.", - "items": { - "$ref": "ServiceEndpoint" - }, - "type": "array" - }, - "fingerprint": { - "description": "The fingerprint of the service information.", - "type": "string" - } - }, - "type": "object" - }, - "ZoneViewsList": { - "description": "The response to a list request.", - "id": "ZoneViewsList", - "properties": { - "items": { - "description": "The result that contains all resource views that meet the criteria.", - "items": { - "$ref": "ResourceView" - }, - "type": "array" - }, - "kind": { - "default": "resourceviews#zoneViewsList", - "description": "Type of resource.", - "type": "string" - }, - "nextPageToken": { - "description": "A token used for pagination.", - "type": "string" - }, - "selfLink": { - "description": "Server defined URL for this resource (output only).", - "type": "string" - } - }, - "type": "object" - }, - "ZoneViewsListResourcesResponse": { - "description": "The response to a list resource request.", - "id": "ZoneViewsListResourcesResponse", - "properties": { - "items": { - "description": "The formatted JSON that is requested by the user.", - "items": { - "$ref": "ListResourceResponseItem" - }, - "type": "array" - }, - "network": { - "description": "The URL of a Compute Engine network to which the resources in the view belong.", - "type": "string" - }, - "nextPageToken": { - "description": "A token used for pagination.", - "type": "string" - } - }, - "type": "object" - }, - "ZoneViewsRemoveResourcesRequest": { - "description": "The request to remove resources from the resource view.", - "id": "ZoneViewsRemoveResourcesRequest", - "properties": { - "resources": { - "description": "The list of resources to be removed.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "ZoneViewsSetServiceRequest": { - "id": "ZoneViewsSetServiceRequest", - "properties": { - "endpoints": { - "description": "The service information to be updated.", - "items": { - "$ref": "ServiceEndpoint" - }, - "type": "array" - }, - "fingerprint": { - "description": "Fingerprint of the service information; a hash of the contents. This field is used for optimistic locking when updating the service entries.", - "type": "string" - }, - "resourceName": { - "description": "The name of the resource if user wants to update the service information of the resource.", - "type": "string" - } - }, - "type": "object" - } - }, - "servicePath": "resourceviews/v1beta2/projects/", - "title": "Google Compute Engine Instance Groups API", - "version": "v1beta2" -} \ No newline at end of file
diff --git a/resourceviews/v1beta2/resourceviews-gen.go b/resourceviews/v1beta2/resourceviews-gen.go deleted file mode 100644 index fe2700b..0000000 --- a/resourceviews/v1beta2/resourceviews-gen.go +++ /dev/null
@@ -1,2722 +0,0 @@ -// Package resourceviews provides access to the Google Compute Engine Instance Groups API. -// -// See https://developers.google.com/compute/ -// -// Usage example: -// -// import "google.golang.org/api/resourceviews/v1beta2" -// ... -// resourceviewsService, err := resourceviews.New(oauthHttpClient) -package resourceviews // import "google.golang.org/api/resourceviews/v1beta2" - -import ( - "bytes" - "context" - "encoding/json" - "errors" - "fmt" - "io" - "net/http" - "net/url" - "strconv" - "strings" - - gensupport "google.golang.org/api/gensupport" - googleapi "google.golang.org/api/googleapi" -) - -// Always reference these packages, just in case the auto-generated code -// below doesn't. -var _ = bytes.NewBuffer -var _ = strconv.Itoa -var _ = fmt.Sprintf -var _ = json.NewDecoder -var _ = io.Copy -var _ = url.Parse -var _ = gensupport.MarshalJSON -var _ = googleapi.Version -var _ = errors.New -var _ = strings.Replace -var _ = context.Canceled - -const apiId = "resourceviews:v1beta2" -const apiName = "resourceviews" -const apiVersion = "v1beta2" -const basePath = "https://www.googleapis.com/resourceviews/v1beta2/projects/" - -// OAuth2 scopes used by this API. -const ( - // View and manage your data across Google Cloud Platform services - CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform" - - // View your data across Google Cloud Platform services - CloudPlatformReadOnlyScope = "https://www.googleapis.com/auth/cloud-platform.read-only" - - // View and manage your Google Compute Engine resources - ComputeScope = "https://www.googleapis.com/auth/compute" - - // View your Google Compute Engine resources - ComputeReadonlyScope = "https://www.googleapis.com/auth/compute.readonly" - - // View and manage your Google Cloud Platform management resources and - // deployment status information - NdevCloudmanScope = "https://www.googleapis.com/auth/ndev.cloudman" - - // View your Google Cloud Platform management resources and deployment - // status information - NdevCloudmanReadonlyScope = "https://www.googleapis.com/auth/ndev.cloudman.readonly" -) - -func New(client *http.Client) (*Service, error) { - if client == nil { - return nil, errors.New("client is nil") - } - s := &Service{client: client, BasePath: basePath} - s.ZoneOperations = NewZoneOperationsService(s) - s.ZoneViews = NewZoneViewsService(s) - return s, nil -} - -type Service struct { - client *http.Client - BasePath string // API endpoint base URL - UserAgent string // optional additional User-Agent fragment - - ZoneOperations *ZoneOperationsService - - ZoneViews *ZoneViewsService -} - -func (s *Service) userAgent() string { - if s.UserAgent == "" { - return googleapi.UserAgent - } - return googleapi.UserAgent + " " + s.UserAgent -} - -func NewZoneOperationsService(s *Service) *ZoneOperationsService { - rs := &ZoneOperationsService{s: s} - return rs -} - -type ZoneOperationsService struct { - s *Service -} - -func NewZoneViewsService(s *Service) *ZoneViewsService { - rs := &ZoneViewsService{s: s} - return rs -} - -type ZoneViewsService struct { - s *Service -} - -// Label: The Label to be applied to the resource views. -type Label struct { - // Key: Key of the label. - Key string `json:"key,omitempty"` - - // Value: Value of the label. - Value string `json:"value,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Key") 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. "Key") 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 *Label) MarshalJSON() ([]byte, error) { - type NoMethod Label - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// ListResourceResponseItem: The list response item that contains the -// resource and end points information. -type ListResourceResponseItem struct { - // Endpoints: The list of service end points on the resource. - Endpoints map[string][]int64 `json:"endpoints,omitempty"` - - // Resource: The full URL of the resource. - Resource string `json:"resource,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Endpoints") 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. "Endpoints") 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 *ListResourceResponseItem) MarshalJSON() ([]byte, error) { - type NoMethod ListResourceResponseItem - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// Operation: An operation resource, used to manage asynchronous API -// requests. -type Operation struct { - // ClientOperationId: [Output only] An optional identifier specified by - // the client when the mutation was initiated. Must be unique for all - // operation resources in the project. - ClientOperationId string `json:"clientOperationId,omitempty"` - - // CreationTimestamp: [Output Only] The time that this operation was - // requested, in RFC3339 text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - - // EndTime: [Output Only] The time that this operation was completed, in - // RFC3339 text format. - EndTime string `json:"endTime,omitempty"` - - // Error: [Output Only] If errors occurred during processing of this - // operation, this field will be populated. - Error *OperationError `json:"error,omitempty"` - - // HttpErrorMessage: [Output only] If operation fails, the HTTP error - // message returned. - HttpErrorMessage string `json:"httpErrorMessage,omitempty"` - - // HttpErrorStatusCode: [Output only] If operation fails, the HTTP error - // status code returned. - HttpErrorStatusCode int64 `json:"httpErrorStatusCode,omitempty"` - - // Id: [Output Only] Unique identifier for the resource, generated by - // the server. - Id uint64 `json:"id,omitempty,string"` - - // InsertTime: [Output Only] The time that this operation was requested, - // in RFC3339 text format. - InsertTime string `json:"insertTime,omitempty"` - - // Kind: [Output only] Type of the resource. - Kind string `json:"kind,omitempty"` - - // Name: [Output Only] Name of the resource. - Name string `json:"name,omitempty"` - - // OperationType: [Output only] Type of the operation. Operations - // include insert, update, and delete. - OperationType string `json:"operationType,omitempty"` - - // Progress: [Output only] An optional progress indicator that ranges - // from 0 to 100. There is no requirement that this be linear or support - // any granularity of operations. This should not be used to guess at - // when the operation will be complete. This number should be - // monotonically increasing as the operation progresses. - Progress int64 `json:"progress,omitempty"` - - // Region: [Output Only] URL of the region where the operation resides. - // Only available when performing regional operations. - Region string `json:"region,omitempty"` - - // SelfLink: [Output Only] Server-defined fully-qualified URL for this - // resource. - SelfLink string `json:"selfLink,omitempty"` - - // StartTime: [Output Only] The time that this operation was started by - // the server, in RFC3339 text format. - StartTime string `json:"startTime,omitempty"` - - // Status: [Output Only] Status of the operation. - Status string `json:"status,omitempty"` - - // StatusMessage: [Output Only] An optional textual description of the - // current status of the operation. - StatusMessage string `json:"statusMessage,omitempty"` - - // TargetId: [Output Only] Unique target ID which identifies a - // particular incarnation of the target. - TargetId uint64 `json:"targetId,omitempty,string"` - - // TargetLink: [Output only] URL of the resource the operation is - // mutating. - TargetLink string `json:"targetLink,omitempty"` - - // User: [Output Only] User who requested the operation, for example: - // user@example.com. - User string `json:"user,omitempty"` - - // Warnings: [Output Only] If there are issues with this operation, a - // warning is returned. - Warnings []*OperationWarnings `json:"warnings,omitempty"` - - // Zone: [Output Only] URL of the zone where the operation resides. Only - // available when performing per-zone operations. - Zone string `json:"zone,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "ClientOperationId") - // 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. "ClientOperationId") 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 *Operation) MarshalJSON() ([]byte, error) { - type NoMethod Operation - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// OperationError: [Output Only] If errors occurred during processing of -// this operation, this field will be populated. -type OperationError struct { - // Errors: [Output Only] The array of errors encountered while - // processing this operation. - Errors []*OperationErrorErrors `json:"errors,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Errors") 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. "Errors") 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 *OperationError) MarshalJSON() ([]byte, error) { - type NoMethod OperationError - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type OperationErrorErrors struct { - // Code: [Output Only] The error type identifier for this error. - Code string `json:"code,omitempty"` - - // Location: [Output Only] Indicates the field in the request which - // caused the error. This property is optional. - Location string `json:"location,omitempty"` - - // Message: [Output Only] An optional, human-readable error message. - Message string `json:"message,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Code") 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. "Code") 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 *OperationErrorErrors) MarshalJSON() ([]byte, error) { - type NoMethod OperationErrorErrors - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type OperationWarnings struct { - // Code: [Output only] The warning type identifier for this warning. - Code string `json:"code,omitempty"` - - // Data: [Output only] Metadata for this warning in key:value format. - Data []*OperationWarningsData `json:"data,omitempty"` - - // Message: [Output only] Optional human-readable details for this - // warning. - Message string `json:"message,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Code") 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. "Code") 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 *OperationWarnings) MarshalJSON() ([]byte, error) { - type NoMethod OperationWarnings - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type OperationWarningsData struct { - // Key: [Output Only] Metadata key for this warning. - Key string `json:"key,omitempty"` - - // Value: [Output Only] Metadata value for this warning. - Value string `json:"value,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Key") 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. "Key") 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 *OperationWarningsData) MarshalJSON() ([]byte, error) { - type NoMethod OperationWarningsData - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type OperationList struct { - // Id: Unique identifier for the resource; defined by the server (output - // only). - Id string `json:"id,omitempty"` - - // Items: The operation resources. - Items []*Operation `json:"items,omitempty"` - - // Kind: Type of resource. - Kind string `json:"kind,omitempty"` - - // NextPageToken: A token used to continue a truncated list request - // (output only). - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: Server defined URL for this resource (output only). - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") 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. "Id") 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 *OperationList) MarshalJSON() ([]byte, error) { - type NoMethod OperationList - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// ResourceView: The resource view object. -type ResourceView struct { - // CreationTimestamp: The creation time of the resource view. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - - // Description: The detailed description of the resource view. - Description string `json:"description,omitempty"` - - // Endpoints: Services endpoint information. - Endpoints []*ServiceEndpoint `json:"endpoints,omitempty"` - - // Fingerprint: The fingerprint of the service endpoint information. - Fingerprint string `json:"fingerprint,omitempty"` - - // Id: [Output Only] The ID of the resource view. - Id string `json:"id,omitempty"` - - // Kind: Type of the resource. - Kind string `json:"kind,omitempty"` - - // Labels: The labels for events. - Labels []*Label `json:"labels,omitempty"` - - // Name: The name of the resource view. - Name string `json:"name,omitempty"` - - // Network: The URL of a Compute Engine network to which the resources - // in the view belong. - Network string `json:"network,omitempty"` - - // Resources: A list of all resources in the resource view. - Resources []string `json:"resources,omitempty"` - - // SelfLink: [Output Only] A self-link to the resource view. - SelfLink string `json:"selfLink,omitempty"` - - // Size: The total number of resources in the resource view. - Size int64 `json:"size,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "CreationTimestamp") - // 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. "CreationTimestamp") 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 *ResourceView) MarshalJSON() ([]byte, error) { - type NoMethod ResourceView - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// ServiceEndpoint: The service endpoint that may be started in a VM. -type ServiceEndpoint struct { - // Name: The name of the service endpoint. - Name string `json:"name,omitempty"` - - // Port: The port of the service endpoint. - Port int64 `json:"port,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Name") 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. "Name") 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 *ServiceEndpoint) MarshalJSON() ([]byte, error) { - type NoMethod ServiceEndpoint - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// ZoneViewsAddResourcesRequest: The request to add resources to the -// resource view. -type ZoneViewsAddResourcesRequest struct { - // Resources: The list of resources to be added. - Resources []string `json:"resources,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Resources") 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. "Resources") 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 *ZoneViewsAddResourcesRequest) MarshalJSON() ([]byte, error) { - type NoMethod ZoneViewsAddResourcesRequest - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type ZoneViewsGetServiceResponse struct { - // Endpoints: The service information. - Endpoints []*ServiceEndpoint `json:"endpoints,omitempty"` - - // Fingerprint: The fingerprint of the service information. - Fingerprint string `json:"fingerprint,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Endpoints") 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. "Endpoints") 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 *ZoneViewsGetServiceResponse) MarshalJSON() ([]byte, error) { - type NoMethod ZoneViewsGetServiceResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// ZoneViewsList: The response to a list request. -type ZoneViewsList struct { - // Items: The result that contains all resource views that meet the - // criteria. - Items []*ResourceView `json:"items,omitempty"` - - // Kind: Type of resource. - Kind string `json:"kind,omitempty"` - - // NextPageToken: A token used for pagination. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: Server defined URL for this resource (output only). - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Items") 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. "Items") 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 *ZoneViewsList) MarshalJSON() ([]byte, error) { - type NoMethod ZoneViewsList - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// ZoneViewsListResourcesResponse: The response to a list resource -// request. -type ZoneViewsListResourcesResponse struct { - // Items: The formatted JSON that is requested by the user. - Items []*ListResourceResponseItem `json:"items,omitempty"` - - // Network: The URL of a Compute Engine network to which the resources - // in the view belong. - Network string `json:"network,omitempty"` - - // NextPageToken: A token used for pagination. - 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. "Items") 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. "Items") 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 *ZoneViewsListResourcesResponse) MarshalJSON() ([]byte, error) { - type NoMethod ZoneViewsListResourcesResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// ZoneViewsRemoveResourcesRequest: The request to remove resources from -// the resource view. -type ZoneViewsRemoveResourcesRequest struct { - // Resources: The list of resources to be removed. - Resources []string `json:"resources,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Resources") 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. "Resources") 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 *ZoneViewsRemoveResourcesRequest) MarshalJSON() ([]byte, error) { - type NoMethod ZoneViewsRemoveResourcesRequest - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type ZoneViewsSetServiceRequest struct { - // Endpoints: The service information to be updated. - Endpoints []*ServiceEndpoint `json:"endpoints,omitempty"` - - // Fingerprint: Fingerprint of the service information; a hash of the - // contents. This field is used for optimistic locking when updating the - // service entries. - Fingerprint string `json:"fingerprint,omitempty"` - - // ResourceName: The name of the resource if user wants to update the - // service information of the resource. - ResourceName string `json:"resourceName,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Endpoints") 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. "Endpoints") 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 *ZoneViewsSetServiceRequest) MarshalJSON() ([]byte, error) { - type NoMethod ZoneViewsSetServiceRequest - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// method id "resourceviews.zoneOperations.get": - -type ZoneOperationsGetCall struct { - s *Service - project string - zone string - operation string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Retrieves the specified zone-specific operation resource. -func (r *ZoneOperationsService) Get(project string, zone string, operation string) *ZoneOperationsGetCall { - c := &ZoneOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.operation = operation - 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 *ZoneOperationsGetCall) Fields(s ...googleapi.Field) *ZoneOperationsGetCall { - 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 *ZoneOperationsGetCall) IfNoneMatch(entityTag string) *ZoneOperationsGetCall { - 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 *ZoneOperationsGetCall) Context(ctx context.Context) *ZoneOperationsGetCall { - 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 *ZoneOperationsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ZoneOperationsGetCall) 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, "{project}/zones/{zone}/operations/{operation}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "operation": c.operation, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "resourceviews.zoneOperations.get" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.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 *ZoneOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, 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 := &Operation{ - 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": "Retrieves the specified zone-specific operation resource.", - // "httpMethod": "GET", - // "id": "resourceviews.zoneOperations.get", - // "parameterOrder": [ - // "project", - // "zone", - // "operation" - // ], - // "parameters": { - // "operation": { - // "description": "Name of the operation resource to return.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Name of the project scoping this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "Name of the zone scoping this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/operations/{operation}", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/cloud-platform.read-only", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly", - // "https://www.googleapis.com/auth/ndev.cloudman", - // "https://www.googleapis.com/auth/ndev.cloudman.readonly" - // ] - // } - -} - -// method id "resourceviews.zoneOperations.list": - -type ZoneOperationsListCall struct { - s *Service - project string - zone string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of operation resources contained within the -// specified zone. -func (r *ZoneOperationsService) List(project string, zone string) *ZoneOperationsListCall { - c := &ZoneOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - return c -} - -// Filter sets the optional parameter "filter": Filter expression for -// filtering listed resources. -func (c *ZoneOperationsListCall) Filter(filter string) *ZoneOperationsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": Maximum count of -// results to be returned. Maximum value is 500 and default value is -// 500. -func (c *ZoneOperationsListCall) MaxResults(maxResults int64) *ZoneOperationsListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// PageToken sets the optional parameter "pageToken": Tag returned by a -// previous list request truncated by maxResults. Used to continue a -// previous list request. -func (c *ZoneOperationsListCall) PageToken(pageToken string) *ZoneOperationsListCall { - 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 *ZoneOperationsListCall) Fields(s ...googleapi.Field) *ZoneOperationsListCall { - 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 *ZoneOperationsListCall) IfNoneMatch(entityTag string) *ZoneOperationsListCall { - 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 *ZoneOperationsListCall) Context(ctx context.Context) *ZoneOperationsListCall { - 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 *ZoneOperationsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ZoneOperationsListCall) 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, "{project}/zones/{zone}/operations") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "resourceviews.zoneOperations.list" call. -// Exactly one of *OperationList or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *OperationList.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 *ZoneOperationsListCall) Do(opts ...googleapi.CallOption) (*OperationList, 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 := &OperationList{ - 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": "Retrieves the list of operation resources contained within the specified zone.", - // "httpMethod": "GET", - // "id": "resourceviews.zoneOperations.list", - // "parameterOrder": [ - // "project", - // "zone" - // ], - // "parameters": { - // "filter": { - // "description": "Optional. Filter expression for filtering listed resources.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500.", - // "format": "uint32", - // "location": "query", - // "maximum": "500", - // "minimum": "0", - // "type": "integer" - // }, - // "pageToken": { - // "description": "Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Name of the project scoping this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "Name of the zone scoping this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/operations", - // "response": { - // "$ref": "OperationList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/cloud-platform.read-only", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly", - // "https://www.googleapis.com/auth/ndev.cloudman", - // "https://www.googleapis.com/auth/ndev.cloudman.readonly" - // ] - // } - -} - -// 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 *ZoneOperationsListCall) Pages(ctx context.Context, f func(*OperationList) 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 "resourceviews.zoneViews.addResources": - -type ZoneViewsAddResourcesCall struct { - s *Service - project string - zone string - resourceView string - zoneviewsaddresourcesrequest *ZoneViewsAddResourcesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// AddResources: Add resources to the view. -func (r *ZoneViewsService) AddResources(project string, zone string, resourceView string, zoneviewsaddresourcesrequest *ZoneViewsAddResourcesRequest) *ZoneViewsAddResourcesCall { - c := &ZoneViewsAddResourcesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.resourceView = resourceView - c.zoneviewsaddresourcesrequest = zoneviewsaddresourcesrequest - 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 *ZoneViewsAddResourcesCall) Fields(s ...googleapi.Field) *ZoneViewsAddResourcesCall { - 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 *ZoneViewsAddResourcesCall) Context(ctx context.Context) *ZoneViewsAddResourcesCall { - 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 *ZoneViewsAddResourcesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ZoneViewsAddResourcesCall) 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.zoneviewsaddresourcesrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/resourceViews/{resourceView}/addResources") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "resourceView": c.resourceView, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "resourceviews.zoneViews.addResources" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.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 *ZoneViewsAddResourcesCall) Do(opts ...googleapi.CallOption) (*Operation, 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 := &Operation{ - 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": "Add resources to the view.", - // "httpMethod": "POST", - // "id": "resourceviews.zoneViews.addResources", - // "parameterOrder": [ - // "project", - // "zone", - // "resourceView" - // ], - // "parameters": { - // "project": { - // "description": "The project name of the resource view.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "resourceView": { - // "description": "The name of the resource view.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "The zone name of the resource view.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/resourceViews/{resourceView}/addResources", - // "request": { - // "$ref": "ZoneViewsAddResourcesRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/ndev.cloudman" - // ] - // } - -} - -// method id "resourceviews.zoneViews.delete": - -type ZoneViewsDeleteCall struct { - s *Service - project string - zone string - resourceView string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Delete a resource view. -func (r *ZoneViewsService) Delete(project string, zone string, resourceView string) *ZoneViewsDeleteCall { - c := &ZoneViewsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.resourceView = resourceView - 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 *ZoneViewsDeleteCall) Fields(s ...googleapi.Field) *ZoneViewsDeleteCall { - 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 *ZoneViewsDeleteCall) Context(ctx context.Context) *ZoneViewsDeleteCall { - 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 *ZoneViewsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ZoneViewsDeleteCall) 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 - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/resourceViews/{resourceView}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("DELETE", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "resourceView": c.resourceView, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "resourceviews.zoneViews.delete" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.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 *ZoneViewsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, 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 := &Operation{ - 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": "Delete a resource view.", - // "httpMethod": "DELETE", - // "id": "resourceviews.zoneViews.delete", - // "parameterOrder": [ - // "project", - // "zone", - // "resourceView" - // ], - // "parameters": { - // "project": { - // "description": "The project name of the resource view.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "resourceView": { - // "description": "The name of the resource view.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "The zone name of the resource view.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/resourceViews/{resourceView}", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/ndev.cloudman" - // ] - // } - -} - -// method id "resourceviews.zoneViews.get": - -type ZoneViewsGetCall struct { - s *Service - project string - zone string - resourceView string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Get the information of a zonal resource view. -func (r *ZoneViewsService) Get(project string, zone string, resourceView string) *ZoneViewsGetCall { - c := &ZoneViewsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.resourceView = resourceView - 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 *ZoneViewsGetCall) Fields(s ...googleapi.Field) *ZoneViewsGetCall { - 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 *ZoneViewsGetCall) IfNoneMatch(entityTag string) *ZoneViewsGetCall { - 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 *ZoneViewsGetCall) Context(ctx context.Context) *ZoneViewsGetCall { - 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 *ZoneViewsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ZoneViewsGetCall) 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, "{project}/zones/{zone}/resourceViews/{resourceView}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "resourceView": c.resourceView, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "resourceviews.zoneViews.get" call. -// Exactly one of *ResourceView or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *ResourceView.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 *ZoneViewsGetCall) Do(opts ...googleapi.CallOption) (*ResourceView, 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 := &ResourceView{ - 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": "Get the information of a zonal resource view.", - // "httpMethod": "GET", - // "id": "resourceviews.zoneViews.get", - // "parameterOrder": [ - // "project", - // "zone", - // "resourceView" - // ], - // "parameters": { - // "project": { - // "description": "The project name of the resource view.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "resourceView": { - // "description": "The name of the resource view.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "The zone name of the resource view.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/resourceViews/{resourceView}", - // "response": { - // "$ref": "ResourceView" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/cloud-platform.read-only", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly", - // "https://www.googleapis.com/auth/ndev.cloudman", - // "https://www.googleapis.com/auth/ndev.cloudman.readonly" - // ] - // } - -} - -// method id "resourceviews.zoneViews.getService": - -type ZoneViewsGetServiceCall struct { - s *Service - project string - zone string - resourceView string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// GetService: Get the service information of a resource view or a -// resource. -func (r *ZoneViewsService) GetService(project string, zone string, resourceView string) *ZoneViewsGetServiceCall { - c := &ZoneViewsGetServiceCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.resourceView = resourceView - return c -} - -// ResourceName sets the optional parameter "resourceName": The name of -// the resource if user wants to get the service information of the -// resource. -func (c *ZoneViewsGetServiceCall) ResourceName(resourceName string) *ZoneViewsGetServiceCall { - c.urlParams_.Set("resourceName", resourceName) - 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 *ZoneViewsGetServiceCall) Fields(s ...googleapi.Field) *ZoneViewsGetServiceCall { - 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 *ZoneViewsGetServiceCall) Context(ctx context.Context) *ZoneViewsGetServiceCall { - 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 *ZoneViewsGetServiceCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ZoneViewsGetServiceCall) 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 - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/resourceViews/{resourceView}/getService") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "resourceView": c.resourceView, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "resourceviews.zoneViews.getService" call. -// Exactly one of *ZoneViewsGetServiceResponse or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *ZoneViewsGetServiceResponse.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 *ZoneViewsGetServiceCall) Do(opts ...googleapi.CallOption) (*ZoneViewsGetServiceResponse, 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 := &ZoneViewsGetServiceResponse{ - 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": "Get the service information of a resource view or a resource.", - // "httpMethod": "POST", - // "id": "resourceviews.zoneViews.getService", - // "parameterOrder": [ - // "project", - // "zone", - // "resourceView" - // ], - // "parameters": { - // "project": { - // "description": "The project name of the resource view.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "resourceName": { - // "description": "The name of the resource if user wants to get the service information of the resource.", - // "location": "query", - // "type": "string" - // }, - // "resourceView": { - // "description": "The name of the resource view.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "The zone name of the resource view.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/resourceViews/{resourceView}/getService", - // "response": { - // "$ref": "ZoneViewsGetServiceResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/ndev.cloudman" - // ] - // } - -} - -// method id "resourceviews.zoneViews.insert": - -type ZoneViewsInsertCall struct { - s *Service - project string - zone string - resourceview *ResourceView - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Create a resource view. -func (r *ZoneViewsService) Insert(project string, zone string, resourceview *ResourceView) *ZoneViewsInsertCall { - c := &ZoneViewsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.resourceview = resourceview - 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 *ZoneViewsInsertCall) Fields(s ...googleapi.Field) *ZoneViewsInsertCall { - 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 *ZoneViewsInsertCall) Context(ctx context.Context) *ZoneViewsInsertCall { - 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 *ZoneViewsInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ZoneViewsInsertCall) 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.resourceview) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/resourceViews") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "resourceviews.zoneViews.insert" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.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 *ZoneViewsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, 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 := &Operation{ - 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": "Create a resource view.", - // "httpMethod": "POST", - // "id": "resourceviews.zoneViews.insert", - // "parameterOrder": [ - // "project", - // "zone" - // ], - // "parameters": { - // "project": { - // "description": "The project name of the resource view.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "The zone name of the resource view.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/resourceViews", - // "request": { - // "$ref": "ResourceView" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/ndev.cloudman" - // ] - // } - -} - -// method id "resourceviews.zoneViews.list": - -type ZoneViewsListCall struct { - s *Service - project string - zone string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: List resource views. -func (r *ZoneViewsService) List(project string, zone string) *ZoneViewsListCall { - c := &ZoneViewsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - return c -} - -// MaxResults sets the optional parameter "maxResults": Maximum count of -// results to be returned. Acceptable values are 0 to 5000, inclusive. -// (Default: 5000) -func (c *ZoneViewsListCall) MaxResults(maxResults int64) *ZoneViewsListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a -// nextPageToken returned by a previous list request. This token can be -// used to request the next page of results from a previous list -// request. -func (c *ZoneViewsListCall) PageToken(pageToken string) *ZoneViewsListCall { - 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 *ZoneViewsListCall) Fields(s ...googleapi.Field) *ZoneViewsListCall { - 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 *ZoneViewsListCall) IfNoneMatch(entityTag string) *ZoneViewsListCall { - 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 *ZoneViewsListCall) Context(ctx context.Context) *ZoneViewsListCall { - 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 *ZoneViewsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ZoneViewsListCall) 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, "{project}/zones/{zone}/resourceViews") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "resourceviews.zoneViews.list" call. -// Exactly one of *ZoneViewsList or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *ZoneViewsList.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 *ZoneViewsListCall) Do(opts ...googleapi.CallOption) (*ZoneViewsList, 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 := &ZoneViewsList{ - 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": "List resource views.", - // "httpMethod": "GET", - // "id": "resourceviews.zoneViews.list", - // "parameterOrder": [ - // "project", - // "zone" - // ], - // "parameters": { - // "maxResults": { - // "default": "5000", - // "description": "Maximum count of results to be returned. Acceptable values are 0 to 5000, inclusive. (Default: 5000)", - // "format": "int32", - // "location": "query", - // "maximum": "5000", - // "minimum": "0", - // "type": "integer" - // }, - // "pageToken": { - // "description": "Specifies a nextPageToken returned by a previous list request. This token can be used to request the next page of results from a previous list request.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "The project name of the resource view.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "The zone name of the resource view.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/resourceViews", - // "response": { - // "$ref": "ZoneViewsList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/cloud-platform.read-only", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly", - // "https://www.googleapis.com/auth/ndev.cloudman", - // "https://www.googleapis.com/auth/ndev.cloudman.readonly" - // ] - // } - -} - -// 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 *ZoneViewsListCall) Pages(ctx context.Context, f func(*ZoneViewsList) 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 "resourceviews.zoneViews.listResources": - -type ZoneViewsListResourcesCall struct { - s *Service - project string - zone string - resourceView string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// ListResources: List the resources of the resource view. -func (r *ZoneViewsService) ListResources(project string, zone string, resourceView string) *ZoneViewsListResourcesCall { - c := &ZoneViewsListResourcesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.resourceView = resourceView - return c -} - -// Format sets the optional parameter "format": The requested format of -// the return value. It can be URL or URL_PORT. A JSON object will be -// included in the response based on the format. The default format is -// NONE, which results in no JSON in the response. -// -// Possible values: -// "NONE" -// "URL" -// "URL_PORT" -func (c *ZoneViewsListResourcesCall) Format(format string) *ZoneViewsListResourcesCall { - c.urlParams_.Set("format", format) - return c -} - -// ListState sets the optional parameter "listState": The state of the -// instance to list. By default, it lists all instances. -// -// Possible values: -// "ALL" (default) -// "RUNNING" -func (c *ZoneViewsListResourcesCall) ListState(listState string) *ZoneViewsListResourcesCall { - c.urlParams_.Set("listState", listState) - return c -} - -// MaxResults sets the optional parameter "maxResults": Maximum count of -// results to be returned. Acceptable values are 0 to 5000, inclusive. -// (Default: 5000) -func (c *ZoneViewsListResourcesCall) MaxResults(maxResults int64) *ZoneViewsListResourcesCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a -// nextPageToken returned by a previous list request. This token can be -// used to request the next page of results from a previous list -// request. -func (c *ZoneViewsListResourcesCall) PageToken(pageToken string) *ZoneViewsListResourcesCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ServiceName sets the optional parameter "serviceName": The service -// name to return in the response. It is optional and if it is not set, -// all the service end points will be returned. -func (c *ZoneViewsListResourcesCall) ServiceName(serviceName string) *ZoneViewsListResourcesCall { - c.urlParams_.Set("serviceName", serviceName) - 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 *ZoneViewsListResourcesCall) Fields(s ...googleapi.Field) *ZoneViewsListResourcesCall { - 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 *ZoneViewsListResourcesCall) IfNoneMatch(entityTag string) *ZoneViewsListResourcesCall { - 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 *ZoneViewsListResourcesCall) Context(ctx context.Context) *ZoneViewsListResourcesCall { - 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 *ZoneViewsListResourcesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ZoneViewsListResourcesCall) 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, "{project}/zones/{zone}/resourceViews/{resourceView}/resources") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "resourceView": c.resourceView, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "resourceviews.zoneViews.listResources" call. -// Exactly one of *ZoneViewsListResourcesResponse or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *ZoneViewsListResourcesResponse.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 *ZoneViewsListResourcesCall) Do(opts ...googleapi.CallOption) (*ZoneViewsListResourcesResponse, 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 := &ZoneViewsListResourcesResponse{ - 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": "List the resources of the resource view.", - // "httpMethod": "GET", - // "id": "resourceviews.zoneViews.listResources", - // "parameterOrder": [ - // "project", - // "zone", - // "resourceView" - // ], - // "parameters": { - // "format": { - // "description": "The requested format of the return value. It can be URL or URL_PORT. A JSON object will be included in the response based on the format. The default format is NONE, which results in no JSON in the response.", - // "enum": [ - // "NONE", - // "URL", - // "URL_PORT" - // ], - // "enumDescriptions": [ - // "", - // "", - // "" - // ], - // "location": "query", - // "type": "string" - // }, - // "listState": { - // "default": "ALL", - // "description": "The state of the instance to list. By default, it lists all instances.", - // "enum": [ - // "ALL", - // "RUNNING" - // ], - // "enumDescriptions": [ - // "", - // "" - // ], - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "5000", - // "description": "Maximum count of results to be returned. Acceptable values are 0 to 5000, inclusive. (Default: 5000)", - // "format": "int32", - // "location": "query", - // "maximum": "5000", - // "minimum": "0", - // "type": "integer" - // }, - // "pageToken": { - // "description": "Specifies a nextPageToken returned by a previous list request. This token can be used to request the next page of results from a previous list request.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "The project name of the resource view.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "resourceView": { - // "description": "The name of the resource view.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "serviceName": { - // "description": "The service name to return in the response. It is optional and if it is not set, all the service end points will be returned.", - // "location": "query", - // "type": "string" - // }, - // "zone": { - // "description": "The zone name of the resource view.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/resourceViews/{resourceView}/resources", - // "response": { - // "$ref": "ZoneViewsListResourcesResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/cloud-platform.read-only", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly", - // "https://www.googleapis.com/auth/ndev.cloudman", - // "https://www.googleapis.com/auth/ndev.cloudman.readonly" - // ] - // } - -} - -// 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 *ZoneViewsListResourcesCall) Pages(ctx context.Context, f func(*ZoneViewsListResourcesResponse) 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 "resourceviews.zoneViews.removeResources": - -type ZoneViewsRemoveResourcesCall struct { - s *Service - project string - zone string - resourceView string - zoneviewsremoveresourcesrequest *ZoneViewsRemoveResourcesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// RemoveResources: Remove resources from the view. -func (r *ZoneViewsService) RemoveResources(project string, zone string, resourceView string, zoneviewsremoveresourcesrequest *ZoneViewsRemoveResourcesRequest) *ZoneViewsRemoveResourcesCall { - c := &ZoneViewsRemoveResourcesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.resourceView = resourceView - c.zoneviewsremoveresourcesrequest = zoneviewsremoveresourcesrequest - 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 *ZoneViewsRemoveResourcesCall) Fields(s ...googleapi.Field) *ZoneViewsRemoveResourcesCall { - 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 *ZoneViewsRemoveResourcesCall) Context(ctx context.Context) *ZoneViewsRemoveResourcesCall { - 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 *ZoneViewsRemoveResourcesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ZoneViewsRemoveResourcesCall) 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.zoneviewsremoveresourcesrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/resourceViews/{resourceView}/removeResources") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "resourceView": c.resourceView, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "resourceviews.zoneViews.removeResources" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.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 *ZoneViewsRemoveResourcesCall) Do(opts ...googleapi.CallOption) (*Operation, 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 := &Operation{ - 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": "Remove resources from the view.", - // "httpMethod": "POST", - // "id": "resourceviews.zoneViews.removeResources", - // "parameterOrder": [ - // "project", - // "zone", - // "resourceView" - // ], - // "parameters": { - // "project": { - // "description": "The project name of the resource view.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "resourceView": { - // "description": "The name of the resource view.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "The zone name of the resource view.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/resourceViews/{resourceView}/removeResources", - // "request": { - // "$ref": "ZoneViewsRemoveResourcesRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/ndev.cloudman" - // ] - // } - -} - -// method id "resourceviews.zoneViews.setService": - -type ZoneViewsSetServiceCall struct { - s *Service - project string - zone string - resourceView string - zoneviewssetservicerequest *ZoneViewsSetServiceRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetService: Update the service information of a resource view or a -// resource. -func (r *ZoneViewsService) SetService(project string, zone string, resourceView string, zoneviewssetservicerequest *ZoneViewsSetServiceRequest) *ZoneViewsSetServiceCall { - c := &ZoneViewsSetServiceCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.resourceView = resourceView - c.zoneviewssetservicerequest = zoneviewssetservicerequest - 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 *ZoneViewsSetServiceCall) Fields(s ...googleapi.Field) *ZoneViewsSetServiceCall { - 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 *ZoneViewsSetServiceCall) Context(ctx context.Context) *ZoneViewsSetServiceCall { - 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 *ZoneViewsSetServiceCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ZoneViewsSetServiceCall) 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.zoneviewssetservicerequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/resourceViews/{resourceView}/setService") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "resourceView": c.resourceView, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "resourceviews.zoneViews.setService" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.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 *ZoneViewsSetServiceCall) Do(opts ...googleapi.CallOption) (*Operation, 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 := &Operation{ - 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": "Update the service information of a resource view or a resource.", - // "httpMethod": "POST", - // "id": "resourceviews.zoneViews.setService", - // "parameterOrder": [ - // "project", - // "zone", - // "resourceView" - // ], - // "parameters": { - // "project": { - // "description": "The project name of the resource view.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "resourceView": { - // "description": "The name of the resource view.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "The zone name of the resource view.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/resourceViews/{resourceView}/setService", - // "request": { - // "$ref": "ZoneViewsSetServiceRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/ndev.cloudman" - // ] - // } - -}
diff --git a/sqladmin/v1beta3/sqladmin-api.json b/sqladmin/v1beta3/sqladmin-api.json deleted file mode 100644 index 64fc88f..0000000 --- a/sqladmin/v1beta3/sqladmin-api.json +++ /dev/null
@@ -1,1978 +0,0 @@ -{ - "auth": { - "oauth2": { - "scopes": { - "https://www.googleapis.com/auth/cloud-platform": { - "description": "View and manage your data across Google Cloud Platform services" - }, - "https://www.googleapis.com/auth/sqlservice.admin": { - "description": "Manage your Google SQL Service instances" - } - } - } - }, - "basePath": "/sql/v1beta3/", - "baseUrl": "https://www.googleapis.com/sql/v1beta3/", - "batchPath": "batch/sqladmin/v1beta3", - "canonicalName": "SQL Admin", - "description": "Cloud SQL provides the Cloud SQL Admin API, a REST API for administering your instances programmatically.", - "discoveryVersion": "v1", - "documentationLink": "https://cloud.google.com/sql/docs/reference/latest", - "etag": "\"J3WqvAcMk4eQjJXvfSI4Yr8VouA/FJoyLLk1UZU_9svJI62d3hhQYlA\"", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "id": "sqladmin:v1beta3", - "kind": "discovery#restDescription", - "name": "sqladmin", - "ownerDomain": "google.com", - "ownerName": "Google", - "parameters": { - "alt": { - "default": "json", - "description": "Data format for the response.", - "enum": [ - "json" - ], - "enumDescriptions": [ - "Responses with Content-Type of application/json" - ], - "location": "query", - "type": "string" - }, - "fields": { - "description": "Selector specifying which fields to include in a partial response.", - "location": "query", - "type": "string" - }, - "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" - }, - "oauth_token": { - "description": "OAuth 2.0 token for the current user.", - "location": "query", - "type": "string" - }, - "prettyPrint": { - "default": "true", - "description": "Returns response with indentations and line breaks.", - "location": "query", - "type": "boolean" - }, - "quotaUser": { - "description": "An opaque string that represents a user for quota purposes. Must not exceed 40 characters.", - "location": "query", - "type": "string" - }, - "userIp": { - "description": "Deprecated. Please use quotaUser instead.", - "location": "query", - "type": "string" - } - }, - "protocol": "rest", - "resources": { - "backupRuns": { - "methods": { - "get": { - "description": "Retrieves information about a specified backup run for a Cloud SQL instance.", - "httpMethod": "GET", - "id": "sql.backupRuns.get", - "parameterOrder": [ - "project", - "instance", - "backupConfiguration", - "dueTime" - ], - "parameters": { - "backupConfiguration": { - "description": "Identifier for the backup configuration. This gets generated automatically when a backup configuration is created.", - "location": "path", - "required": true, - "type": "string" - }, - "dueTime": { - "description": "The start time of the four-hour backup window. The backup can occur any time in the window. The time is in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.", - "location": "query", - "required": true, - "type": "string" - }, - "instance": { - "description": "Cloud SQL instance ID. This does not include the project ID.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID of the project that contains the instance.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/instances/{instance}/backupRuns/{backupConfiguration}", - "response": { - "$ref": "BackupRun" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/sqlservice.admin" - ] - }, - "list": { - "description": "Lists all backup runs associated with a Cloud SQL instance.", - "httpMethod": "GET", - "id": "sql.backupRuns.list", - "parameterOrder": [ - "project", - "instance", - "backupConfiguration" - ], - "parameters": { - "backupConfiguration": { - "description": "Identifier for the backup configuration. This gets generated automatically when a backup configuration is created.", - "location": "query", - "required": true, - "type": "string" - }, - "instance": { - "description": "Cloud SQL instance ID. This does not include the project ID.", - "location": "path", - "required": true, - "type": "string" - }, - "maxResults": { - "description": "Maximum number of backup runs per response.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "pageToken": { - "description": "A previously-returned page token representing part of the larger set of results to view.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID of the project that contains the instance.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/instances/{instance}/backupRuns", - "response": { - "$ref": "BackupRunsListResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/sqlservice.admin" - ] - } - } - }, - "flags": { - "methods": { - "list": { - "description": "Lists all database flags that can be set for Google Cloud SQL instances.", - "httpMethod": "GET", - "id": "sql.flags.list", - "path": "flags", - "response": { - "$ref": "FlagsListResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/sqlservice.admin" - ] - } - } - }, - "instances": { - "methods": { - "clone": { - "description": "Creates a Cloud SQL instance as a clone of a source instance.", - "httpMethod": "POST", - "id": "sql.instances.clone", - "parameterOrder": [ - "project" - ], - "parameters": { - "project": { - "description": "Project ID of the source as well as the clone Cloud SQL instance.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/instances/clone", - "request": { - "$ref": "InstancesCloneRequest" - }, - "response": { - "$ref": "InstancesCloneResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/sqlservice.admin" - ] - }, - "delete": { - "description": "Deletes a Cloud SQL instance.", - "httpMethod": "DELETE", - "id": "sql.instances.delete", - "parameterOrder": [ - "project", - "instance" - ], - "parameters": { - "instance": { - "description": "Cloud SQL instance ID. This does not include the project ID.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID of the project that contains the instance to be deleted.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/instances/{instance}", - "response": { - "$ref": "InstancesDeleteResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/sqlservice.admin" - ] - }, - "export": { - "description": "Exports data from a Cloud SQL instance to a Google Cloud Storage bucket as a MySQL dump file.", - "httpMethod": "POST", - "id": "sql.instances.export", - "parameterOrder": [ - "project", - "instance" - ], - "parameters": { - "instance": { - "description": "Cloud SQL instance ID. This does not include the project ID.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID of the project that contains the instance to be exported.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/instances/{instance}/export", - "request": { - "$ref": "InstancesExportRequest" - }, - "response": { - "$ref": "InstancesExportResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "get": { - "description": "Retrieves information about a Cloud SQL instance.", - "httpMethod": "GET", - "id": "sql.instances.get", - "parameterOrder": [ - "project", - "instance" - ], - "parameters": { - "instance": { - "description": "Database instance ID. This does not include the project ID.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID of the project that contains the instance.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/instances/{instance}", - "response": { - "$ref": "DatabaseInstance" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/sqlservice.admin" - ] - }, - "import": { - "description": "Imports data into a Cloud SQL instance from a MySQL dump file stored in a Google Cloud Storage bucket.", - "httpMethod": "POST", - "id": "sql.instances.import", - "parameterOrder": [ - "project", - "instance" - ], - "parameters": { - "instance": { - "description": "Cloud SQL instance ID. This does not include the project ID.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID of the project that contains the instance.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/instances/{instance}/import", - "request": { - "$ref": "InstancesImportRequest" - }, - "response": { - "$ref": "InstancesImportResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "insert": { - "description": "Creates a new Cloud SQL instance.", - "httpMethod": "POST", - "id": "sql.instances.insert", - "parameterOrder": [ - "project" - ], - "parameters": { - "project": { - "description": "Project ID of the project to which the newly created Cloud SQL instances should belong.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/instances", - "request": { - "$ref": "DatabaseInstance" - }, - "response": { - "$ref": "InstancesInsertResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/sqlservice.admin" - ] - }, - "list": { - "description": "Lists instances for a given project, in alphabetical order by instance name.", - "httpMethod": "GET", - "id": "sql.instances.list", - "parameterOrder": [ - "project" - ], - "parameters": { - "maxResults": { - "description": "The maximum number of results to return per response.", - "format": "uint32", - "location": "query", - "type": "integer" - }, - "pageToken": { - "description": "A previously-returned page token representing part of the larger set of results to view.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID of the project for which to list Cloud SQL instances.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/instances", - "response": { - "$ref": "InstancesListResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/sqlservice.admin" - ] - }, - "patch": { - "description": "Updates the settings of a Cloud SQL instance. This method supports patch semantics.", - "httpMethod": "PATCH", - "id": "sql.instances.patch", - "parameterOrder": [ - "project", - "instance" - ], - "parameters": { - "instance": { - "description": "Cloud SQL instance ID. This does not include the project ID.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID of the project that contains the instance.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/instances/{instance}", - "request": { - "$ref": "DatabaseInstance" - }, - "response": { - "$ref": "InstancesUpdateResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/sqlservice.admin" - ] - }, - "promoteReplica": { - "description": "Promotes the read replica instance to be a stand-alone Cloud SQL instance.", - "httpMethod": "POST", - "id": "sql.instances.promoteReplica", - "parameterOrder": [ - "project", - "instance" - ], - "parameters": { - "instance": { - "description": "Cloud SQL read replica instance name.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "ID of the project that contains the read replica.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/instances/{instance}/promoteReplica", - "response": { - "$ref": "InstancesPromoteReplicaResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/sqlservice.admin" - ] - }, - "resetSslConfig": { - "description": "Deletes all client certificates and generates a new server SSL certificate for a Cloud SQL instance.", - "httpMethod": "POST", - "id": "sql.instances.resetSslConfig", - "parameterOrder": [ - "project", - "instance" - ], - "parameters": { - "instance": { - "description": "Cloud SQL instance ID. This does not include the project ID.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID of the project that contains the instance.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/instances/{instance}/resetSslConfig", - "response": { - "$ref": "InstancesResetSslConfigResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/sqlservice.admin" - ] - }, - "restart": { - "description": "Restarts a Cloud SQL instance.", - "httpMethod": "POST", - "id": "sql.instances.restart", - "parameterOrder": [ - "project", - "instance" - ], - "parameters": { - "instance": { - "description": "Cloud SQL instance ID. This does not include the project ID.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID of the project that contains the instance to be restarted.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/instances/{instance}/restart", - "response": { - "$ref": "InstancesRestartResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/sqlservice.admin" - ] - }, - "restoreBackup": { - "description": "Restores a backup of a Cloud SQL instance.", - "httpMethod": "POST", - "id": "sql.instances.restoreBackup", - "parameterOrder": [ - "project", - "instance", - "backupConfiguration", - "dueTime" - ], - "parameters": { - "backupConfiguration": { - "description": "The identifier of the backup configuration. This gets generated automatically when a backup configuration is created.", - "location": "query", - "required": true, - "type": "string" - }, - "dueTime": { - "description": "The start time of the four-hour backup window. The backup can occur any time in the window. The time is in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.", - "location": "query", - "required": true, - "type": "string" - }, - "instance": { - "description": "Cloud SQL instance ID. This does not include the project ID.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID of the project that contains the instance.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/instances/{instance}/restoreBackup", - "response": { - "$ref": "InstancesRestoreBackupResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/sqlservice.admin" - ] - }, - "setRootPassword": { - "description": "Sets the password for the root user of the specified Cloud SQL instance.", - "httpMethod": "POST", - "id": "sql.instances.setRootPassword", - "parameterOrder": [ - "project", - "instance" - ], - "parameters": { - "instance": { - "description": "Cloud SQL instance ID. This does not include the project ID.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID of the project that contains the instance.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/instances/{instance}/setRootPassword", - "request": { - "$ref": "InstanceSetRootPasswordRequest" - }, - "response": { - "$ref": "InstancesSetRootPasswordResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/sqlservice.admin" - ] - }, - "update": { - "description": "Updates the settings of a Cloud SQL instance.", - "etagRequired": true, - "httpMethod": "PUT", - "id": "sql.instances.update", - "parameterOrder": [ - "project", - "instance" - ], - "parameters": { - "instance": { - "description": "Cloud SQL instance ID. This does not include the project ID.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID of the project that contains the instance.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/instances/{instance}", - "request": { - "$ref": "DatabaseInstance" - }, - "response": { - "$ref": "InstancesUpdateResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/sqlservice.admin" - ] - } - } - }, - "operations": { - "methods": { - "get": { - "description": "Retrieves information about a specific operation that was performed on a Cloud SQL instance.", - "httpMethod": "GET", - "id": "sql.operations.get", - "parameterOrder": [ - "project", - "instance", - "operation" - ], - "parameters": { - "instance": { - "description": "Cloud SQL instance ID. This does not include the project ID.", - "location": "path", - "required": true, - "type": "string" - }, - "operation": { - "description": "Instance operation ID.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID of the project that contains the instance.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/instances/{instance}/operations/{operation}", - "response": { - "$ref": "InstanceOperation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/sqlservice.admin" - ] - }, - "list": { - "description": "Lists all operations that have been performed on a Cloud SQL instance.", - "httpMethod": "GET", - "id": "sql.operations.list", - "parameterOrder": [ - "project", - "instance" - ], - "parameters": { - "instance": { - "description": "Cloud SQL instance ID. This does not include the project ID.", - "location": "path", - "required": true, - "type": "string" - }, - "maxResults": { - "description": "Maximum number of operations per response.", - "format": "uint32", - "location": "query", - "type": "integer" - }, - "pageToken": { - "description": "A previously-returned page token representing part of the larger set of results to view.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID of the project that contains the instance.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/instances/{instance}/operations", - "response": { - "$ref": "OperationsListResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/sqlservice.admin" - ] - } - } - }, - "sslCerts": { - "methods": { - "delete": { - "description": "Deletes an SSL certificate from a Cloud SQL instance.", - "httpMethod": "DELETE", - "id": "sql.sslCerts.delete", - "parameterOrder": [ - "project", - "instance", - "sha1Fingerprint" - ], - "parameters": { - "instance": { - "description": "Cloud SQL instance ID. This does not include the project ID.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID of the project that contains the instance to be deleted.", - "location": "path", - "required": true, - "type": "string" - }, - "sha1Fingerprint": { - "description": "Sha1 FingerPrint.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/instances/{instance}/sslCerts/{sha1Fingerprint}", - "response": { - "$ref": "SslCertsDeleteResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/sqlservice.admin" - ] - }, - "get": { - "description": "Retrieves an SSL certificate as specified by its SHA-1 fingerprint.", - "httpMethod": "GET", - "id": "sql.sslCerts.get", - "parameterOrder": [ - "project", - "instance", - "sha1Fingerprint" - ], - "parameters": { - "instance": { - "description": "Cloud SQL instance ID. This does not include the project ID.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID of the project that contains the instance.", - "location": "path", - "required": true, - "type": "string" - }, - "sha1Fingerprint": { - "description": "Sha1 FingerPrint.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/instances/{instance}/sslCerts/{sha1Fingerprint}", - "response": { - "$ref": "SslCert" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/sqlservice.admin" - ] - }, - "insert": { - "description": "Creates an SSL certificate and returns the certificate, the associated private key, and the server certificate authority.", - "httpMethod": "POST", - "id": "sql.sslCerts.insert", - "parameterOrder": [ - "project", - "instance" - ], - "parameters": { - "instance": { - "description": "Cloud SQL instance ID. This does not include the project ID.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID of the project to which the newly created Cloud SQL instances should belong.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/instances/{instance}/sslCerts", - "request": { - "$ref": "SslCertsInsertRequest" - }, - "response": { - "$ref": "SslCertsInsertResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/sqlservice.admin" - ] - }, - "list": { - "description": "Lists all of the current SSL certificates defined for a Cloud SQL instance.", - "httpMethod": "GET", - "id": "sql.sslCerts.list", - "parameterOrder": [ - "project", - "instance" - ], - "parameters": { - "instance": { - "description": "Cloud SQL instance ID. This does not include the project ID.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID of the project for which to list Cloud SQL instances.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/instances/{instance}/sslCerts", - "response": { - "$ref": "SslCertsListResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/sqlservice.admin" - ] - } - } - }, - "tiers": { - "methods": { - "list": { - "description": "Lists service tiers that can be used to create Google Cloud SQL instances.", - "httpMethod": "GET", - "id": "sql.tiers.list", - "parameterOrder": [ - "project" - ], - "parameters": { - "project": { - "description": "Project ID of the project for which to list tiers.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/tiers", - "response": { - "$ref": "TiersListResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/sqlservice.admin" - ] - } - } - } - }, - "rootUrl": "https://www.googleapis.com/", - "schemas": { - "BackupConfiguration": { - "description": "Database instance backup configuration.", - "id": "BackupConfiguration", - "properties": { - "binaryLogEnabled": { - "description": "Whether binary log is enabled. If backup configuration is disabled, binary log must be disabled as well.", - "type": "boolean" - }, - "enabled": { - "description": "Whether this configuration is enabled.", - "type": "boolean" - }, - "id": { - "description": "Identifier for this configuration. This gets generated automatically when a backup configuration is created.", - "type": "string" - }, - "kind": { - "default": "sql#backupConfiguration", - "description": "This is always sql#backupConfiguration.", - "type": "string" - }, - "replicationLogArchivingEnabled": { - "description": "Whether replication log archiving is enabled. Replication log archiving is required for the point-in-time recovery (PITR) feature. PostgreSQL instances only.", - "type": "boolean" - }, - "startTime": { - "description": "Start time for the daily backup configuration in UTC timezone in the 24 hour format - HH:MM.", - "type": "string" - } - }, - "type": "object" - }, - "BackupRun": { - "description": "A database instance backup run resource.", - "id": "BackupRun", - "properties": { - "backupConfiguration": { - "description": "Backup Configuration identifier.", - "type": "string" - }, - "dueTime": { - "description": "The due time of this run in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.", - "format": "date-time", - "type": "string" - }, - "endTime": { - "description": "The time the backup operation completed in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.", - "format": "date-time", - "type": "string" - }, - "enqueuedTime": { - "description": "The time the run was enqueued in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.", - "format": "date-time", - "type": "string" - }, - "error": { - "$ref": "OperationError", - "description": "Information about why the backup operation failed. This is only present if the run has the FAILED status." - }, - "instance": { - "description": "Name of the database instance.", - "type": "string" - }, - "kind": { - "default": "sql#backupRun", - "description": "This is always sql#backupRun.", - "type": "string" - }, - "startTime": { - "description": "The time the backup operation actually started in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.", - "format": "date-time", - "type": "string" - }, - "status": { - "description": "The status of this run.", - "type": "string" - } - }, - "type": "object" - }, - "BackupRunsListResponse": { - "description": "Backup run list results.", - "id": "BackupRunsListResponse", - "properties": { - "items": { - "description": "A list of backup runs in reverse chronological order of the enqueued time.", - "items": { - "$ref": "BackupRun" - }, - "type": "array" - }, - "kind": { - "default": "sql#backupRunsList", - "description": "This is always sql#backupRunsList.", - "type": "string" - }, - "nextPageToken": { - "description": "The continuation token, used to page through large result sets. Provide this value in a subsequent request to return the next page of results.", - "type": "string" - } - }, - "type": "object" - }, - "BinLogCoordinates": { - "description": "Binary log coordinates.", - "id": "BinLogCoordinates", - "properties": { - "binLogFileName": { - "description": "Name of the binary log file for a Cloud SQL instance.", - "type": "string" - }, - "binLogPosition": { - "description": "Position (offset) within the binary log file.", - "format": "int64", - "type": "string" - }, - "kind": { - "default": "sql#binLogCoordinates", - "description": "This is always sql#binLogCoordinates.", - "type": "string" - } - }, - "type": "object" - }, - "CloneContext": { - "description": "Database instance clone context.", - "id": "CloneContext", - "properties": { - "binLogCoordinates": { - "$ref": "BinLogCoordinates", - "description": "Binary log coordinates, if specified, indentify the position up to which the source instance should be cloned. If not specified, the source instance is cloned up to the most recent binary log coordinates." - }, - "destinationInstanceName": { - "description": "Name of the Cloud SQL instance to be created as a clone.", - "type": "string" - }, - "kind": { - "default": "sql#cloneContext", - "description": "This is always sql#cloneContext.", - "type": "string" - }, - "pitrTimestampMs": { - "description": "The epoch timestamp, in milliseconds, of the time to which a point-in-time recovery (PITR) is performed. PostgreSQL instances only. For MySQL instances, use the binLogCoordinates property.", - "format": "int64", - "type": "string" - }, - "sourceInstanceName": { - "description": "Name of the Cloud SQL instance to be cloned.", - "type": "string" - } - }, - "type": "object" - }, - "DatabaseFlags": { - "description": "MySQL flags for Cloud SQL instances.", - "id": "DatabaseFlags", - "properties": { - "name": { - "description": "The name of the flag. These flags are passed at instance startup, so include both MySQL server options and MySQL system variables. Flags should be specified with underscores, not hyphens. For more information, see Configuring MySQL Flags in the Google Cloud SQL documentation, as well as the official MySQL documentation for server options and system variables.", - "type": "string" - }, - "value": { - "description": "The value of the flag. Booleans should be set to on for true and off for false. This field must be omitted if the flag doesn't take a value.", - "type": "string" - } - }, - "type": "object" - }, - "DatabaseInstance": { - "description": "A Cloud SQL instance resource.", - "id": "DatabaseInstance", - "properties": { - "connectionName": { - "description": "Connection name of the Cloud SQL instance used in connection strings.", - "type": "string" - }, - "currentDiskSize": { - "description": "The current disk usage of the instance in bytes.", - "format": "int64", - "type": "string" - }, - "databaseVersion": { - "description": "The database engine type and version. Can be MYSQL_5_5 or MYSQL_5_6. Defaults to MYSQL_5_5. The databaseVersion cannot be changed after instance creation.", - "type": "string" - }, - "etag": { - "description": "HTTP 1.1 Entity tag for the resource.", - "type": "string" - }, - "instance": { - "annotations": { - "required": [ - "sql.instances.insert", - "sql.instances.update" - ] - }, - "description": "Name of the Cloud SQL instance. This does not include the project ID.", - "type": "string" - }, - "instanceType": { - "description": "The instance type. This can be one of the following.\nCLOUD_SQL_INSTANCE: Regular Cloud SQL instance.\nREAD_REPLICA_INSTANCE: Cloud SQL instance acting as a read-replica.", - "type": "string" - }, - "ipAddresses": { - "description": "The assigned IP addresses for the instance.", - "items": { - "$ref": "IpMapping" - }, - "type": "array" - }, - "ipv6Address": { - "description": "The IPv6 address assigned to the instance.", - "type": "string" - }, - "kind": { - "default": "sql#instance", - "description": "This is always sql#instance.", - "type": "string" - }, - "masterInstanceName": { - "description": "The name of the instance which will act as master in the replication setup.", - "type": "string" - }, - "maxDiskSize": { - "description": "The maximum disk size of the instance in bytes.", - "format": "int64", - "type": "string" - }, - "project": { - "annotations": { - "required": [ - "sql.instances.insert", - "sql.instances.update" - ] - }, - "description": "The project ID of the project containing the Cloud SQL instance. The Google apps domain is prefixed if applicable.", - "type": "string" - }, - "region": { - "description": "The geographical region. Can be us-central, asia-east1 or europe-west1. Defaults to us-central. The region can not be changed after instance creation.", - "type": "string" - }, - "replicaNames": { - "description": "The replicas of the instance.", - "items": { - "type": "string" - }, - "type": "array" - }, - "serverCaCert": { - "$ref": "SslCert", - "description": "SSL configuration." - }, - "serviceAccountEmailAddress": { - "description": "The service account email address assigned to the instance.", - "type": "string" - }, - "settings": { - "$ref": "Settings", - "description": "The user settings." - }, - "state": { - "description": "The current serving state of the Cloud SQL instance. This can be one of the following.\nRUNNABLE: The instance is running, or is ready to run when accessed.\nSUSPENDED: The instance is not available, for example due to problems with billing.\nPENDING_CREATE: The instance is being created.\nMAINTENANCE: The instance is down for maintenance.\nUNKNOWN_STATE: The state of the instance is unknown.", - "type": "string" - } - }, - "type": "object" - }, - "ExportContext": { - "description": "Database instance export context.", - "id": "ExportContext", - "properties": { - "database": { - "description": "Databases (for example, guestbook) from which the export is made. If unspecified, all databases are exported.", - "items": { - "type": "string" - }, - "type": "array" - }, - "kind": { - "default": "sql#exportContext", - "description": "This is always sql#exportContext.", - "type": "string" - }, - "table": { - "description": "Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database.", - "items": { - "type": "string" - }, - "type": "array" - }, - "uri": { - "description": "The path to the file in Google Cloud Storage where the export will be stored, or where it was already stored. The URI is in the form gs://bucketName/fileName. If the file already exists, the operation fails. If the filename ends with .gz, the contents are compressed.", - "type": "string" - } - }, - "type": "object" - }, - "Flag": { - "description": "A Google Cloud SQL service flag resource.", - "id": "Flag", - "properties": { - "allowedStringValues": { - "description": "For STRING flags, a list of strings that the value can be set to.", - "items": { - "type": "string" - }, - "type": "array" - }, - "appliesTo": { - "description": "The database version this flag applies to. Currently this can only be [MYSQL_5_5].", - "items": { - "type": "string" - }, - "type": "array" - }, - "kind": { - "default": "sql#flag", - "description": "This is always sql#flag.", - "type": "string" - }, - "maxValue": { - "description": "For INTEGER flags, the maximum allowed value.", - "format": "int64", - "type": "string" - }, - "minValue": { - "description": "For INTEGER flags, the minimum allowed value.", - "format": "int64", - "type": "string" - }, - "name": { - "description": "This is the name of the flag. Flag names always use underscores, not hyphens, e.g. max_allowed_packet", - "type": "string" - }, - "type": { - "description": "The type of the flag. Flags are typed to being BOOLEAN, STRING, INTEGER or NONE. NONE is used for flags which do not take a value, such as skip_grant_tables.", - "type": "string" - } - }, - "type": "object" - }, - "FlagsListResponse": { - "description": "Flags list response.", - "id": "FlagsListResponse", - "properties": { - "items": { - "description": "List of flags.", - "items": { - "$ref": "Flag" - }, - "type": "array" - }, - "kind": { - "default": "sql#flagsList", - "description": "This is always sql#flagsList.", - "type": "string" - } - }, - "type": "object" - }, - "ImportContext": { - "description": "Database instance import context.", - "id": "ImportContext", - "properties": { - "database": { - "description": "The database (for example, guestbook) to which the import is made. If not set, it is assumed that the database is specified in the file to be imported.", - "type": "string" - }, - "kind": { - "default": "sql#importContext", - "description": "This is always sql#importContext.", - "type": "string" - }, - "uri": { - "description": "A path to the MySQL dump file in Google Cloud Storage from which the import is made. The URI is in the form gs://bucketName/fileName. Compressed gzip files (.gz) are also supported.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "InstanceOperation": { - "description": "An Operations resource contains information about database instance operations such as create, delete, and restart. Operations resources are created in response to operations that were initiated; you never create them directly.", - "id": "InstanceOperation", - "properties": { - "endTime": { - "description": "The time this operation finished in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.", - "format": "date-time", - "type": "string" - }, - "enqueuedTime": { - "description": "The time this operation was enqueued in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.", - "format": "date-time", - "type": "string" - }, - "error": { - "description": "The error(s) encountered by this operation. Only set if the operation results in an error.", - "items": { - "$ref": "OperationError" - }, - "type": "array" - }, - "exportContext": { - "$ref": "ExportContext", - "description": "The context for export operation, if applicable." - }, - "importContext": { - "$ref": "ImportContext", - "description": "The context for import operation, if applicable." - }, - "instance": { - "description": "Name of the database instance.", - "type": "string" - }, - "kind": { - "default": "sql#instanceOperation", - "description": "This is always sql#instanceOperation.", - "type": "string" - }, - "operation": { - "description": "An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation.", - "type": "string" - }, - "operationType": { - "description": "The type of the operation. Valid values are CREATE, DELETE, UPDATE, RESTART, IMPORT, EXPORT, BACKUP_VOLUME, RESTORE_VOLUME.", - "type": "string" - }, - "startTime": { - "description": "The time this operation actually started in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.", - "format": "date-time", - "type": "string" - }, - "state": { - "description": "The state of an operation. Valid values are PENDING, RUNNING, DONE, UNKNOWN.", - "type": "string" - }, - "userEmailAddress": { - "description": "The email address of the user who initiated this operation.", - "type": "string" - } - }, - "type": "object" - }, - "InstanceSetRootPasswordRequest": { - "description": "Database instance set root password request.", - "id": "InstanceSetRootPasswordRequest", - "properties": { - "setRootPasswordContext": { - "$ref": "SetRootPasswordContext", - "description": "Set Root Password Context." - } - }, - "type": "object" - }, - "InstancesCloneRequest": { - "description": "Database instance clone request.", - "id": "InstancesCloneRequest", - "properties": { - "cloneContext": { - "$ref": "CloneContext", - "description": "Contains details about the clone operation." - } - }, - "type": "object" - }, - "InstancesCloneResponse": { - "description": "Database instance clone response.", - "id": "InstancesCloneResponse", - "properties": { - "kind": { - "default": "sql#instancesClone", - "description": "This is always sql#instancesClone.", - "type": "string" - }, - "operation": { - "description": "An unique identifier for the operation associated with the cloned instance. You can use this identifier to retrieve the Operations resource, which has information about the operation.", - "type": "string" - } - }, - "type": "object" - }, - "InstancesDeleteResponse": { - "description": "Database instance delete response.", - "id": "InstancesDeleteResponse", - "properties": { - "kind": { - "default": "sql#instancesDelete", - "description": "This is always sql#instancesDelete.", - "type": "string" - }, - "operation": { - "description": "An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation.", - "type": "string" - } - }, - "type": "object" - }, - "InstancesExportRequest": { - "description": "Database instance export request.", - "id": "InstancesExportRequest", - "properties": { - "exportContext": { - "$ref": "ExportContext", - "description": "Contains details about the export operation." - } - }, - "type": "object" - }, - "InstancesExportResponse": { - "description": "Database instance export response.", - "id": "InstancesExportResponse", - "properties": { - "kind": { - "default": "sql#instancesExport", - "description": "This is always sql#instancesExport.", - "type": "string" - }, - "operation": { - "description": "An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation.", - "type": "string" - } - }, - "type": "object" - }, - "InstancesImportRequest": { - "description": "Database instance import request.", - "id": "InstancesImportRequest", - "properties": { - "importContext": { - "$ref": "ImportContext", - "description": "Contains details about the import operation." - } - }, - "type": "object" - }, - "InstancesImportResponse": { - "description": "Database instance import response.", - "id": "InstancesImportResponse", - "properties": { - "kind": { - "default": "sql#instancesImport", - "description": "This is always sql#instancesImport.", - "type": "string" - }, - "operation": { - "description": "An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation.", - "type": "string" - } - }, - "type": "object" - }, - "InstancesInsertResponse": { - "description": "Database instance insert response.", - "id": "InstancesInsertResponse", - "properties": { - "kind": { - "default": "sql#instancesInsert", - "description": "This is always sql#instancesInsert.", - "type": "string" - }, - "operation": { - "description": "An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation.", - "type": "string" - } - }, - "type": "object" - }, - "InstancesListResponse": { - "description": "Database instances list response.", - "id": "InstancesListResponse", - "properties": { - "items": { - "description": "List of database instance resources.", - "items": { - "$ref": "DatabaseInstance" - }, - "type": "array" - }, - "kind": { - "default": "sql#instancesList", - "description": "This is always sql#instancesList.", - "type": "string" - }, - "nextPageToken": { - "description": "The continuation token, used to page through large result sets. Provide this value in a subsequent request to return the next page of results.", - "type": "string" - } - }, - "type": "object" - }, - "InstancesPromoteReplicaResponse": { - "description": "Database promote read replica response.", - "id": "InstancesPromoteReplicaResponse", - "properties": { - "kind": { - "default": "sql#instancesPromoteReplica", - "description": "This is always sql#instancesPromoteReplica.", - "type": "string" - }, - "operation": { - "description": "An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation.", - "type": "string" - } - }, - "type": "object" - }, - "InstancesResetSslConfigResponse": { - "description": "Database instance resetSslConfig response.", - "id": "InstancesResetSslConfigResponse", - "properties": { - "kind": { - "default": "sql#instancesResetSslConfig", - "description": "This is always sql#instancesResetSslConfig.", - "type": "string" - }, - "operation": { - "description": "An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation. All ssl client certificates will be deleted and a new server certificate will be created. Does not take effect until the next instance restart.", - "type": "string" - } - }, - "type": "object" - }, - "InstancesRestartResponse": { - "description": "Database instance restart response.", - "id": "InstancesRestartResponse", - "properties": { - "kind": { - "default": "sql#instancesRestart", - "description": "This is always sql#instancesRestart.", - "type": "string" - }, - "operation": { - "description": "An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation.", - "type": "string" - } - }, - "type": "object" - }, - "InstancesRestoreBackupResponse": { - "description": "Database instance restore backup response.", - "id": "InstancesRestoreBackupResponse", - "properties": { - "kind": { - "default": "sql#instancesRestoreBackup", - "description": "This is always sql#instancesRestoreBackup.", - "type": "string" - }, - "operation": { - "description": "An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation.", - "type": "string" - } - }, - "type": "object" - }, - "InstancesSetRootPasswordResponse": { - "description": "Database instance set root password response.", - "id": "InstancesSetRootPasswordResponse", - "properties": { - "kind": { - "default": "sql#instancesSetRootPassword", - "description": "This is always sql#instancesSetRootPassword.", - "type": "string" - }, - "operation": { - "description": "An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation.", - "type": "string" - } - }, - "type": "object" - }, - "InstancesUpdateResponse": { - "description": "Database instance update response.", - "id": "InstancesUpdateResponse", - "properties": { - "kind": { - "default": "sql#instancesUpdate", - "description": "This is always sql#instancesUpdate.", - "type": "string" - }, - "operation": { - "description": "An identifier that uniquely identifies the operation. You can use this identifier to retrieve information about the operation.", - "type": "string" - } - }, - "type": "object" - }, - "IpConfiguration": { - "description": "IP Management configuration.", - "id": "IpConfiguration", - "properties": { - "authorizedNetworks": { - "description": "The list of external networks that are allowed to connect to the instance using the IP. In CIDR notation, also known as 'slash' notation (e.g. 192.168.100.0/24).", - "items": { - "type": "string" - }, - "type": "array" - }, - "enabled": { - "description": "Whether the instance should be assigned an IP address or not.", - "type": "boolean" - }, - "kind": { - "default": "sql#ipConfiguration", - "description": "This is always sql#ipConfiguration.", - "type": "string" - }, - "requireSsl": { - "description": "Whether SSL connections over IP should be enforced or not.", - "type": "boolean" - } - }, - "type": "object" - }, - "IpMapping": { - "description": "Database instance IP Mapping.", - "id": "IpMapping", - "properties": { - "ipAddress": { - "description": "The IP address assigned.", - "type": "string" - }, - "timeToRetire": { - "description": "The due time for this IP to be retired in RFC 3339 format, for example 2012-11-15T16:19:00.094Z. This field is only available when the IP is scheduled to be retired.", - "format": "date-time", - "type": "string" - } - }, - "type": "object" - }, - "LocationPreference": { - "description": "Preferred location. This specifies where a Cloud SQL instance should preferably be located, either in a specific Compute Engine zone, or co-located with an App Engine application. Note that if the preferred location is not available, the instance will be located as close as possible within the region. Only one location may be specified.", - "id": "LocationPreference", - "properties": { - "followGaeApplication": { - "description": "The App Engine application to follow, it must be in the same region as the Cloud SQL instance.", - "type": "string" - }, - "kind": { - "default": "sql#locationPreference", - "description": "This is always sql#locationPreference.", - "type": "string" - }, - "zone": { - "description": "The preferred Compute Engine zone (e.g. us-centra1-a, us-central1-b, etc.).", - "type": "string" - } - }, - "type": "object" - }, - "OperationError": { - "description": "Database instance operation error.", - "id": "OperationError", - "properties": { - "code": { - "description": "Identifies the specific error that occurred.", - "type": "string" - }, - "kind": { - "default": "sql#operationError", - "description": "This is always sql#operationError.", - "type": "string" - } - }, - "type": "object" - }, - "OperationsListResponse": { - "description": "Database instance list operations response.", - "id": "OperationsListResponse", - "properties": { - "items": { - "description": "List of operation resources.", - "items": { - "$ref": "InstanceOperation" - }, - "type": "array" - }, - "kind": { - "default": "sql#operationsList", - "description": "This is always sql#operationsList.", - "type": "string" - }, - "nextPageToken": { - "description": "The continuation token, used to page through large result sets. Provide this value in a subsequent request to return the next page of results.", - "type": "string" - } - }, - "type": "object" - }, - "SetRootPasswordContext": { - "description": "Database instance set root password context.", - "id": "SetRootPasswordContext", - "properties": { - "kind": { - "default": "sql#setRootUserContext", - "description": "This is always sql#setRootUserContext.", - "type": "string" - }, - "password": { - "description": "The password for the root user.", - "type": "string" - } - }, - "type": "object" - }, - "Settings": { - "description": "Database instance settings.", - "id": "Settings", - "properties": { - "activationPolicy": { - "description": "The activation policy for this instance. This specifies when the instance should be activated and is applicable only when the instance state is RUNNABLE. This can be one of the following.\nALWAYS: The instance should always be active.\nNEVER: The instance should never be activated.\nON_DEMAND: The instance is activated upon receiving requests.", - "type": "string" - }, - "authorizedGaeApplications": { - "description": "The App Engine app IDs that can access this instance.", - "items": { - "type": "string" - }, - "type": "array" - }, - "backupConfiguration": { - "description": "The daily backup configuration for the instance.", - "items": { - "$ref": "BackupConfiguration" - }, - "type": "array" - }, - "databaseFlags": { - "description": "The database flags passed to the instance at startup.", - "items": { - "$ref": "DatabaseFlags" - }, - "type": "array" - }, - "databaseReplicationEnabled": { - "description": "Configuration specific to read replica instance. Indicates whether replication is enabled or not.", - "type": "boolean" - }, - "ipConfiguration": { - "$ref": "IpConfiguration", - "description": "The settings for IP Management. This allows to enable or disable the instance IP and manage which external networks can connect to the instance." - }, - "kind": { - "default": "sql#settings", - "description": "This is always sql#settings.", - "type": "string" - }, - "locationPreference": { - "$ref": "LocationPreference", - "description": "The location preference settings. This allows the instance to be located as near as possible to either an App Engine app or GCE zone for better performance." - }, - "pricingPlan": { - "description": "The pricing plan for this instance. This can be either PER_USE or PACKAGE.", - "type": "string" - }, - "replicationType": { - "description": "The type of replication this instance uses. This can be either ASYNCHRONOUS or SYNCHRONOUS.", - "type": "string" - }, - "settingsVersion": { - "annotations": { - "required": [ - "sql.instances.update" - ] - }, - "description": "The version of instance settings. This is a required field for update method to make sure concurrent updates are handled properly. During update, use the most recent settingsVersion value for this instance and do not try to update this value.", - "format": "int64", - "type": "string" - }, - "tier": { - "annotations": { - "required": [ - "sql.instances.insert", - "sql.instances.update" - ] - }, - "description": "The tier of service for this instance, for example D1, D2. For more information, see pricing.", - "type": "string" - } - }, - "type": "object" - }, - "SslCert": { - "description": "SslCerts Resource", - "id": "SslCert", - "properties": { - "cert": { - "description": "PEM representation.", - "type": "string" - }, - "certSerialNumber": { - "description": "Serial number, as extracted from the certificate.", - "type": "string" - }, - "commonName": { - "description": "User supplied name. Constrained to [a-zA-Z.-_ ]+.", - "type": "string" - }, - "createTime": { - "description": "Time when the certificate was created.", - "format": "date-time", - "type": "string" - }, - "expirationTime": { - "description": "Time when the certificate expires.", - "format": "date-time", - "type": "string" - }, - "instance": { - "description": "Name of the database instance.", - "type": "string" - }, - "kind": { - "default": "sql#sslCert", - "description": "This is always sql#sslCert.", - "type": "string" - }, - "sha1Fingerprint": { - "description": "Sha1 Fingerprint.", - "type": "string" - } - }, - "type": "object" - }, - "SslCertDetail": { - "description": "SslCertDetail.", - "id": "SslCertDetail", - "properties": { - "certInfo": { - "$ref": "SslCert", - "description": "The public information about the cert." - }, - "certPrivateKey": { - "description": "The private key for the client cert, in pem format. Keep private in order to protect your security.", - "type": "string" - } - }, - "type": "object" - }, - "SslCertsDeleteResponse": { - "description": "SslCert delete response.", - "id": "SslCertsDeleteResponse", - "properties": { - "kind": { - "default": "sql#sslCertsDelete", - "description": "This is always sql#sslCertsDelete.", - "type": "string" - }, - "operation": { - "description": "An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation.", - "type": "string" - } - }, - "type": "object" - }, - "SslCertsInsertRequest": { - "description": "SslCerts insert request.", - "id": "SslCertsInsertRequest", - "properties": { - "commonName": { - "description": "User supplied name. Must be a distinct name from the other certificates for this instance. New certificates will not be usable until the instance is restarted.", - "type": "string" - } - }, - "type": "object" - }, - "SslCertsInsertResponse": { - "description": "SslCert insert response.", - "id": "SslCertsInsertResponse", - "properties": { - "clientCert": { - "$ref": "SslCertDetail", - "description": "The new client certificate and private key. The new certificate will not work until the instance is restarted." - }, - "kind": { - "default": "sql#sslCertsInsert", - "description": "This is always sql#sslCertsInsert.", - "type": "string" - }, - "serverCaCert": { - "$ref": "SslCert", - "description": "The server Certificate Authority's certificate. If this is missing you can force a new one to be generated by calling resetSslConfig method on instances resource.." - } - }, - "type": "object" - }, - "SslCertsListResponse": { - "description": "SslCerts list response.", - "id": "SslCertsListResponse", - "properties": { - "items": { - "description": "List of client certificates for the instance.", - "items": { - "$ref": "SslCert" - }, - "type": "array" - }, - "kind": { - "default": "sql#sslCertsList", - "description": "This is always sql#sslCertsList.", - "type": "string" - } - }, - "type": "object" - }, - "Tier": { - "description": "A Google Cloud SQL service tier resource.", - "id": "Tier", - "properties": { - "DiskQuota": { - "description": "The maximum disk size of this tier in bytes.", - "format": "int64", - "type": "string" - }, - "RAM": { - "description": "The maximum RAM usage of this tier in bytes.", - "format": "int64", - "type": "string" - }, - "kind": { - "default": "sql#tier", - "description": "This is always sql#tier.", - "type": "string" - }, - "region": { - "description": "The applicable regions for this tier.", - "items": { - "type": "string" - }, - "type": "array" - }, - "tier": { - "description": "An identifier for the service tier, for example D1, D2 etc. For related information, see Pricing.", - "type": "string" - } - }, - "type": "object" - }, - "TiersListResponse": { - "description": "Tiers list response.", - "id": "TiersListResponse", - "properties": { - "items": { - "description": "List of tiers.", - "items": { - "$ref": "Tier" - }, - "type": "array" - }, - "kind": { - "default": "sql#tiersList", - "description": "This is always sql#tiersList.", - "type": "string" - } - }, - "type": "object" - } - }, - "servicePath": "sql/v1beta3/", - "title": "Cloud SQL Admin API", - "version": "v1beta3" -} \ No newline at end of file
diff --git a/sqladmin/v1beta3/sqladmin-gen.go b/sqladmin/v1beta3/sqladmin-gen.go deleted file mode 100644 index a6f3174..0000000 --- a/sqladmin/v1beta3/sqladmin-gen.go +++ /dev/null
@@ -1,5563 +0,0 @@ -// Package sqladmin provides access to the Cloud SQL Admin API. -// -// See https://cloud.google.com/sql/docs/reference/latest -// -// Usage example: -// -// import "google.golang.org/api/sqladmin/v1beta3" -// ... -// sqladminService, err := sqladmin.New(oauthHttpClient) -package sqladmin // import "google.golang.org/api/sqladmin/v1beta3" - -import ( - "bytes" - "context" - "encoding/json" - "errors" - "fmt" - "io" - "net/http" - "net/url" - "strconv" - "strings" - - gensupport "google.golang.org/api/gensupport" - googleapi "google.golang.org/api/googleapi" -) - -// Always reference these packages, just in case the auto-generated code -// below doesn't. -var _ = bytes.NewBuffer -var _ = strconv.Itoa -var _ = fmt.Sprintf -var _ = json.NewDecoder -var _ = io.Copy -var _ = url.Parse -var _ = gensupport.MarshalJSON -var _ = googleapi.Version -var _ = errors.New -var _ = strings.Replace -var _ = context.Canceled - -const apiId = "sqladmin:v1beta3" -const apiName = "sqladmin" -const apiVersion = "v1beta3" -const basePath = "https://www.googleapis.com/sql/v1beta3/" - -// OAuth2 scopes used by this API. -const ( - // View and manage your data across Google Cloud Platform services - CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform" - - // Manage your Google SQL Service instances - SqlserviceAdminScope = "https://www.googleapis.com/auth/sqlservice.admin" -) - -func New(client *http.Client) (*Service, error) { - if client == nil { - return nil, errors.New("client is nil") - } - s := &Service{client: client, BasePath: basePath} - s.BackupRuns = NewBackupRunsService(s) - s.Flags = NewFlagsService(s) - s.Instances = NewInstancesService(s) - s.Operations = NewOperationsService(s) - s.SslCerts = NewSslCertsService(s) - s.Tiers = NewTiersService(s) - return s, nil -} - -type Service struct { - client *http.Client - BasePath string // API endpoint base URL - UserAgent string // optional additional User-Agent fragment - - BackupRuns *BackupRunsService - - Flags *FlagsService - - Instances *InstancesService - - Operations *OperationsService - - SslCerts *SslCertsService - - Tiers *TiersService -} - -func (s *Service) userAgent() string { - if s.UserAgent == "" { - return googleapi.UserAgent - } - return googleapi.UserAgent + " " + s.UserAgent -} - -func NewBackupRunsService(s *Service) *BackupRunsService { - rs := &BackupRunsService{s: s} - return rs -} - -type BackupRunsService struct { - s *Service -} - -func NewFlagsService(s *Service) *FlagsService { - rs := &FlagsService{s: s} - return rs -} - -type FlagsService struct { - s *Service -} - -func NewInstancesService(s *Service) *InstancesService { - rs := &InstancesService{s: s} - return rs -} - -type InstancesService struct { - s *Service -} - -func NewOperationsService(s *Service) *OperationsService { - rs := &OperationsService{s: s} - return rs -} - -type OperationsService struct { - s *Service -} - -func NewSslCertsService(s *Service) *SslCertsService { - rs := &SslCertsService{s: s} - return rs -} - -type SslCertsService struct { - s *Service -} - -func NewTiersService(s *Service) *TiersService { - rs := &TiersService{s: s} - return rs -} - -type TiersService struct { - s *Service -} - -// BackupConfiguration: Database instance backup configuration. -type BackupConfiguration struct { - // BinaryLogEnabled: Whether binary log is enabled. If backup - // configuration is disabled, binary log must be disabled as well. - BinaryLogEnabled bool `json:"binaryLogEnabled,omitempty"` - - // Enabled: Whether this configuration is enabled. - Enabled bool `json:"enabled,omitempty"` - - // Id: Identifier for this configuration. This gets generated - // automatically when a backup configuration is created. - Id string `json:"id,omitempty"` - - // Kind: This is always sql#backupConfiguration. - Kind string `json:"kind,omitempty"` - - // ReplicationLogArchivingEnabled: Whether replication log archiving is - // enabled. Replication log archiving is required for the point-in-time - // recovery (PITR) feature. PostgreSQL instances only. - ReplicationLogArchivingEnabled bool `json:"replicationLogArchivingEnabled,omitempty"` - - // StartTime: Start time for the daily backup configuration in UTC - // timezone in the 24 hour format - HH:MM. - StartTime string `json:"startTime,omitempty"` - - // ForceSendFields is a list of field names (e.g. "BinaryLogEnabled") 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. "BinaryLogEnabled") 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 *BackupConfiguration) MarshalJSON() ([]byte, error) { - type NoMethod BackupConfiguration - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// BackupRun: A database instance backup run resource. -type BackupRun struct { - // BackupConfiguration: Backup Configuration identifier. - BackupConfiguration string `json:"backupConfiguration,omitempty"` - - // DueTime: The due time of this run in UTC timezone in RFC 3339 format, - // for example 2012-11-15T16:19:00.094Z. - DueTime string `json:"dueTime,omitempty"` - - // EndTime: The time the backup operation completed in UTC timezone in - // RFC 3339 format, for example 2012-11-15T16:19:00.094Z. - EndTime string `json:"endTime,omitempty"` - - // EnqueuedTime: The time the run was enqueued in UTC timezone in RFC - // 3339 format, for example 2012-11-15T16:19:00.094Z. - EnqueuedTime string `json:"enqueuedTime,omitempty"` - - // Error: Information about why the backup operation failed. This is - // only present if the run has the FAILED status. - Error *OperationError `json:"error,omitempty"` - - // Instance: Name of the database instance. - Instance string `json:"instance,omitempty"` - - // Kind: This is always sql#backupRun. - Kind string `json:"kind,omitempty"` - - // StartTime: The time the backup operation actually started in UTC - // timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z. - StartTime string `json:"startTime,omitempty"` - - // Status: The status of this run. - Status string `json:"status,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "BackupConfiguration") - // 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. "BackupConfiguration") 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 *BackupRun) MarshalJSON() ([]byte, error) { - type NoMethod BackupRun - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// BackupRunsListResponse: Backup run list results. -type BackupRunsListResponse struct { - // Items: A list of backup runs in reverse chronological order of the - // enqueued time. - Items []*BackupRun `json:"items,omitempty"` - - // Kind: This is always sql#backupRunsList. - Kind string `json:"kind,omitempty"` - - // NextPageToken: The continuation token, 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. "Items") 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. "Items") 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 *BackupRunsListResponse) MarshalJSON() ([]byte, error) { - type NoMethod BackupRunsListResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// BinLogCoordinates: Binary log coordinates. -type BinLogCoordinates struct { - // BinLogFileName: Name of the binary log file for a Cloud SQL instance. - BinLogFileName string `json:"binLogFileName,omitempty"` - - // BinLogPosition: Position (offset) within the binary log file. - BinLogPosition int64 `json:"binLogPosition,omitempty,string"` - - // Kind: This is always sql#binLogCoordinates. - Kind string `json:"kind,omitempty"` - - // ForceSendFields is a list of field names (e.g. "BinLogFileName") 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. "BinLogFileName") 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 *BinLogCoordinates) MarshalJSON() ([]byte, error) { - type NoMethod BinLogCoordinates - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// CloneContext: Database instance clone context. -type CloneContext struct { - // BinLogCoordinates: Binary log coordinates, if specified, indentify - // the position up to which the source instance should be cloned. If not - // specified, the source instance is cloned up to the most recent binary - // log coordinates. - BinLogCoordinates *BinLogCoordinates `json:"binLogCoordinates,omitempty"` - - // DestinationInstanceName: Name of the Cloud SQL instance to be created - // as a clone. - DestinationInstanceName string `json:"destinationInstanceName,omitempty"` - - // Kind: This is always sql#cloneContext. - Kind string `json:"kind,omitempty"` - - // PitrTimestampMs: The epoch timestamp, in milliseconds, of the time to - // which a point-in-time recovery (PITR) is performed. PostgreSQL - // instances only. For MySQL instances, use the binLogCoordinates - // property. - PitrTimestampMs int64 `json:"pitrTimestampMs,omitempty,string"` - - // SourceInstanceName: Name of the Cloud SQL instance to be cloned. - SourceInstanceName string `json:"sourceInstanceName,omitempty"` - - // ForceSendFields is a list of field names (e.g. "BinLogCoordinates") - // 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. "BinLogCoordinates") 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 *CloneContext) MarshalJSON() ([]byte, error) { - type NoMethod CloneContext - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// DatabaseFlags: MySQL flags for Cloud SQL instances. -type DatabaseFlags struct { - // Name: The name of the flag. These flags are passed at instance - // startup, so include both MySQL server options and MySQL system - // variables. Flags should be specified with underscores, not hyphens. - // For more information, see Configuring MySQL Flags in the Google Cloud - // SQL documentation, as well as the official MySQL documentation for - // server options and system variables. - Name string `json:"name,omitempty"` - - // Value: The value of the flag. Booleans should be set to on for true - // and off for false. This field must be omitted if the flag doesn't - // take a value. - Value string `json:"value,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Name") 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. "Name") 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 *DatabaseFlags) MarshalJSON() ([]byte, error) { - type NoMethod DatabaseFlags - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// DatabaseInstance: A Cloud SQL instance resource. -type DatabaseInstance struct { - // ConnectionName: Connection name of the Cloud SQL instance used in - // connection strings. - ConnectionName string `json:"connectionName,omitempty"` - - // CurrentDiskSize: The current disk usage of the instance in bytes. - CurrentDiskSize int64 `json:"currentDiskSize,omitempty,string"` - - // DatabaseVersion: The database engine type and version. Can be - // MYSQL_5_5 or MYSQL_5_6. Defaults to MYSQL_5_5. The databaseVersion - // cannot be changed after instance creation. - DatabaseVersion string `json:"databaseVersion,omitempty"` - - // Etag: HTTP 1.1 Entity tag for the resource. - Etag string `json:"etag,omitempty"` - - // Instance: Name of the Cloud SQL instance. This does not include the - // project ID. - Instance string `json:"instance,omitempty"` - - // InstanceType: The instance type. This can be one of the - // following. - // CLOUD_SQL_INSTANCE: Regular Cloud SQL - // instance. - // READ_REPLICA_INSTANCE: Cloud SQL instance acting as a read-replica. - InstanceType string `json:"instanceType,omitempty"` - - // IpAddresses: The assigned IP addresses for the instance. - IpAddresses []*IpMapping `json:"ipAddresses,omitempty"` - - // Ipv6Address: The IPv6 address assigned to the instance. - Ipv6Address string `json:"ipv6Address,omitempty"` - - // Kind: This is always sql#instance. - Kind string `json:"kind,omitempty"` - - // MasterInstanceName: The name of the instance which will act as master - // in the replication setup. - MasterInstanceName string `json:"masterInstanceName,omitempty"` - - // MaxDiskSize: The maximum disk size of the instance in bytes. - MaxDiskSize int64 `json:"maxDiskSize,omitempty,string"` - - // Project: The project ID of the project containing the Cloud SQL - // instance. The Google apps domain is prefixed if applicable. - Project string `json:"project,omitempty"` - - // Region: The geographical region. Can be us-central, asia-east1 or - // europe-west1. Defaults to us-central. The region can not be changed - // after instance creation. - Region string `json:"region,omitempty"` - - // ReplicaNames: The replicas of the instance. - ReplicaNames []string `json:"replicaNames,omitempty"` - - // ServerCaCert: SSL configuration. - ServerCaCert *SslCert `json:"serverCaCert,omitempty"` - - // ServiceAccountEmailAddress: The service account email address - // assigned to the instance. - ServiceAccountEmailAddress string `json:"serviceAccountEmailAddress,omitempty"` - - // Settings: The user settings. - Settings *Settings `json:"settings,omitempty"` - - // State: The current serving state of the Cloud SQL instance. This can - // be one of the following. - // RUNNABLE: The instance is running, or is ready to run when - // accessed. - // SUSPENDED: The instance is not available, for example due to problems - // with billing. - // PENDING_CREATE: The instance is being created. - // MAINTENANCE: The instance is down for maintenance. - // UNKNOWN_STATE: The state of the instance is unknown. - State string `json:"state,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "ConnectionName") 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. "ConnectionName") 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 *DatabaseInstance) MarshalJSON() ([]byte, error) { - type NoMethod DatabaseInstance - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// ExportContext: Database instance export context. -type ExportContext struct { - // Database: Databases (for example, guestbook) from which the export is - // made. If unspecified, all databases are exported. - Database []string `json:"database,omitempty"` - - // Kind: This is always sql#exportContext. - Kind string `json:"kind,omitempty"` - - // Table: Tables to export, or that were exported, from the specified - // database. If you specify tables, specify one and only one database. - Table []string `json:"table,omitempty"` - - // Uri: The path to the file in Google Cloud Storage where the export - // will be stored, or where it was already stored. The URI is in the - // form gs://bucketName/fileName. If the file already exists, the - // operation fails. If the filename ends with .gz, the contents are - // compressed. - Uri string `json:"uri,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Database") 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. "Database") 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 *ExportContext) MarshalJSON() ([]byte, error) { - type NoMethod ExportContext - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// Flag: A Google Cloud SQL service flag resource. -type Flag struct { - // AllowedStringValues: For STRING flags, a list of strings that the - // value can be set to. - AllowedStringValues []string `json:"allowedStringValues,omitempty"` - - // AppliesTo: The database version this flag applies to. Currently this - // can only be [MYSQL_5_5]. - AppliesTo []string `json:"appliesTo,omitempty"` - - // Kind: This is always sql#flag. - Kind string `json:"kind,omitempty"` - - // MaxValue: For INTEGER flags, the maximum allowed value. - MaxValue int64 `json:"maxValue,omitempty,string"` - - // MinValue: For INTEGER flags, the minimum allowed value. - MinValue int64 `json:"minValue,omitempty,string"` - - // Name: This is the name of the flag. Flag names always use - // underscores, not hyphens, e.g. max_allowed_packet - Name string `json:"name,omitempty"` - - // Type: The type of the flag. Flags are typed to being BOOLEAN, STRING, - // INTEGER or NONE. NONE is used for flags which do not take a value, - // such as skip_grant_tables. - Type string `json:"type,omitempty"` - - // ForceSendFields is a list of field names (e.g. "AllowedStringValues") - // 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. "AllowedStringValues") 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 *Flag) MarshalJSON() ([]byte, error) { - type NoMethod Flag - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// FlagsListResponse: Flags list response. -type FlagsListResponse struct { - // Items: List of flags. - Items []*Flag `json:"items,omitempty"` - - // Kind: This is always sql#flagsList. - Kind string `json:"kind,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Items") 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. "Items") 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 *FlagsListResponse) MarshalJSON() ([]byte, error) { - type NoMethod FlagsListResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// ImportContext: Database instance import context. -type ImportContext struct { - // Database: The database (for example, guestbook) to which the import - // is made. If not set, it is assumed that the database is specified in - // the file to be imported. - Database string `json:"database,omitempty"` - - // Kind: This is always sql#importContext. - Kind string `json:"kind,omitempty"` - - // Uri: A path to the MySQL dump file in Google Cloud Storage from which - // the import is made. The URI is in the form gs://bucketName/fileName. - // Compressed gzip files (.gz) are also supported. - Uri []string `json:"uri,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Database") 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. "Database") 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 *ImportContext) MarshalJSON() ([]byte, error) { - type NoMethod ImportContext - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// InstanceOperation: An Operations resource contains information about -// database instance operations such as create, delete, and restart. -// Operations resources are created in response to operations that were -// initiated; you never create them directly. -type InstanceOperation struct { - // EndTime: The time this operation finished in UTC timezone in RFC 3339 - // format, for example 2012-11-15T16:19:00.094Z. - EndTime string `json:"endTime,omitempty"` - - // EnqueuedTime: The time this operation was enqueued in UTC timezone in - // RFC 3339 format, for example 2012-11-15T16:19:00.094Z. - EnqueuedTime string `json:"enqueuedTime,omitempty"` - - // Error: The error(s) encountered by this operation. Only set if the - // operation results in an error. - Error []*OperationError `json:"error,omitempty"` - - // ExportContext: The context for export operation, if applicable. - ExportContext *ExportContext `json:"exportContext,omitempty"` - - // ImportContext: The context for import operation, if applicable. - ImportContext *ImportContext `json:"importContext,omitempty"` - - // Instance: Name of the database instance. - Instance string `json:"instance,omitempty"` - - // Kind: This is always sql#instanceOperation. - Kind string `json:"kind,omitempty"` - - // Operation: An identifier that uniquely identifies the operation. You - // can use this identifier to retrieve the Operations resource that has - // information about the operation. - Operation string `json:"operation,omitempty"` - - // OperationType: The type of the operation. Valid values are CREATE, - // DELETE, UPDATE, RESTART, IMPORT, EXPORT, BACKUP_VOLUME, - // RESTORE_VOLUME. - OperationType string `json:"operationType,omitempty"` - - // StartTime: The time this operation actually started in UTC timezone - // in RFC 3339 format, for example 2012-11-15T16:19:00.094Z. - StartTime string `json:"startTime,omitempty"` - - // State: The state of an operation. Valid values are PENDING, RUNNING, - // DONE, UNKNOWN. - State string `json:"state,omitempty"` - - // UserEmailAddress: The email address of the user who initiated this - // operation. - UserEmailAddress string `json:"userEmailAddress,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "EndTime") 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. "EndTime") 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 *InstanceOperation) MarshalJSON() ([]byte, error) { - type NoMethod InstanceOperation - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// InstanceSetRootPasswordRequest: Database instance set root password -// request. -type InstanceSetRootPasswordRequest struct { - // SetRootPasswordContext: Set Root Password Context. - SetRootPasswordContext *SetRootPasswordContext `json:"setRootPasswordContext,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "SetRootPasswordContext") 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. "SetRootPasswordContext") - // 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 *InstanceSetRootPasswordRequest) MarshalJSON() ([]byte, error) { - type NoMethod InstanceSetRootPasswordRequest - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// InstancesCloneRequest: Database instance clone request. -type InstancesCloneRequest struct { - // CloneContext: Contains details about the clone operation. - CloneContext *CloneContext `json:"cloneContext,omitempty"` - - // ForceSendFields is a list of field names (e.g. "CloneContext") 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. "CloneContext") 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 *InstancesCloneRequest) MarshalJSON() ([]byte, error) { - type NoMethod InstancesCloneRequest - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// InstancesCloneResponse: Database instance clone response. -type InstancesCloneResponse struct { - // Kind: This is always sql#instancesClone. - Kind string `json:"kind,omitempty"` - - // Operation: An unique identifier for the operation associated with the - // cloned instance. You can use this identifier to retrieve the - // Operations resource, which has information about the operation. - Operation string `json:"operation,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Kind") 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. "Kind") 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 *InstancesCloneResponse) MarshalJSON() ([]byte, error) { - type NoMethod InstancesCloneResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// InstancesDeleteResponse: Database instance delete response. -type InstancesDeleteResponse struct { - // Kind: This is always sql#instancesDelete. - Kind string `json:"kind,omitempty"` - - // Operation: An identifier that uniquely identifies the operation. You - // can use this identifier to retrieve the Operations resource that has - // information about the operation. - Operation string `json:"operation,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Kind") 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. "Kind") 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 *InstancesDeleteResponse) MarshalJSON() ([]byte, error) { - type NoMethod InstancesDeleteResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// InstancesExportRequest: Database instance export request. -type InstancesExportRequest struct { - // ExportContext: Contains details about the export operation. - ExportContext *ExportContext `json:"exportContext,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ExportContext") 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. "ExportContext") 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 *InstancesExportRequest) MarshalJSON() ([]byte, error) { - type NoMethod InstancesExportRequest - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// InstancesExportResponse: Database instance export response. -type InstancesExportResponse struct { - // Kind: This is always sql#instancesExport. - Kind string `json:"kind,omitempty"` - - // Operation: An identifier that uniquely identifies the operation. You - // can use this identifier to retrieve the Operations resource that has - // information about the operation. - Operation string `json:"operation,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Kind") 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. "Kind") 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 *InstancesExportResponse) MarshalJSON() ([]byte, error) { - type NoMethod InstancesExportResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// InstancesImportRequest: Database instance import request. -type InstancesImportRequest struct { - // ImportContext: Contains details about the import operation. - ImportContext *ImportContext `json:"importContext,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ImportContext") 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. "ImportContext") 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 *InstancesImportRequest) MarshalJSON() ([]byte, error) { - type NoMethod InstancesImportRequest - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// InstancesImportResponse: Database instance import response. -type InstancesImportResponse struct { - // Kind: This is always sql#instancesImport. - Kind string `json:"kind,omitempty"` - - // Operation: An identifier that uniquely identifies the operation. You - // can use this identifier to retrieve the Operations resource that has - // information about the operation. - Operation string `json:"operation,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Kind") 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. "Kind") 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 *InstancesImportResponse) MarshalJSON() ([]byte, error) { - type NoMethod InstancesImportResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// InstancesInsertResponse: Database instance insert response. -type InstancesInsertResponse struct { - // Kind: This is always sql#instancesInsert. - Kind string `json:"kind,omitempty"` - - // Operation: An identifier that uniquely identifies the operation. You - // can use this identifier to retrieve the Operations resource that has - // information about the operation. - Operation string `json:"operation,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Kind") 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. "Kind") 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 *InstancesInsertResponse) MarshalJSON() ([]byte, error) { - type NoMethod InstancesInsertResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// InstancesListResponse: Database instances list response. -type InstancesListResponse struct { - // Items: List of database instance resources. - Items []*DatabaseInstance `json:"items,omitempty"` - - // Kind: This is always sql#instancesList. - Kind string `json:"kind,omitempty"` - - // NextPageToken: The continuation token, 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. "Items") 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. "Items") 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 *InstancesListResponse) MarshalJSON() ([]byte, error) { - type NoMethod InstancesListResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// InstancesPromoteReplicaResponse: Database promote read replica -// response. -type InstancesPromoteReplicaResponse struct { - // Kind: This is always sql#instancesPromoteReplica. - Kind string `json:"kind,omitempty"` - - // Operation: An identifier that uniquely identifies the operation. You - // can use this identifier to retrieve the Operations resource that has - // information about the operation. - Operation string `json:"operation,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Kind") 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. "Kind") 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 *InstancesPromoteReplicaResponse) MarshalJSON() ([]byte, error) { - type NoMethod InstancesPromoteReplicaResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// InstancesResetSslConfigResponse: Database instance resetSslConfig -// response. -type InstancesResetSslConfigResponse struct { - // Kind: This is always sql#instancesResetSslConfig. - Kind string `json:"kind,omitempty"` - - // Operation: An identifier that uniquely identifies the operation. You - // can use this identifier to retrieve the Operations resource that has - // information about the operation. All ssl client certificates will be - // deleted and a new server certificate will be created. Does not take - // effect until the next instance restart. - Operation string `json:"operation,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Kind") 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. "Kind") 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 *InstancesResetSslConfigResponse) MarshalJSON() ([]byte, error) { - type NoMethod InstancesResetSslConfigResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// InstancesRestartResponse: Database instance restart response. -type InstancesRestartResponse struct { - // Kind: This is always sql#instancesRestart. - Kind string `json:"kind,omitempty"` - - // Operation: An identifier that uniquely identifies the operation. You - // can use this identifier to retrieve the Operations resource that has - // information about the operation. - Operation string `json:"operation,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Kind") 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. "Kind") 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 *InstancesRestartResponse) MarshalJSON() ([]byte, error) { - type NoMethod InstancesRestartResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// InstancesRestoreBackupResponse: Database instance restore backup -// response. -type InstancesRestoreBackupResponse struct { - // Kind: This is always sql#instancesRestoreBackup. - Kind string `json:"kind,omitempty"` - - // Operation: An identifier that uniquely identifies the operation. You - // can use this identifier to retrieve the Operations resource that has - // information about the operation. - Operation string `json:"operation,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Kind") 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. "Kind") 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 *InstancesRestoreBackupResponse) MarshalJSON() ([]byte, error) { - type NoMethod InstancesRestoreBackupResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// InstancesSetRootPasswordResponse: Database instance set root password -// response. -type InstancesSetRootPasswordResponse struct { - // Kind: This is always sql#instancesSetRootPassword. - Kind string `json:"kind,omitempty"` - - // Operation: An identifier that uniquely identifies the operation. You - // can use this identifier to retrieve the Operations resource that has - // information about the operation. - Operation string `json:"operation,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Kind") 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. "Kind") 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 *InstancesSetRootPasswordResponse) MarshalJSON() ([]byte, error) { - type NoMethod InstancesSetRootPasswordResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// InstancesUpdateResponse: Database instance update response. -type InstancesUpdateResponse struct { - // Kind: This is always sql#instancesUpdate. - Kind string `json:"kind,omitempty"` - - // Operation: An identifier that uniquely identifies the operation. You - // can use this identifier to retrieve information about the operation. - Operation string `json:"operation,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Kind") 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. "Kind") 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 *InstancesUpdateResponse) MarshalJSON() ([]byte, error) { - type NoMethod InstancesUpdateResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// IpConfiguration: IP Management configuration. -type IpConfiguration struct { - // AuthorizedNetworks: The list of external networks that are allowed to - // connect to the instance using the IP. In CIDR notation, also known as - // 'slash' notation (e.g. 192.168.100.0/24). - AuthorizedNetworks []string `json:"authorizedNetworks,omitempty"` - - // Enabled: Whether the instance should be assigned an IP address or - // not. - Enabled bool `json:"enabled,omitempty"` - - // Kind: This is always sql#ipConfiguration. - Kind string `json:"kind,omitempty"` - - // RequireSsl: Whether SSL connections over IP should be enforced or - // not. - RequireSsl bool `json:"requireSsl,omitempty"` - - // ForceSendFields is a list of field names (e.g. "AuthorizedNetworks") - // 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. "AuthorizedNetworks") 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 *IpConfiguration) MarshalJSON() ([]byte, error) { - type NoMethod IpConfiguration - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// IpMapping: Database instance IP Mapping. -type IpMapping struct { - // IpAddress: The IP address assigned. - IpAddress string `json:"ipAddress,omitempty"` - - // TimeToRetire: The due time for this IP to be retired in RFC 3339 - // format, for example 2012-11-15T16:19:00.094Z. This field is only - // available when the IP is scheduled to be retired. - TimeToRetire string `json:"timeToRetire,omitempty"` - - // ForceSendFields is a list of field names (e.g. "IpAddress") 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. "IpAddress") 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 *IpMapping) MarshalJSON() ([]byte, error) { - type NoMethod IpMapping - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// LocationPreference: Preferred location. This specifies where a Cloud -// SQL instance should preferably be located, either in a specific -// Compute Engine zone, or co-located with an App Engine application. -// Note that if the preferred location is not available, the instance -// will be located as close as possible within the region. Only one -// location may be specified. -type LocationPreference struct { - // FollowGaeApplication: The App Engine application to follow, it must - // be in the same region as the Cloud SQL instance. - FollowGaeApplication string `json:"followGaeApplication,omitempty"` - - // Kind: This is always sql#locationPreference. - Kind string `json:"kind,omitempty"` - - // Zone: The preferred Compute Engine zone (e.g. us-centra1-a, - // us-central1-b, etc.). - Zone string `json:"zone,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "FollowGaeApplication") 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. "FollowGaeApplication") 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 *LocationPreference) MarshalJSON() ([]byte, error) { - type NoMethod LocationPreference - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// OperationError: Database instance operation error. -type OperationError struct { - // Code: Identifies the specific error that occurred. - Code string `json:"code,omitempty"` - - // Kind: This is always sql#operationError. - Kind string `json:"kind,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Code") 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. "Code") 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 *OperationError) MarshalJSON() ([]byte, error) { - type NoMethod OperationError - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// OperationsListResponse: Database instance list operations response. -type OperationsListResponse struct { - // Items: List of operation resources. - Items []*InstanceOperation `json:"items,omitempty"` - - // Kind: This is always sql#operationsList. - Kind string `json:"kind,omitempty"` - - // NextPageToken: The continuation token, 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. "Items") 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. "Items") 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 *OperationsListResponse) MarshalJSON() ([]byte, error) { - type NoMethod OperationsListResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// SetRootPasswordContext: Database instance set root password context. -type SetRootPasswordContext struct { - // Kind: This is always sql#setRootUserContext. - Kind string `json:"kind,omitempty"` - - // Password: The password for the root user. - Password string `json:"password,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Kind") 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. "Kind") 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 *SetRootPasswordContext) MarshalJSON() ([]byte, error) { - type NoMethod SetRootPasswordContext - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// Settings: Database instance settings. -type Settings struct { - // ActivationPolicy: The activation policy for this instance. This - // specifies when the instance should be activated and is applicable - // only when the instance state is RUNNABLE. This can be one of the - // following. - // ALWAYS: The instance should always be active. - // NEVER: The instance should never be activated. - // ON_DEMAND: The instance is activated upon receiving requests. - ActivationPolicy string `json:"activationPolicy,omitempty"` - - // AuthorizedGaeApplications: The App Engine app IDs that can access - // this instance. - AuthorizedGaeApplications []string `json:"authorizedGaeApplications,omitempty"` - - // BackupConfiguration: The daily backup configuration for the instance. - BackupConfiguration []*BackupConfiguration `json:"backupConfiguration,omitempty"` - - // DatabaseFlags: The database flags passed to the instance at startup. - DatabaseFlags []*DatabaseFlags `json:"databaseFlags,omitempty"` - - // DatabaseReplicationEnabled: Configuration specific to read replica - // instance. Indicates whether replication is enabled or not. - DatabaseReplicationEnabled bool `json:"databaseReplicationEnabled,omitempty"` - - // IpConfiguration: The settings for IP Management. This allows to - // enable or disable the instance IP and manage which external networks - // can connect to the instance. - IpConfiguration *IpConfiguration `json:"ipConfiguration,omitempty"` - - // Kind: This is always sql#settings. - Kind string `json:"kind,omitempty"` - - // LocationPreference: The location preference settings. This allows the - // instance to be located as near as possible to either an App Engine - // app or GCE zone for better performance. - LocationPreference *LocationPreference `json:"locationPreference,omitempty"` - - // PricingPlan: The pricing plan for this instance. This can be either - // PER_USE or PACKAGE. - PricingPlan string `json:"pricingPlan,omitempty"` - - // ReplicationType: The type of replication this instance uses. This can - // be either ASYNCHRONOUS or SYNCHRONOUS. - ReplicationType string `json:"replicationType,omitempty"` - - // SettingsVersion: The version of instance settings. This is a required - // field for update method to make sure concurrent updates are handled - // properly. During update, use the most recent settingsVersion value - // for this instance and do not try to update this value. - SettingsVersion int64 `json:"settingsVersion,omitempty,string"` - - // Tier: The tier of service for this instance, for example D1, D2. For - // more information, see pricing. - Tier string `json:"tier,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ActivationPolicy") 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. "ActivationPolicy") 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 *Settings) MarshalJSON() ([]byte, error) { - type NoMethod Settings - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// SslCert: SslCerts Resource -type SslCert struct { - // Cert: PEM representation. - Cert string `json:"cert,omitempty"` - - // CertSerialNumber: Serial number, as extracted from the certificate. - CertSerialNumber string `json:"certSerialNumber,omitempty"` - - // CommonName: User supplied name. Constrained to [a-zA-Z.-_ ]+. - CommonName string `json:"commonName,omitempty"` - - // CreateTime: Time when the certificate was created. - CreateTime string `json:"createTime,omitempty"` - - // ExpirationTime: Time when the certificate expires. - ExpirationTime string `json:"expirationTime,omitempty"` - - // Instance: Name of the database instance. - Instance string `json:"instance,omitempty"` - - // Kind: This is always sql#sslCert. - Kind string `json:"kind,omitempty"` - - // Sha1Fingerprint: Sha1 Fingerprint. - Sha1Fingerprint string `json:"sha1Fingerprint,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Cert") 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. "Cert") 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 *SslCert) MarshalJSON() ([]byte, error) { - type NoMethod SslCert - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// SslCertDetail: SslCertDetail. -type SslCertDetail struct { - // CertInfo: The public information about the cert. - CertInfo *SslCert `json:"certInfo,omitempty"` - - // CertPrivateKey: The private key for the client cert, in pem format. - // Keep private in order to protect your security. - CertPrivateKey string `json:"certPrivateKey,omitempty"` - - // ForceSendFields is a list of field names (e.g. "CertInfo") 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. "CertInfo") 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 *SslCertDetail) MarshalJSON() ([]byte, error) { - type NoMethod SslCertDetail - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// SslCertsDeleteResponse: SslCert delete response. -type SslCertsDeleteResponse struct { - // Kind: This is always sql#sslCertsDelete. - Kind string `json:"kind,omitempty"` - - // Operation: An identifier that uniquely identifies the operation. You - // can use this identifier to retrieve the Operations resource that has - // information about the operation. - Operation string `json:"operation,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Kind") 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. "Kind") 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 *SslCertsDeleteResponse) MarshalJSON() ([]byte, error) { - type NoMethod SslCertsDeleteResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// SslCertsInsertRequest: SslCerts insert request. -type SslCertsInsertRequest struct { - // CommonName: User supplied name. Must be a distinct name from the - // other certificates for this instance. New certificates will not be - // usable until the instance is restarted. - CommonName string `json:"commonName,omitempty"` - - // ForceSendFields is a list of field names (e.g. "CommonName") 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. "CommonName") 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 *SslCertsInsertRequest) MarshalJSON() ([]byte, error) { - type NoMethod SslCertsInsertRequest - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// SslCertsInsertResponse: SslCert insert response. -type SslCertsInsertResponse struct { - // ClientCert: The new client certificate and private key. The new - // certificate will not work until the instance is restarted. - ClientCert *SslCertDetail `json:"clientCert,omitempty"` - - // Kind: This is always sql#sslCertsInsert. - Kind string `json:"kind,omitempty"` - - // ServerCaCert: The server Certificate Authority's certificate. If this - // is missing you can force a new one to be generated by calling - // resetSslConfig method on instances resource.. - ServerCaCert *SslCert `json:"serverCaCert,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "ClientCert") 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. "ClientCert") 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 *SslCertsInsertResponse) MarshalJSON() ([]byte, error) { - type NoMethod SslCertsInsertResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// SslCertsListResponse: SslCerts list response. -type SslCertsListResponse struct { - // Items: List of client certificates for the instance. - Items []*SslCert `json:"items,omitempty"` - - // Kind: This is always sql#sslCertsList. - Kind string `json:"kind,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Items") 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. "Items") 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 *SslCertsListResponse) MarshalJSON() ([]byte, error) { - type NoMethod SslCertsListResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// Tier: A Google Cloud SQL service tier resource. -type Tier struct { - // DiskQuota: The maximum disk size of this tier in bytes. - DiskQuota int64 `json:"DiskQuota,omitempty,string"` - - // RAM: The maximum RAM usage of this tier in bytes. - RAM int64 `json:"RAM,omitempty,string"` - - // Kind: This is always sql#tier. - Kind string `json:"kind,omitempty"` - - // Region: The applicable regions for this tier. - Region []string `json:"region,omitempty"` - - // Tier: An identifier for the service tier, for example D1, D2 etc. For - // related information, see Pricing. - Tier string `json:"tier,omitempty"` - - // ForceSendFields is a list of field names (e.g. "DiskQuota") 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. "DiskQuota") 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 *Tier) MarshalJSON() ([]byte, error) { - type NoMethod Tier - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// TiersListResponse: Tiers list response. -type TiersListResponse struct { - // Items: List of tiers. - Items []*Tier `json:"items,omitempty"` - - // Kind: This is always sql#tiersList. - Kind string `json:"kind,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Items") 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. "Items") 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 *TiersListResponse) MarshalJSON() ([]byte, error) { - type NoMethod TiersListResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// method id "sql.backupRuns.get": - -type BackupRunsGetCall struct { - s *Service - project string - instance string - backupConfiguration string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Retrieves information about a specified backup run for a Cloud -// SQL instance. -func (r *BackupRunsService) Get(project string, instance string, backupConfiguration string, dueTime string) *BackupRunsGetCall { - c := &BackupRunsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.instance = instance - c.backupConfiguration = backupConfiguration - c.urlParams_.Set("dueTime", dueTime) - 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 *BackupRunsGetCall) Fields(s ...googleapi.Field) *BackupRunsGetCall { - 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 *BackupRunsGetCall) IfNoneMatch(entityTag string) *BackupRunsGetCall { - 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 *BackupRunsGetCall) Context(ctx context.Context) *BackupRunsGetCall { - 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 *BackupRunsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *BackupRunsGetCall) 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) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/instances/{instance}/backupRuns/{backupConfiguration}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "instance": c.instance, - "backupConfiguration": c.backupConfiguration, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "sql.backupRuns.get" call. -// Exactly one of *BackupRun or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *BackupRun.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 *BackupRunsGetCall) Do(opts ...googleapi.CallOption) (*BackupRun, 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 := &BackupRun{ - 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": "Retrieves information about a specified backup run for a Cloud SQL instance.", - // "httpMethod": "GET", - // "id": "sql.backupRuns.get", - // "parameterOrder": [ - // "project", - // "instance", - // "backupConfiguration", - // "dueTime" - // ], - // "parameters": { - // "backupConfiguration": { - // "description": "Identifier for the backup configuration. This gets generated automatically when a backup configuration is created.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "dueTime": { - // "description": "The start time of the four-hour backup window. The backup can occur any time in the window. The time is in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.", - // "location": "query", - // "required": true, - // "type": "string" - // }, - // "instance": { - // "description": "Cloud SQL instance ID. This does not include the project ID.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID of the project that contains the instance.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "projects/{project}/instances/{instance}/backupRuns/{backupConfiguration}", - // "response": { - // "$ref": "BackupRun" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/sqlservice.admin" - // ] - // } - -} - -// method id "sql.backupRuns.list": - -type BackupRunsListCall struct { - s *Service - project string - instance string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists all backup runs associated with a Cloud SQL instance. -func (r *BackupRunsService) List(project string, instance string, backupConfiguration string) *BackupRunsListCall { - c := &BackupRunsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.instance = instance - c.urlParams_.Set("backupConfiguration", backupConfiguration) - return c -} - -// MaxResults sets the optional parameter "maxResults": Maximum number -// of backup runs per response. -func (c *BackupRunsListCall) MaxResults(maxResults int64) *BackupRunsListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// PageToken sets the optional parameter "pageToken": A -// previously-returned page token representing part of the larger set of -// results to view. -func (c *BackupRunsListCall) PageToken(pageToken string) *BackupRunsListCall { - 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 *BackupRunsListCall) Fields(s ...googleapi.Field) *BackupRunsListCall { - 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 *BackupRunsListCall) IfNoneMatch(entityTag string) *BackupRunsListCall { - 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 *BackupRunsListCall) Context(ctx context.Context) *BackupRunsListCall { - 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 *BackupRunsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *BackupRunsListCall) 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) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/instances/{instance}/backupRuns") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "instance": c.instance, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "sql.backupRuns.list" call. -// Exactly one of *BackupRunsListResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *BackupRunsListResponse.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 *BackupRunsListCall) Do(opts ...googleapi.CallOption) (*BackupRunsListResponse, 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 := &BackupRunsListResponse{ - 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": "Lists all backup runs associated with a Cloud SQL instance.", - // "httpMethod": "GET", - // "id": "sql.backupRuns.list", - // "parameterOrder": [ - // "project", - // "instance", - // "backupConfiguration" - // ], - // "parameters": { - // "backupConfiguration": { - // "description": "Identifier for the backup configuration. This gets generated automatically when a backup configuration is created.", - // "location": "query", - // "required": true, - // "type": "string" - // }, - // "instance": { - // "description": "Cloud SQL instance ID. This does not include the project ID.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "maxResults": { - // "description": "Maximum number of backup runs per response.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "A previously-returned page token representing part of the larger set of results to view.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID of the project that contains the instance.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "projects/{project}/instances/{instance}/backupRuns", - // "response": { - // "$ref": "BackupRunsListResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/sqlservice.admin" - // ] - // } - -} - -// 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 *BackupRunsListCall) Pages(ctx context.Context, f func(*BackupRunsListResponse) 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 "sql.flags.list": - -type FlagsListCall struct { - s *Service - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists all database flags that can be set for Google Cloud SQL -// instances. -func (r *FlagsService) List() *FlagsListCall { - c := &FlagsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - 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 *FlagsListCall) Fields(s ...googleapi.Field) *FlagsListCall { - 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 *FlagsListCall) IfNoneMatch(entityTag string) *FlagsListCall { - 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 *FlagsListCall) Context(ctx context.Context) *FlagsListCall { - 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 *FlagsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *FlagsListCall) 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) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "flags") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "sql.flags.list" call. -// Exactly one of *FlagsListResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *FlagsListResponse.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 *FlagsListCall) Do(opts ...googleapi.CallOption) (*FlagsListResponse, 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 := &FlagsListResponse{ - 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": "Lists all database flags that can be set for Google Cloud SQL instances.", - // "httpMethod": "GET", - // "id": "sql.flags.list", - // "path": "flags", - // "response": { - // "$ref": "FlagsListResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/sqlservice.admin" - // ] - // } - -} - -// method id "sql.instances.clone": - -type InstancesCloneCall struct { - s *Service - project string - instancesclonerequest *InstancesCloneRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Clone: Creates a Cloud SQL instance as a clone of a source instance. -func (r *InstancesService) Clone(project string, instancesclonerequest *InstancesCloneRequest) *InstancesCloneCall { - c := &InstancesCloneCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.instancesclonerequest = instancesclonerequest - 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 *InstancesCloneCall) Fields(s ...googleapi.Field) *InstancesCloneCall { - 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 *InstancesCloneCall) Context(ctx context.Context) *InstancesCloneCall { - 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 *InstancesCloneCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesCloneCall) 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.instancesclonerequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/instances/clone") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "sql.instances.clone" call. -// Exactly one of *InstancesCloneResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *InstancesCloneResponse.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 *InstancesCloneCall) Do(opts ...googleapi.CallOption) (*InstancesCloneResponse, 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 := &InstancesCloneResponse{ - 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": "Creates a Cloud SQL instance as a clone of a source instance.", - // "httpMethod": "POST", - // "id": "sql.instances.clone", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "project": { - // "description": "Project ID of the source as well as the clone Cloud SQL instance.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "projects/{project}/instances/clone", - // "request": { - // "$ref": "InstancesCloneRequest" - // }, - // "response": { - // "$ref": "InstancesCloneResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/sqlservice.admin" - // ] - // } - -} - -// method id "sql.instances.delete": - -type InstancesDeleteCall struct { - s *Service - project string - instance string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes a Cloud SQL instance. -func (r *InstancesService) Delete(project string, instance string) *InstancesDeleteCall { - c := &InstancesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.instance = instance - 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 *InstancesDeleteCall) Fields(s ...googleapi.Field) *InstancesDeleteCall { - 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 *InstancesDeleteCall) Context(ctx context.Context) *InstancesDeleteCall { - 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 *InstancesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesDeleteCall) 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 - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/instances/{instance}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("DELETE", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "instance": c.instance, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "sql.instances.delete" call. -// Exactly one of *InstancesDeleteResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *InstancesDeleteResponse.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 *InstancesDeleteCall) Do(opts ...googleapi.CallOption) (*InstancesDeleteResponse, 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 := &InstancesDeleteResponse{ - 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": "Deletes a Cloud SQL instance.", - // "httpMethod": "DELETE", - // "id": "sql.instances.delete", - // "parameterOrder": [ - // "project", - // "instance" - // ], - // "parameters": { - // "instance": { - // "description": "Cloud SQL instance ID. This does not include the project ID.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID of the project that contains the instance to be deleted.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "projects/{project}/instances/{instance}", - // "response": { - // "$ref": "InstancesDeleteResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/sqlservice.admin" - // ] - // } - -} - -// method id "sql.instances.export": - -type InstancesExportCall struct { - s *Service - project string - instance string - instancesexportrequest *InstancesExportRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Export: Exports data from a Cloud SQL instance to a Google Cloud -// Storage bucket as a MySQL dump file. -func (r *InstancesService) Export(project string, instance string, instancesexportrequest *InstancesExportRequest) *InstancesExportCall { - c := &InstancesExportCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.instance = instance - c.instancesexportrequest = instancesexportrequest - 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 *InstancesExportCall) Fields(s ...googleapi.Field) *InstancesExportCall { - 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 *InstancesExportCall) Context(ctx context.Context) *InstancesExportCall { - 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 *InstancesExportCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesExportCall) 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.instancesexportrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/instances/{instance}/export") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "instance": c.instance, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "sql.instances.export" call. -// Exactly one of *InstancesExportResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *InstancesExportResponse.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 *InstancesExportCall) Do(opts ...googleapi.CallOption) (*InstancesExportResponse, 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 := &InstancesExportResponse{ - 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": "Exports data from a Cloud SQL instance to a Google Cloud Storage bucket as a MySQL dump file.", - // "httpMethod": "POST", - // "id": "sql.instances.export", - // "parameterOrder": [ - // "project", - // "instance" - // ], - // "parameters": { - // "instance": { - // "description": "Cloud SQL instance ID. This does not include the project ID.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID of the project that contains the instance to be exported.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "projects/{project}/instances/{instance}/export", - // "request": { - // "$ref": "InstancesExportRequest" - // }, - // "response": { - // "$ref": "InstancesExportResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "sql.instances.get": - -type InstancesGetCall struct { - s *Service - project string - instance string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Retrieves information about a Cloud SQL instance. -func (r *InstancesService) Get(project string, instance string) *InstancesGetCall { - c := &InstancesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.instance = instance - 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 *InstancesGetCall) Fields(s ...googleapi.Field) *InstancesGetCall { - 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 *InstancesGetCall) IfNoneMatch(entityTag string) *InstancesGetCall { - 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 *InstancesGetCall) Context(ctx context.Context) *InstancesGetCall { - 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 *InstancesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesGetCall) 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) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/instances/{instance}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "instance": c.instance, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "sql.instances.get" call. -// Exactly one of *DatabaseInstance or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *DatabaseInstance.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 *InstancesGetCall) Do(opts ...googleapi.CallOption) (*DatabaseInstance, 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 := &DatabaseInstance{ - 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": "Retrieves information about a Cloud SQL instance.", - // "httpMethod": "GET", - // "id": "sql.instances.get", - // "parameterOrder": [ - // "project", - // "instance" - // ], - // "parameters": { - // "instance": { - // "description": "Database instance ID. This does not include the project ID.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID of the project that contains the instance.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "projects/{project}/instances/{instance}", - // "response": { - // "$ref": "DatabaseInstance" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/sqlservice.admin" - // ] - // } - -} - -// method id "sql.instances.import": - -type InstancesImportCall struct { - s *Service - project string - instance string - instancesimportrequest *InstancesImportRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Import: Imports data into a Cloud SQL instance from a MySQL dump file -// stored in a Google Cloud Storage bucket. -func (r *InstancesService) Import(project string, instance string, instancesimportrequest *InstancesImportRequest) *InstancesImportCall { - c := &InstancesImportCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.instance = instance - c.instancesimportrequest = instancesimportrequest - 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 *InstancesImportCall) Fields(s ...googleapi.Field) *InstancesImportCall { - 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 *InstancesImportCall) Context(ctx context.Context) *InstancesImportCall { - 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 *InstancesImportCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesImportCall) 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.instancesimportrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/instances/{instance}/import") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "instance": c.instance, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "sql.instances.import" call. -// Exactly one of *InstancesImportResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *InstancesImportResponse.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 *InstancesImportCall) Do(opts ...googleapi.CallOption) (*InstancesImportResponse, 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 := &InstancesImportResponse{ - 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": "Imports data into a Cloud SQL instance from a MySQL dump file stored in a Google Cloud Storage bucket.", - // "httpMethod": "POST", - // "id": "sql.instances.import", - // "parameterOrder": [ - // "project", - // "instance" - // ], - // "parameters": { - // "instance": { - // "description": "Cloud SQL instance ID. This does not include the project ID.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID of the project that contains the instance.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "projects/{project}/instances/{instance}/import", - // "request": { - // "$ref": "InstancesImportRequest" - // }, - // "response": { - // "$ref": "InstancesImportResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "sql.instances.insert": - -type InstancesInsertCall struct { - s *Service - project string - databaseinstance *DatabaseInstance - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a new Cloud SQL instance. -func (r *InstancesService) Insert(project string, databaseinstance *DatabaseInstance) *InstancesInsertCall { - c := &InstancesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.databaseinstance = databaseinstance - 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 *InstancesInsertCall) Fields(s ...googleapi.Field) *InstancesInsertCall { - 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 *InstancesInsertCall) Context(ctx context.Context) *InstancesInsertCall { - 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 *InstancesInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesInsertCall) 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.databaseinstance) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/instances") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "sql.instances.insert" call. -// Exactly one of *InstancesInsertResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *InstancesInsertResponse.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 *InstancesInsertCall) Do(opts ...googleapi.CallOption) (*InstancesInsertResponse, 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 := &InstancesInsertResponse{ - 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": "Creates a new Cloud SQL instance.", - // "httpMethod": "POST", - // "id": "sql.instances.insert", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "project": { - // "description": "Project ID of the project to which the newly created Cloud SQL instances should belong.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "projects/{project}/instances", - // "request": { - // "$ref": "DatabaseInstance" - // }, - // "response": { - // "$ref": "InstancesInsertResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/sqlservice.admin" - // ] - // } - -} - -// method id "sql.instances.list": - -type InstancesListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists instances for a given project, in alphabetical order by -// instance name. -func (r *InstancesService) List(project string) *InstancesListCall { - c := &InstancesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results to return per response. -func (c *InstancesListCall) MaxResults(maxResults int64) *InstancesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// PageToken sets the optional parameter "pageToken": A -// previously-returned page token representing part of the larger set of -// results to view. -func (c *InstancesListCall) PageToken(pageToken string) *InstancesListCall { - 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 *InstancesListCall) Fields(s ...googleapi.Field) *InstancesListCall { - 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 *InstancesListCall) IfNoneMatch(entityTag string) *InstancesListCall { - 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 *InstancesListCall) Context(ctx context.Context) *InstancesListCall { - 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 *InstancesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesListCall) 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) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/instances") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "sql.instances.list" call. -// Exactly one of *InstancesListResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *InstancesListResponse.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 *InstancesListCall) Do(opts ...googleapi.CallOption) (*InstancesListResponse, 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 := &InstancesListResponse{ - 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": "Lists instances for a given project, in alphabetical order by instance name.", - // "httpMethod": "GET", - // "id": "sql.instances.list", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "maxResults": { - // "description": "The maximum number of results to return per response.", - // "format": "uint32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "A previously-returned page token representing part of the larger set of results to view.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID of the project for which to list Cloud SQL instances.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "projects/{project}/instances", - // "response": { - // "$ref": "InstancesListResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/sqlservice.admin" - // ] - // } - -} - -// 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 *InstancesListCall) Pages(ctx context.Context, f func(*InstancesListResponse) 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 "sql.instances.patch": - -type InstancesPatchCall struct { - s *Service - project string - instance string - databaseinstance *DatabaseInstance - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Updates the settings of a Cloud SQL instance. This method -// supports patch semantics. -func (r *InstancesService) Patch(project string, instance string, databaseinstance *DatabaseInstance) *InstancesPatchCall { - c := &InstancesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.instance = instance - c.databaseinstance = databaseinstance - 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 *InstancesPatchCall) Fields(s ...googleapi.Field) *InstancesPatchCall { - 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 *InstancesPatchCall) Context(ctx context.Context) *InstancesPatchCall { - 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 *InstancesPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesPatchCall) 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.databaseinstance) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/instances/{instance}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("PATCH", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "instance": c.instance, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "sql.instances.patch" call. -// Exactly one of *InstancesUpdateResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *InstancesUpdateResponse.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 *InstancesPatchCall) Do(opts ...googleapi.CallOption) (*InstancesUpdateResponse, 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 := &InstancesUpdateResponse{ - 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": "Updates the settings of a Cloud SQL instance. This method supports patch semantics.", - // "httpMethod": "PATCH", - // "id": "sql.instances.patch", - // "parameterOrder": [ - // "project", - // "instance" - // ], - // "parameters": { - // "instance": { - // "description": "Cloud SQL instance ID. This does not include the project ID.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID of the project that contains the instance.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "projects/{project}/instances/{instance}", - // "request": { - // "$ref": "DatabaseInstance" - // }, - // "response": { - // "$ref": "InstancesUpdateResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/sqlservice.admin" - // ] - // } - -} - -// method id "sql.instances.promoteReplica": - -type InstancesPromoteReplicaCall struct { - s *Service - project string - instance string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// PromoteReplica: Promotes the read replica instance to be a -// stand-alone Cloud SQL instance. -func (r *InstancesService) PromoteReplica(project string, instance string) *InstancesPromoteReplicaCall { - c := &InstancesPromoteReplicaCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.instance = instance - 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 *InstancesPromoteReplicaCall) Fields(s ...googleapi.Field) *InstancesPromoteReplicaCall { - 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 *InstancesPromoteReplicaCall) Context(ctx context.Context) *InstancesPromoteReplicaCall { - 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 *InstancesPromoteReplicaCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesPromoteReplicaCall) 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 - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/instances/{instance}/promoteReplica") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "instance": c.instance, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "sql.instances.promoteReplica" call. -// Exactly one of *InstancesPromoteReplicaResponse or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *InstancesPromoteReplicaResponse.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 *InstancesPromoteReplicaCall) Do(opts ...googleapi.CallOption) (*InstancesPromoteReplicaResponse, 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 := &InstancesPromoteReplicaResponse{ - 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": "Promotes the read replica instance to be a stand-alone Cloud SQL instance.", - // "httpMethod": "POST", - // "id": "sql.instances.promoteReplica", - // "parameterOrder": [ - // "project", - // "instance" - // ], - // "parameters": { - // "instance": { - // "description": "Cloud SQL read replica instance name.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "ID of the project that contains the read replica.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "projects/{project}/instances/{instance}/promoteReplica", - // "response": { - // "$ref": "InstancesPromoteReplicaResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/sqlservice.admin" - // ] - // } - -} - -// method id "sql.instances.resetSslConfig": - -type InstancesResetSslConfigCall struct { - s *Service - project string - instance string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// ResetSslConfig: Deletes all client certificates and generates a new -// server SSL certificate for a Cloud SQL instance. -func (r *InstancesService) ResetSslConfig(project string, instance string) *InstancesResetSslConfigCall { - c := &InstancesResetSslConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.instance = instance - 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 *InstancesResetSslConfigCall) Fields(s ...googleapi.Field) *InstancesResetSslConfigCall { - 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 *InstancesResetSslConfigCall) Context(ctx context.Context) *InstancesResetSslConfigCall { - 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 *InstancesResetSslConfigCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesResetSslConfigCall) 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 - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/instances/{instance}/resetSslConfig") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "instance": c.instance, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "sql.instances.resetSslConfig" call. -// Exactly one of *InstancesResetSslConfigResponse or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *InstancesResetSslConfigResponse.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 *InstancesResetSslConfigCall) Do(opts ...googleapi.CallOption) (*InstancesResetSslConfigResponse, 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 := &InstancesResetSslConfigResponse{ - 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": "Deletes all client certificates and generates a new server SSL certificate for a Cloud SQL instance.", - // "httpMethod": "POST", - // "id": "sql.instances.resetSslConfig", - // "parameterOrder": [ - // "project", - // "instance" - // ], - // "parameters": { - // "instance": { - // "description": "Cloud SQL instance ID. This does not include the project ID.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID of the project that contains the instance.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "projects/{project}/instances/{instance}/resetSslConfig", - // "response": { - // "$ref": "InstancesResetSslConfigResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/sqlservice.admin" - // ] - // } - -} - -// method id "sql.instances.restart": - -type InstancesRestartCall struct { - s *Service - project string - instance string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Restart: Restarts a Cloud SQL instance. -func (r *InstancesService) Restart(project string, instance string) *InstancesRestartCall { - c := &InstancesRestartCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.instance = instance - 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 *InstancesRestartCall) Fields(s ...googleapi.Field) *InstancesRestartCall { - 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 *InstancesRestartCall) Context(ctx context.Context) *InstancesRestartCall { - 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 *InstancesRestartCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesRestartCall) 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 - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/instances/{instance}/restart") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "instance": c.instance, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "sql.instances.restart" call. -// Exactly one of *InstancesRestartResponse or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *InstancesRestartResponse.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 *InstancesRestartCall) Do(opts ...googleapi.CallOption) (*InstancesRestartResponse, 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 := &InstancesRestartResponse{ - 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": "Restarts a Cloud SQL instance.", - // "httpMethod": "POST", - // "id": "sql.instances.restart", - // "parameterOrder": [ - // "project", - // "instance" - // ], - // "parameters": { - // "instance": { - // "description": "Cloud SQL instance ID. This does not include the project ID.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID of the project that contains the instance to be restarted.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "projects/{project}/instances/{instance}/restart", - // "response": { - // "$ref": "InstancesRestartResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/sqlservice.admin" - // ] - // } - -} - -// method id "sql.instances.restoreBackup": - -type InstancesRestoreBackupCall struct { - s *Service - project string - instance string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// RestoreBackup: Restores a backup of a Cloud SQL instance. -func (r *InstancesService) RestoreBackup(project string, instance string, backupConfigurationid string, dueTime string) *InstancesRestoreBackupCall { - c := &InstancesRestoreBackupCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.instance = instance - c.urlParams_.Set("backupConfiguration", backupConfigurationid) - c.urlParams_.Set("dueTime", dueTime) - 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 *InstancesRestoreBackupCall) Fields(s ...googleapi.Field) *InstancesRestoreBackupCall { - 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 *InstancesRestoreBackupCall) Context(ctx context.Context) *InstancesRestoreBackupCall { - 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 *InstancesRestoreBackupCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesRestoreBackupCall) 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 - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/instances/{instance}/restoreBackup") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "instance": c.instance, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "sql.instances.restoreBackup" call. -// Exactly one of *InstancesRestoreBackupResponse or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *InstancesRestoreBackupResponse.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 *InstancesRestoreBackupCall) Do(opts ...googleapi.CallOption) (*InstancesRestoreBackupResponse, 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 := &InstancesRestoreBackupResponse{ - 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": "Restores a backup of a Cloud SQL instance.", - // "httpMethod": "POST", - // "id": "sql.instances.restoreBackup", - // "parameterOrder": [ - // "project", - // "instance", - // "backupConfiguration", - // "dueTime" - // ], - // "parameters": { - // "backupConfiguration": { - // "description": "The identifier of the backup configuration. This gets generated automatically when a backup configuration is created.", - // "location": "query", - // "required": true, - // "type": "string" - // }, - // "dueTime": { - // "description": "The start time of the four-hour backup window. The backup can occur any time in the window. The time is in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.", - // "location": "query", - // "required": true, - // "type": "string" - // }, - // "instance": { - // "description": "Cloud SQL instance ID. This does not include the project ID.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID of the project that contains the instance.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "projects/{project}/instances/{instance}/restoreBackup", - // "response": { - // "$ref": "InstancesRestoreBackupResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/sqlservice.admin" - // ] - // } - -} - -// method id "sql.instances.setRootPassword": - -type InstancesSetRootPasswordCall struct { - s *Service - project string - instance string - instancesetrootpasswordrequest *InstanceSetRootPasswordRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetRootPassword: Sets the password for the root user of the specified -// Cloud SQL instance. -func (r *InstancesService) SetRootPassword(project string, instance string, instancesetrootpasswordrequest *InstanceSetRootPasswordRequest) *InstancesSetRootPasswordCall { - c := &InstancesSetRootPasswordCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.instance = instance - c.instancesetrootpasswordrequest = instancesetrootpasswordrequest - 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 *InstancesSetRootPasswordCall) Fields(s ...googleapi.Field) *InstancesSetRootPasswordCall { - 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 *InstancesSetRootPasswordCall) Context(ctx context.Context) *InstancesSetRootPasswordCall { - 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 *InstancesSetRootPasswordCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesSetRootPasswordCall) 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.instancesetrootpasswordrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/instances/{instance}/setRootPassword") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "instance": c.instance, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "sql.instances.setRootPassword" call. -// Exactly one of *InstancesSetRootPasswordResponse or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *InstancesSetRootPasswordResponse.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 *InstancesSetRootPasswordCall) Do(opts ...googleapi.CallOption) (*InstancesSetRootPasswordResponse, 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 := &InstancesSetRootPasswordResponse{ - 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": "Sets the password for the root user of the specified Cloud SQL instance.", - // "httpMethod": "POST", - // "id": "sql.instances.setRootPassword", - // "parameterOrder": [ - // "project", - // "instance" - // ], - // "parameters": { - // "instance": { - // "description": "Cloud SQL instance ID. This does not include the project ID.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID of the project that contains the instance.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "projects/{project}/instances/{instance}/setRootPassword", - // "request": { - // "$ref": "InstanceSetRootPasswordRequest" - // }, - // "response": { - // "$ref": "InstancesSetRootPasswordResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/sqlservice.admin" - // ] - // } - -} - -// method id "sql.instances.update": - -type InstancesUpdateCall struct { - s *Service - project string - instance string - databaseinstance *DatabaseInstance - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Update: Updates the settings of a Cloud SQL instance. -func (r *InstancesService) Update(project string, instance string, databaseinstance *DatabaseInstance) *InstancesUpdateCall { - c := &InstancesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.instance = instance - c.databaseinstance = databaseinstance - 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 *InstancesUpdateCall) Fields(s ...googleapi.Field) *InstancesUpdateCall { - 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 *InstancesUpdateCall) Context(ctx context.Context) *InstancesUpdateCall { - 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 *InstancesUpdateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesUpdateCall) 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.databaseinstance) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/instances/{instance}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("PUT", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "instance": c.instance, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "sql.instances.update" call. -// Exactly one of *InstancesUpdateResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *InstancesUpdateResponse.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 *InstancesUpdateCall) Do(opts ...googleapi.CallOption) (*InstancesUpdateResponse, 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 := &InstancesUpdateResponse{ - 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": "Updates the settings of a Cloud SQL instance.", - // "etagRequired": true, - // "httpMethod": "PUT", - // "id": "sql.instances.update", - // "parameterOrder": [ - // "project", - // "instance" - // ], - // "parameters": { - // "instance": { - // "description": "Cloud SQL instance ID. This does not include the project ID.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID of the project that contains the instance.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "projects/{project}/instances/{instance}", - // "request": { - // "$ref": "DatabaseInstance" - // }, - // "response": { - // "$ref": "InstancesUpdateResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/sqlservice.admin" - // ] - // } - -} - -// method id "sql.operations.get": - -type OperationsGetCall struct { - s *Service - project string - instance string - operation string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Retrieves information about a specific operation that was -// performed on a Cloud SQL instance. -func (r *OperationsService) Get(project string, instance string, operation string) *OperationsGetCall { - c := &OperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.instance = instance - c.operation = operation - 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 *OperationsGetCall) Fields(s ...googleapi.Field) *OperationsGetCall { - 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 *OperationsGetCall) IfNoneMatch(entityTag string) *OperationsGetCall { - 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 *OperationsGetCall) Context(ctx context.Context) *OperationsGetCall { - 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 *OperationsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *OperationsGetCall) 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) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/instances/{instance}/operations/{operation}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "instance": c.instance, - "operation": c.operation, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "sql.operations.get" call. -// Exactly one of *InstanceOperation or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *InstanceOperation.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 *OperationsGetCall) Do(opts ...googleapi.CallOption) (*InstanceOperation, 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 := &InstanceOperation{ - 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": "Retrieves information about a specific operation that was performed on a Cloud SQL instance.", - // "httpMethod": "GET", - // "id": "sql.operations.get", - // "parameterOrder": [ - // "project", - // "instance", - // "operation" - // ], - // "parameters": { - // "instance": { - // "description": "Cloud SQL instance ID. This does not include the project ID.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "operation": { - // "description": "Instance operation ID.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID of the project that contains the instance.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "projects/{project}/instances/{instance}/operations/{operation}", - // "response": { - // "$ref": "InstanceOperation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/sqlservice.admin" - // ] - // } - -} - -// method id "sql.operations.list": - -type OperationsListCall struct { - s *Service - project string - instance string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists all operations that have been performed on a Cloud SQL -// instance. -func (r *OperationsService) List(project string, instance string) *OperationsListCall { - c := &OperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.instance = instance - return c -} - -// MaxResults sets the optional parameter "maxResults": Maximum number -// of operations per response. -func (c *OperationsListCall) MaxResults(maxResults int64) *OperationsListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// PageToken sets the optional parameter "pageToken": A -// previously-returned page token representing part of the larger set of -// results to view. -func (c *OperationsListCall) PageToken(pageToken string) *OperationsListCall { - 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 *OperationsListCall) Fields(s ...googleapi.Field) *OperationsListCall { - 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 *OperationsListCall) IfNoneMatch(entityTag string) *OperationsListCall { - 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 *OperationsListCall) Context(ctx context.Context) *OperationsListCall { - 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 *OperationsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *OperationsListCall) 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) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/instances/{instance}/operations") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "instance": c.instance, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "sql.operations.list" call. -// Exactly one of *OperationsListResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *OperationsListResponse.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 *OperationsListCall) Do(opts ...googleapi.CallOption) (*OperationsListResponse, 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 := &OperationsListResponse{ - 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": "Lists all operations that have been performed on a Cloud SQL instance.", - // "httpMethod": "GET", - // "id": "sql.operations.list", - // "parameterOrder": [ - // "project", - // "instance" - // ], - // "parameters": { - // "instance": { - // "description": "Cloud SQL instance ID. This does not include the project ID.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "maxResults": { - // "description": "Maximum number of operations per response.", - // "format": "uint32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "A previously-returned page token representing part of the larger set of results to view.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID of the project that contains the instance.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "projects/{project}/instances/{instance}/operations", - // "response": { - // "$ref": "OperationsListResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/sqlservice.admin" - // ] - // } - -} - -// 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 *OperationsListCall) Pages(ctx context.Context, f func(*OperationsListResponse) 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 "sql.sslCerts.delete": - -type SslCertsDeleteCall struct { - s *Service - project string - instance string - sha1Fingerprint string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes an SSL certificate from a Cloud SQL instance. -func (r *SslCertsService) Delete(project string, instance string, sha1Fingerprint string) *SslCertsDeleteCall { - c := &SslCertsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.instance = instance - c.sha1Fingerprint = sha1Fingerprint - 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 *SslCertsDeleteCall) Fields(s ...googleapi.Field) *SslCertsDeleteCall { - 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 *SslCertsDeleteCall) Context(ctx context.Context) *SslCertsDeleteCall { - 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 *SslCertsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SslCertsDeleteCall) 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 - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/instances/{instance}/sslCerts/{sha1Fingerprint}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("DELETE", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "instance": c.instance, - "sha1Fingerprint": c.sha1Fingerprint, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "sql.sslCerts.delete" call. -// Exactly one of *SslCertsDeleteResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *SslCertsDeleteResponse.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 *SslCertsDeleteCall) Do(opts ...googleapi.CallOption) (*SslCertsDeleteResponse, 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 := &SslCertsDeleteResponse{ - 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": "Deletes an SSL certificate from a Cloud SQL instance.", - // "httpMethod": "DELETE", - // "id": "sql.sslCerts.delete", - // "parameterOrder": [ - // "project", - // "instance", - // "sha1Fingerprint" - // ], - // "parameters": { - // "instance": { - // "description": "Cloud SQL instance ID. This does not include the project ID.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID of the project that contains the instance to be deleted.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "sha1Fingerprint": { - // "description": "Sha1 FingerPrint.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "projects/{project}/instances/{instance}/sslCerts/{sha1Fingerprint}", - // "response": { - // "$ref": "SslCertsDeleteResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/sqlservice.admin" - // ] - // } - -} - -// method id "sql.sslCerts.get": - -type SslCertsGetCall struct { - s *Service - project string - instance string - sha1Fingerprint string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Retrieves an SSL certificate as specified by its SHA-1 -// fingerprint. -func (r *SslCertsService) Get(project string, instance string, sha1Fingerprint string) *SslCertsGetCall { - c := &SslCertsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.instance = instance - c.sha1Fingerprint = sha1Fingerprint - 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 *SslCertsGetCall) Fields(s ...googleapi.Field) *SslCertsGetCall { - 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 *SslCertsGetCall) IfNoneMatch(entityTag string) *SslCertsGetCall { - 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 *SslCertsGetCall) Context(ctx context.Context) *SslCertsGetCall { - 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 *SslCertsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SslCertsGetCall) 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) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/instances/{instance}/sslCerts/{sha1Fingerprint}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "instance": c.instance, - "sha1Fingerprint": c.sha1Fingerprint, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "sql.sslCerts.get" call. -// Exactly one of *SslCert or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *SslCert.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 *SslCertsGetCall) Do(opts ...googleapi.CallOption) (*SslCert, 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 := &SslCert{ - 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": "Retrieves an SSL certificate as specified by its SHA-1 fingerprint.", - // "httpMethod": "GET", - // "id": "sql.sslCerts.get", - // "parameterOrder": [ - // "project", - // "instance", - // "sha1Fingerprint" - // ], - // "parameters": { - // "instance": { - // "description": "Cloud SQL instance ID. This does not include the project ID.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID of the project that contains the instance.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "sha1Fingerprint": { - // "description": "Sha1 FingerPrint.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "projects/{project}/instances/{instance}/sslCerts/{sha1Fingerprint}", - // "response": { - // "$ref": "SslCert" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/sqlservice.admin" - // ] - // } - -} - -// method id "sql.sslCerts.insert": - -type SslCertsInsertCall struct { - s *Service - project string - instance string - sslcertsinsertrequest *SslCertsInsertRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates an SSL certificate and returns the certificate, the -// associated private key, and the server certificate authority. -func (r *SslCertsService) Insert(project string, instance string, sslcertsinsertrequest *SslCertsInsertRequest) *SslCertsInsertCall { - c := &SslCertsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.instance = instance - c.sslcertsinsertrequest = sslcertsinsertrequest - 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 *SslCertsInsertCall) Fields(s ...googleapi.Field) *SslCertsInsertCall { - 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 *SslCertsInsertCall) Context(ctx context.Context) *SslCertsInsertCall { - 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 *SslCertsInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SslCertsInsertCall) 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.sslcertsinsertrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/instances/{instance}/sslCerts") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "instance": c.instance, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "sql.sslCerts.insert" call. -// Exactly one of *SslCertsInsertResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *SslCertsInsertResponse.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 *SslCertsInsertCall) Do(opts ...googleapi.CallOption) (*SslCertsInsertResponse, 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 := &SslCertsInsertResponse{ - 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": "Creates an SSL certificate and returns the certificate, the associated private key, and the server certificate authority.", - // "httpMethod": "POST", - // "id": "sql.sslCerts.insert", - // "parameterOrder": [ - // "project", - // "instance" - // ], - // "parameters": { - // "instance": { - // "description": "Cloud SQL instance ID. This does not include the project ID.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID of the project to which the newly created Cloud SQL instances should belong.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "projects/{project}/instances/{instance}/sslCerts", - // "request": { - // "$ref": "SslCertsInsertRequest" - // }, - // "response": { - // "$ref": "SslCertsInsertResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/sqlservice.admin" - // ] - // } - -} - -// method id "sql.sslCerts.list": - -type SslCertsListCall struct { - s *Service - project string - instance string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists all of the current SSL certificates defined for a Cloud -// SQL instance. -func (r *SslCertsService) List(project string, instance string) *SslCertsListCall { - c := &SslCertsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.instance = instance - 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 *SslCertsListCall) Fields(s ...googleapi.Field) *SslCertsListCall { - 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 *SslCertsListCall) IfNoneMatch(entityTag string) *SslCertsListCall { - 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 *SslCertsListCall) Context(ctx context.Context) *SslCertsListCall { - 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 *SslCertsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SslCertsListCall) 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) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/instances/{instance}/sslCerts") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "instance": c.instance, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "sql.sslCerts.list" call. -// Exactly one of *SslCertsListResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *SslCertsListResponse.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 *SslCertsListCall) Do(opts ...googleapi.CallOption) (*SslCertsListResponse, 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 := &SslCertsListResponse{ - 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": "Lists all of the current SSL certificates defined for a Cloud SQL instance.", - // "httpMethod": "GET", - // "id": "sql.sslCerts.list", - // "parameterOrder": [ - // "project", - // "instance" - // ], - // "parameters": { - // "instance": { - // "description": "Cloud SQL instance ID. This does not include the project ID.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID of the project for which to list Cloud SQL instances.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "projects/{project}/instances/{instance}/sslCerts", - // "response": { - // "$ref": "SslCertsListResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/sqlservice.admin" - // ] - // } - -} - -// method id "sql.tiers.list": - -type TiersListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists service tiers that can be used to create Google Cloud SQL -// instances. -func (r *TiersService) List(project string) *TiersListCall { - c := &TiersListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - 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 *TiersListCall) Fields(s ...googleapi.Field) *TiersListCall { - 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 *TiersListCall) IfNoneMatch(entityTag string) *TiersListCall { - 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 *TiersListCall) Context(ctx context.Context) *TiersListCall { - 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 *TiersListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TiersListCall) 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) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/tiers") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "sql.tiers.list" call. -// Exactly one of *TiersListResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *TiersListResponse.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 *TiersListCall) Do(opts ...googleapi.CallOption) (*TiersListResponse, 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 := &TiersListResponse{ - 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": "Lists service tiers that can be used to create Google Cloud SQL instances.", - // "httpMethod": "GET", - // "id": "sql.tiers.list", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "project": { - // "description": "Project ID of the project for which to list tiers.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "projects/{project}/tiers", - // "response": { - // "$ref": "TiersListResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/sqlservice.admin" - // ] - // } - -}
diff --git a/taskqueue/v1beta1/taskqueue-api.json b/taskqueue/v1beta1/taskqueue-api.json deleted file mode 100644 index 31e4c3c..0000000 --- a/taskqueue/v1beta1/taskqueue-api.json +++ /dev/null
@@ -1,422 +0,0 @@ -{ - "auth": { - "oauth2": { - "scopes": { - "https://www.googleapis.com/auth/taskqueue": { - "description": "Manage your Tasks and Taskqueues" - }, - "https://www.googleapis.com/auth/taskqueue.consumer": { - "description": "Consume Tasks from your Taskqueues" - } - } - } - }, - "basePath": "/taskqueue/v1beta1/projects/", - "baseUrl": "https://www.googleapis.com/taskqueue/v1beta1/projects/", - "batchPath": "batch/taskqueue/v1beta1", - "description": "Accesses a Google App Engine Pull Task Queue over REST.", - "discoveryVersion": "v1", - "documentationLink": "https://developers.google.com/appengine/docs/python/taskqueue/rest", - "etag": "\"-iA1DTNe4s-I6JZXPt1t1Ypy8IU/UNHEtVyVE-POJmRW0SrDcBQE6KY\"", - "icons": { - "x16": "https://www.google.com/images/icons/product/app_engine-16.png", - "x32": "https://www.google.com/images/icons/product/app_engine-32.png" - }, - "id": "taskqueue:v1beta1", - "kind": "discovery#restDescription", - "name": "taskqueue", - "ownerDomain": "google.com", - "ownerName": "Google", - "parameters": { - "alt": { - "default": "json", - "description": "Data format for the response.", - "enum": [ - "json" - ], - "enumDescriptions": [ - "Responses with Content-Type of application/json" - ], - "location": "query", - "type": "string" - }, - "fields": { - "description": "Selector specifying which fields to include in a partial response.", - "location": "query", - "type": "string" - }, - "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" - }, - "oauth_token": { - "description": "OAuth 2.0 token for the current user.", - "location": "query", - "type": "string" - }, - "prettyPrint": { - "default": "true", - "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": { - "taskqueues": { - "methods": { - "get": { - "description": "Get detailed information about a TaskQueue.", - "httpMethod": "GET", - "id": "taskqueue.taskqueues.get", - "parameterOrder": [ - "project", - "taskqueue" - ], - "parameters": { - "getStats": { - "description": "Whether to get stats. Optional.", - "location": "query", - "type": "boolean" - }, - "project": { - "description": "The project under which the queue lies.", - "location": "path", - "required": true, - "type": "string" - }, - "taskqueue": { - "description": "The id of the taskqueue to get the properties of.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "{project}/taskqueues/{taskqueue}", - "response": { - "$ref": "TaskQueue" - }, - "scopes": [ - "https://www.googleapis.com/auth/taskqueue", - "https://www.googleapis.com/auth/taskqueue.consumer" - ] - } - } - }, - "tasks": { - "methods": { - "delete": { - "description": "Delete a task from a TaskQueue.", - "httpMethod": "DELETE", - "id": "taskqueue.tasks.delete", - "parameterOrder": [ - "project", - "taskqueue", - "task" - ], - "parameters": { - "project": { - "description": "The project under which the queue lies.", - "location": "path", - "required": true, - "type": "string" - }, - "task": { - "description": "The id of the task to delete.", - "location": "path", - "required": true, - "type": "string" - }, - "taskqueue": { - "description": "The taskqueue to delete a task from.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "{project}/taskqueues/{taskqueue}/tasks/{task}", - "scopes": [ - "https://www.googleapis.com/auth/taskqueue", - "https://www.googleapis.com/auth/taskqueue.consumer" - ] - }, - "get": { - "description": "Get a particular task from a TaskQueue.", - "httpMethod": "GET", - "id": "taskqueue.tasks.get", - "parameterOrder": [ - "project", - "taskqueue", - "task" - ], - "parameters": { - "project": { - "description": "The project under which the queue lies.", - "location": "path", - "required": true, - "type": "string" - }, - "task": { - "description": "The task to get properties of.", - "location": "path", - "required": true, - "type": "string" - }, - "taskqueue": { - "description": "The taskqueue in which the task belongs.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "{project}/taskqueues/{taskqueue}/tasks/{task}", - "response": { - "$ref": "Task" - }, - "scopes": [ - "https://www.googleapis.com/auth/taskqueue", - "https://www.googleapis.com/auth/taskqueue.consumer" - ] - }, - "lease": { - "description": "Lease 1 or more tasks from a TaskQueue.", - "httpMethod": "POST", - "id": "taskqueue.tasks.lease", - "parameterOrder": [ - "project", - "taskqueue", - "numTasks", - "leaseSecs" - ], - "parameters": { - "leaseSecs": { - "description": "The lease in seconds.", - "format": "int32", - "location": "query", - "required": true, - "type": "integer" - }, - "numTasks": { - "description": "The number of tasks to lease.", - "format": "int32", - "location": "query", - "required": true, - "type": "integer" - }, - "project": { - "description": "The project under which the queue lies.", - "location": "path", - "required": true, - "type": "string" - }, - "taskqueue": { - "description": "The taskqueue to lease a task from.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "{project}/taskqueues/{taskqueue}/tasks/lease", - "response": { - "$ref": "Tasks" - }, - "scopes": [ - "https://www.googleapis.com/auth/taskqueue", - "https://www.googleapis.com/auth/taskqueue.consumer" - ] - }, - "list": { - "description": "List Tasks in a TaskQueue", - "httpMethod": "GET", - "id": "taskqueue.tasks.list", - "parameterOrder": [ - "project", - "taskqueue" - ], - "parameters": { - "project": { - "description": "The project under which the queue lies.", - "location": "path", - "required": true, - "type": "string" - }, - "taskqueue": { - "description": "The id of the taskqueue to list tasks from.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "{project}/taskqueues/{taskqueue}/tasks", - "response": { - "$ref": "Tasks2" - }, - "scopes": [ - "https://www.googleapis.com/auth/taskqueue", - "https://www.googleapis.com/auth/taskqueue.consumer" - ] - } - } - } - }, - "revision": "20160428", - "rootUrl": "https://www.googleapis.com/", - "schemas": { - "Task": { - "id": "Task", - "properties": { - "enqueueTimestamp": { - "description": "Time (in seconds since the epoch) at which the task was enqueued.", - "format": "int64", - "type": "string" - }, - "id": { - "description": "Name of the task.", - "type": "string" - }, - "kind": { - "default": "taskqueues#task", - "description": "The kind of object returned, in this case set to task.", - "type": "string" - }, - "leaseTimestamp": { - "description": "Time (in seconds since the epoch) at which the task lease will expire. This value is 0 if the task isnt currently leased out to a worker.", - "format": "int64", - "type": "string" - }, - "payloadBase64": { - "description": "A bag of bytes which is the task payload. The payload on the JSON side is always Base64 encoded.", - "type": "string" - }, - "queueName": { - "description": "Name of the queue that the task is in.", - "type": "string" - } - }, - "type": "object" - }, - "TaskQueue": { - "id": "TaskQueue", - "properties": { - "acl": { - "description": "ACLs that are applicable to this TaskQueue object.", - "properties": { - "adminEmails": { - "description": "Email addresses of users who are \"admins\" of the TaskQueue. This means they can control the queue, eg set ACLs for the queue.", - "items": { - "type": "string" - }, - "type": "array" - }, - "consumerEmails": { - "description": "Email addresses of users who can \"consume\" tasks from the TaskQueue. This means they can Dequeue and Delete tasks from the queue.", - "items": { - "type": "string" - }, - "type": "array" - }, - "producerEmails": { - "description": "Email addresses of users who can \"produce\" tasks into the TaskQueue. This means they can Insert tasks into the queue.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "id": { - "description": "Name of the taskqueue.", - "type": "string" - }, - "kind": { - "default": "taskqueues#taskqueue", - "description": "The kind of REST object returned, in this case taskqueue.", - "type": "string" - }, - "maxLeases": { - "description": "The number of times we should lease out tasks before giving up on them. If unset we lease them out forever until a worker deletes the task.", - "format": "int32", - "type": "integer" - }, - "stats": { - "description": "Statistics for the TaskQueue object in question.", - "properties": { - "leasedLastHour": { - "description": "Number of tasks leased in the last hour.", - "format": "int64", - "type": "string" - }, - "leasedLastMinute": { - "description": "Number of tasks leased in the last minute.", - "format": "int64", - "type": "string" - }, - "oldestTask": { - "description": "The timestamp (in seconds since the epoch) of the oldest unfinished task.", - "format": "int64", - "type": "string" - }, - "totalTasks": { - "description": "Number of tasks in the queue.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "Tasks": { - "id": "Tasks", - "properties": { - "items": { - "description": "The actual list of tasks returned as a result of the lease operation.", - "items": { - "$ref": "Task" - }, - "type": "array" - }, - "kind": { - "default": "taskqueue#tasks", - "description": "The kind of object returned, a list of tasks.", - "type": "string" - } - }, - "type": "object" - }, - "Tasks2": { - "id": "Tasks2", - "properties": { - "items": { - "description": "The actual list of tasks currently active in the TaskQueue.", - "items": { - "$ref": "Task" - }, - "type": "array" - }, - "kind": { - "default": "taskqueues#tasks", - "description": "The kind of object returned, a list of tasks.", - "type": "string" - } - }, - "type": "object" - } - }, - "servicePath": "taskqueue/v1beta1/projects/", - "title": "TaskQueue API", - "version": "v1beta1" -} \ No newline at end of file
diff --git a/taskqueue/v1beta1/taskqueue-gen.go b/taskqueue/v1beta1/taskqueue-gen.go deleted file mode 100644 index e267c1e..0000000 --- a/taskqueue/v1beta1/taskqueue-gen.go +++ /dev/null
@@ -1,1076 +0,0 @@ -// Package taskqueue provides access to the TaskQueue API. -// -// See https://developers.google.com/appengine/docs/python/taskqueue/rest -// -// Usage example: -// -// import "google.golang.org/api/taskqueue/v1beta1" -// ... -// taskqueueService, err := taskqueue.New(oauthHttpClient) -package taskqueue // import "google.golang.org/api/taskqueue/v1beta1" - -import ( - "bytes" - "context" - "encoding/json" - "errors" - "fmt" - "io" - "net/http" - "net/url" - "strconv" - "strings" - - gensupport "google.golang.org/api/gensupport" - googleapi "google.golang.org/api/googleapi" -) - -// Always reference these packages, just in case the auto-generated code -// below doesn't. -var _ = bytes.NewBuffer -var _ = strconv.Itoa -var _ = fmt.Sprintf -var _ = json.NewDecoder -var _ = io.Copy -var _ = url.Parse -var _ = gensupport.MarshalJSON -var _ = googleapi.Version -var _ = errors.New -var _ = strings.Replace -var _ = context.Canceled - -const apiId = "taskqueue:v1beta1" -const apiName = "taskqueue" -const apiVersion = "v1beta1" -const basePath = "https://www.googleapis.com/taskqueue/v1beta1/projects/" - -// OAuth2 scopes used by this API. -const ( - // Manage your Tasks and Taskqueues - TaskqueueScope = "https://www.googleapis.com/auth/taskqueue" - - // Consume Tasks from your Taskqueues - TaskqueueConsumerScope = "https://www.googleapis.com/auth/taskqueue.consumer" -) - -func New(client *http.Client) (*Service, error) { - if client == nil { - return nil, errors.New("client is nil") - } - s := &Service{client: client, BasePath: basePath} - s.Taskqueues = NewTaskqueuesService(s) - s.Tasks = NewTasksService(s) - return s, nil -} - -type Service struct { - client *http.Client - BasePath string // API endpoint base URL - UserAgent string // optional additional User-Agent fragment - - Taskqueues *TaskqueuesService - - Tasks *TasksService -} - -func (s *Service) userAgent() string { - if s.UserAgent == "" { - return googleapi.UserAgent - } - return googleapi.UserAgent + " " + s.UserAgent -} - -func NewTaskqueuesService(s *Service) *TaskqueuesService { - rs := &TaskqueuesService{s: s} - return rs -} - -type TaskqueuesService struct { - s *Service -} - -func NewTasksService(s *Service) *TasksService { - rs := &TasksService{s: s} - return rs -} - -type TasksService struct { - s *Service -} - -type Task struct { - // EnqueueTimestamp: Time (in seconds since the epoch) at which the task - // was enqueued. - EnqueueTimestamp int64 `json:"enqueueTimestamp,omitempty,string"` - - // Id: Name of the task. - Id string `json:"id,omitempty"` - - // Kind: The kind of object returned, in this case set to task. - Kind string `json:"kind,omitempty"` - - // LeaseTimestamp: Time (in seconds since the epoch) at which the task - // lease will expire. This value is 0 if the task isnt currently leased - // out to a worker. - LeaseTimestamp int64 `json:"leaseTimestamp,omitempty,string"` - - // PayloadBase64: A bag of bytes which is the task payload. The payload - // on the JSON side is always Base64 encoded. - PayloadBase64 string `json:"payloadBase64,omitempty"` - - // QueueName: Name of the queue that the task is in. - QueueName string `json:"queueName,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "EnqueueTimestamp") 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. "EnqueueTimestamp") 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 *Task) MarshalJSON() ([]byte, error) { - type NoMethod Task - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type TaskQueue struct { - // Acl: ACLs that are applicable to this TaskQueue object. - Acl *TaskQueueAcl `json:"acl,omitempty"` - - // Id: Name of the taskqueue. - Id string `json:"id,omitempty"` - - // Kind: The kind of REST object returned, in this case taskqueue. - Kind string `json:"kind,omitempty"` - - // MaxLeases: The number of times we should lease out tasks before - // giving up on them. If unset we lease them out forever until a worker - // deletes the task. - MaxLeases int64 `json:"maxLeases,omitempty"` - - // Stats: Statistics for the TaskQueue object in question. - Stats *TaskQueueStats `json:"stats,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Acl") 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. "Acl") 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 *TaskQueue) MarshalJSON() ([]byte, error) { - type NoMethod TaskQueue - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// TaskQueueAcl: ACLs that are applicable to this TaskQueue object. -type TaskQueueAcl struct { - // AdminEmails: Email addresses of users who are "admins" of the - // TaskQueue. This means they can control the queue, eg set ACLs for the - // queue. - AdminEmails []string `json:"adminEmails,omitempty"` - - // ConsumerEmails: Email addresses of users who can "consume" tasks from - // the TaskQueue. This means they can Dequeue and Delete tasks from the - // queue. - ConsumerEmails []string `json:"consumerEmails,omitempty"` - - // ProducerEmails: Email addresses of users who can "produce" tasks into - // the TaskQueue. This means they can Insert tasks into the queue. - ProducerEmails []string `json:"producerEmails,omitempty"` - - // ForceSendFields is a list of field names (e.g. "AdminEmails") 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. "AdminEmails") 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 *TaskQueueAcl) MarshalJSON() ([]byte, error) { - type NoMethod TaskQueueAcl - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// TaskQueueStats: Statistics for the TaskQueue object in question. -type TaskQueueStats struct { - // LeasedLastHour: Number of tasks leased in the last hour. - LeasedLastHour int64 `json:"leasedLastHour,omitempty,string"` - - // LeasedLastMinute: Number of tasks leased in the last minute. - LeasedLastMinute int64 `json:"leasedLastMinute,omitempty,string"` - - // OldestTask: The timestamp (in seconds since the epoch) of the oldest - // unfinished task. - OldestTask int64 `json:"oldestTask,omitempty,string"` - - // TotalTasks: Number of tasks in the queue. - TotalTasks int64 `json:"totalTasks,omitempty"` - - // ForceSendFields is a list of field names (e.g. "LeasedLastHour") 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. "LeasedLastHour") 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 *TaskQueueStats) MarshalJSON() ([]byte, error) { - type NoMethod TaskQueueStats - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type Tasks struct { - // Items: The actual list of tasks returned as a result of the lease - // operation. - Items []*Task `json:"items,omitempty"` - - // Kind: The kind of object returned, a list of tasks. - Kind string `json:"kind,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Items") 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. "Items") 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 *Tasks) MarshalJSON() ([]byte, error) { - type NoMethod Tasks - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type Tasks2 struct { - // Items: The actual list of tasks currently active in the TaskQueue. - Items []*Task `json:"items,omitempty"` - - // Kind: The kind of object returned, a list of tasks. - Kind string `json:"kind,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Items") 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. "Items") 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 *Tasks2) MarshalJSON() ([]byte, error) { - type NoMethod Tasks2 - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// method id "taskqueue.taskqueues.get": - -type TaskqueuesGetCall struct { - s *Service - project string - taskqueue string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Get detailed information about a TaskQueue. -func (r *TaskqueuesService) Get(project string, taskqueue string) *TaskqueuesGetCall { - c := &TaskqueuesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.taskqueue = taskqueue - return c -} - -// GetStats sets the optional parameter "getStats": Whether to get -// stats. -func (c *TaskqueuesGetCall) GetStats(getStats bool) *TaskqueuesGetCall { - c.urlParams_.Set("getStats", fmt.Sprint(getStats)) - 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 *TaskqueuesGetCall) Fields(s ...googleapi.Field) *TaskqueuesGetCall { - 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 *TaskqueuesGetCall) IfNoneMatch(entityTag string) *TaskqueuesGetCall { - 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 *TaskqueuesGetCall) Context(ctx context.Context) *TaskqueuesGetCall { - 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 *TaskqueuesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TaskqueuesGetCall) 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, "{project}/taskqueues/{taskqueue}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "taskqueue": c.taskqueue, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "taskqueue.taskqueues.get" call. -// Exactly one of *TaskQueue or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *TaskQueue.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 *TaskqueuesGetCall) Do(opts ...googleapi.CallOption) (*TaskQueue, 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 := &TaskQueue{ - 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": "Get detailed information about a TaskQueue.", - // "httpMethod": "GET", - // "id": "taskqueue.taskqueues.get", - // "parameterOrder": [ - // "project", - // "taskqueue" - // ], - // "parameters": { - // "getStats": { - // "description": "Whether to get stats. Optional.", - // "location": "query", - // "type": "boolean" - // }, - // "project": { - // "description": "The project under which the queue lies.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "taskqueue": { - // "description": "The id of the taskqueue to get the properties of.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/taskqueues/{taskqueue}", - // "response": { - // "$ref": "TaskQueue" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/taskqueue", - // "https://www.googleapis.com/auth/taskqueue.consumer" - // ] - // } - -} - -// method id "taskqueue.tasks.delete": - -type TasksDeleteCall struct { - s *Service - project string - taskqueue string - task string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Delete a task from a TaskQueue. -func (r *TasksService) Delete(project string, taskqueue string, task string) *TasksDeleteCall { - c := &TasksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.taskqueue = taskqueue - c.task = task - 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 *TasksDeleteCall) Fields(s ...googleapi.Field) *TasksDeleteCall { - 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 *TasksDeleteCall) Context(ctx context.Context) *TasksDeleteCall { - 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 *TasksDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TasksDeleteCall) 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 - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/taskqueues/{taskqueue}/tasks/{task}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("DELETE", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "taskqueue": c.taskqueue, - "task": c.task, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "taskqueue.tasks.delete" call. -func (c *TasksDeleteCall) Do(opts ...googleapi.CallOption) error { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if err != nil { - return err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return err - } - return nil - // { - // "description": "Delete a task from a TaskQueue.", - // "httpMethod": "DELETE", - // "id": "taskqueue.tasks.delete", - // "parameterOrder": [ - // "project", - // "taskqueue", - // "task" - // ], - // "parameters": { - // "project": { - // "description": "The project under which the queue lies.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "task": { - // "description": "The id of the task to delete.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "taskqueue": { - // "description": "The taskqueue to delete a task from.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/taskqueues/{taskqueue}/tasks/{task}", - // "scopes": [ - // "https://www.googleapis.com/auth/taskqueue", - // "https://www.googleapis.com/auth/taskqueue.consumer" - // ] - // } - -} - -// method id "taskqueue.tasks.get": - -type TasksGetCall struct { - s *Service - project string - taskqueue string - task string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Get a particular task from a TaskQueue. -func (r *TasksService) Get(project string, taskqueue string, task string) *TasksGetCall { - c := &TasksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.taskqueue = taskqueue - c.task = task - 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 *TasksGetCall) Fields(s ...googleapi.Field) *TasksGetCall { - 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 *TasksGetCall) IfNoneMatch(entityTag string) *TasksGetCall { - 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 *TasksGetCall) Context(ctx context.Context) *TasksGetCall { - 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 *TasksGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TasksGetCall) 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, "{project}/taskqueues/{taskqueue}/tasks/{task}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "taskqueue": c.taskqueue, - "task": c.task, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "taskqueue.tasks.get" call. -// Exactly one of *Task or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Task.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 *TasksGetCall) Do(opts ...googleapi.CallOption) (*Task, 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 := &Task{ - 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": "Get a particular task from a TaskQueue.", - // "httpMethod": "GET", - // "id": "taskqueue.tasks.get", - // "parameterOrder": [ - // "project", - // "taskqueue", - // "task" - // ], - // "parameters": { - // "project": { - // "description": "The project under which the queue lies.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "task": { - // "description": "The task to get properties of.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "taskqueue": { - // "description": "The taskqueue in which the task belongs.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/taskqueues/{taskqueue}/tasks/{task}", - // "response": { - // "$ref": "Task" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/taskqueue", - // "https://www.googleapis.com/auth/taskqueue.consumer" - // ] - // } - -} - -// method id "taskqueue.tasks.lease": - -type TasksLeaseCall struct { - s *Service - project string - taskqueue string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Lease: Lease 1 or more tasks from a TaskQueue. -func (r *TasksService) Lease(project string, taskqueue string, numTasks int64, leaseSecs int64) *TasksLeaseCall { - c := &TasksLeaseCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.taskqueue = taskqueue - c.urlParams_.Set("numTasks", fmt.Sprint(numTasks)) - c.urlParams_.Set("leaseSecs", fmt.Sprint(leaseSecs)) - 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 *TasksLeaseCall) Fields(s ...googleapi.Field) *TasksLeaseCall { - 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 *TasksLeaseCall) Context(ctx context.Context) *TasksLeaseCall { - 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 *TasksLeaseCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TasksLeaseCall) 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 - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/taskqueues/{taskqueue}/tasks/lease") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "taskqueue": c.taskqueue, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "taskqueue.tasks.lease" call. -// Exactly one of *Tasks or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Tasks.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 *TasksLeaseCall) Do(opts ...googleapi.CallOption) (*Tasks, 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 := &Tasks{ - 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": "Lease 1 or more tasks from a TaskQueue.", - // "httpMethod": "POST", - // "id": "taskqueue.tasks.lease", - // "parameterOrder": [ - // "project", - // "taskqueue", - // "numTasks", - // "leaseSecs" - // ], - // "parameters": { - // "leaseSecs": { - // "description": "The lease in seconds.", - // "format": "int32", - // "location": "query", - // "required": true, - // "type": "integer" - // }, - // "numTasks": { - // "description": "The number of tasks to lease.", - // "format": "int32", - // "location": "query", - // "required": true, - // "type": "integer" - // }, - // "project": { - // "description": "The project under which the queue lies.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "taskqueue": { - // "description": "The taskqueue to lease a task from.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/taskqueues/{taskqueue}/tasks/lease", - // "response": { - // "$ref": "Tasks" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/taskqueue", - // "https://www.googleapis.com/auth/taskqueue.consumer" - // ] - // } - -} - -// method id "taskqueue.tasks.list": - -type TasksListCall struct { - s *Service - project string - taskqueue string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: List Tasks in a TaskQueue -func (r *TasksService) List(project string, taskqueue string) *TasksListCall { - c := &TasksListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.taskqueue = taskqueue - 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 *TasksListCall) Fields(s ...googleapi.Field) *TasksListCall { - 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 *TasksListCall) IfNoneMatch(entityTag string) *TasksListCall { - 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 *TasksListCall) Context(ctx context.Context) *TasksListCall { - 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 *TasksListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TasksListCall) 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, "{project}/taskqueues/{taskqueue}/tasks") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "taskqueue": c.taskqueue, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "taskqueue.tasks.list" call. -// Exactly one of *Tasks2 or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Tasks2.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 *TasksListCall) Do(opts ...googleapi.CallOption) (*Tasks2, 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 := &Tasks2{ - 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": "List Tasks in a TaskQueue", - // "httpMethod": "GET", - // "id": "taskqueue.tasks.list", - // "parameterOrder": [ - // "project", - // "taskqueue" - // ], - // "parameters": { - // "project": { - // "description": "The project under which the queue lies.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "taskqueue": { - // "description": "The id of the taskqueue to list tasks from.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/taskqueues/{taskqueue}/tasks", - // "response": { - // "$ref": "Tasks2" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/taskqueue", - // "https://www.googleapis.com/auth/taskqueue.consumer" - // ] - // } - -}
diff --git a/taskqueue/v1beta2/taskqueue-api.json b/taskqueue/v1beta2/taskqueue-api.json deleted file mode 100644 index 815e189..0000000 --- a/taskqueue/v1beta2/taskqueue-api.json +++ /dev/null
@@ -1,569 +0,0 @@ -{ - "auth": { - "oauth2": { - "scopes": { - "https://www.googleapis.com/auth/taskqueue": { - "description": "Manage your Tasks and Taskqueues" - }, - "https://www.googleapis.com/auth/taskqueue.consumer": { - "description": "Consume Tasks from your Taskqueues" - } - } - } - }, - "basePath": "/taskqueue/v1beta2/projects/", - "baseUrl": "https://www.googleapis.com/taskqueue/v1beta2/projects/", - "batchPath": "batch/taskqueue/v1beta2", - "description": "Accesses a Google App Engine Pull Task Queue over REST.", - "discoveryVersion": "v1", - "documentationLink": "https://developers.google.com/appengine/docs/python/taskqueue/rest", - "etag": "\"-iA1DTNe4s-I6JZXPt1t1Ypy8IU/rBU1z2tHcOAAx8ktsJNBvusBoYw\"", - "icons": { - "x16": "https://www.google.com/images/icons/product/app_engine-16.png", - "x32": "https://www.google.com/images/icons/product/app_engine-32.png" - }, - "id": "taskqueue:v1beta2", - "kind": "discovery#restDescription", - "name": "taskqueue", - "ownerDomain": "google.com", - "ownerName": "Google", - "parameters": { - "alt": { - "default": "json", - "description": "Data format for the response.", - "enum": [ - "json" - ], - "enumDescriptions": [ - "Responses with Content-Type of application/json" - ], - "location": "query", - "type": "string" - }, - "fields": { - "description": "Selector specifying which fields to include in a partial response.", - "location": "query", - "type": "string" - }, - "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" - }, - "oauth_token": { - "description": "OAuth 2.0 token for the current user.", - "location": "query", - "type": "string" - }, - "prettyPrint": { - "default": "true", - "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": { - "taskqueues": { - "methods": { - "get": { - "description": "Get detailed information about a TaskQueue.", - "httpMethod": "GET", - "id": "taskqueue.taskqueues.get", - "parameterOrder": [ - "project", - "taskqueue" - ], - "parameters": { - "getStats": { - "description": "Whether to get stats. Optional.", - "location": "query", - "type": "boolean" - }, - "project": { - "description": "The project under which the queue lies.", - "location": "path", - "required": true, - "type": "string" - }, - "taskqueue": { - "description": "The id of the taskqueue to get the properties of.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "{project}/taskqueues/{taskqueue}", - "response": { - "$ref": "TaskQueue" - }, - "scopes": [ - "https://www.googleapis.com/auth/taskqueue", - "https://www.googleapis.com/auth/taskqueue.consumer" - ] - } - } - }, - "tasks": { - "methods": { - "delete": { - "description": "Delete a task from a TaskQueue.", - "httpMethod": "DELETE", - "id": "taskqueue.tasks.delete", - "parameterOrder": [ - "project", - "taskqueue", - "task" - ], - "parameters": { - "project": { - "description": "The project under which the queue lies.", - "location": "path", - "required": true, - "type": "string" - }, - "task": { - "description": "The id of the task to delete.", - "location": "path", - "required": true, - "type": "string" - }, - "taskqueue": { - "description": "The taskqueue to delete a task from.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "{project}/taskqueues/{taskqueue}/tasks/{task}", - "scopes": [ - "https://www.googleapis.com/auth/taskqueue", - "https://www.googleapis.com/auth/taskqueue.consumer" - ] - }, - "get": { - "description": "Get a particular task from a TaskQueue.", - "httpMethod": "GET", - "id": "taskqueue.tasks.get", - "parameterOrder": [ - "project", - "taskqueue", - "task" - ], - "parameters": { - "project": { - "description": "The project under which the queue lies.", - "location": "path", - "required": true, - "type": "string" - }, - "task": { - "description": "The task to get properties of.", - "location": "path", - "required": true, - "type": "string" - }, - "taskqueue": { - "description": "The taskqueue in which the task belongs.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "{project}/taskqueues/{taskqueue}/tasks/{task}", - "response": { - "$ref": "Task" - }, - "scopes": [ - "https://www.googleapis.com/auth/taskqueue", - "https://www.googleapis.com/auth/taskqueue.consumer" - ] - }, - "insert": { - "description": "Insert a new task in a TaskQueue", - "httpMethod": "POST", - "id": "taskqueue.tasks.insert", - "parameterOrder": [ - "project", - "taskqueue" - ], - "parameters": { - "project": { - "description": "The project under which the queue lies", - "location": "path", - "required": true, - "type": "string" - }, - "taskqueue": { - "description": "The taskqueue to insert the task into", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "{project}/taskqueues/{taskqueue}/tasks", - "request": { - "$ref": "Task" - }, - "response": { - "$ref": "Task" - }, - "scopes": [ - "https://www.googleapis.com/auth/taskqueue", - "https://www.googleapis.com/auth/taskqueue.consumer" - ] - }, - "lease": { - "description": "Lease 1 or more tasks from a TaskQueue.", - "httpMethod": "POST", - "id": "taskqueue.tasks.lease", - "parameterOrder": [ - "project", - "taskqueue", - "numTasks", - "leaseSecs" - ], - "parameters": { - "groupByTag": { - "description": "When true, all returned tasks will have the same tag", - "location": "query", - "type": "boolean" - }, - "leaseSecs": { - "description": "The lease in seconds.", - "format": "int32", - "location": "query", - "required": true, - "type": "integer" - }, - "numTasks": { - "description": "The number of tasks to lease.", - "format": "int32", - "location": "query", - "required": true, - "type": "integer" - }, - "project": { - "description": "The project under which the queue lies.", - "location": "path", - "required": true, - "type": "string" - }, - "tag": { - "description": "The tag allowed for tasks in the response. Must only be specified if group_by_tag is true. If group_by_tag is true and tag is not specified the tag will be that of the oldest task by eta, i.e. the first available tag", - "location": "query", - "type": "string" - }, - "taskqueue": { - "description": "The taskqueue to lease a task from.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "{project}/taskqueues/{taskqueue}/tasks/lease", - "response": { - "$ref": "Tasks" - }, - "scopes": [ - "https://www.googleapis.com/auth/taskqueue", - "https://www.googleapis.com/auth/taskqueue.consumer" - ] - }, - "list": { - "description": "List Tasks in a TaskQueue", - "httpMethod": "GET", - "id": "taskqueue.tasks.list", - "parameterOrder": [ - "project", - "taskqueue" - ], - "parameters": { - "project": { - "description": "The project under which the queue lies.", - "location": "path", - "required": true, - "type": "string" - }, - "taskqueue": { - "description": "The id of the taskqueue to list tasks from.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "{project}/taskqueues/{taskqueue}/tasks", - "response": { - "$ref": "Tasks2" - }, - "scopes": [ - "https://www.googleapis.com/auth/taskqueue", - "https://www.googleapis.com/auth/taskqueue.consumer" - ] - }, - "patch": { - "description": "Update tasks that are leased out of a TaskQueue. This method supports patch semantics.", - "httpMethod": "PATCH", - "id": "taskqueue.tasks.patch", - "parameterOrder": [ - "project", - "taskqueue", - "task", - "newLeaseSeconds" - ], - "parameters": { - "newLeaseSeconds": { - "description": "The new lease in seconds.", - "format": "int32", - "location": "query", - "required": true, - "type": "integer" - }, - "project": { - "description": "The project under which the queue lies.", - "location": "path", - "required": true, - "type": "string" - }, - "task": { - "location": "path", - "required": true, - "type": "string" - }, - "taskqueue": { - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "{project}/taskqueues/{taskqueue}/tasks/{task}", - "request": { - "$ref": "Task" - }, - "response": { - "$ref": "Task" - }, - "scopes": [ - "https://www.googleapis.com/auth/taskqueue", - "https://www.googleapis.com/auth/taskqueue.consumer" - ] - }, - "update": { - "description": "Update tasks that are leased out of a TaskQueue.", - "httpMethod": "POST", - "id": "taskqueue.tasks.update", - "parameterOrder": [ - "project", - "taskqueue", - "task", - "newLeaseSeconds" - ], - "parameters": { - "newLeaseSeconds": { - "description": "The new lease in seconds.", - "format": "int32", - "location": "query", - "required": true, - "type": "integer" - }, - "project": { - "description": "The project under which the queue lies.", - "location": "path", - "required": true, - "type": "string" - }, - "task": { - "location": "path", - "required": true, - "type": "string" - }, - "taskqueue": { - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "{project}/taskqueues/{taskqueue}/tasks/{task}", - "request": { - "$ref": "Task" - }, - "response": { - "$ref": "Task" - }, - "scopes": [ - "https://www.googleapis.com/auth/taskqueue", - "https://www.googleapis.com/auth/taskqueue.consumer" - ] - } - } - } - }, - "revision": "20160428", - "rootUrl": "https://www.googleapis.com/", - "schemas": { - "Task": { - "id": "Task", - "properties": { - "enqueueTimestamp": { - "description": "Time (in seconds since the epoch) at which the task was enqueued.", - "format": "int64", - "type": "string" - }, - "id": { - "description": "Name of the task.", - "type": "string" - }, - "kind": { - "default": "taskqueues#task", - "description": "The kind of object returned, in this case set to task.", - "type": "string" - }, - "leaseTimestamp": { - "description": "Time (in seconds since the epoch) at which the task lease will expire. This value is 0 if the task isnt currently leased out to a worker.", - "format": "int64", - "type": "string" - }, - "payloadBase64": { - "description": "A bag of bytes which is the task payload. The payload on the JSON side is always Base64 encoded.", - "type": "string" - }, - "queueName": { - "description": "Name of the queue that the task is in.", - "type": "string" - }, - "retry_count": { - "description": "The number of leases applied to this task.", - "format": "int32", - "type": "integer" - }, - "tag": { - "description": "Tag for the task, could be used later to lease tasks grouped by a specific tag.", - "type": "string" - } - }, - "type": "object" - }, - "TaskQueue": { - "id": "TaskQueue", - "properties": { - "acl": { - "description": "ACLs that are applicable to this TaskQueue object.", - "properties": { - "adminEmails": { - "description": "Email addresses of users who are \"admins\" of the TaskQueue. This means they can control the queue, eg set ACLs for the queue.", - "items": { - "type": "string" - }, - "type": "array" - }, - "consumerEmails": { - "description": "Email addresses of users who can \"consume\" tasks from the TaskQueue. This means they can Dequeue and Delete tasks from the queue.", - "items": { - "type": "string" - }, - "type": "array" - }, - "producerEmails": { - "description": "Email addresses of users who can \"produce\" tasks into the TaskQueue. This means they can Insert tasks into the queue.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "id": { - "description": "Name of the taskqueue.", - "type": "string" - }, - "kind": { - "default": "taskqueues#taskqueue", - "description": "The kind of REST object returned, in this case taskqueue.", - "type": "string" - }, - "maxLeases": { - "description": "The number of times we should lease out tasks before giving up on them. If unset we lease them out forever until a worker deletes the task.", - "format": "int32", - "type": "integer" - }, - "stats": { - "description": "Statistics for the TaskQueue object in question.", - "properties": { - "leasedLastHour": { - "description": "Number of tasks leased in the last hour.", - "format": "int64", - "type": "string" - }, - "leasedLastMinute": { - "description": "Number of tasks leased in the last minute.", - "format": "int64", - "type": "string" - }, - "oldestTask": { - "description": "The timestamp (in seconds since the epoch) of the oldest unfinished task.", - "format": "int64", - "type": "string" - }, - "totalTasks": { - "description": "Number of tasks in the queue.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "Tasks": { - "id": "Tasks", - "properties": { - "items": { - "description": "The actual list of tasks returned as a result of the lease operation.", - "items": { - "$ref": "Task" - }, - "type": "array" - }, - "kind": { - "default": "taskqueue#tasks", - "description": "The kind of object returned, a list of tasks.", - "type": "string" - } - }, - "type": "object" - }, - "Tasks2": { - "id": "Tasks2", - "properties": { - "items": { - "description": "The actual list of tasks currently active in the TaskQueue.", - "items": { - "$ref": "Task" - }, - "type": "array" - }, - "kind": { - "default": "taskqueues#tasks", - "description": "The kind of object returned, a list of tasks.", - "type": "string" - } - }, - "type": "object" - } - }, - "servicePath": "taskqueue/v1beta2/projects/", - "title": "TaskQueue API", - "version": "v1beta2" -} \ No newline at end of file
diff --git a/taskqueue/v1beta2/taskqueue-gen.go b/taskqueue/v1beta2/taskqueue-gen.go deleted file mode 100644 index cca8378..0000000 --- a/taskqueue/v1beta2/taskqueue-gen.go +++ /dev/null
@@ -1,1576 +0,0 @@ -// Package taskqueue provides access to the TaskQueue API. -// -// See https://developers.google.com/appengine/docs/python/taskqueue/rest -// -// Usage example: -// -// import "google.golang.org/api/taskqueue/v1beta2" -// ... -// taskqueueService, err := taskqueue.New(oauthHttpClient) -package taskqueue // import "google.golang.org/api/taskqueue/v1beta2" - -import ( - "bytes" - "context" - "encoding/json" - "errors" - "fmt" - "io" - "net/http" - "net/url" - "strconv" - "strings" - - gensupport "google.golang.org/api/gensupport" - googleapi "google.golang.org/api/googleapi" -) - -// Always reference these packages, just in case the auto-generated code -// below doesn't. -var _ = bytes.NewBuffer -var _ = strconv.Itoa -var _ = fmt.Sprintf -var _ = json.NewDecoder -var _ = io.Copy -var _ = url.Parse -var _ = gensupport.MarshalJSON -var _ = googleapi.Version -var _ = errors.New -var _ = strings.Replace -var _ = context.Canceled - -const apiId = "taskqueue:v1beta2" -const apiName = "taskqueue" -const apiVersion = "v1beta2" -const basePath = "https://www.googleapis.com/taskqueue/v1beta2/projects/" - -// OAuth2 scopes used by this API. -const ( - // Manage your Tasks and Taskqueues - TaskqueueScope = "https://www.googleapis.com/auth/taskqueue" - - // Consume Tasks from your Taskqueues - TaskqueueConsumerScope = "https://www.googleapis.com/auth/taskqueue.consumer" -) - -func New(client *http.Client) (*Service, error) { - if client == nil { - return nil, errors.New("client is nil") - } - s := &Service{client: client, BasePath: basePath} - s.Taskqueues = NewTaskqueuesService(s) - s.Tasks = NewTasksService(s) - return s, nil -} - -type Service struct { - client *http.Client - BasePath string // API endpoint base URL - UserAgent string // optional additional User-Agent fragment - - Taskqueues *TaskqueuesService - - Tasks *TasksService -} - -func (s *Service) userAgent() string { - if s.UserAgent == "" { - return googleapi.UserAgent - } - return googleapi.UserAgent + " " + s.UserAgent -} - -func NewTaskqueuesService(s *Service) *TaskqueuesService { - rs := &TaskqueuesService{s: s} - return rs -} - -type TaskqueuesService struct { - s *Service -} - -func NewTasksService(s *Service) *TasksService { - rs := &TasksService{s: s} - return rs -} - -type TasksService struct { - s *Service -} - -type Task struct { - // EnqueueTimestamp: Time (in seconds since the epoch) at which the task - // was enqueued. - EnqueueTimestamp int64 `json:"enqueueTimestamp,omitempty,string"` - - // Id: Name of the task. - Id string `json:"id,omitempty"` - - // Kind: The kind of object returned, in this case set to task. - Kind string `json:"kind,omitempty"` - - // LeaseTimestamp: Time (in seconds since the epoch) at which the task - // lease will expire. This value is 0 if the task isnt currently leased - // out to a worker. - LeaseTimestamp int64 `json:"leaseTimestamp,omitempty,string"` - - // PayloadBase64: A bag of bytes which is the task payload. The payload - // on the JSON side is always Base64 encoded. - PayloadBase64 string `json:"payloadBase64,omitempty"` - - // QueueName: Name of the queue that the task is in. - QueueName string `json:"queueName,omitempty"` - - // RetryCount: The number of leases applied to this task. - RetryCount int64 `json:"retry_count,omitempty"` - - // Tag: Tag for the task, could be used later to lease tasks grouped by - // a specific tag. - Tag string `json:"tag,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "EnqueueTimestamp") 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. "EnqueueTimestamp") 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 *Task) MarshalJSON() ([]byte, error) { - type NoMethod Task - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type TaskQueue struct { - // Acl: ACLs that are applicable to this TaskQueue object. - Acl *TaskQueueAcl `json:"acl,omitempty"` - - // Id: Name of the taskqueue. - Id string `json:"id,omitempty"` - - // Kind: The kind of REST object returned, in this case taskqueue. - Kind string `json:"kind,omitempty"` - - // MaxLeases: The number of times we should lease out tasks before - // giving up on them. If unset we lease them out forever until a worker - // deletes the task. - MaxLeases int64 `json:"maxLeases,omitempty"` - - // Stats: Statistics for the TaskQueue object in question. - Stats *TaskQueueStats `json:"stats,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Acl") 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. "Acl") 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 *TaskQueue) MarshalJSON() ([]byte, error) { - type NoMethod TaskQueue - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// TaskQueueAcl: ACLs that are applicable to this TaskQueue object. -type TaskQueueAcl struct { - // AdminEmails: Email addresses of users who are "admins" of the - // TaskQueue. This means they can control the queue, eg set ACLs for the - // queue. - AdminEmails []string `json:"adminEmails,omitempty"` - - // ConsumerEmails: Email addresses of users who can "consume" tasks from - // the TaskQueue. This means they can Dequeue and Delete tasks from the - // queue. - ConsumerEmails []string `json:"consumerEmails,omitempty"` - - // ProducerEmails: Email addresses of users who can "produce" tasks into - // the TaskQueue. This means they can Insert tasks into the queue. - ProducerEmails []string `json:"producerEmails,omitempty"` - - // ForceSendFields is a list of field names (e.g. "AdminEmails") 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. "AdminEmails") 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 *TaskQueueAcl) MarshalJSON() ([]byte, error) { - type NoMethod TaskQueueAcl - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// TaskQueueStats: Statistics for the TaskQueue object in question. -type TaskQueueStats struct { - // LeasedLastHour: Number of tasks leased in the last hour. - LeasedLastHour int64 `json:"leasedLastHour,omitempty,string"` - - // LeasedLastMinute: Number of tasks leased in the last minute. - LeasedLastMinute int64 `json:"leasedLastMinute,omitempty,string"` - - // OldestTask: The timestamp (in seconds since the epoch) of the oldest - // unfinished task. - OldestTask int64 `json:"oldestTask,omitempty,string"` - - // TotalTasks: Number of tasks in the queue. - TotalTasks int64 `json:"totalTasks,omitempty"` - - // ForceSendFields is a list of field names (e.g. "LeasedLastHour") 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. "LeasedLastHour") 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 *TaskQueueStats) MarshalJSON() ([]byte, error) { - type NoMethod TaskQueueStats - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type Tasks struct { - // Items: The actual list of tasks returned as a result of the lease - // operation. - Items []*Task `json:"items,omitempty"` - - // Kind: The kind of object returned, a list of tasks. - Kind string `json:"kind,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Items") 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. "Items") 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 *Tasks) MarshalJSON() ([]byte, error) { - type NoMethod Tasks - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type Tasks2 struct { - // Items: The actual list of tasks currently active in the TaskQueue. - Items []*Task `json:"items,omitempty"` - - // Kind: The kind of object returned, a list of tasks. - Kind string `json:"kind,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Items") 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. "Items") 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 *Tasks2) MarshalJSON() ([]byte, error) { - type NoMethod Tasks2 - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// method id "taskqueue.taskqueues.get": - -type TaskqueuesGetCall struct { - s *Service - project string - taskqueue string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Get detailed information about a TaskQueue. -func (r *TaskqueuesService) Get(project string, taskqueue string) *TaskqueuesGetCall { - c := &TaskqueuesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.taskqueue = taskqueue - return c -} - -// GetStats sets the optional parameter "getStats": Whether to get -// stats. -func (c *TaskqueuesGetCall) GetStats(getStats bool) *TaskqueuesGetCall { - c.urlParams_.Set("getStats", fmt.Sprint(getStats)) - 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 *TaskqueuesGetCall) Fields(s ...googleapi.Field) *TaskqueuesGetCall { - 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 *TaskqueuesGetCall) IfNoneMatch(entityTag string) *TaskqueuesGetCall { - 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 *TaskqueuesGetCall) Context(ctx context.Context) *TaskqueuesGetCall { - 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 *TaskqueuesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TaskqueuesGetCall) 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, "{project}/taskqueues/{taskqueue}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "taskqueue": c.taskqueue, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "taskqueue.taskqueues.get" call. -// Exactly one of *TaskQueue or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *TaskQueue.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 *TaskqueuesGetCall) Do(opts ...googleapi.CallOption) (*TaskQueue, 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 := &TaskQueue{ - 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": "Get detailed information about a TaskQueue.", - // "httpMethod": "GET", - // "id": "taskqueue.taskqueues.get", - // "parameterOrder": [ - // "project", - // "taskqueue" - // ], - // "parameters": { - // "getStats": { - // "description": "Whether to get stats. Optional.", - // "location": "query", - // "type": "boolean" - // }, - // "project": { - // "description": "The project under which the queue lies.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "taskqueue": { - // "description": "The id of the taskqueue to get the properties of.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/taskqueues/{taskqueue}", - // "response": { - // "$ref": "TaskQueue" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/taskqueue", - // "https://www.googleapis.com/auth/taskqueue.consumer" - // ] - // } - -} - -// method id "taskqueue.tasks.delete": - -type TasksDeleteCall struct { - s *Service - project string - taskqueue string - task string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Delete a task from a TaskQueue. -func (r *TasksService) Delete(project string, taskqueue string, task string) *TasksDeleteCall { - c := &TasksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.taskqueue = taskqueue - c.task = task - 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 *TasksDeleteCall) Fields(s ...googleapi.Field) *TasksDeleteCall { - 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 *TasksDeleteCall) Context(ctx context.Context) *TasksDeleteCall { - 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 *TasksDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TasksDeleteCall) 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 - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/taskqueues/{taskqueue}/tasks/{task}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("DELETE", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "taskqueue": c.taskqueue, - "task": c.task, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "taskqueue.tasks.delete" call. -func (c *TasksDeleteCall) Do(opts ...googleapi.CallOption) error { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if err != nil { - return err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return err - } - return nil - // { - // "description": "Delete a task from a TaskQueue.", - // "httpMethod": "DELETE", - // "id": "taskqueue.tasks.delete", - // "parameterOrder": [ - // "project", - // "taskqueue", - // "task" - // ], - // "parameters": { - // "project": { - // "description": "The project under which the queue lies.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "task": { - // "description": "The id of the task to delete.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "taskqueue": { - // "description": "The taskqueue to delete a task from.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/taskqueues/{taskqueue}/tasks/{task}", - // "scopes": [ - // "https://www.googleapis.com/auth/taskqueue", - // "https://www.googleapis.com/auth/taskqueue.consumer" - // ] - // } - -} - -// method id "taskqueue.tasks.get": - -type TasksGetCall struct { - s *Service - project string - taskqueue string - task string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Get a particular task from a TaskQueue. -func (r *TasksService) Get(project string, taskqueue string, task string) *TasksGetCall { - c := &TasksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.taskqueue = taskqueue - c.task = task - 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 *TasksGetCall) Fields(s ...googleapi.Field) *TasksGetCall { - 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 *TasksGetCall) IfNoneMatch(entityTag string) *TasksGetCall { - 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 *TasksGetCall) Context(ctx context.Context) *TasksGetCall { - 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 *TasksGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TasksGetCall) 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, "{project}/taskqueues/{taskqueue}/tasks/{task}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "taskqueue": c.taskqueue, - "task": c.task, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "taskqueue.tasks.get" call. -// Exactly one of *Task or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Task.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 *TasksGetCall) Do(opts ...googleapi.CallOption) (*Task, 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 := &Task{ - 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": "Get a particular task from a TaskQueue.", - // "httpMethod": "GET", - // "id": "taskqueue.tasks.get", - // "parameterOrder": [ - // "project", - // "taskqueue", - // "task" - // ], - // "parameters": { - // "project": { - // "description": "The project under which the queue lies.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "task": { - // "description": "The task to get properties of.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "taskqueue": { - // "description": "The taskqueue in which the task belongs.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/taskqueues/{taskqueue}/tasks/{task}", - // "response": { - // "$ref": "Task" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/taskqueue", - // "https://www.googleapis.com/auth/taskqueue.consumer" - // ] - // } - -} - -// method id "taskqueue.tasks.insert": - -type TasksInsertCall struct { - s *Service - project string - taskqueue string - task *Task - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Insert a new task in a TaskQueue -func (r *TasksService) Insert(project string, taskqueue string, task *Task) *TasksInsertCall { - c := &TasksInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.taskqueue = taskqueue - c.task = task - 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 *TasksInsertCall) Fields(s ...googleapi.Field) *TasksInsertCall { - 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 *TasksInsertCall) Context(ctx context.Context) *TasksInsertCall { - 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 *TasksInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TasksInsertCall) 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.task) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/taskqueues/{taskqueue}/tasks") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "taskqueue": c.taskqueue, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "taskqueue.tasks.insert" call. -// Exactly one of *Task or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Task.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 *TasksInsertCall) Do(opts ...googleapi.CallOption) (*Task, 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 := &Task{ - 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": "Insert a new task in a TaskQueue", - // "httpMethod": "POST", - // "id": "taskqueue.tasks.insert", - // "parameterOrder": [ - // "project", - // "taskqueue" - // ], - // "parameters": { - // "project": { - // "description": "The project under which the queue lies", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "taskqueue": { - // "description": "The taskqueue to insert the task into", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/taskqueues/{taskqueue}/tasks", - // "request": { - // "$ref": "Task" - // }, - // "response": { - // "$ref": "Task" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/taskqueue", - // "https://www.googleapis.com/auth/taskqueue.consumer" - // ] - // } - -} - -// method id "taskqueue.tasks.lease": - -type TasksLeaseCall struct { - s *Service - project string - taskqueue string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Lease: Lease 1 or more tasks from a TaskQueue. -func (r *TasksService) Lease(project string, taskqueue string, numTasks int64, leaseSecs int64) *TasksLeaseCall { - c := &TasksLeaseCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.taskqueue = taskqueue - c.urlParams_.Set("numTasks", fmt.Sprint(numTasks)) - c.urlParams_.Set("leaseSecs", fmt.Sprint(leaseSecs)) - return c -} - -// GroupByTag sets the optional parameter "groupByTag": When true, all -// returned tasks will have the same tag -func (c *TasksLeaseCall) GroupByTag(groupByTag bool) *TasksLeaseCall { - c.urlParams_.Set("groupByTag", fmt.Sprint(groupByTag)) - return c -} - -// Tag sets the optional parameter "tag": The tag allowed for tasks in -// the response. Must only be specified if group_by_tag is true. If -// group_by_tag is true and tag is not specified the tag will be that of -// the oldest task by eta, i.e. the first available tag -func (c *TasksLeaseCall) Tag(tag string) *TasksLeaseCall { - c.urlParams_.Set("tag", tag) - 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 *TasksLeaseCall) Fields(s ...googleapi.Field) *TasksLeaseCall { - 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 *TasksLeaseCall) Context(ctx context.Context) *TasksLeaseCall { - 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 *TasksLeaseCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TasksLeaseCall) 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 - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/taskqueues/{taskqueue}/tasks/lease") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "taskqueue": c.taskqueue, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "taskqueue.tasks.lease" call. -// Exactly one of *Tasks or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Tasks.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 *TasksLeaseCall) Do(opts ...googleapi.CallOption) (*Tasks, 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 := &Tasks{ - 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": "Lease 1 or more tasks from a TaskQueue.", - // "httpMethod": "POST", - // "id": "taskqueue.tasks.lease", - // "parameterOrder": [ - // "project", - // "taskqueue", - // "numTasks", - // "leaseSecs" - // ], - // "parameters": { - // "groupByTag": { - // "description": "When true, all returned tasks will have the same tag", - // "location": "query", - // "type": "boolean" - // }, - // "leaseSecs": { - // "description": "The lease in seconds.", - // "format": "int32", - // "location": "query", - // "required": true, - // "type": "integer" - // }, - // "numTasks": { - // "description": "The number of tasks to lease.", - // "format": "int32", - // "location": "query", - // "required": true, - // "type": "integer" - // }, - // "project": { - // "description": "The project under which the queue lies.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "tag": { - // "description": "The tag allowed for tasks in the response. Must only be specified if group_by_tag is true. If group_by_tag is true and tag is not specified the tag will be that of the oldest task by eta, i.e. the first available tag", - // "location": "query", - // "type": "string" - // }, - // "taskqueue": { - // "description": "The taskqueue to lease a task from.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/taskqueues/{taskqueue}/tasks/lease", - // "response": { - // "$ref": "Tasks" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/taskqueue", - // "https://www.googleapis.com/auth/taskqueue.consumer" - // ] - // } - -} - -// method id "taskqueue.tasks.list": - -type TasksListCall struct { - s *Service - project string - taskqueue string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: List Tasks in a TaskQueue -func (r *TasksService) List(project string, taskqueue string) *TasksListCall { - c := &TasksListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.taskqueue = taskqueue - 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 *TasksListCall) Fields(s ...googleapi.Field) *TasksListCall { - 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 *TasksListCall) IfNoneMatch(entityTag string) *TasksListCall { - 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 *TasksListCall) Context(ctx context.Context) *TasksListCall { - 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 *TasksListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TasksListCall) 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, "{project}/taskqueues/{taskqueue}/tasks") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "taskqueue": c.taskqueue, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "taskqueue.tasks.list" call. -// Exactly one of *Tasks2 or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Tasks2.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 *TasksListCall) Do(opts ...googleapi.CallOption) (*Tasks2, 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 := &Tasks2{ - 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": "List Tasks in a TaskQueue", - // "httpMethod": "GET", - // "id": "taskqueue.tasks.list", - // "parameterOrder": [ - // "project", - // "taskqueue" - // ], - // "parameters": { - // "project": { - // "description": "The project under which the queue lies.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "taskqueue": { - // "description": "The id of the taskqueue to list tasks from.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/taskqueues/{taskqueue}/tasks", - // "response": { - // "$ref": "Tasks2" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/taskqueue", - // "https://www.googleapis.com/auth/taskqueue.consumer" - // ] - // } - -} - -// method id "taskqueue.tasks.patch": - -type TasksPatchCall struct { - s *Service - project string - taskqueue string - task string - task2 *Task - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Update tasks that are leased out of a TaskQueue. This method -// supports patch semantics. -func (r *TasksService) Patch(project string, taskqueue string, task string, newLeaseSeconds int64, task2 *Task) *TasksPatchCall { - c := &TasksPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.taskqueue = taskqueue - c.task = task - c.urlParams_.Set("newLeaseSeconds", fmt.Sprint(newLeaseSeconds)) - c.task2 = task2 - 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 *TasksPatchCall) Fields(s ...googleapi.Field) *TasksPatchCall { - 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 *TasksPatchCall) Context(ctx context.Context) *TasksPatchCall { - 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 *TasksPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TasksPatchCall) 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.task2) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/taskqueues/{taskqueue}/tasks/{task}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("PATCH", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "taskqueue": c.taskqueue, - "task": c.task, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "taskqueue.tasks.patch" call. -// Exactly one of *Task or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Task.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 *TasksPatchCall) Do(opts ...googleapi.CallOption) (*Task, 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 := &Task{ - 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": "Update tasks that are leased out of a TaskQueue. This method supports patch semantics.", - // "httpMethod": "PATCH", - // "id": "taskqueue.tasks.patch", - // "parameterOrder": [ - // "project", - // "taskqueue", - // "task", - // "newLeaseSeconds" - // ], - // "parameters": { - // "newLeaseSeconds": { - // "description": "The new lease in seconds.", - // "format": "int32", - // "location": "query", - // "required": true, - // "type": "integer" - // }, - // "project": { - // "description": "The project under which the queue lies.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "task": { - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "taskqueue": { - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/taskqueues/{taskqueue}/tasks/{task}", - // "request": { - // "$ref": "Task" - // }, - // "response": { - // "$ref": "Task" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/taskqueue", - // "https://www.googleapis.com/auth/taskqueue.consumer" - // ] - // } - -} - -// method id "taskqueue.tasks.update": - -type TasksUpdateCall struct { - s *Service - project string - taskqueue string - task string - task2 *Task - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Update: Update tasks that are leased out of a TaskQueue. -func (r *TasksService) Update(project string, taskqueue string, task string, newLeaseSeconds int64, task2 *Task) *TasksUpdateCall { - c := &TasksUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.taskqueue = taskqueue - c.task = task - c.urlParams_.Set("newLeaseSeconds", fmt.Sprint(newLeaseSeconds)) - c.task2 = task2 - 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 *TasksUpdateCall) Fields(s ...googleapi.Field) *TasksUpdateCall { - 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 *TasksUpdateCall) Context(ctx context.Context) *TasksUpdateCall { - 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 *TasksUpdateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TasksUpdateCall) 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.task2) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/taskqueues/{taskqueue}/tasks/{task}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "taskqueue": c.taskqueue, - "task": c.task, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "taskqueue.tasks.update" call. -// Exactly one of *Task or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Task.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 *TasksUpdateCall) Do(opts ...googleapi.CallOption) (*Task, 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 := &Task{ - 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": "Update tasks that are leased out of a TaskQueue.", - // "httpMethod": "POST", - // "id": "taskqueue.tasks.update", - // "parameterOrder": [ - // "project", - // "taskqueue", - // "task", - // "newLeaseSeconds" - // ], - // "parameters": { - // "newLeaseSeconds": { - // "description": "The new lease in seconds.", - // "format": "int32", - // "location": "query", - // "required": true, - // "type": "integer" - // }, - // "project": { - // "description": "The project under which the queue lies.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "task": { - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "taskqueue": { - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/taskqueues/{taskqueue}/tasks/{task}", - // "request": { - // "$ref": "Task" - // }, - // "response": { - // "$ref": "Task" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/taskqueue", - // "https://www.googleapis.com/auth/taskqueue.consumer" - // ] - // } - -}
diff --git a/toolresults/v1beta3firstparty/toolresults-api.json b/toolresults/v1beta3firstparty/toolresults-api.json deleted file mode 100644 index 43cb380..0000000 --- a/toolresults/v1beta3firstparty/toolresults-api.json +++ /dev/null
@@ -1,2313 +0,0 @@ -{ - "kind": "discovery#restDescription", - "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/oRWw5OqIvzBrnyAI_p6qB5VpgEM\"", - "discoveryVersion": "v1", - "id": "toolresults:v1beta3firstparty", - "name": "toolresults", - "canonicalName": "Tool Results", - "version": "v1beta3firstparty", - "revision": "20170911", - "title": "Cloud Tool Results firstparty API", - "description": "Reads and publishes results from Firebase Test Lab.", - "ownerDomain": "google.com", - "ownerName": "Google", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://firebase.google.com/docs/test-lab/", - "protocol": "rest", - "baseUrl": "https://www.googleapis.com/toolresults/v1beta3firstparty/projects/", - "basePath": "/toolresults/v1beta3firstparty/projects/", - "rootUrl": "https://www.googleapis.com/", - "servicePath": "toolresults/v1beta3firstparty/projects/", - "batchPath": "batch", - "parameters": { - "alt": { - "type": "string", - "description": "Data format for the response.", - "default": "json", - "enum": [ - "json" - ], - "enumDescriptions": [ - "Responses with Content-Type of application/json" - ], - "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": "true", - "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" - } - }, - "schemas": { - "AndroidAppInfo": { - "id": "AndroidAppInfo", - "type": "object", - "description": "Android app information.", - "properties": { - "name": { - "type": "string", - "description": "The name of the app. Optional" - }, - "packageName": { - "type": "string", - "description": "The package name of the app. Required." - }, - "versionCode": { - "type": "string", - "description": "The internal version code of the app. Optional." - }, - "versionName": { - "type": "string", - "description": "The version name of the app. Optional." - } - } - }, - "AndroidInstrumentationTest": { - "id": "AndroidInstrumentationTest", - "type": "object", - "description": "A test of an Android application that can control an Android component independently of its normal lifecycle.\n\nSee for more information on types of Android tests.", - "properties": { - "testPackageId": { - "type": "string", - "description": "The java package for the test to be executed. Required" - }, - "testRunnerClass": { - "type": "string", - "description": "The InstrumentationTestRunner class. Required" - }, - "testTargets": { - "type": "array", - "description": "Each target must be fully qualified with the package name or class name, in one of these formats: - \"package package_name\" - \"class package_name.class_name\" - \"class package_name.class_name#method_name\"\n\nIf empty, all targets in the module will be run.", - "items": { - "type": "string" - } - }, - "useOrchestrator": { - "type": "boolean", - "description": "The flag indicates whether Android Test Orchestrator will be used to run test or not. Test orchestrator is used if either: - orchestrator_option field is USE_ORCHESTRATOR, and test runner is compatible with orchestrator. Or - orchestrator_option field is unspecified or ORCHESTRATOR_OPTION_UNSPECIFIED, and test runner is compatible with orchestrator." - } - } - }, - "AndroidRoboTest": { - "id": "AndroidRoboTest", - "type": "object", - "description": "A test of an android application that explores the application on a virtual or physical Android device, finding culprits and crashes as it goes.", - "properties": { - "appInitialActivity": { - "type": "string", - "description": "The initial activity that should be used to start the app. Optional" - }, - "bootstrapPackageId": { - "type": "string", - "description": "The java package for the bootstrap. Optional" - }, - "bootstrapRunnerClass": { - "type": "string", - "description": "The runner class for the bootstrap. Optional" - }, - "maxDepth": { - "type": "integer", - "description": "The max depth of the traversal stack Robo can explore. Optional", - "format": "int32" - }, - "maxSteps": { - "type": "integer", - "description": "The max number of steps/actions Robo can execute. Default is no limit (0). Optional", - "format": "int32" - } - } - }, - "AndroidTest": { - "id": "AndroidTest", - "type": "object", - "description": "An Android mobile test specification.", - "properties": { - "androidAppInfo": { - "$ref": "AndroidAppInfo", - "description": "Infomation about the application under test." - }, - "androidInstrumentationTest": { - "$ref": "AndroidInstrumentationTest", - "description": "An Android instrumentation test." - }, - "androidRoboTest": { - "$ref": "AndroidRoboTest", - "description": "An Android robo test." - }, - "testTimeout": { - "$ref": "Duration", - "description": "Max time a test is allowed to run before it is automatically cancelled." - } - } - }, - "Any": { - "id": "Any", - "type": "object", - "description": "`Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\nFoo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... }\n\nExample 2: Pack and unpack a message in Java.\n\nFoo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); }\n\nExample 3: Pack and unpack a message in Python.\n\nfoo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ...\n\nExample 4: Pack and unpack a message in Go\n\nfoo := &pb.Foo{...} any, err := ptypes.MarshalAny(foo) ... foo := &pb.Foo{} if err := ptypes.UnmarshalAny(any, foo); err != nil { ... }\n\nThe pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example \"foo.bar.com/x/y.z\" will yield type name \"y.z\".\n\n\n\nJSON ==== The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example:\n\npackage google.profile; message Person { string first_name = 1; string last_name = 2; }\n\n{ \"@type\": \"type.googleapis.com/google.profile.Person\", \"firstName\": , \"lastName\": }\n\nIf the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]):\n\n{ \"@type\": \"type.googleapis.com/google.protobuf.Duration\", \"value\": \"1.212s\" }", - "properties": { - "typeUrl": { - "type": "string", - "description": "A URL/resource name whose content describes the type of the serialized protocol buffer message.\n\nFor URLs which use the scheme `http`, `https`, or no scheme, the following restrictions and interpretations apply:\n\n* If no scheme is provided, `https` is assumed. * The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading \".\" is not accepted). * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.)\n\nSchemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics." - }, - "value": { - "type": "string", - "description": "Must be a valid serialized protocol buffer of the above specified type.", - "format": "byte" - } - } - }, - "AppStartTime": { - "id": "AppStartTime", - "type": "object", - "properties": { - "fullyDrawnTime": { - "$ref": "Duration", - "description": "Optional. The time from app start to reaching the developer-reported \"fully drawn\" time. This is only stored if the app includes a call to Activity.reportFullyDrawn(). See https://developer.android.com/topic/performance/launch-time.html#time-full" - }, - "initialDisplayTime": { - "$ref": "Duration", - "description": "The time from app start to the first displayed activity being drawn, as reported in Logcat. See https://developer.android.com/topic/performance/launch-time.html#time-initial" - } - } - }, - "BasicPerfSampleSeries": { - "id": "BasicPerfSampleSeries", - "type": "object", - "description": "Encapsulates the metadata for basic sample series represented by a line chart", - "properties": { - "perfMetricType": { - "type": "string", - "enum": [ - "cpu", - "graphics", - "memory", - "network", - "perfMetricTypeUnspecified" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "" - ] - }, - "perfUnit": { - "type": "string", - "enum": [ - "byte", - "bytesPerSecond", - "framesPerSecond", - "kibibyte", - "percent", - "perfUnitUnspecified" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "" - ] - }, - "sampleSeriesLabel": { - "type": "string", - "enum": [ - "cpuKernel", - "cpuTotal", - "cpuUser", - "graphicsFrameRate", - "memoryRssPrivate", - "memoryRssShared", - "memoryRssTotal", - "memoryTotal", - "networkReceived", - "networkSent", - "ntBytesReceived", - "ntBytesTransferred", - "sampleSeriesTypeUnspecified" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "" - ] - } - } - }, - "BatchCreatePerfSamplesRequest": { - "id": "BatchCreatePerfSamplesRequest", - "type": "object", - "description": "The request must provide up to a maximum of 5000 samples to be created; a larger sample size will cause an INVALID_ARGUMENT error", - "properties": { - "perfSamples": { - "type": "array", - "description": "The set of PerfSamples to create should not include existing timestamps", - "items": { - "$ref": "PerfSample" - } - } - } - }, - "BatchCreatePerfSamplesResponse": { - "id": "BatchCreatePerfSamplesResponse", - "type": "object", - "properties": { - "perfSamples": { - "type": "array", - "items": { - "$ref": "PerfSample" - } - } - } - }, - "CPUInfo": { - "id": "CPUInfo", - "type": "object", - "properties": { - "cpuProcessor": { - "type": "string", - "description": "description of the device processor ie '1.8 GHz hexa core 64-bit ARMv8-A'" - }, - "cpuSpeedInGhz": { - "type": "number", - "description": "the CPU clock speed in GHz", - "format": "float" - }, - "numberOfCores": { - "type": "integer", - "description": "the number of CPU cores", - "format": "int32" - } - } - }, - "Duration": { - "id": "Duration", - "type": "object", - "description": "A Duration represents a signed, fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like \"day\" or \"month\". It is related to Timestamp in that the difference between two Timestamp values is a Duration and it can be added or subtracted from a Timestamp. Range is approximately +-10,000 years.\n\n# Examples\n\nExample 1: Compute Duration from two Timestamps in pseudo code.\n\nTimestamp start = ...; Timestamp end = ...; Duration duration = ...;\n\nduration.seconds = end.seconds - start.seconds; duration.nanos = end.nanos - start.nanos;\n\nif (duration.seconds 0) { duration.seconds += 1; duration.nanos -= 1000000000; } else if (durations.seconds \u003e 0 && duration.nanos \u003c 0) { duration.seconds -= 1; duration.nanos += 1000000000; }\n\nExample 2: Compute Timestamp from Timestamp + Duration in pseudo code.\n\nTimestamp start = ...; Duration duration = ...; Timestamp end = ...;\n\nend.seconds = start.seconds + duration.seconds; end.nanos = start.nanos + duration.nanos;\n\nif (end.nanos = 1000000000) { end.seconds += 1; end.nanos -= 1000000000; }\n\nExample 3: Compute Duration from datetime.timedelta in Python.\n\ntd = datetime.timedelta(days=3, minutes=10) duration = Duration() duration.FromTimedelta(td)\n\n# JSON Mapping\n\nIn JSON format, the Duration type is encoded as a string rather than an object, where the string ends in the suffix \"s\" (indicating seconds) and is preceded by the number of seconds, with nanoseconds expressed as fractional seconds. For example, 3 seconds with 0 nanoseconds should be encoded in JSON format as \"3s\", while 3 seconds and 1 nanosecond should be expressed in JSON format as \"3.000000001s\", and 3 seconds and 1 microsecond should be expressed in JSON format as \"3.000001s\".", - "properties": { - "nanos": { - "type": "integer", - "description": "Signed fractions of a second at nanosecond resolution of the span of time. Durations less than one second are represented with a 0 `seconds` field and a positive or negative `nanos` field. For durations of one second or more, a non-zero value for the `nanos` field must be of the same sign as the `seconds` field. Must be from -999,999,999 to +999,999,999 inclusive.", - "format": "int32" - }, - "seconds": { - "type": "string", - "description": "Signed seconds of the span of time. Must be from -315,576,000,000 to +315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years", - "format": "int64" - } - } - }, - "Execution": { - "id": "Execution", - "type": "object", - "description": "An Execution represents a collection of Steps. For instance, it could represent: - a mobile test executed across a range of device configurations - a jenkins job with a build step followed by a test step\n\nThe maximum size of an execution message is 1 MiB.\n\nAn Execution can be updated until its state is set to COMPLETE at which point it becomes immutable.", - "properties": { - "completionTime": { - "$ref": "Timestamp", - "description": "The time when the Execution status transitioned to COMPLETE.\n\nThis value will be set automatically when state transitions to COMPLETE.\n\n- In response: set if the execution state is COMPLETE. - In create/update request: never set" - }, - "creationTime": { - "$ref": "Timestamp", - "description": "The time when the Execution was created.\n\nThis value will be set automatically when CreateExecution is called.\n\n- In response: always set - In create/update request: never set" - }, - "executionId": { - "type": "string", - "description": "A unique identifier within a History for this Execution.\n\nReturns INVALID_ARGUMENT if this field is set or overwritten by the caller.\n\n- In response always set - In create/update request: never set" - }, - "outcome": { - "$ref": "Outcome", - "description": "Classify the result, for example into SUCCESS or FAILURE\n\n- In response: present if set by create/update request - In create/update request: optional" - }, - "specification": { - "$ref": "Specification", - "description": "Lightweight information about execution request.\n\n- In response: present if set by create - In create: optional - In update: optional" - }, - "state": { - "type": "string", - "description": "The initial state is IN_PROGRESS.\n\nThe only legal state transitions is from IN_PROGRESS to COMPLETE.\n\nA PRECONDITION_FAILED will be returned if an invalid transition is requested.\n\nThe state can only be set to COMPLETE once. A FAILED_PRECONDITION will be returned if the state is set to COMPLETE multiple times.\n\nIf the state is set to COMPLETE, all the in-progress steps within the execution will be set as COMPLETE. If the outcome of the step is not set, the outcome will be set to INCONCLUSIVE.\n\n- In response always set - In create/update request: optional", - "enum": [ - "complete", - "inProgress", - "pending", - "unknownState" - ], - "enumDescriptions": [ - "", - "", - "", - "" - ] - }, - "testExecutionMatrixId": { - "type": "string", - "description": "TestExecution Matrix ID that the TestExecutionService uses.\n\n- In response: present if set by create - In create: optional - In update: never set" - } - } - }, - "FailureDetail": { - "id": "FailureDetail", - "type": "object", - "properties": { - "crashed": { - "type": "boolean", - "description": "If the failure was severe because the system under test crashed." - }, - "notInstalled": { - "type": "boolean", - "description": "If an app is not installed and thus no test can be run with the app. This might be caused by trying to run a test on an unsupported platform." - }, - "otherNativeCrash": { - "type": "boolean", - "description": "If a native process other than the app crashed." - }, - "timedOut": { - "type": "boolean", - "description": "If the test overran some time limit, and that is why it failed." - }, - "unableToCrawl": { - "type": "boolean", - "description": "If the robo was unable to crawl the app; perhaps because the app did not start." - } - } - }, - "FileReference": { - "id": "FileReference", - "type": "object", - "description": "A reference to a file.", - "properties": { - "fileUri": { - "type": "string", - "description": "The URI of a file stored in Google Cloud Storage.\n\nFor example: http://storage.googleapis.com/mybucket/path/to/test.xml or in gsutil format: gs://mybucket/path/to/test.xml with version-specific info, gs://mybucket/path/to/test.xml#1360383693690000\n\nAn INVALID_ARGUMENT error will be returned if the URI format is not supported.\n\n- In response: always set - In create/update request: always set" - } - } - }, - "History": { - "id": "History", - "type": "object", - "description": "A History represents a sorted list of Executions ordered by the start_timestamp_millis field (descending). It can be used to group all the Executions of a continuous build.\n\nNote that the ordering only operates on one-dimension. If a repository has multiple branches, it means that multiple histories will need to be used in order to order Executions per branch.", - "properties": { - "displayName": { - "type": "string", - "description": "A short human-readable (plain text) name to display in the UI. Maximum of 100 characters.\n\n- In response: present if set during create. - In create request: optional" - }, - "historyId": { - "type": "string", - "description": "A unique identifier within a project for this History.\n\nReturns INVALID_ARGUMENT if this field is set or overwritten by the caller.\n\n- In response always set - In create request: never set" - }, - "name": { - "type": "string", - "description": "A name to uniquely identify a history within a project. Maximum of 100 characters.\n\n- In response always set - In create request: always set" - } - } - }, - "Image": { - "id": "Image", - "type": "object", - "description": "An image, with a link to the main image and a thumbnail.", - "properties": { - "error": { - "$ref": "Status", - "description": "An error explaining why the thumbnail could not be rendered." - }, - "sourceImage": { - "$ref": "ToolOutputReference", - "description": "A reference to the full-size, original image.\n\nThis is the same as the tool_outputs entry for the image under its Step.\n\nAlways set." - }, - "stepId": { - "type": "string", - "description": "The step to which the image is attached.\n\nAlways set." - }, - "thumbnail": { - "$ref": "Thumbnail", - "description": "The thumbnail." - } - } - }, - "InconclusiveDetail": { - "id": "InconclusiveDetail", - "type": "object", - "properties": { - "abortedByUser": { - "type": "boolean", - "description": "If the end user aborted the test execution before a pass or fail could be determined. For example, the user pressed ctrl-c which sent a kill signal to the test runner while the test was running." - }, - "infrastructureFailure": { - "type": "boolean", - "description": "If the test runner could not determine success or failure because the test depends on a component other than the system under test which failed.\n\nFor example, a mobile test requires provisioning a device where the test executes, and that provisioning can fail." - } - } - }, - "ListExecutionsResponse": { - "id": "ListExecutionsResponse", - "type": "object", - "properties": { - "executions": { - "type": "array", - "description": "Executions.\n\nAlways set.", - "items": { - "$ref": "Execution" - } - }, - "nextPageToken": { - "type": "string", - "description": "A continuation token to resume the query at the next item.\n\nWill only be set if there are more Executions to fetch." - } - } - }, - "ListHistoriesResponse": { - "id": "ListHistoriesResponse", - "type": "object", - "description": "Response message for HistoryService.List", - "properties": { - "histories": { - "type": "array", - "description": "Histories.", - "items": { - "$ref": "History" - } - }, - "nextPageToken": { - "type": "string", - "description": "A continuation token to resume the query at the next item.\n\nWill only be set if there are more histories to fetch.\n\nTokens are valid for up to one hour from the time of the first list request. For instance, if you make a list request at 1PM and use the token from this first request 10 minutes later, the token from this second response will only be valid for 50 minutes." - } - } - }, - "ListPerfSampleSeriesResponse": { - "id": "ListPerfSampleSeriesResponse", - "type": "object", - "properties": { - "perfSampleSeries": { - "type": "array", - "description": "The resulting PerfSampleSeries sorted by id", - "items": { - "$ref": "PerfSampleSeries" - } - } - } - }, - "ListPerfSamplesResponse": { - "id": "ListPerfSamplesResponse", - "type": "object", - "properties": { - "nextPageToken": { - "type": "string", - "description": "Optional, returned if result size exceeds the page size specified in the request (or the default page size, 500, if unspecified). It indicates the last sample timestamp to be used as page_token in subsequent request" - }, - "perfSamples": { - "type": "array", - "items": { - "$ref": "PerfSample" - } - } - } - }, - "ListScreenshotClustersResponse": { - "id": "ListScreenshotClustersResponse", - "type": "object", - "properties": { - "clusters": { - "type": "array", - "description": "The set of clustres associated with an execution Always set", - "items": { - "$ref": "ScreenshotCluster" - } - } - } - }, - "ListStepThumbnailsResponse": { - "id": "ListStepThumbnailsResponse", - "type": "object", - "description": "A response containing the thumbnails in a step.", - "properties": { - "nextPageToken": { - "type": "string", - "description": "A continuation token to resume the query at the next item.\n\nIf set, indicates that there are more thumbnails to read, by calling list again with this value in the page_token field." - }, - "thumbnails": { - "type": "array", - "description": "A list of image data.\n\nImages are returned in a deterministic order; they are ordered by these factors, in order of importance: * First, by their associated test case. Images without a test case are considered greater than images with one. * Second, by their creation time. Images without a creation time are greater than images with one. * Third, by the order in which they were added to the step (by calls to CreateStep or UpdateStep).", - "items": { - "$ref": "Image" - } - } - } - }, - "ListStepsResponse": { - "id": "ListStepsResponse", - "type": "object", - "description": "Response message for StepService.List.", - "properties": { - "nextPageToken": { - "type": "string", - "description": "A continuation token to resume the query at the next item.\n\nIf set, indicates that there are more steps to read, by calling list again with this value in the page_token field." - }, - "steps": { - "type": "array", - "description": "Steps.", - "items": { - "$ref": "Step" - } - } - } - }, - "MemoryInfo": { - "id": "MemoryInfo", - "type": "object", - "properties": { - "memoryCapInKibibyte": { - "type": "string", - "description": "Maximum memory that can be allocated to the process in KiB", - "format": "int64" - }, - "memoryTotalInKibibyte": { - "type": "string", - "description": "Total memory available on the device in KiB", - "format": "int64" - } - } - }, - "Outcome": { - "id": "Outcome", - "type": "object", - "description": "Interprets a result so that humans and machines can act on it.", - "properties": { - "failureDetail": { - "$ref": "FailureDetail", - "description": "More information about a FAILURE outcome.\n\nReturns INVALID_ARGUMENT if this field is set but the summary is not FAILURE.\n\nOptional" - }, - "inconclusiveDetail": { - "$ref": "InconclusiveDetail", - "description": "More information about an INCONCLUSIVE outcome.\n\nReturns INVALID_ARGUMENT if this field is set but the summary is not INCONCLUSIVE.\n\nOptional" - }, - "skippedDetail": { - "$ref": "SkippedDetail", - "description": "More information about a SKIPPED outcome.\n\nReturns INVALID_ARGUMENT if this field is set but the summary is not SKIPPED.\n\nOptional" - }, - "successDetail": { - "$ref": "SuccessDetail", - "description": "More information about a SUCCESS outcome.\n\nReturns INVALID_ARGUMENT if this field is set but the summary is not SUCCESS.\n\nOptional" - }, - "summary": { - "type": "string", - "description": "The simplest way to interpret a result.\n\nRequired", - "enum": [ - "failure", - "inconclusive", - "skipped", - "success", - "unset" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "" - ] - } - } - }, - "PerfEnvironment": { - "id": "PerfEnvironment", - "type": "object", - "description": "Encapsulates performance environment info", - "properties": { - "cpuInfo": { - "$ref": "CPUInfo", - "description": "CPU related environment info" - }, - "memoryInfo": { - "$ref": "MemoryInfo", - "description": "Memory related environment info" - } - } - }, - "PerfMetricsSummary": { - "id": "PerfMetricsSummary", - "type": "object", - "description": "A summary of perf metrics collected and performance environment info", - "properties": { - "appStartTime": { - "$ref": "AppStartTime" - }, - "executionId": { - "type": "string", - "description": "A tool results execution ID." - }, - "historyId": { - "type": "string", - "description": "A tool results history ID." - }, - "perfEnvironment": { - "$ref": "PerfEnvironment", - "description": "Describes the environment in which the performance metrics were collected" - }, - "perfMetrics": { - "type": "array", - "description": "Set of resource collected", - "items": { - "type": "string", - "enum": [ - "cpu", - "graphics", - "memory", - "network", - "perfMetricTypeUnspecified" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "" - ] - } - }, - "projectId": { - "type": "string", - "description": "The cloud project" - }, - "stepId": { - "type": "string", - "description": "A tool results step ID." - } - } - }, - "PerfSample": { - "id": "PerfSample", - "type": "object", - "description": "Resource representing a single performance measure or data point", - "properties": { - "sampleTime": { - "$ref": "Timestamp", - "description": "Timestamp of collection" - }, - "value": { - "type": "number", - "description": "Value observed", - "format": "double" - } - } - }, - "PerfSampleSeries": { - "id": "PerfSampleSeries", - "type": "object", - "description": "Resource representing a collection of performance samples (or data points)", - "properties": { - "basicPerfSampleSeries": { - "$ref": "BasicPerfSampleSeries", - "description": "Basic series represented by a line chart" - }, - "executionId": { - "type": "string", - "description": "A tool results execution ID." - }, - "historyId": { - "type": "string", - "description": "A tool results history ID." - }, - "projectId": { - "type": "string", - "description": "The cloud project" - }, - "sampleSeriesId": { - "type": "string", - "description": "A sample series id" - }, - "stepId": { - "type": "string", - "description": "A tool results step ID." - } - } - }, - "ProjectSettings": { - "id": "ProjectSettings", - "type": "object", - "description": "Per-project settings for the Tool Results service.", - "properties": { - "defaultBucket": { - "type": "string", - "description": "The name of the Google Cloud Storage bucket to which results are written.\n\nBy default, this is unset.\n\nIn update request: optional In response: optional" - }, - "name": { - "type": "string", - "description": "The name of the project's settings.\n\nAlways of the form: projects/{project-id}/settings\n\nIn update request: never set In response: always set" - } - } - }, - "PublishXunitXmlFilesRequest": { - "id": "PublishXunitXmlFilesRequest", - "type": "object", - "description": "Request message for StepService.PublishXunitXmlFiles.", - "properties": { - "xunitXmlFiles": { - "type": "array", - "description": "URI of the Xunit XML files to publish.\n\nThe maximum size of the file this reference is pointing to is 50MB.\n\nRequired.", - "items": { - "$ref": "FileReference" - } - } - } - }, - "Screen": { - "id": "Screen", - "type": "object", - "properties": { - "fileReference": { - "type": "string", - "description": "File reference of the png file. Required." - }, - "locale": { - "type": "string", - "description": "Locale of the device that the screenshot was taken on. Required." - }, - "model": { - "type": "string", - "description": "Model of the device that the screenshot was taken on. Required." - }, - "version": { - "type": "string", - "description": "OS version of the device that the screenshot was taken on. Required." - } - } - }, - "ScreenshotCluster": { - "id": "ScreenshotCluster", - "type": "object", - "properties": { - "activity": { - "type": "string", - "description": "A string that describes the activity of every screen in the cluster." - }, - "clusterId": { - "type": "string", - "description": "A unique identifier for the cluster." - }, - "keyScreen": { - "$ref": "Screen", - "description": "A singular screen that represents the cluster as a whole. This screen will act as the \"cover\" of the entire cluster. When users look at the clusters, only the key screen from each cluster will be shown. Which screen is the key screen is determined by the ClusteringAlgorithm" - }, - "screens": { - "type": "array", - "description": "Full list of screens.", - "items": { - "$ref": "Screen" - } - } - } - }, - "SkippedDetail": { - "id": "SkippedDetail", - "type": "object", - "properties": { - "incompatibleAppVersion": { - "type": "boolean", - "description": "If the App doesn't support the specific API level." - }, - "incompatibleArchitecture": { - "type": "boolean", - "description": "If the App doesn't run on the specific architecture, for example, x86." - }, - "incompatibleDevice": { - "type": "boolean", - "description": "If the requested OS version doesn't run on the specific device model." - } - } - }, - "Specification": { - "id": "Specification", - "type": "object", - "description": "The details about how to run the execution.", - "properties": { - "androidTest": { - "$ref": "AndroidTest", - "description": "An Android mobile test execution specification." - } - } - }, - "StackTrace": { - "id": "StackTrace", - "type": "object", - "description": "A stacktrace.", - "properties": { - "clusterId": { - "type": "string", - "description": "Exception cluster ID" - }, - "exception": { - "type": "string", - "description": "The stack trace message.\n\nRequired" - }, - "reportId": { - "type": "string", - "description": "Exception report ID" - } - } - }, - "Status": { - "id": "Status", - "type": "object", - "description": "The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). The error model is designed to be:\n\n- Simple to use and understand for most users - Flexible enough to meet unexpected needs\n\n# Overview\n\nThe `Status` message contains three pieces of data: error code, error message, and error details. The error code should be an enum value of [google.rpc.Code][], but it may accept additional error codes if needed. The error message should be a developer-facing English message that helps developers *understand* and *resolve* the error. If a localized user-facing error message is needed, put the localized message in the error details or localize it in the client. The optional error details may contain arbitrary information about the error. There is a predefined set of error detail types in the package `google.rpc` that can be used for common error conditions.\n\n# Language mapping\n\nThe `Status` message is the logical representation of the error model, but it is not necessarily the actual wire format. When the `Status` message is exposed in different client libraries and different wire protocols, it can be mapped differently. For example, it will likely be mapped to some exceptions in Java, but more likely mapped to some error codes in C.\n\n# Other uses\n\nThe error model and the `Status` message can be used in a variety of environments, either with or without APIs, to provide a consistent developer experience across different environments.\n\nExample uses of this error model include:\n\n- Partial errors. If a service needs to return partial errors to the client, it may embed the `Status` in the normal response to indicate the partial errors.\n\n- Workflow errors. A typical workflow has multiple steps. Each step may have a `Status` message for error reporting.\n\n- Batch operations. If a client uses batch request and batch response, the `Status` message should be used directly inside batch response, one for each error sub-response.\n\n- Asynchronous operations. If an API call embeds asynchronous operation results in its response, the status of those operations should be represented directly using the `Status` message.\n\n- Logging. If some API errors are stored in logs, the message `Status` could be used directly after any stripping needed for security/privacy reasons.", - "properties": { - "code": { - "type": "integer", - "description": "The status code, which should be an enum value of [google.rpc.Code][].", - "format": "int32" - }, - "details": { - "type": "array", - "description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.", - "items": { - "$ref": "Any" - } - }, - "message": { - "type": "string", - "description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the [google.rpc.Status.details][] field, or localized by the client." - } - } - }, - "Step": { - "id": "Step", - "type": "object", - "description": "A Step represents a single operation performed as part of Execution. A step can be used to represent the execution of a tool ( for example a test runner execution or an execution of a compiler).\n\nSteps can overlap (for instance two steps might have the same start time if some operations are done in parallel).\n\nHere is an example, let's consider that we have a continuous build is executing a test runner for each iteration. The workflow would look like: - user creates a Execution with id 1 - user creates an TestExecutionStep with id 100 for Execution 1 - user update TestExecutionStep with id 100 to add a raw xml log + the service parses the xml logs and returns a TestExecutionStep with updated TestResult(s). - user update the status of TestExecutionStep with id 100 to COMPLETE\n\nA Step can be updated until its state is set to COMPLETE at which points it becomes immutable.", - "properties": { - "completionTime": { - "$ref": "Timestamp", - "description": "The time when the step status was set to complete.\n\nThis value will be set automatically when state transitions to COMPLETE.\n\n- In response: set if the execution state is COMPLETE. - In create/update request: never set" - }, - "creationTime": { - "$ref": "Timestamp", - "description": "The time when the step was created.\n\n- In response: always set - In create/update request: never set" - }, - "description": { - "type": "string", - "description": "A description of this tool For example: mvn clean package -D skipTests=true\n\n- In response: present if set by create/update request - In create/update request: optional" - }, - "deviceUsageDuration": { - "$ref": "Duration", - "description": "How much the device resource is used to perform the test.\n\nThis is the device usage used for billing purpose, which is different from the run_duration, for example, infrastructure failure won't be charged for device usage.\n\nPRECONDITION_FAILED will be returned if one attempts to set a device_usage on a step which already has this field set.\n\n- In response: present if previously set. - In create request: optional - In update request: optional" - }, - "dimensionValue": { - "type": "array", - "description": "If the execution containing this step has any dimension_definition set, then this field allows the child to specify the values of the dimensions.\n\nThe keys must exactly match the dimension_definition of the execution.\n\nFor example, if the execution has `dimension_definition = ['attempt', 'device']` then a step must define values for those dimensions, eg. `dimension_value = ['attempt': '1', 'device': 'Nexus 6']`\n\nIf a step does not participate in one dimension of the matrix, the value for that dimension should be empty string. For example, if one of the tests is executed by a runner which does not support retries, the step could have `dimension_value = ['attempt': '', 'device': 'Nexus 6']`\n\nIf the step does not participate in any dimensions of the matrix, it may leave dimension_value unset.\n\nA PRECONDITION_FAILED will be returned if any of the keys do not exist in the dimension_definition of the execution.\n\nA PRECONDITION_FAILED will be returned if another step in this execution already has the same name and dimension_value, but differs on other data fields, for example, step field is different.\n\nA PRECONDITION_FAILED will be returned if dimension_value is set, and there is a dimension_definition in the execution which is not specified as one of the keys.\n\n- In response: present if set by create - In create request: optional - In update request: never set", - "items": { - "$ref": "StepDimensionValueEntry" - } - }, - "hasImages": { - "type": "boolean", - "description": "Whether any of the outputs of this step are images whose thumbnails can be fetched with ListThumbnails.\n\n- In response: always set - In create/update request: never set" - }, - "labels": { - "type": "array", - "description": "Arbitrary user-supplied key/value pairs that are associated with the step.\n\nUsers are responsible for managing the key namespace such that keys don't accidentally collide.\n\nAn INVALID_ARGUMENT will be returned if the number of labels exceeds 100 or if the length of any of the keys or values exceeds 100 characters.\n\n- In response: always set - In create request: optional - In update request: optional; any new key/value pair will be added to the map, and any new value for an existing key will update that key's value", - "items": { - "$ref": "StepLabelsEntry" - } - }, - "name": { - "type": "string", - "description": "A short human-readable name to display in the UI. Maximum of 100 characters. For example: Clean build\n\nA PRECONDITION_FAILED will be returned upon creating a new step if it shares its name and dimension_value with an existing step. If two steps represent a similar action, but have different dimension values, they should share the same name. For instance, if the same set of tests is run on two different platforms, the two steps should have the same name.\n\n- In response: always set - In create request: always set - In update request: never set" - }, - "outcome": { - "$ref": "Outcome", - "description": "Classification of the result, for example into SUCCESS or FAILURE\n\n- In response: present if set by create/update request - In create/update request: optional" - }, - "runDuration": { - "$ref": "Duration", - "description": "How long it took for this step to run.\n\nIf unset, this is set to the difference between creation_time and completion_time when the step is set to the COMPLETE state. In some cases, it is appropriate to set this value separately: For instance, if a step is created, but the operation it represents is queued for a few minutes before it executes, it would be appropriate not to include the time spent queued in its run_duration.\n\nPRECONDITION_FAILED will be returned if one attempts to set a run_duration on a step which already has this field set.\n\n- In response: present if previously set; always present on COMPLETE step - In create request: optional - In update request: optional" - }, - "state": { - "type": "string", - "description": "The initial state is IN_PROGRESS. The only legal state transitions are * IN_PROGRESS -\u003e COMPLETE\n\nA PRECONDITION_FAILED will be returned if an invalid transition is requested.\n\nIt is valid to create Step with a state set to COMPLETE. The state can only be set to COMPLETE once. A PRECONDITION_FAILED will be returned if the state is set to COMPLETE multiple times.\n\n- In response: always set - In create/update request: optional", - "enum": [ - "complete", - "inProgress", - "pending", - "unknownState" - ], - "enumDescriptions": [ - "", - "", - "", - "" - ] - }, - "stepId": { - "type": "string", - "description": "A unique identifier within a Execution for this Step.\n\nReturns INVALID_ARGUMENT if this field is set or overwritten by the caller.\n\n- In response: always set - In create/update request: never set" - }, - "testExecutionStep": { - "$ref": "TestExecutionStep", - "description": "An execution of a test runner." - }, - "toolExecutionStep": { - "$ref": "ToolExecutionStep", - "description": "An execution of a tool (used for steps we don't explicitly support)." - } - } - }, - "StepDimensionValueEntry": { - "id": "StepDimensionValueEntry", - "type": "object", - "properties": { - "key": { - "type": "string" - }, - "value": { - "type": "string" - } - } - }, - "StepLabelsEntry": { - "id": "StepLabelsEntry", - "type": "object", - "properties": { - "key": { - "type": "string" - }, - "value": { - "type": "string" - } - } - }, - "SuccessDetail": { - "id": "SuccessDetail", - "type": "object", - "properties": { - "otherNativeCrash": { - "type": "boolean", - "description": "If a native process other than the app crashed." - } - } - }, - "TestCaseReference": { - "id": "TestCaseReference", - "type": "object", - "description": "A reference to a test case.\n\nTest case references are canonically ordered lexicographically by these three factors: * First, by test_suite_name. * Second, by class_name. * Third, by name.", - "properties": { - "className": { - "type": "string", - "description": "The name of the class." - }, - "name": { - "type": "string", - "description": "The name of the test case.\n\nRequired." - }, - "testSuiteName": { - "type": "string", - "description": "The name of the test suite to which this test case belongs." - } - } - }, - "TestExecutionStep": { - "id": "TestExecutionStep", - "type": "object", - "description": "A step that represents running tests.\n\nIt accepts ant-junit xml files which will be parsed into structured test results by the service. Xml file paths are updated in order to append more files, however they can't be deleted.\n\nUsers can also add test results manually by using the test_result field.", - "properties": { - "testIssues": { - "type": "array", - "description": "Issues observed during the test execution.\n\nFor example, if the mobile app under test crashed during the test, the error message and the stack trace content can be recorded here to assist debugging.\n\n- In response: present if set by create or update - In create/update request: optional", - "items": { - "$ref": "TestIssue" - } - }, - "testSuiteOverviews": { - "type": "array", - "description": "List of test suite overview contents. This could be parsed from xUnit XML log by server, or uploaded directly by user. This references should only be called when test suites are fully parsed or uploaded.\n\nThe maximum allowed number of test suite overviews per step is 1000.\n\n- In response: always set - In create request: optional - In update request: never (use publishXunitXmlFiles custom method instead)", - "items": { - "$ref": "TestSuiteOverview" - } - }, - "testTiming": { - "$ref": "TestTiming", - "description": "The timing break down of the test execution.\n\n- In response: present if set by create or update - In create/update request: optional" - }, - "toolExecution": { - "$ref": "ToolExecution", - "description": "Represents the execution of the test runner.\n\nThe exit code of this tool will be used to determine if the test passed.\n\n- In response: always set - In create/update request: optional" - } - } - }, - "TestIssue": { - "id": "TestIssue", - "type": "object", - "description": "An issue detected occurring during a test execution.", - "properties": { - "errorMessage": { - "type": "string", - "description": "A brief human-readable message describing the issue. Required." - }, - "severity": { - "type": "string", - "description": "Severity of issue. Required.", - "enum": [ - "info", - "severe", - "unspecifiedSeverity", - "warning" - ], - "enumDescriptions": [ - "", - "", - "", - "" - ] - }, - "stackTrace": { - "$ref": "StackTrace", - "description": "Deprecated in favor of stack trace fields inside specific warnings." - }, - "type": { - "type": "string", - "description": "Type of issue. Required.", - "enum": [ - "anr", - "fatalException", - "nativeCrash", - "unspecifiedType" - ], - "enumDescriptions": [ - "", - "", - "", - "" - ] - }, - "warning": { - "$ref": "Any", - "description": "Warning message with additional details of the issue. Should always be a message from com.google.devtools.toolresults.v1.warnings Required." - } - } - }, - "TestSuiteOverview": { - "id": "TestSuiteOverview", - "type": "object", - "description": "A summary of a test suite result either parsed from XML or uploaded directly by a user.\n\nNote: the API related comments are for StepService only. This message is also being used in ExecutionService in a read only mode for the corresponding step.", - "properties": { - "errorCount": { - "type": "integer", - "description": "Number of test cases in error, typically set by the service by parsing the xml_source.\n\n- In create/response: always set - In update request: never", - "format": "int32" - }, - "failureCount": { - "type": "integer", - "description": "Number of failed test cases, typically set by the service by parsing the xml_source. May also be set by the user.\n\n- In create/response: always set - In update request: never", - "format": "int32" - }, - "name": { - "type": "string", - "description": "The name of the test suite.\n\n- In create/response: always set - In update request: never" - }, - "skippedCount": { - "type": "integer", - "description": "Number of test cases not run, typically set by the service by parsing the xml_source.\n\n- In create/response: always set - In update request: never", - "format": "int32" - }, - "totalCount": { - "type": "integer", - "description": "Number of test cases, typically set by the service by parsing the xml_source.\n\n- In create/response: always set - In update request: never", - "format": "int32" - }, - "xmlSource": { - "$ref": "FileReference", - "description": "If this test suite was parsed from XML, this is the URI where the original XML file is stored.\n\nNote: Multiple test suites can share the same xml_source\n\nReturns INVALID_ARGUMENT if the uri format is not supported.\n\n- In create/response: optional - In update request: never" - } - } - }, - "TestTiming": { - "id": "TestTiming", - "type": "object", - "description": "Testing timing break down to know phases.", - "properties": { - "testProcessDuration": { - "$ref": "Duration", - "description": "How long it took to run the test process.\n\n- In response: present if previously set. - In create/update request: optional" - } - } - }, - "Thumbnail": { - "id": "Thumbnail", - "type": "object", - "description": "A single thumbnail, with its size and format.", - "properties": { - "contentType": { - "type": "string", - "description": "The thumbnail's content type, i.e. \"image/png\".\n\nAlways set." - }, - "data": { - "type": "string", - "description": "The thumbnail file itself.\n\nThat is, the bytes here are precisely the bytes that make up the thumbnail file; they can be served as an image as-is (with the appropriate content type.)\n\nAlways set.", - "format": "byte" - }, - "heightPx": { - "type": "integer", - "description": "The height of the thumbnail, in pixels.\n\nAlways set.", - "format": "int32" - }, - "widthPx": { - "type": "integer", - "description": "The width of the thumbnail, in pixels.\n\nAlways set.", - "format": "int32" - } - } - }, - "Timestamp": { - "id": "Timestamp", - "type": "object", - "description": "A Timestamp represents a point in time independent of any time zone or calendar, represented as seconds and fractions of seconds at nanosecond resolution in UTC Epoch time. It is encoded using the Proleptic Gregorian Calendar which extends the Gregorian calendar backwards to year one. It is encoded assuming all minutes are 60 seconds long, i.e. leap seconds are \"smeared\" so that no leap second table is needed for interpretation. Range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from RFC 3339 date strings. See [https://www.ietf.org/rfc/rfc3339.txt](https://www.ietf.org/rfc/rfc3339.txt).\n\n# Examples\n\nExample 1: Compute Timestamp from POSIX `time()`.\n\nTimestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0);\n\nExample 2: Compute Timestamp from POSIX `gettimeofday()`.\n\nstruct timeval tv; gettimeofday(&tv, NULL);\n\nTimestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000);\n\nExample 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`.\n\nFILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) \u003c\u003c 32) | ft.dwLowDateTime;\n\n// A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100));\n\nExample 4: Compute Timestamp from Java `System.currentTimeMillis()`.\n\nlong millis = System.currentTimeMillis();\n\nTimestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build();\n\n\n\nExample 5: Compute Timestamp from current time in Python.\n\ntimestamp = Timestamp() timestamp.GetCurrentTime()\n\n# JSON Mapping\n\nIn JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required, though only UTC (as indicated by \"Z\") is presently supported.\n\nFor example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017.\n\nIn JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString] method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime()) to obtain a formatter capable of generating timestamps in this format.", - "properties": { - "nanos": { - "type": "integer", - "description": "Non-negative fractions of a second at nanosecond resolution. Negative second values with fractions must still have non-negative nanos values that count forward in time. Must be from 0 to 999,999,999 inclusive.", - "format": "int32" - }, - "seconds": { - "type": "string", - "description": "Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive.", - "format": "int64" - } - } - }, - "ToolExecution": { - "id": "ToolExecution", - "type": "object", - "description": "An execution of an arbitrary tool. It could be a test runner or a tool copying artifacts or deploying code.", - "properties": { - "commandLineArguments": { - "type": "array", - "description": "The full tokenized command line including the program name (equivalent to argv in a C program).\n\n- In response: present if set by create request - In create request: optional - In update request: never set", - "items": { - "type": "string" - } - }, - "exitCode": { - "$ref": "ToolExitCode", - "description": "Tool execution exit code. This field will be set once the tool has exited.\n\n- In response: present if set by create/update request - In create request: optional - In update request: optional, a FAILED_PRECONDITION error will be returned if an exit_code is already set." - }, - "toolLogs": { - "type": "array", - "description": "References to any plain text logs output the tool execution.\n\nThis field can be set before the tool has exited in order to be able to have access to a live view of the logs while the tool is running.\n\nThe maximum allowed number of tool logs per step is 1000.\n\n- In response: present if set by create/update request - In create request: optional - In update request: optional, any value provided will be appended to the existing list", - "items": { - "$ref": "FileReference" - } - }, - "toolOutputs": { - "type": "array", - "description": "References to opaque files of any format output by the tool execution.\n\nThe maximum allowed number of tool outputs per step is 1000.\n\n- In response: present if set by create/update request - In create request: optional - In update request: optional, any value provided will be appended to the existing list", - "items": { - "$ref": "ToolOutputReference" - } - } - } - }, - "ToolExecutionStep": { - "id": "ToolExecutionStep", - "type": "object", - "description": "Generic tool step to be used for binaries we do not explicitly support. For example: running cp to copy artifacts from one location to another.", - "properties": { - "toolExecution": { - "$ref": "ToolExecution", - "description": "A Tool execution.\n\n- In response: present if set by create/update request - In create/update request: optional" - } - } - }, - "ToolExitCode": { - "id": "ToolExitCode", - "type": "object", - "description": "Exit code from a tool execution.", - "properties": { - "number": { - "type": "integer", - "description": "Tool execution exit code. A value of 0 means that the execution was successful.\n\n- In response: always set - In create/update request: always set", - "format": "int32" - } - } - }, - "ToolOutputReference": { - "id": "ToolOutputReference", - "type": "object", - "description": "A reference to a ToolExecution output file.", - "properties": { - "creationTime": { - "$ref": "Timestamp", - "description": "The creation time of the file.\n\n- In response: present if set by create/update request - In create/update request: optional" - }, - "output": { - "$ref": "FileReference", - "description": "A FileReference to an output file.\n\n- In response: always set - In create/update request: always set" - }, - "testCase": { - "$ref": "TestCaseReference", - "description": "The test case to which this output file belongs.\n\n- In response: present if set by create/update request - In create/update request: optional" - } - } - } - }, - "resources": { - "projects": { - "methods": { - "getSettings": { - "id": "toolresults.projects.getSettings", - "path": "{projectId}/settings", - "httpMethod": "GET", - "description": "Gets the Tool Results settings for a project.\n\nMay return any of the following canonical error codes:\n\n- PERMISSION_DENIED - if the user is not authorized to read from project", - "parameters": { - "projectId": { - "type": "string", - "description": "A Project id.\n\nRequired.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "projectId" - ], - "response": { - "$ref": "ProjectSettings" - } - }, - "initializeSettings": { - "id": "toolresults.projects.initializeSettings", - "path": "{projectId}:initializeSettings", - "httpMethod": "POST", - "description": "Creates resources for settings which have not yet been set.\n\nCurrently, this creates a single resource: a Google Cloud Storage bucket, to be used as the default bucket for this project. The bucket is created in an FTL-own storage project. Except for in rare cases, calling this method in parallel from multiple clients will only create a single bucket. In order to avoid unnecessary storage charges, the bucket is configured to automatically delete objects older than 90 days.\n\nThe bucket is created with the following permissions: - Owner access for owners of central storage project (FTL-owned) - Writer access for owners/editors of customer project - Reader access for viewers of customer project The default ACL on objects created in the bucket is: - Owner access for owners of central storage project - Reader access for owners/editors/viewers of customer project See Google Cloud Storage documentation for more details.\n\nIf there is already a default bucket set and the project can access the bucket, this call does nothing. However, if the project doesn't have the permission to access the bucket or the bucket is deleted, a new bucket will be created.\n\nMay return any canonical error codes, including the following:\n\n- PERMISSION_DENIED - if the user is not authorized to write to project - Any error code raised by Google Cloud Storage", - "parameters": { - "projectId": { - "type": "string", - "description": "A Project id.\n\nRequired.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "projectId" - ], - "response": { - "$ref": "ProjectSettings" - } - } - }, - "resources": { - "histories": { - "methods": { - "create": { - "id": "toolresults.projects.histories.create", - "path": "{projectId}/histories", - "httpMethod": "POST", - "description": "Creates a History.\n\nThe returned History will have the id set.\n\nMay return any of the following canonical error codes:\n\n- PERMISSION_DENIED - if the user is not authorized to write to project - INVALID_ARGUMENT - if the request is malformed - NOT_FOUND - if the containing project does not exist", - "parameters": { - "projectId": { - "type": "string", - "description": "A Project id.\n\nRequired.", - "required": true, - "location": "path" - }, - "requestId": { - "type": "string", - "description": "A unique request ID for server to detect duplicated requests. For example, a UUID.\n\nOptional, but strongly recommended.", - "location": "query" - } - }, - "parameterOrder": [ - "projectId" - ], - "request": { - "$ref": "History" - }, - "response": { - "$ref": "History" - } - }, - "get": { - "id": "toolresults.projects.histories.get", - "path": "{projectId}/histories/{historyId}", - "httpMethod": "GET", - "description": "Gets a History.\n\nMay return any of the following canonical error codes:\n\n- PERMISSION_DENIED - if the user is not authorized to read project - INVALID_ARGUMENT - if the request is malformed - NOT_FOUND - if the History does not exist", - "parameters": { - "historyId": { - "type": "string", - "description": "A History id.\n\nRequired.", - "required": true, - "location": "path" - }, - "projectId": { - "type": "string", - "description": "A Project id.\n\nRequired.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "projectId", - "historyId" - ], - "response": { - "$ref": "History" - } - }, - "list": { - "id": "toolresults.projects.histories.list", - "path": "{projectId}/histories", - "httpMethod": "GET", - "description": "Lists Histories for a given Project.\n\nThe histories are sorted by modification time in descending order. The history_id key will be used to order the history with the same modification time.\n\nMay return any of the following canonical error codes:\n\n- PERMISSION_DENIED - if the user is not authorized to read project - INVALID_ARGUMENT - if the request is malformed - NOT_FOUND - if the History does not exist", - "parameters": { - "filterByName": { - "type": "string", - "description": "If set, only return histories with the given name.\n\nOptional.", - "location": "query" - }, - "pageSize": { - "type": "integer", - "description": "The maximum number of Histories to fetch.\n\nDefault value: 20. The server will use this default if the field is not set or has a value of 0. Any value greater than 100 will be treated as 100.\n\nOptional.", - "format": "int32", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "A continuation token to resume the query at the next item.\n\nOptional.", - "location": "query" - }, - "projectId": { - "type": "string", - "description": "A Project id.\n\nRequired.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "projectId" - ], - "response": { - "$ref": "ListHistoriesResponse" - } - } - }, - "resources": { - "executions": { - "methods": { - "create": { - "id": "toolresults.projects.histories.executions.create", - "path": "{projectId}/histories/{historyId}/executions", - "httpMethod": "POST", - "description": "Creates an Execution.\n\nThe returned Execution will have the id set.\n\nMay return any of the following canonical error codes:\n\n- PERMISSION_DENIED - if the user is not authorized to write to project - INVALID_ARGUMENT - if the request is malformed - NOT_FOUND - if the containing History does not exist", - "parameters": { - "historyId": { - "type": "string", - "description": "A History id.\n\nRequired.", - "required": true, - "location": "path" - }, - "projectId": { - "type": "string", - "description": "A Project id.\n\nRequired.", - "required": true, - "location": "path" - }, - "requestId": { - "type": "string", - "description": "A unique request ID for server to detect duplicated requests. For example, a UUID.\n\nOptional, but strongly recommended.", - "location": "query" - } - }, - "parameterOrder": [ - "projectId", - "historyId" - ], - "request": { - "$ref": "Execution" - }, - "response": { - "$ref": "Execution" - } - }, - "get": { - "id": "toolresults.projects.histories.executions.get", - "path": "{projectId}/histories/{historyId}/executions/{executionId}", - "httpMethod": "GET", - "description": "Gets an Execution.\n\nMay return any of the following canonical error codes:\n\n- PERMISSION_DENIED - if the user is not authorized to write to project - INVALID_ARGUMENT - if the request is malformed - NOT_FOUND - if the Execution does not exist", - "parameters": { - "executionId": { - "type": "string", - "description": "An Execution id.\n\nRequired.", - "required": true, - "location": "path" - }, - "historyId": { - "type": "string", - "description": "A History id.\n\nRequired.", - "required": true, - "location": "path" - }, - "projectId": { - "type": "string", - "description": "A Project id.\n\nRequired.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "projectId", - "historyId", - "executionId" - ], - "response": { - "$ref": "Execution" - } - }, - "list": { - "id": "toolresults.projects.histories.executions.list", - "path": "{projectId}/histories/{historyId}/executions", - "httpMethod": "GET", - "description": "Lists Histories for a given Project.\n\nThe executions are sorted by creation_time in descending order. The execution_id key will be used to order the executions with the same creation_time.\n\nMay return any of the following canonical error codes:\n\n- PERMISSION_DENIED - if the user is not authorized to read project - INVALID_ARGUMENT - if the request is malformed - NOT_FOUND - if the containing History does not exist", - "parameters": { - "historyId": { - "type": "string", - "description": "A History id.\n\nRequired.", - "required": true, - "location": "path" - }, - "pageSize": { - "type": "integer", - "description": "The maximum number of Executions to fetch.\n\nDefault value: 25. The server will use this default if the field is not set or has a value of 0.\n\nOptional.", - "format": "int32", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "A continuation token to resume the query at the next item.\n\nOptional.", - "location": "query" - }, - "projectId": { - "type": "string", - "description": "A Project id.\n\nRequired.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "projectId", - "historyId" - ], - "response": { - "$ref": "ListExecutionsResponse" - } - }, - "patch": { - "id": "toolresults.projects.histories.executions.patch", - "path": "{projectId}/histories/{historyId}/executions/{executionId}", - "httpMethod": "PATCH", - "description": "Updates an existing Execution with the supplied partial entity.\n\nMay return any of the following canonical error codes:\n\n- PERMISSION_DENIED - if the user is not authorized to write to project - INVALID_ARGUMENT - if the request is malformed - FAILED_PRECONDITION - if the requested state transition is illegal - NOT_FOUND - if the containing History does not exist", - "parameters": { - "executionId": { - "type": "string", - "description": "Required.", - "required": true, - "location": "path" - }, - "historyId": { - "type": "string", - "description": "Required.", - "required": true, - "location": "path" - }, - "projectId": { - "type": "string", - "description": "A Project id. Required.", - "required": true, - "location": "path" - }, - "requestId": { - "type": "string", - "description": "A unique request ID for server to detect duplicated requests. For example, a UUID.\n\nOptional, but strongly recommended.", - "location": "query" - } - }, - "parameterOrder": [ - "projectId", - "historyId", - "executionId" - ], - "request": { - "$ref": "Execution" - }, - "response": { - "$ref": "Execution" - } - } - }, - "resources": { - "clusters": { - "methods": { - "get": { - "id": "toolresults.projects.histories.executions.clusters.get", - "path": "{projectId}/histories/{historyId}/executions/{executionId}/clusters/{clusterId}", - "httpMethod": "GET", - "description": "Retrieves a single screenshot cluster by its ID", - "parameters": { - "clusterId": { - "type": "string", - "description": "A Cluster id\n\nRequired.", - "required": true, - "location": "path" - }, - "executionId": { - "type": "string", - "description": "An Execution id.\n\nRequired.", - "required": true, - "location": "path" - }, - "historyId": { - "type": "string", - "description": "A History id.\n\nRequired.", - "required": true, - "location": "path" - }, - "projectId": { - "type": "string", - "description": "A Project id.\n\nRequired.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "projectId", - "historyId", - "executionId", - "clusterId" - ], - "response": { - "$ref": "ScreenshotCluster" - } - }, - "list": { - "id": "toolresults.projects.histories.executions.clusters.list", - "path": "{projectId}/histories/{historyId}/executions/{executionId}/clusters", - "httpMethod": "GET", - "description": "Lists Screenshot Clusters\n\nReturns the list of screenshot clusters corresponding to an execution. Screenshot clusters are created after the execution is finished. Clusters are created from a set of screenshots. Between any two screenshots, a matching score is calculated based off their metadata that determines how similar they are. Screenshots are placed in the cluster that has screens which have the highest matching scores.", - "parameters": { - "executionId": { - "type": "string", - "description": "An Execution id.\n\nRequired.", - "required": true, - "location": "path" - }, - "historyId": { - "type": "string", - "description": "A History id.\n\nRequired.", - "required": true, - "location": "path" - }, - "projectId": { - "type": "string", - "description": "A Project id.\n\nRequired.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "projectId", - "historyId", - "executionId" - ], - "response": { - "$ref": "ListScreenshotClustersResponse" - } - } - } - }, - "steps": { - "methods": { - "create": { - "id": "toolresults.projects.histories.executions.steps.create", - "path": "{projectId}/histories/{historyId}/executions/{executionId}/steps", - "httpMethod": "POST", - "description": "Creates a Step.\n\nThe returned Step will have the id set.\n\nMay return any of the following canonical error codes:\n\n- PERMISSION_DENIED - if the user is not authorized to write to project - INVALID_ARGUMENT - if the request is malformed - FAILED_PRECONDITION - if the step is too large (more than 10Mib) - NOT_FOUND - if the containing Execution does not exist", - "parameters": { - "executionId": { - "type": "string", - "description": "A Execution id.\n\nRequired.", - "required": true, - "location": "path" - }, - "historyId": { - "type": "string", - "description": "A History id.\n\nRequired.", - "required": true, - "location": "path" - }, - "projectId": { - "type": "string", - "description": "A Project id.\n\nRequired.", - "required": true, - "location": "path" - }, - "requestId": { - "type": "string", - "description": "A unique request ID for server to detect duplicated requests. For example, a UUID.\n\nOptional, but strongly recommended.", - "location": "query" - } - }, - "parameterOrder": [ - "projectId", - "historyId", - "executionId" - ], - "request": { - "$ref": "Step" - }, - "response": { - "$ref": "Step" - } - }, - "get": { - "id": "toolresults.projects.histories.executions.steps.get", - "path": "{projectId}/histories/{historyId}/executions/{executionId}/steps/{stepId}", - "httpMethod": "GET", - "description": "Gets a Step.\n\nMay return any of the following canonical error codes:\n\n- PERMISSION_DENIED - if the user is not authorized to read project - INVALID_ARGUMENT - if the request is malformed - NOT_FOUND - if the Step does not exist", - "parameters": { - "executionId": { - "type": "string", - "description": "A Execution id.\n\nRequired.", - "required": true, - "location": "path" - }, - "historyId": { - "type": "string", - "description": "A History id.\n\nRequired.", - "required": true, - "location": "path" - }, - "projectId": { - "type": "string", - "description": "A Project id.\n\nRequired.", - "required": true, - "location": "path" - }, - "stepId": { - "type": "string", - "description": "A Step id.\n\nRequired.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "projectId", - "historyId", - "executionId", - "stepId" - ], - "response": { - "$ref": "Step" - } - }, - "getPerfMetricsSummary": { - "id": "toolresults.projects.histories.executions.steps.getPerfMetricsSummary", - "path": "{projectId}/histories/{historyId}/executions/{executionId}/steps/{stepId}/perfMetricsSummary", - "httpMethod": "GET", - "description": "Retrieves a PerfMetricsSummary.\n\nMay return any of the following error code(s): - NOT_FOUND - The specified PerfMetricsSummary does not exist", - "parameters": { - "executionId": { - "type": "string", - "description": "A tool results execution ID.", - "required": true, - "location": "path" - }, - "historyId": { - "type": "string", - "description": "A tool results history ID.", - "required": true, - "location": "path" - }, - "projectId": { - "type": "string", - "description": "The cloud project", - "required": true, - "location": "path" - }, - "stepId": { - "type": "string", - "description": "A tool results step ID.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "projectId", - "historyId", - "executionId", - "stepId" - ], - "response": { - "$ref": "PerfMetricsSummary" - } - }, - "list": { - "id": "toolresults.projects.histories.executions.steps.list", - "path": "{projectId}/histories/{historyId}/executions/{executionId}/steps", - "httpMethod": "GET", - "description": "Lists Steps for a given Execution.\n\nThe steps are sorted by creation_time in descending order. The step_id key will be used to order the steps with the same creation_time.\n\nMay return any of the following canonical error codes:\n\n- PERMISSION_DENIED - if the user is not authorized to read project - INVALID_ARGUMENT - if the request is malformed - FAILED_PRECONDITION - if an argument in the request happens to be invalid; e.g. if an attempt is made to list the children of a nonexistent Step - NOT_FOUND - if the containing Execution does not exist", - "parameters": { - "executionId": { - "type": "string", - "description": "A Execution id.\n\nRequired.", - "required": true, - "location": "path" - }, - "historyId": { - "type": "string", - "description": "A History id.\n\nRequired.", - "required": true, - "location": "path" - }, - "pageSize": { - "type": "integer", - "description": "The maximum number of Steps to fetch.\n\nDefault value: 25. The server will use this default if the field is not set or has a value of 0.\n\nOptional.", - "format": "int32", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "A continuation token to resume the query at the next item.\n\nOptional.", - "location": "query" - }, - "projectId": { - "type": "string", - "description": "A Project id.\n\nRequired.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "projectId", - "historyId", - "executionId" - ], - "response": { - "$ref": "ListStepsResponse" - } - }, - "patch": { - "id": "toolresults.projects.histories.executions.steps.patch", - "path": "{projectId}/histories/{historyId}/executions/{executionId}/steps/{stepId}", - "httpMethod": "PATCH", - "description": "Updates an existing Step with the supplied partial entity.\n\nMay return any of the following canonical error codes:\n\n- PERMISSION_DENIED - if the user is not authorized to write project - INVALID_ARGUMENT - if the request is malformed - FAILED_PRECONDITION - if the requested state transition is illegal (e.g try to upload a duplicate xml file), if the updated step is too large (more than 10Mib) - NOT_FOUND - if the containing Execution does not exist", - "parameters": { - "executionId": { - "type": "string", - "description": "A Execution id.\n\nRequired.", - "required": true, - "location": "path" - }, - "historyId": { - "type": "string", - "description": "A History id.\n\nRequired.", - "required": true, - "location": "path" - }, - "projectId": { - "type": "string", - "description": "A Project id.\n\nRequired.", - "required": true, - "location": "path" - }, - "requestId": { - "type": "string", - "description": "A unique request ID for server to detect duplicated requests. For example, a UUID.\n\nOptional, but strongly recommended.", - "location": "query" - }, - "stepId": { - "type": "string", - "description": "A Step id.\n\nRequired.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "projectId", - "historyId", - "executionId", - "stepId" - ], - "request": { - "$ref": "Step" - }, - "response": { - "$ref": "Step" - } - }, - "publishXunitXmlFiles": { - "id": "toolresults.projects.histories.executions.steps.publishXunitXmlFiles", - "path": "{projectId}/histories/{historyId}/executions/{executionId}/steps/{stepId}:publishXunitXmlFiles", - "httpMethod": "POST", - "description": "Publish xml files to an existing Step.\n\nMay return any of the following canonical error codes:\n\n- PERMISSION_DENIED - if the user is not authorized to write project - INVALID_ARGUMENT - if the request is malformed - FAILED_PRECONDITION - if the requested state transition is illegal, e.g try to upload a duplicate xml file or a file too large. - NOT_FOUND - if the containing Execution does not exist", - "parameters": { - "executionId": { - "type": "string", - "description": "A Execution id.\n\nRequired.", - "required": true, - "location": "path" - }, - "historyId": { - "type": "string", - "description": "A History id.\n\nRequired.", - "required": true, - "location": "path" - }, - "projectId": { - "type": "string", - "description": "A Project id.\n\nRequired.", - "required": true, - "location": "path" - }, - "stepId": { - "type": "string", - "description": "A Step id. Note: This step must include a TestExecutionStep.\n\nRequired.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "projectId", - "historyId", - "executionId", - "stepId" - ], - "request": { - "$ref": "PublishXunitXmlFilesRequest" - }, - "response": { - "$ref": "Step" - } - } - }, - "resources": { - "perfMetricsSummary": { - "methods": { - "create": { - "id": "toolresults.projects.histories.executions.steps.perfMetricsSummary.create", - "path": "{projectId}/histories/{historyId}/executions/{executionId}/steps/{stepId}/perfMetricsSummary", - "httpMethod": "POST", - "description": "Creates a PerfMetricsSummary resource. Returns the existing one if it has already been created.\n\nMay return any of the following error code(s): - NOT_FOUND - The containing Step does not exist", - "parameters": { - "executionId": { - "type": "string", - "description": "A tool results execution ID.", - "required": true, - "location": "path" - }, - "historyId": { - "type": "string", - "description": "A tool results history ID.", - "required": true, - "location": "path" - }, - "projectId": { - "type": "string", - "description": "The cloud project", - "required": true, - "location": "path" - }, - "stepId": { - "type": "string", - "description": "A tool results step ID.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "projectId", - "historyId", - "executionId", - "stepId" - ], - "request": { - "$ref": "PerfMetricsSummary" - }, - "response": { - "$ref": "PerfMetricsSummary" - } - } - } - }, - "perfSampleSeries": { - "methods": { - "create": { - "id": "toolresults.projects.histories.executions.steps.perfSampleSeries.create", - "path": "{projectId}/histories/{historyId}/executions/{executionId}/steps/{stepId}/perfSampleSeries", - "httpMethod": "POST", - "description": "Creates a PerfSampleSeries.\n\nMay return any of the following error code(s): - ALREADY_EXISTS - PerfMetricSummary already exists for the given Step - NOT_FOUND - The containing Step does not exist", - "parameters": { - "executionId": { - "type": "string", - "description": "A tool results execution ID.", - "required": true, - "location": "path" - }, - "historyId": { - "type": "string", - "description": "A tool results history ID.", - "required": true, - "location": "path" - }, - "projectId": { - "type": "string", - "description": "The cloud project", - "required": true, - "location": "path" - }, - "stepId": { - "type": "string", - "description": "A tool results step ID.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "projectId", - "historyId", - "executionId", - "stepId" - ], - "request": { - "$ref": "PerfSampleSeries" - }, - "response": { - "$ref": "PerfSampleSeries" - } - }, - "get": { - "id": "toolresults.projects.histories.executions.steps.perfSampleSeries.get", - "path": "{projectId}/histories/{historyId}/executions/{executionId}/steps/{stepId}/perfSampleSeries/{sampleSeriesId}", - "httpMethod": "GET", - "description": "Gets a PerfSampleSeries.\n\nMay return any of the following error code(s): - NOT_FOUND - The specified PerfSampleSeries does not exist", - "parameters": { - "executionId": { - "type": "string", - "description": "A tool results execution ID.", - "required": true, - "location": "path" - }, - "historyId": { - "type": "string", - "description": "A tool results history ID.", - "required": true, - "location": "path" - }, - "projectId": { - "type": "string", - "description": "The cloud project", - "required": true, - "location": "path" - }, - "sampleSeriesId": { - "type": "string", - "description": "A sample series id", - "required": true, - "location": "path" - }, - "stepId": { - "type": "string", - "description": "A tool results step ID.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "projectId", - "historyId", - "executionId", - "stepId", - "sampleSeriesId" - ], - "response": { - "$ref": "PerfSampleSeries" - } - }, - "list": { - "id": "toolresults.projects.histories.executions.steps.perfSampleSeries.list", - "path": "{projectId}/histories/{historyId}/executions/{executionId}/steps/{stepId}/perfSampleSeries", - "httpMethod": "GET", - "description": "Lists PerfSampleSeries for a given Step.\n\nThe request provides an optional filter which specifies one or more PerfMetricsType to include in the result; if none returns all. The resulting PerfSampleSeries are sorted by ids.\n\nMay return any of the following canonical error codes: - NOT_FOUND - The containing Step does not exist", - "parameters": { - "executionId": { - "type": "string", - "description": "A tool results execution ID.", - "required": true, - "location": "path" - }, - "filter": { - "type": "string", - "description": "Specify one or more PerfMetricType values such as CPU to filter the result", - "enum": [ - "cpu", - "graphics", - "memory", - "network", - "perfMetricTypeUnspecified" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "" - ], - "repeated": true, - "location": "query" - }, - "historyId": { - "type": "string", - "description": "A tool results history ID.", - "required": true, - "location": "path" - }, - "projectId": { - "type": "string", - "description": "The cloud project", - "required": true, - "location": "path" - }, - "stepId": { - "type": "string", - "description": "A tool results step ID.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "projectId", - "historyId", - "executionId", - "stepId" - ], - "response": { - "$ref": "ListPerfSampleSeriesResponse" - } - } - }, - "resources": { - "samples": { - "methods": { - "batchCreate": { - "id": "toolresults.projects.histories.executions.steps.perfSampleSeries.samples.batchCreate", - "path": "{projectId}/histories/{historyId}/executions/{executionId}/steps/{stepId}/perfSampleSeries/{sampleSeriesId}/samples:batchCreate", - "httpMethod": "POST", - "description": "Creates a batch of PerfSamples - a client can submit multiple batches of Perf Samples through repeated calls to this method in order to split up a large request payload - duplicates and existing timestamp entries will be ignored. - the batch operation may partially succeed - the set of elements successfully inserted is returned in the response (omits items which already existed in the database).\n\nMay return any of the following canonical error codes: - NOT_FOUND - The containing PerfSampleSeries does not exist", - "parameters": { - "executionId": { - "type": "string", - "description": "A tool results execution ID.", - "required": true, - "location": "path" - }, - "historyId": { - "type": "string", - "description": "A tool results history ID.", - "required": true, - "location": "path" - }, - "projectId": { - "type": "string", - "description": "The cloud project", - "required": true, - "location": "path" - }, - "sampleSeriesId": { - "type": "string", - "description": "A sample series id", - "required": true, - "location": "path" - }, - "stepId": { - "type": "string", - "description": "A tool results step ID.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "projectId", - "historyId", - "executionId", - "stepId", - "sampleSeriesId" - ], - "request": { - "$ref": "BatchCreatePerfSamplesRequest" - }, - "response": { - "$ref": "BatchCreatePerfSamplesResponse" - } - }, - "list": { - "id": "toolresults.projects.histories.executions.steps.perfSampleSeries.samples.list", - "path": "{projectId}/histories/{historyId}/executions/{executionId}/steps/{stepId}/perfSampleSeries/{sampleSeriesId}/samples", - "httpMethod": "GET", - "description": "Lists the Performance Samples of a given Sample Series - The list results are sorted by timestamps ascending - The default page size is 500 samples; and maximum size allowed 5000 - The response token indicates the last returned PerfSample timestamp - When the results size exceeds the page size, submit a subsequent request including the page token to return the rest of the samples up to the page limit\n\nMay return any of the following canonical error codes: - OUT_OF_RANGE - The specified request page_token is out of valid range - NOT_FOUND - The containing PerfSampleSeries does not exist", - "parameters": { - "executionId": { - "type": "string", - "description": "A tool results execution ID.", - "required": true, - "location": "path" - }, - "historyId": { - "type": "string", - "description": "A tool results history ID.", - "required": true, - "location": "path" - }, - "pageSize": { - "type": "integer", - "description": "The default page size is 500 samples, and the maximum size is 5000. If the page_size is greater than 5000, the effective page size will be 5000", - "format": "int32", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Optional, the next_page_token returned in the previous response", - "location": "query" - }, - "projectId": { - "type": "string", - "description": "The cloud project", - "required": true, - "location": "path" - }, - "sampleSeriesId": { - "type": "string", - "description": "A sample series id", - "required": true, - "location": "path" - }, - "stepId": { - "type": "string", - "description": "A tool results step ID.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "projectId", - "historyId", - "executionId", - "stepId", - "sampleSeriesId" - ], - "response": { - "$ref": "ListPerfSamplesResponse" - } - } - } - } - } - }, - "thumbnails": { - "methods": { - "list": { - "id": "toolresults.projects.histories.executions.steps.thumbnails.list", - "path": "{projectId}/histories/{historyId}/executions/{executionId}/steps/{stepId}/thumbnails", - "httpMethod": "GET", - "description": "Lists thumbnails of images attached to a step.\n\nMay return any of the following canonical error codes: - PERMISSION_DENIED - if the user is not authorized to read from the project, or from any of the images - INVALID_ARGUMENT - if the request is malformed - NOT_FOUND - if the step does not exist, or if any of the images do not exist", - "parameters": { - "executionId": { - "type": "string", - "description": "An Execution id.\n\nRequired.", - "required": true, - "location": "path" - }, - "historyId": { - "type": "string", - "description": "A History id.\n\nRequired.", - "required": true, - "location": "path" - }, - "pageSize": { - "type": "integer", - "description": "The maximum number of thumbnails to fetch.\n\nDefault value: 50. The server will use this default if the field is not set or has a value of 0.\n\nOptional.", - "format": "int32", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "A continuation token to resume the query at the next item.\n\nOptional.", - "location": "query" - }, - "projectId": { - "type": "string", - "description": "A Project id.\n\nRequired.", - "required": true, - "location": "path" - }, - "stepId": { - "type": "string", - "description": "A Step id.\n\nRequired.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "projectId", - "historyId", - "executionId", - "stepId" - ], - "response": { - "$ref": "ListStepThumbnailsResponse" - } - } - } - } - } - } - } - } - } - } - } - } - } -}
diff --git a/toolresults/v1beta3firstparty/toolresults-gen.go b/toolresults/v1beta3firstparty/toolresults-gen.go deleted file mode 100644 index 18f0b66..0000000 --- a/toolresults/v1beta3firstparty/toolresults-gen.go +++ /dev/null
@@ -1,7125 +0,0 @@ -// Package toolresults provides access to the Cloud Tool Results firstparty API. -// -// See https://firebase.google.com/docs/test-lab/ -// -// Usage example: -// -// import "google.golang.org/api/toolresults/v1beta3firstparty" -// ... -// toolresultsService, err := toolresults.New(oauthHttpClient) -package toolresults // import "google.golang.org/api/toolresults/v1beta3firstparty" - -import ( - "bytes" - "context" - "encoding/json" - "errors" - "fmt" - "io" - "net/http" - "net/url" - "strconv" - "strings" - - gensupport "google.golang.org/api/gensupport" - googleapi "google.golang.org/api/googleapi" -) - -// Always reference these packages, just in case the auto-generated code -// below doesn't. -var _ = bytes.NewBuffer -var _ = strconv.Itoa -var _ = fmt.Sprintf -var _ = json.NewDecoder -var _ = io.Copy -var _ = url.Parse -var _ = gensupport.MarshalJSON -var _ = googleapi.Version -var _ = errors.New -var _ = strings.Replace -var _ = context.Canceled - -const apiId = "toolresults:v1beta3firstparty" -const apiName = "toolresults" -const apiVersion = "v1beta3firstparty" -const basePath = "https://www.googleapis.com/toolresults/v1beta3firstparty/projects/" - -func New(client *http.Client) (*Service, error) { - if client == nil { - return nil, errors.New("client is nil") - } - s := &Service{client: client, BasePath: basePath} - s.Projects = NewProjectsService(s) - return s, nil -} - -type Service struct { - client *http.Client - BasePath string // API endpoint base URL - UserAgent string // optional additional User-Agent fragment - - Projects *ProjectsService -} - -func (s *Service) userAgent() string { - if s.UserAgent == "" { - return googleapi.UserAgent - } - return googleapi.UserAgent + " " + s.UserAgent -} - -func NewProjectsService(s *Service) *ProjectsService { - rs := &ProjectsService{s: s} - rs.Histories = NewProjectsHistoriesService(s) - return rs -} - -type ProjectsService struct { - s *Service - - Histories *ProjectsHistoriesService -} - -func NewProjectsHistoriesService(s *Service) *ProjectsHistoriesService { - rs := &ProjectsHistoriesService{s: s} - rs.Executions = NewProjectsHistoriesExecutionsService(s) - return rs -} - -type ProjectsHistoriesService struct { - s *Service - - Executions *ProjectsHistoriesExecutionsService -} - -func NewProjectsHistoriesExecutionsService(s *Service) *ProjectsHistoriesExecutionsService { - rs := &ProjectsHistoriesExecutionsService{s: s} - rs.Clusters = NewProjectsHistoriesExecutionsClustersService(s) - rs.Steps = NewProjectsHistoriesExecutionsStepsService(s) - return rs -} - -type ProjectsHistoriesExecutionsService struct { - s *Service - - Clusters *ProjectsHistoriesExecutionsClustersService - - Steps *ProjectsHistoriesExecutionsStepsService -} - -func NewProjectsHistoriesExecutionsClustersService(s *Service) *ProjectsHistoriesExecutionsClustersService { - rs := &ProjectsHistoriesExecutionsClustersService{s: s} - return rs -} - -type ProjectsHistoriesExecutionsClustersService struct { - s *Service -} - -func NewProjectsHistoriesExecutionsStepsService(s *Service) *ProjectsHistoriesExecutionsStepsService { - rs := &ProjectsHistoriesExecutionsStepsService{s: s} - rs.PerfMetricsSummary = NewProjectsHistoriesExecutionsStepsPerfMetricsSummaryService(s) - rs.PerfSampleSeries = NewProjectsHistoriesExecutionsStepsPerfSampleSeriesService(s) - rs.Thumbnails = NewProjectsHistoriesExecutionsStepsThumbnailsService(s) - return rs -} - -type ProjectsHistoriesExecutionsStepsService struct { - s *Service - - PerfMetricsSummary *ProjectsHistoriesExecutionsStepsPerfMetricsSummaryService - - PerfSampleSeries *ProjectsHistoriesExecutionsStepsPerfSampleSeriesService - - Thumbnails *ProjectsHistoriesExecutionsStepsThumbnailsService -} - -func NewProjectsHistoriesExecutionsStepsPerfMetricsSummaryService(s *Service) *ProjectsHistoriesExecutionsStepsPerfMetricsSummaryService { - rs := &ProjectsHistoriesExecutionsStepsPerfMetricsSummaryService{s: s} - return rs -} - -type ProjectsHistoriesExecutionsStepsPerfMetricsSummaryService struct { - s *Service -} - -func NewProjectsHistoriesExecutionsStepsPerfSampleSeriesService(s *Service) *ProjectsHistoriesExecutionsStepsPerfSampleSeriesService { - rs := &ProjectsHistoriesExecutionsStepsPerfSampleSeriesService{s: s} - rs.Samples = NewProjectsHistoriesExecutionsStepsPerfSampleSeriesSamplesService(s) - return rs -} - -type ProjectsHistoriesExecutionsStepsPerfSampleSeriesService struct { - s *Service - - Samples *ProjectsHistoriesExecutionsStepsPerfSampleSeriesSamplesService -} - -func NewProjectsHistoriesExecutionsStepsPerfSampleSeriesSamplesService(s *Service) *ProjectsHistoriesExecutionsStepsPerfSampleSeriesSamplesService { - rs := &ProjectsHistoriesExecutionsStepsPerfSampleSeriesSamplesService{s: s} - return rs -} - -type ProjectsHistoriesExecutionsStepsPerfSampleSeriesSamplesService struct { - s *Service -} - -func NewProjectsHistoriesExecutionsStepsThumbnailsService(s *Service) *ProjectsHistoriesExecutionsStepsThumbnailsService { - rs := &ProjectsHistoriesExecutionsStepsThumbnailsService{s: s} - return rs -} - -type ProjectsHistoriesExecutionsStepsThumbnailsService struct { - s *Service -} - -// AndroidAppInfo: Android app information. -type AndroidAppInfo struct { - // Name: The name of the app. Optional - Name string `json:"name,omitempty"` - - // PackageName: The package name of the app. Required. - PackageName string `json:"packageName,omitempty"` - - // VersionCode: The internal version code of the app. Optional. - VersionCode string `json:"versionCode,omitempty"` - - // VersionName: The version name of the app. Optional. - VersionName string `json:"versionName,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Name") 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. "Name") 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 *AndroidAppInfo) MarshalJSON() ([]byte, error) { - type NoMethod AndroidAppInfo - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// AndroidInstrumentationTest: A test of an Android application that can -// control an Android component independently of its normal -// lifecycle. -// -// See for more information on types of Android tests. -type AndroidInstrumentationTest struct { - // TestPackageId: The java package for the test to be executed. Required - TestPackageId string `json:"testPackageId,omitempty"` - - // TestRunnerClass: The InstrumentationTestRunner class. Required - TestRunnerClass string `json:"testRunnerClass,omitempty"` - - // TestTargets: Each target must be fully qualified with the package - // name or class name, in one of these formats: - "package package_name" - // - "class package_name.class_name" - "class - // package_name.class_name#method_name" - // - // If empty, all targets in the module will be run. - TestTargets []string `json:"testTargets,omitempty"` - - // UseOrchestrator: The flag indicates whether Android Test Orchestrator - // will be used to run test or not. Test orchestrator is used if either: - // - orchestrator_option field is USE_ORCHESTRATOR, and test runner is - // compatible with orchestrator. Or - orchestrator_option field is - // unspecified or ORCHESTRATOR_OPTION_UNSPECIFIED, and test runner is - // compatible with orchestrator. - UseOrchestrator bool `json:"useOrchestrator,omitempty"` - - // ForceSendFields is a list of field names (e.g. "TestPackageId") 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. "TestPackageId") 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 *AndroidInstrumentationTest) MarshalJSON() ([]byte, error) { - type NoMethod AndroidInstrumentationTest - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// AndroidRoboTest: A test of an android application that explores the -// application on a virtual or physical Android device, finding culprits -// and crashes as it goes. -type AndroidRoboTest struct { - // AppInitialActivity: The initial activity that should be used to start - // the app. Optional - AppInitialActivity string `json:"appInitialActivity,omitempty"` - - // BootstrapPackageId: The java package for the bootstrap. Optional - BootstrapPackageId string `json:"bootstrapPackageId,omitempty"` - - // BootstrapRunnerClass: The runner class for the bootstrap. Optional - BootstrapRunnerClass string `json:"bootstrapRunnerClass,omitempty"` - - // MaxDepth: The max depth of the traversal stack Robo can explore. - // Optional - MaxDepth int64 `json:"maxDepth,omitempty"` - - // MaxSteps: The max number of steps/actions Robo can execute. Default - // is no limit (0). Optional - MaxSteps int64 `json:"maxSteps,omitempty"` - - // ForceSendFields is a list of field names (e.g. "AppInitialActivity") - // 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. "AppInitialActivity") 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 *AndroidRoboTest) MarshalJSON() ([]byte, error) { - type NoMethod AndroidRoboTest - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// AndroidTest: An Android mobile test specification. -type AndroidTest struct { - // AndroidAppInfo: Infomation about the application under test. - AndroidAppInfo *AndroidAppInfo `json:"androidAppInfo,omitempty"` - - // AndroidInstrumentationTest: An Android instrumentation test. - AndroidInstrumentationTest *AndroidInstrumentationTest `json:"androidInstrumentationTest,omitempty"` - - // AndroidRoboTest: An Android robo test. - AndroidRoboTest *AndroidRoboTest `json:"androidRoboTest,omitempty"` - - // TestTimeout: Max time a test is allowed to run before it is - // automatically cancelled. - TestTimeout *Duration `json:"testTimeout,omitempty"` - - // ForceSendFields is a list of field names (e.g. "AndroidAppInfo") 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. "AndroidAppInfo") 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 *AndroidTest) MarshalJSON() ([]byte, error) { - type NoMethod AndroidTest - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// Any: `Any` contains an arbitrary serialized protocol buffer message -// along with a URL that describes the type of the serialized -// message. -// -// Protobuf library provides support to pack/unpack Any values in the -// form of utility functions or additional generated methods of the Any -// type. -// -// Example 1: Pack and unpack a message in C++. -// -// Foo foo = ...; Any any; any.PackFrom(foo); ... if -// (any.UnpackTo(&foo)) { ... } -// -// Example 2: Pack and unpack a message in Java. -// -// Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { -// foo = any.unpack(Foo.class); } -// -// Example 3: Pack and unpack a message in Python. -// -// foo = Foo(...) any = Any() any.Pack(foo) ... if -// any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... -// -// Example 4: Pack and unpack a message in Go -// -// foo := &pb.Foo{...} any, err := ptypes.MarshalAny(foo) ... foo := -// &pb.Foo{} if err := ptypes.UnmarshalAny(any, foo); err != nil { ... -// } -// -// The pack methods provided by protobuf library will by default use -// 'type.googleapis.com/full.type.name' as the type URL and the unpack -// methods only use the fully qualified type name after the last '/' in -// the type URL, for example "foo.bar.com/x/y.z" will yield type name -// "y.z". -// -// -// -// JSON ==== The JSON representation of an `Any` value uses the regular -// representation of the deserialized, embedded message, with an -// additional field `@type` which contains the type URL. -// Example: -// -// package google.profile; message Person { string first_name = 1; -// string last_name = 2; } -// -// { "@type": "type.googleapis.com/google.profile.Person", "firstName": -// , "lastName": } -// -// If the embedded message type is well-known and has a custom JSON -// representation, that representation will be embedded adding a field -// `value` which holds the custom JSON in addition to the `@type` field. -// Example (for message [google.protobuf.Duration][]): -// -// { "@type": "type.googleapis.com/google.protobuf.Duration", "value": -// "1.212s" } -type Any struct { - // TypeUrl: A URL/resource name whose content describes the type of the - // serialized protocol buffer message. - // - // For URLs which use the scheme `http`, `https`, or no scheme, the - // following restrictions and interpretations apply: - // - // * If no scheme is provided, `https` is assumed. * The last segment of - // the URL's path must represent the fully qualified name of the type - // (as in `path/google.protobuf.Duration`). The name should be in a - // canonical form (e.g., leading "." is not accepted). * An HTTP GET on - // the URL must yield a [google.protobuf.Type][] value in binary format, - // or produce an error. * Applications are allowed to cache lookup - // results based on the URL, or have them precompiled into a binary to - // avoid any lookup. Therefore, binary compatibility needs to be - // preserved on changes to types. (Use versioned type names to manage - // breaking changes.) - // - // Schemes other than `http`, `https` (or the empty scheme) might be - // used with implementation specific semantics. - TypeUrl string `json:"typeUrl,omitempty"` - - // Value: Must be a valid serialized protocol buffer of the above - // specified type. - Value string `json:"value,omitempty"` - - // ForceSendFields is a list of field names (e.g. "TypeUrl") 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. "TypeUrl") 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 *Any) MarshalJSON() ([]byte, error) { - type NoMethod Any - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type AppStartTime struct { - // FullyDrawnTime: Optional. The time from app start to reaching the - // developer-reported "fully drawn" time. This is only stored if the app - // includes a call to Activity.reportFullyDrawn(). See - // https://developer.android.com/topic/performance/launch-time.html#time-full - FullyDrawnTime *Duration `json:"fullyDrawnTime,omitempty"` - - // InitialDisplayTime: The time from app start to the first displayed - // activity being drawn, as reported in Logcat. See - // https://developer.android.com/topic/performance/launch-time.html#time-initial - InitialDisplayTime *Duration `json:"initialDisplayTime,omitempty"` - - // ForceSendFields is a list of field names (e.g. "FullyDrawnTime") 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. "FullyDrawnTime") 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 *AppStartTime) MarshalJSON() ([]byte, error) { - type NoMethod AppStartTime - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// BasicPerfSampleSeries: Encapsulates the metadata for basic sample -// series represented by a line chart -type BasicPerfSampleSeries struct { - // Possible values: - // "cpu" - // "graphics" - // "memory" - // "network" - // "perfMetricTypeUnspecified" - PerfMetricType string `json:"perfMetricType,omitempty"` - - // Possible values: - // "byte" - // "bytesPerSecond" - // "framesPerSecond" - // "kibibyte" - // "percent" - // "perfUnitUnspecified" - PerfUnit string `json:"perfUnit,omitempty"` - - // Possible values: - // "cpuKernel" - // "cpuTotal" - // "cpuUser" - // "graphicsFrameRate" - // "memoryRssPrivate" - // "memoryRssShared" - // "memoryRssTotal" - // "memoryTotal" - // "networkReceived" - // "networkSent" - // "ntBytesReceived" - // "ntBytesTransferred" - // "sampleSeriesTypeUnspecified" - SampleSeriesLabel string `json:"sampleSeriesLabel,omitempty"` - - // ForceSendFields is a list of field names (e.g. "PerfMetricType") 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. "PerfMetricType") 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 *BasicPerfSampleSeries) MarshalJSON() ([]byte, error) { - type NoMethod BasicPerfSampleSeries - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// BatchCreatePerfSamplesRequest: The request must provide up to a -// maximum of 5000 samples to be created; a larger sample size will -// cause an INVALID_ARGUMENT error -type BatchCreatePerfSamplesRequest struct { - // PerfSamples: The set of PerfSamples to create should not include - // existing timestamps - PerfSamples []*PerfSample `json:"perfSamples,omitempty"` - - // ForceSendFields is a list of field names (e.g. "PerfSamples") 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. "PerfSamples") 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 *BatchCreatePerfSamplesRequest) MarshalJSON() ([]byte, error) { - type NoMethod BatchCreatePerfSamplesRequest - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type BatchCreatePerfSamplesResponse struct { - PerfSamples []*PerfSample `json:"perfSamples,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "PerfSamples") 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. "PerfSamples") 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 *BatchCreatePerfSamplesResponse) MarshalJSON() ([]byte, error) { - type NoMethod BatchCreatePerfSamplesResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type CPUInfo struct { - // CpuProcessor: description of the device processor ie '1.8 GHz hexa - // core 64-bit ARMv8-A' - CpuProcessor string `json:"cpuProcessor,omitempty"` - - // CpuSpeedInGhz: the CPU clock speed in GHz - CpuSpeedInGhz float64 `json:"cpuSpeedInGhz,omitempty"` - - // NumberOfCores: the number of CPU cores - NumberOfCores int64 `json:"numberOfCores,omitempty"` - - // ForceSendFields is a list of field names (e.g. "CpuProcessor") 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. "CpuProcessor") 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 *CPUInfo) MarshalJSON() ([]byte, error) { - type NoMethod CPUInfo - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *CPUInfo) UnmarshalJSON(data []byte) error { - type NoMethod CPUInfo - var s1 struct { - CpuSpeedInGhz gensupport.JSONFloat64 `json:"cpuSpeedInGhz"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.CpuSpeedInGhz = float64(s1.CpuSpeedInGhz) - return nil -} - -// Duration: A Duration represents a signed, fixed-length span of time -// represented as a count of seconds and fractions of seconds at -// nanosecond resolution. It is independent of any calendar and concepts -// like "day" or "month". It is related to Timestamp in that the -// difference between two Timestamp values is a Duration and it can be -// added or subtracted from a Timestamp. Range is approximately +-10,000 -// years. -// -// # Examples -// -// Example 1: Compute Duration from two Timestamps in pseudo -// code. -// -// Timestamp start = ...; Timestamp end = ...; Duration duration = -// ...; -// -// duration.seconds = end.seconds - start.seconds; duration.nanos = -// end.nanos - start.nanos; -// -// if (duration.seconds 0) { duration.seconds += 1; duration.nanos -= -// 1000000000; } else if (durations.seconds > 0 && duration.nanos < 0) { -// duration.seconds -= 1; duration.nanos += 1000000000; } -// -// Example 2: Compute Timestamp from Timestamp + Duration in pseudo -// code. -// -// Timestamp start = ...; Duration duration = ...; Timestamp end = -// ...; -// -// end.seconds = start.seconds + duration.seconds; end.nanos = -// start.nanos + duration.nanos; -// -// if (end.nanos = 1000000000) { end.seconds += 1; end.nanos -= -// 1000000000; } -// -// Example 3: Compute Duration from datetime.timedelta in Python. -// -// td = datetime.timedelta(days=3, minutes=10) duration = Duration() -// duration.FromTimedelta(td) -// -// # JSON Mapping -// -// In JSON format, the Duration type is encoded as a string rather than -// an object, where the string ends in the suffix "s" (indicating -// seconds) and is preceded by the number of seconds, with nanoseconds -// expressed as fractional seconds. For example, 3 seconds with 0 -// nanoseconds should be encoded in JSON format as "3s", while 3 seconds -// and 1 nanosecond should be expressed in JSON format as -// "3.000000001s", and 3 seconds and 1 microsecond should be expressed -// in JSON format as "3.000001s". -type Duration struct { - // Nanos: Signed fractions of a second at nanosecond resolution of the - // span of time. Durations less than one second are represented with a 0 - // `seconds` field and a positive or negative `nanos` field. For - // durations of one second or more, a non-zero value for the `nanos` - // field must be of the same sign as the `seconds` field. Must be from - // -999,999,999 to +999,999,999 inclusive. - Nanos int64 `json:"nanos,omitempty"` - - // Seconds: Signed seconds of the span of time. Must be from - // -315,576,000,000 to +315,576,000,000 inclusive. Note: these bounds - // are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 - // days/year * 10000 years - Seconds int64 `json:"seconds,omitempty,string"` - - // ForceSendFields is a list of field names (e.g. "Nanos") 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. "Nanos") 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 *Duration) MarshalJSON() ([]byte, error) { - type NoMethod Duration - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// Execution: An Execution represents a collection of Steps. For -// instance, it could represent: - a mobile test executed across a range -// of device configurations - a jenkins job with a build step followed -// by a test step -// -// The maximum size of an execution message is 1 MiB. -// -// An Execution can be updated until its state is set to COMPLETE at -// which point it becomes immutable. -type Execution struct { - // CompletionTime: The time when the Execution status transitioned to - // COMPLETE. - // - // This value will be set automatically when state transitions to - // COMPLETE. - // - // - In response: set if the execution state is COMPLETE. - In - // create/update request: never set - CompletionTime *Timestamp `json:"completionTime,omitempty"` - - // CreationTime: The time when the Execution was created. - // - // This value will be set automatically when CreateExecution is - // called. - // - // - In response: always set - In create/update request: never set - CreationTime *Timestamp `json:"creationTime,omitempty"` - - // ExecutionId: A unique identifier within a History for this - // Execution. - // - // Returns INVALID_ARGUMENT if this field is set or overwritten by the - // caller. - // - // - In response always set - In create/update request: never set - ExecutionId string `json:"executionId,omitempty"` - - // Outcome: Classify the result, for example into SUCCESS or FAILURE - // - // - In response: present if set by create/update request - In - // create/update request: optional - Outcome *Outcome `json:"outcome,omitempty"` - - // Specification: Lightweight information about execution request. - // - // - In response: present if set by create - In create: optional - In - // update: optional - Specification *Specification `json:"specification,omitempty"` - - // State: The initial state is IN_PROGRESS. - // - // The only legal state transitions is from IN_PROGRESS to COMPLETE. - // - // A PRECONDITION_FAILED will be returned if an invalid transition is - // requested. - // - // The state can only be set to COMPLETE once. A FAILED_PRECONDITION - // will be returned if the state is set to COMPLETE multiple times. - // - // If the state is set to COMPLETE, all the in-progress steps within the - // execution will be set as COMPLETE. If the outcome of the step is not - // set, the outcome will be set to INCONCLUSIVE. - // - // - In response always set - In create/update request: optional - // - // Possible values: - // "complete" - // "inProgress" - // "pending" - // "unknownState" - State string `json:"state,omitempty"` - - // TestExecutionMatrixId: TestExecution Matrix ID that the - // TestExecutionService uses. - // - // - In response: present if set by create - In create: optional - In - // update: never set - TestExecutionMatrixId string `json:"testExecutionMatrixId,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "CompletionTime") 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. "CompletionTime") 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 *Execution) MarshalJSON() ([]byte, error) { - type NoMethod Execution - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type FailureDetail struct { - // Crashed: If the failure was severe because the system under test - // crashed. - Crashed bool `json:"crashed,omitempty"` - - // NotInstalled: If an app is not installed and thus no test can be run - // with the app. This might be caused by trying to run a test on an - // unsupported platform. - NotInstalled bool `json:"notInstalled,omitempty"` - - // OtherNativeCrash: If a native process other than the app crashed. - OtherNativeCrash bool `json:"otherNativeCrash,omitempty"` - - // TimedOut: If the test overran some time limit, and that is why it - // failed. - TimedOut bool `json:"timedOut,omitempty"` - - // UnableToCrawl: If the robo was unable to crawl the app; perhaps - // because the app did not start. - UnableToCrawl bool `json:"unableToCrawl,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Crashed") 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. "Crashed") 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 *FailureDetail) MarshalJSON() ([]byte, error) { - type NoMethod FailureDetail - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// FileReference: A reference to a file. -type FileReference struct { - // FileUri: The URI of a file stored in Google Cloud Storage. - // - // For example: http://storage.googleapis.com/mybucket/path/to/test.xml - // or in gsutil format: gs://mybucket/path/to/test.xml with - // version-specific info, - // gs://mybucket/path/to/test.xml#1360383693690000 - // - // An INVALID_ARGUMENT error will be returned if the URI format is not - // supported. - // - // - In response: always set - In create/update request: always set - FileUri string `json:"fileUri,omitempty"` - - // ForceSendFields is a list of field names (e.g. "FileUri") 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. "FileUri") 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 *FileReference) MarshalJSON() ([]byte, error) { - type NoMethod FileReference - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// History: A History represents a sorted list of Executions ordered by -// the start_timestamp_millis field (descending). It can be used to -// group all the Executions of a continuous build. -// -// Note that the ordering only operates on one-dimension. If a -// repository has multiple branches, it means that multiple histories -// will need to be used in order to order Executions per branch. -type History struct { - // DisplayName: A short human-readable (plain text) name to display in - // the UI. Maximum of 100 characters. - // - // - In response: present if set during create. - In create request: - // optional - DisplayName string `json:"displayName,omitempty"` - - // HistoryId: A unique identifier within a project for this - // History. - // - // Returns INVALID_ARGUMENT if this field is set or overwritten by the - // caller. - // - // - In response always set - In create request: never set - HistoryId string `json:"historyId,omitempty"` - - // Name: A name to uniquely identify a history within a project. Maximum - // of 100 characters. - // - // - In response always set - In create request: always set - Name string `json:"name,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "DisplayName") 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. "DisplayName") 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 *History) MarshalJSON() ([]byte, error) { - type NoMethod History - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// Image: An image, with a link to the main image and a thumbnail. -type Image struct { - // Error: An error explaining why the thumbnail could not be rendered. - Error *Status `json:"error,omitempty"` - - // SourceImage: A reference to the full-size, original image. - // - // This is the same as the tool_outputs entry for the image under its - // Step. - // - // Always set. - SourceImage *ToolOutputReference `json:"sourceImage,omitempty"` - - // StepId: The step to which the image is attached. - // - // Always set. - StepId string `json:"stepId,omitempty"` - - // Thumbnail: The thumbnail. - Thumbnail *Thumbnail `json:"thumbnail,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Error") 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. "Error") 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 *Image) MarshalJSON() ([]byte, error) { - type NoMethod Image - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type InconclusiveDetail struct { - // AbortedByUser: If the end user aborted the test execution before a - // pass or fail could be determined. For example, the user pressed - // ctrl-c which sent a kill signal to the test runner while the test was - // running. - AbortedByUser bool `json:"abortedByUser,omitempty"` - - // InfrastructureFailure: If the test runner could not determine success - // or failure because the test depends on a component other than the - // system under test which failed. - // - // For example, a mobile test requires provisioning a device where the - // test executes, and that provisioning can fail. - InfrastructureFailure bool `json:"infrastructureFailure,omitempty"` - - // ForceSendFields is a list of field names (e.g. "AbortedByUser") 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. "AbortedByUser") 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 *InconclusiveDetail) MarshalJSON() ([]byte, error) { - type NoMethod InconclusiveDetail - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type ListExecutionsResponse struct { - // Executions: Executions. - // - // Always set. - Executions []*Execution `json:"executions,omitempty"` - - // NextPageToken: A continuation token to resume the query at the next - // item. - // - // Will only be set if there are more Executions to fetch. - 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. "Executions") 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. "Executions") 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 *ListExecutionsResponse) MarshalJSON() ([]byte, error) { - type NoMethod ListExecutionsResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// ListHistoriesResponse: Response message for HistoryService.List -type ListHistoriesResponse struct { - // Histories: Histories. - Histories []*History `json:"histories,omitempty"` - - // NextPageToken: A continuation token to resume the query at the next - // item. - // - // Will only be set if there are more histories to fetch. - // - // Tokens are valid for up to one hour from the time of the first list - // request. For instance, if you make a list request at 1PM and use the - // token from this first request 10 minutes later, the token from this - // second response will only be valid for 50 minutes. - 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. "Histories") 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. "Histories") 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 *ListHistoriesResponse) MarshalJSON() ([]byte, error) { - type NoMethod ListHistoriesResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type ListPerfSampleSeriesResponse struct { - // PerfSampleSeries: The resulting PerfSampleSeries sorted by id - PerfSampleSeries []*PerfSampleSeries `json:"perfSampleSeries,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "PerfSampleSeries") 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. "PerfSampleSeries") 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 *ListPerfSampleSeriesResponse) MarshalJSON() ([]byte, error) { - type NoMethod ListPerfSampleSeriesResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type ListPerfSamplesResponse struct { - // NextPageToken: Optional, returned if result size exceeds the page - // size specified in the request (or the default page size, 500, if - // unspecified). It indicates the last sample timestamp to be used as - // page_token in subsequent request - NextPageToken string `json:"nextPageToken,omitempty"` - - PerfSamples []*PerfSample `json:"perfSamples,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "NextPageToken") 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. "NextPageToken") 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 *ListPerfSamplesResponse) MarshalJSON() ([]byte, error) { - type NoMethod ListPerfSamplesResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type ListScreenshotClustersResponse struct { - // Clusters: The set of clustres associated with an execution Always set - Clusters []*ScreenshotCluster `json:"clusters,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Clusters") 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. "Clusters") 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 *ListScreenshotClustersResponse) MarshalJSON() ([]byte, error) { - type NoMethod ListScreenshotClustersResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// ListStepThumbnailsResponse: A response containing the thumbnails in a -// step. -type ListStepThumbnailsResponse struct { - // NextPageToken: A continuation token to resume the query at the next - // item. - // - // If set, indicates that there are more thumbnails to read, by calling - // list again with this value in the page_token field. - NextPageToken string `json:"nextPageToken,omitempty"` - - // Thumbnails: A list of image data. - // - // Images are returned in a deterministic order; they are ordered by - // these factors, in order of importance: * First, by their associated - // test case. Images without a test case are considered greater than - // images with one. * Second, by their creation time. Images without a - // creation time are greater than images with one. * Third, by the order - // in which they were added to the step (by calls to CreateStep or - // UpdateStep). - Thumbnails []*Image `json:"thumbnails,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "NextPageToken") 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. "NextPageToken") 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 *ListStepThumbnailsResponse) MarshalJSON() ([]byte, error) { - type NoMethod ListStepThumbnailsResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// ListStepsResponse: Response message for StepService.List. -type ListStepsResponse struct { - // NextPageToken: A continuation token to resume the query at the next - // item. - // - // If set, indicates that there are more steps to read, by calling list - // again with this value in the page_token field. - NextPageToken string `json:"nextPageToken,omitempty"` - - // Steps: Steps. - Steps []*Step `json:"steps,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "NextPageToken") 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. "NextPageToken") 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 *ListStepsResponse) MarshalJSON() ([]byte, error) { - type NoMethod ListStepsResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type MemoryInfo struct { - // MemoryCapInKibibyte: Maximum memory that can be allocated to the - // process in KiB - MemoryCapInKibibyte int64 `json:"memoryCapInKibibyte,omitempty,string"` - - // MemoryTotalInKibibyte: Total memory available on the device in KiB - MemoryTotalInKibibyte int64 `json:"memoryTotalInKibibyte,omitempty,string"` - - // ForceSendFields is a list of field names (e.g. "MemoryCapInKibibyte") - // 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. "MemoryCapInKibibyte") 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 *MemoryInfo) MarshalJSON() ([]byte, error) { - type NoMethod MemoryInfo - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// Outcome: Interprets a result so that humans and machines can act on -// it. -type Outcome struct { - // FailureDetail: More information about a FAILURE outcome. - // - // Returns INVALID_ARGUMENT if this field is set but the summary is not - // FAILURE. - // - // Optional - FailureDetail *FailureDetail `json:"failureDetail,omitempty"` - - // InconclusiveDetail: More information about an INCONCLUSIVE - // outcome. - // - // Returns INVALID_ARGUMENT if this field is set but the summary is not - // INCONCLUSIVE. - // - // Optional - InconclusiveDetail *InconclusiveDetail `json:"inconclusiveDetail,omitempty"` - - // SkippedDetail: More information about a SKIPPED outcome. - // - // Returns INVALID_ARGUMENT if this field is set but the summary is not - // SKIPPED. - // - // Optional - SkippedDetail *SkippedDetail `json:"skippedDetail,omitempty"` - - // SuccessDetail: More information about a SUCCESS outcome. - // - // Returns INVALID_ARGUMENT if this field is set but the summary is not - // SUCCESS. - // - // Optional - SuccessDetail *SuccessDetail `json:"successDetail,omitempty"` - - // Summary: The simplest way to interpret a result. - // - // Required - // - // Possible values: - // "failure" - // "inconclusive" - // "skipped" - // "success" - // "unset" - Summary string `json:"summary,omitempty"` - - // ForceSendFields is a list of field names (e.g. "FailureDetail") 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. "FailureDetail") 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 *Outcome) MarshalJSON() ([]byte, error) { - type NoMethod Outcome - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// PerfEnvironment: Encapsulates performance environment info -type PerfEnvironment struct { - // CpuInfo: CPU related environment info - CpuInfo *CPUInfo `json:"cpuInfo,omitempty"` - - // MemoryInfo: Memory related environment info - MemoryInfo *MemoryInfo `json:"memoryInfo,omitempty"` - - // ForceSendFields is a list of field names (e.g. "CpuInfo") 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. "CpuInfo") 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 *PerfEnvironment) MarshalJSON() ([]byte, error) { - type NoMethod PerfEnvironment - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// PerfMetricsSummary: A summary of perf metrics collected and -// performance environment info -type PerfMetricsSummary struct { - AppStartTime *AppStartTime `json:"appStartTime,omitempty"` - - // ExecutionId: A tool results execution ID. - ExecutionId string `json:"executionId,omitempty"` - - // HistoryId: A tool results history ID. - HistoryId string `json:"historyId,omitempty"` - - // PerfEnvironment: Describes the environment in which the performance - // metrics were collected - PerfEnvironment *PerfEnvironment `json:"perfEnvironment,omitempty"` - - // PerfMetrics: Set of resource collected - // - // Possible values: - // "cpu" - // "graphics" - // "memory" - // "network" - // "perfMetricTypeUnspecified" - PerfMetrics []string `json:"perfMetrics,omitempty"` - - // ProjectId: The cloud project - ProjectId string `json:"projectId,omitempty"` - - // StepId: A tool results step ID. - StepId string `json:"stepId,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "AppStartTime") 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. "AppStartTime") 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 *PerfMetricsSummary) MarshalJSON() ([]byte, error) { - type NoMethod PerfMetricsSummary - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// PerfSample: Resource representing a single performance measure or -// data point -type PerfSample struct { - // SampleTime: Timestamp of collection - SampleTime *Timestamp `json:"sampleTime,omitempty"` - - // Value: Value observed - Value float64 `json:"value,omitempty"` - - // ForceSendFields is a list of field names (e.g. "SampleTime") 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. "SampleTime") 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 *PerfSample) MarshalJSON() ([]byte, error) { - type NoMethod PerfSample - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *PerfSample) UnmarshalJSON(data []byte) error { - type NoMethod PerfSample - var s1 struct { - Value gensupport.JSONFloat64 `json:"value"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.Value = float64(s1.Value) - return nil -} - -// PerfSampleSeries: Resource representing a collection of performance -// samples (or data points) -type PerfSampleSeries struct { - // BasicPerfSampleSeries: Basic series represented by a line chart - BasicPerfSampleSeries *BasicPerfSampleSeries `json:"basicPerfSampleSeries,omitempty"` - - // ExecutionId: A tool results execution ID. - ExecutionId string `json:"executionId,omitempty"` - - // HistoryId: A tool results history ID. - HistoryId string `json:"historyId,omitempty"` - - // ProjectId: The cloud project - ProjectId string `json:"projectId,omitempty"` - - // SampleSeriesId: A sample series id - SampleSeriesId string `json:"sampleSeriesId,omitempty"` - - // StepId: A tool results step ID. - StepId string `json:"stepId,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. - // "BasicPerfSampleSeries") 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. "BasicPerfSampleSeries") 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 *PerfSampleSeries) MarshalJSON() ([]byte, error) { - type NoMethod PerfSampleSeries - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// ProjectSettings: Per-project settings for the Tool Results service. -type ProjectSettings struct { - // DefaultBucket: The name of the Google Cloud Storage bucket to which - // results are written. - // - // By default, this is unset. - // - // In update request: optional In response: optional - DefaultBucket string `json:"defaultBucket,omitempty"` - - // Name: The name of the project's settings. - // - // Always of the form: projects/{project-id}/settings - // - // In update request: never set In response: always set - Name string `json:"name,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "DefaultBucket") 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. "DefaultBucket") 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 *ProjectSettings) MarshalJSON() ([]byte, error) { - type NoMethod ProjectSettings - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// PublishXunitXmlFilesRequest: Request message for -// StepService.PublishXunitXmlFiles. -type PublishXunitXmlFilesRequest struct { - // XunitXmlFiles: URI of the Xunit XML files to publish. - // - // The maximum size of the file this reference is pointing to is - // 50MB. - // - // Required. - XunitXmlFiles []*FileReference `json:"xunitXmlFiles,omitempty"` - - // ForceSendFields is a list of field names (e.g. "XunitXmlFiles") 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. "XunitXmlFiles") 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 *PublishXunitXmlFilesRequest) MarshalJSON() ([]byte, error) { - type NoMethod PublishXunitXmlFilesRequest - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type Screen struct { - // FileReference: File reference of the png file. Required. - FileReference string `json:"fileReference,omitempty"` - - // Locale: Locale of the device that the screenshot was taken on. - // Required. - Locale string `json:"locale,omitempty"` - - // Model: Model of the device that the screenshot was taken on. - // Required. - Model string `json:"model,omitempty"` - - // Version: OS version of the device that the screenshot was taken on. - // Required. - Version string `json:"version,omitempty"` - - // ForceSendFields is a list of field names (e.g. "FileReference") 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. "FileReference") 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 *Screen) MarshalJSON() ([]byte, error) { - type NoMethod Screen - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type ScreenshotCluster struct { - // Activity: A string that describes the activity of every screen in the - // cluster. - Activity string `json:"activity,omitempty"` - - // ClusterId: A unique identifier for the cluster. - ClusterId string `json:"clusterId,omitempty"` - - // KeyScreen: A singular screen that represents the cluster as a whole. - // This screen will act as the "cover" of the entire cluster. When users - // look at the clusters, only the key screen from each cluster will be - // shown. Which screen is the key screen is determined by the - // ClusteringAlgorithm - KeyScreen *Screen `json:"keyScreen,omitempty"` - - // Screens: Full list of screens. - Screens []*Screen `json:"screens,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Activity") 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. "Activity") 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 *ScreenshotCluster) MarshalJSON() ([]byte, error) { - type NoMethod ScreenshotCluster - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type SkippedDetail struct { - // IncompatibleAppVersion: If the App doesn't support the specific API - // level. - IncompatibleAppVersion bool `json:"incompatibleAppVersion,omitempty"` - - // IncompatibleArchitecture: If the App doesn't run on the specific - // architecture, for example, x86. - IncompatibleArchitecture bool `json:"incompatibleArchitecture,omitempty"` - - // IncompatibleDevice: If the requested OS version doesn't run on the - // specific device model. - IncompatibleDevice bool `json:"incompatibleDevice,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "IncompatibleAppVersion") 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. "IncompatibleAppVersion") - // 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 *SkippedDetail) MarshalJSON() ([]byte, error) { - type NoMethod SkippedDetail - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// Specification: The details about how to run the execution. -type Specification struct { - // AndroidTest: An Android mobile test execution specification. - AndroidTest *AndroidTest `json:"androidTest,omitempty"` - - // ForceSendFields is a list of field names (e.g. "AndroidTest") 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. "AndroidTest") 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 *Specification) MarshalJSON() ([]byte, error) { - type NoMethod Specification - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// StackTrace: A stacktrace. -type StackTrace struct { - // ClusterId: Exception cluster ID - ClusterId string `json:"clusterId,omitempty"` - - // Exception: The stack trace message. - // - // Required - Exception string `json:"exception,omitempty"` - - // ReportId: Exception report ID - ReportId string `json:"reportId,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ClusterId") 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. "ClusterId") 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 *StackTrace) MarshalJSON() ([]byte, error) { - type NoMethod StackTrace - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// Status: The `Status` type defines a logical error model that is -// suitable for different programming environments, including REST APIs -// and RPC APIs. It is used by [gRPC](https://github.com/grpc). The -// error model is designed to be: -// -// - Simple to use and understand for most users - Flexible enough to -// meet unexpected needs -// -// # Overview -// -// The `Status` message contains three pieces of data: error code, error -// message, and error details. The error code should be an enum value of -// [google.rpc.Code][], but it may accept additional error codes if -// needed. The error message should be a developer-facing English -// message that helps developers *understand* and *resolve* the error. -// If a localized user-facing error message is needed, put the localized -// message in the error details or localize it in the client. The -// optional error details may contain arbitrary information about the -// error. There is a predefined set of error detail types in the package -// `google.rpc` that can be used for common error conditions. -// -// # Language mapping -// -// The `Status` message is the logical representation of the error -// model, but it is not necessarily the actual wire format. When the -// `Status` message is exposed in different client libraries and -// different wire protocols, it can be mapped differently. For example, -// it will likely be mapped to some exceptions in Java, but more likely -// mapped to some error codes in C. -// -// # Other uses -// -// The error model and the `Status` message can be used in a variety of -// environments, either with or without APIs, to provide a consistent -// developer experience across different environments. -// -// Example uses of this error model include: -// -// - Partial errors. If a service needs to return partial errors to the -// client, it may embed the `Status` in the normal response to indicate -// the partial errors. -// -// - Workflow errors. A typical workflow has multiple steps. Each step -// may have a `Status` message for error reporting. -// -// - Batch operations. If a client uses batch request and batch -// response, the `Status` message should be used directly inside batch -// response, one for each error sub-response. -// -// - Asynchronous operations. If an API call embeds asynchronous -// operation results in its response, the status of those operations -// should be represented directly using the `Status` message. -// -// - Logging. If some API errors are stored in logs, the message -// `Status` could be used directly after any stripping needed for -// security/privacy reasons. -type Status struct { - // Code: The status code, which should be an enum value of - // [google.rpc.Code][]. - Code int64 `json:"code,omitempty"` - - // Details: A list of messages that carry the error details. There is a - // common set of message types for APIs to use. - Details []*Any `json:"details,omitempty"` - - // Message: A developer-facing error message, which should be in - // English. Any user-facing error message should be localized and sent - // in the [google.rpc.Status.details][] field, or localized by the - // client. - Message string `json:"message,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Code") 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. "Code") 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 *Status) MarshalJSON() ([]byte, error) { - type NoMethod Status - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// Step: A Step represents a single operation performed as part of -// Execution. A step can be used to represent the execution of a tool ( -// for example a test runner execution or an execution of a -// compiler). -// -// Steps can overlap (for instance two steps might have the same start -// time if some operations are done in parallel). -// -// Here is an example, let's consider that we have a continuous build is -// executing a test runner for each iteration. The workflow would look -// like: - user creates a Execution with id 1 - user creates an -// TestExecutionStep with id 100 for Execution 1 - user update -// TestExecutionStep with id 100 to add a raw xml log + the service -// parses the xml logs and returns a TestExecutionStep with updated -// TestResult(s). - user update the status of TestExecutionStep with id -// 100 to COMPLETE -// -// A Step can be updated until its state is set to COMPLETE at which -// points it becomes immutable. -type Step struct { - // CompletionTime: The time when the step status was set to - // complete. - // - // This value will be set automatically when state transitions to - // COMPLETE. - // - // - In response: set if the execution state is COMPLETE. - In - // create/update request: never set - CompletionTime *Timestamp `json:"completionTime,omitempty"` - - // CreationTime: The time when the step was created. - // - // - In response: always set - In create/update request: never set - CreationTime *Timestamp `json:"creationTime,omitempty"` - - // Description: A description of this tool For example: mvn clean - // package -D skipTests=true - // - // - In response: present if set by create/update request - In - // create/update request: optional - Description string `json:"description,omitempty"` - - // DeviceUsageDuration: How much the device resource is used to perform - // the test. - // - // This is the device usage used for billing purpose, which is different - // from the run_duration, for example, infrastructure failure won't be - // charged for device usage. - // - // PRECONDITION_FAILED will be returned if one attempts to set a - // device_usage on a step which already has this field set. - // - // - In response: present if previously set. - In create request: - // optional - In update request: optional - DeviceUsageDuration *Duration `json:"deviceUsageDuration,omitempty"` - - // DimensionValue: If the execution containing this step has any - // dimension_definition set, then this field allows the child to specify - // the values of the dimensions. - // - // The keys must exactly match the dimension_definition of the - // execution. - // - // For example, if the execution has `dimension_definition = ['attempt', - // 'device']` then a step must define values for those dimensions, eg. - // `dimension_value = ['attempt': '1', 'device': 'Nexus 6']` - // - // If a step does not participate in one dimension of the matrix, the - // value for that dimension should be empty string. For example, if one - // of the tests is executed by a runner which does not support retries, - // the step could have `dimension_value = ['attempt': '', 'device': - // 'Nexus 6']` - // - // If the step does not participate in any dimensions of the matrix, it - // may leave dimension_value unset. - // - // A PRECONDITION_FAILED will be returned if any of the keys do not - // exist in the dimension_definition of the execution. - // - // A PRECONDITION_FAILED will be returned if another step in this - // execution already has the same name and dimension_value, but differs - // on other data fields, for example, step field is different. - // - // A PRECONDITION_FAILED will be returned if dimension_value is set, and - // there is a dimension_definition in the execution which is not - // specified as one of the keys. - // - // - In response: present if set by create - In create request: optional - // - In update request: never set - DimensionValue []*StepDimensionValueEntry `json:"dimensionValue,omitempty"` - - // HasImages: Whether any of the outputs of this step are images whose - // thumbnails can be fetched with ListThumbnails. - // - // - In response: always set - In create/update request: never set - HasImages bool `json:"hasImages,omitempty"` - - // Labels: Arbitrary user-supplied key/value pairs that are associated - // with the step. - // - // Users are responsible for managing the key namespace such that keys - // don't accidentally collide. - // - // An INVALID_ARGUMENT will be returned if the number of labels exceeds - // 100 or if the length of any of the keys or values exceeds 100 - // characters. - // - // - In response: always set - In create request: optional - In update - // request: optional; any new key/value pair will be added to the map, - // and any new value for an existing key will update that key's value - Labels []*StepLabelsEntry `json:"labels,omitempty"` - - // Name: A short human-readable name to display in the UI. Maximum of - // 100 characters. For example: Clean build - // - // A PRECONDITION_FAILED will be returned upon creating a new step if it - // shares its name and dimension_value with an existing step. If two - // steps represent a similar action, but have different dimension - // values, they should share the same name. For instance, if the same - // set of tests is run on two different platforms, the two steps should - // have the same name. - // - // - In response: always set - In create request: always set - In update - // request: never set - Name string `json:"name,omitempty"` - - // Outcome: Classification of the result, for example into SUCCESS or - // FAILURE - // - // - In response: present if set by create/update request - In - // create/update request: optional - Outcome *Outcome `json:"outcome,omitempty"` - - // RunDuration: How long it took for this step to run. - // - // If unset, this is set to the difference between creation_time and - // completion_time when the step is set to the COMPLETE state. In some - // cases, it is appropriate to set this value separately: For instance, - // if a step is created, but the operation it represents is queued for a - // few minutes before it executes, it would be appropriate not to - // include the time spent queued in its - // run_duration. - // - // PRECONDITION_FAILED will be returned if one attempts to set a - // run_duration on a step which already has this field set. - // - // - In response: present if previously set; always present on COMPLETE - // step - In create request: optional - In update request: optional - RunDuration *Duration `json:"runDuration,omitempty"` - - // State: The initial state is IN_PROGRESS. The only legal state - // transitions are * IN_PROGRESS -> COMPLETE - // - // A PRECONDITION_FAILED will be returned if an invalid transition is - // requested. - // - // It is valid to create Step with a state set to COMPLETE. The state - // can only be set to COMPLETE once. A PRECONDITION_FAILED will be - // returned if the state is set to COMPLETE multiple times. - // - // - In response: always set - In create/update request: optional - // - // Possible values: - // "complete" - // "inProgress" - // "pending" - // "unknownState" - State string `json:"state,omitempty"` - - // StepId: A unique identifier within a Execution for this - // Step. - // - // Returns INVALID_ARGUMENT if this field is set or overwritten by the - // caller. - // - // - In response: always set - In create/update request: never set - StepId string `json:"stepId,omitempty"` - - // TestExecutionStep: An execution of a test runner. - TestExecutionStep *TestExecutionStep `json:"testExecutionStep,omitempty"` - - // ToolExecutionStep: An execution of a tool (used for steps we don't - // explicitly support). - ToolExecutionStep *ToolExecutionStep `json:"toolExecutionStep,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "CompletionTime") 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. "CompletionTime") 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 *Step) MarshalJSON() ([]byte, error) { - type NoMethod Step - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type StepDimensionValueEntry struct { - Key string `json:"key,omitempty"` - - Value string `json:"value,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Key") 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. "Key") 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 *StepDimensionValueEntry) MarshalJSON() ([]byte, error) { - type NoMethod StepDimensionValueEntry - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type StepLabelsEntry struct { - Key string `json:"key,omitempty"` - - Value string `json:"value,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Key") 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. "Key") 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 *StepLabelsEntry) MarshalJSON() ([]byte, error) { - type NoMethod StepLabelsEntry - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type SuccessDetail struct { - // OtherNativeCrash: If a native process other than the app crashed. - OtherNativeCrash bool `json:"otherNativeCrash,omitempty"` - - // ForceSendFields is a list of field names (e.g. "OtherNativeCrash") 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. "OtherNativeCrash") 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 *SuccessDetail) MarshalJSON() ([]byte, error) { - type NoMethod SuccessDetail - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// TestCaseReference: A reference to a test case. -// -// Test case references are canonically ordered lexicographically by -// these three factors: * First, by test_suite_name. * Second, by -// class_name. * Third, by name. -type TestCaseReference struct { - // ClassName: The name of the class. - ClassName string `json:"className,omitempty"` - - // Name: The name of the test case. - // - // Required. - Name string `json:"name,omitempty"` - - // TestSuiteName: The name of the test suite to which this test case - // belongs. - TestSuiteName string `json:"testSuiteName,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ClassName") 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. "ClassName") 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 *TestCaseReference) MarshalJSON() ([]byte, error) { - type NoMethod TestCaseReference - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// TestExecutionStep: A step that represents running tests. -// -// It accepts ant-junit xml files which will be parsed into structured -// test results by the service. Xml file paths are updated in order to -// append more files, however they can't be deleted. -// -// Users can also add test results manually by using the test_result -// field. -type TestExecutionStep struct { - // TestIssues: Issues observed during the test execution. - // - // For example, if the mobile app under test crashed during the test, - // the error message and the stack trace content can be recorded here to - // assist debugging. - // - // - In response: present if set by create or update - In create/update - // request: optional - TestIssues []*TestIssue `json:"testIssues,omitempty"` - - // TestSuiteOverviews: List of test suite overview contents. This could - // be parsed from xUnit XML log by server, or uploaded directly by user. - // This references should only be called when test suites are fully - // parsed or uploaded. - // - // The maximum allowed number of test suite overviews per step is - // 1000. - // - // - In response: always set - In create request: optional - In update - // request: never (use publishXunitXmlFiles custom method instead) - TestSuiteOverviews []*TestSuiteOverview `json:"testSuiteOverviews,omitempty"` - - // TestTiming: The timing break down of the test execution. - // - // - In response: present if set by create or update - In create/update - // request: optional - TestTiming *TestTiming `json:"testTiming,omitempty"` - - // ToolExecution: Represents the execution of the test runner. - // - // The exit code of this tool will be used to determine if the test - // passed. - // - // - In response: always set - In create/update request: optional - ToolExecution *ToolExecution `json:"toolExecution,omitempty"` - - // ForceSendFields is a list of field names (e.g. "TestIssues") 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. "TestIssues") 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 *TestExecutionStep) MarshalJSON() ([]byte, error) { - type NoMethod TestExecutionStep - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// TestIssue: An issue detected occurring during a test execution. -type TestIssue struct { - // ErrorMessage: A brief human-readable message describing the issue. - // Required. - ErrorMessage string `json:"errorMessage,omitempty"` - - // Severity: Severity of issue. Required. - // - // Possible values: - // "info" - // "severe" - // "unspecifiedSeverity" - // "warning" - Severity string `json:"severity,omitempty"` - - // StackTrace: Deprecated in favor of stack trace fields inside specific - // warnings. - StackTrace *StackTrace `json:"stackTrace,omitempty"` - - // Type: Type of issue. Required. - // - // Possible values: - // "anr" - // "fatalException" - // "nativeCrash" - // "unspecifiedType" - Type string `json:"type,omitempty"` - - // Warning: Warning message with additional details of the issue. Should - // always be a message from com.google.devtools.toolresults.v1.warnings - // Required. - Warning *Any `json:"warning,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ErrorMessage") 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. "ErrorMessage") 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 *TestIssue) MarshalJSON() ([]byte, error) { - type NoMethod TestIssue - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// TestSuiteOverview: A summary of a test suite result either parsed -// from XML or uploaded directly by a user. -// -// Note: the API related comments are for StepService only. This message -// is also being used in ExecutionService in a read only mode for the -// corresponding step. -type TestSuiteOverview struct { - // ErrorCount: Number of test cases in error, typically set by the - // service by parsing the xml_source. - // - // - In create/response: always set - In update request: never - ErrorCount int64 `json:"errorCount,omitempty"` - - // FailureCount: Number of failed test cases, typically set by the - // service by parsing the xml_source. May also be set by the user. - // - // - In create/response: always set - In update request: never - FailureCount int64 `json:"failureCount,omitempty"` - - // Name: The name of the test suite. - // - // - In create/response: always set - In update request: never - Name string `json:"name,omitempty"` - - // SkippedCount: Number of test cases not run, typically set by the - // service by parsing the xml_source. - // - // - In create/response: always set - In update request: never - SkippedCount int64 `json:"skippedCount,omitempty"` - - // TotalCount: Number of test cases, typically set by the service by - // parsing the xml_source. - // - // - In create/response: always set - In update request: never - TotalCount int64 `json:"totalCount,omitempty"` - - // XmlSource: If this test suite was parsed from XML, this is the URI - // where the original XML file is stored. - // - // Note: Multiple test suites can share the same xml_source - // - // Returns INVALID_ARGUMENT if the uri format is not supported. - // - // - In create/response: optional - In update request: never - XmlSource *FileReference `json:"xmlSource,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ErrorCount") 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. "ErrorCount") 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 *TestSuiteOverview) MarshalJSON() ([]byte, error) { - type NoMethod TestSuiteOverview - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// TestTiming: Testing timing break down to know phases. -type TestTiming struct { - // TestProcessDuration: How long it took to run the test process. - // - // - In response: present if previously set. - In create/update request: - // optional - TestProcessDuration *Duration `json:"testProcessDuration,omitempty"` - - // ForceSendFields is a list of field names (e.g. "TestProcessDuration") - // 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. "TestProcessDuration") 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 *TestTiming) MarshalJSON() ([]byte, error) { - type NoMethod TestTiming - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// Thumbnail: A single thumbnail, with its size and format. -type Thumbnail struct { - // ContentType: The thumbnail's content type, i.e. "image/png". - // - // Always set. - ContentType string `json:"contentType,omitempty"` - - // Data: The thumbnail file itself. - // - // That is, the bytes here are precisely the bytes that make up the - // thumbnail file; they can be served as an image as-is (with the - // appropriate content type.) - // - // Always set. - Data string `json:"data,omitempty"` - - // HeightPx: The height of the thumbnail, in pixels. - // - // Always set. - HeightPx int64 `json:"heightPx,omitempty"` - - // WidthPx: The width of the thumbnail, in pixels. - // - // Always set. - WidthPx int64 `json:"widthPx,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ContentType") 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. "ContentType") 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 *Thumbnail) MarshalJSON() ([]byte, error) { - type NoMethod Thumbnail - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// Timestamp: A Timestamp represents a point in time independent of any -// time zone or calendar, represented as seconds and fractions of -// seconds at nanosecond resolution in UTC Epoch time. It is encoded -// using the Proleptic Gregorian Calendar which extends the Gregorian -// calendar backwards to year one. It is encoded assuming all minutes -// are 60 seconds long, i.e. leap seconds are "smeared" so that no leap -// second table is needed for interpretation. Range is from -// 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By -// restricting to that range, we ensure that we can convert to and from -// RFC 3339 date strings. See -// [https://www.ietf.org/rfc/rfc3339.txt](https://www.ietf.org/rfc/rfc333 -// 9.txt). -// -// # Examples -// -// Example 1: Compute Timestamp from POSIX `time()`. -// -// Timestamp timestamp; timestamp.set_seconds(time(NULL)); -// timestamp.set_nanos(0); -// -// Example 2: Compute Timestamp from POSIX `gettimeofday()`. -// -// struct timeval tv; gettimeofday(&tv, NULL); -// -// Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); -// timestamp.set_nanos(tv.tv_usec * 1000); -// -// Example 3: Compute Timestamp from Win32 -// `GetSystemTimeAsFileTime()`. -// -// FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = -// (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; -// -// // A Windows tick is 100 nanoseconds. Windows epoch -// 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch -// 1970-01-01T00:00:00Z. Timestamp timestamp; -// timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); -// timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); -// -// Example 4: Compute Timestamp from Java -// `System.currentTimeMillis()`. -// -// long millis = System.currentTimeMillis(); -// -// Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / -// 1000) .setNanos((int) ((millis % 1000) * -// 1000000)).build(); -// -// -// -// Example 5: Compute Timestamp from current time in Python. -// -// timestamp = Timestamp() timestamp.GetCurrentTime() -// -// # JSON Mapping -// -// In JSON format, the Timestamp type is encoded as a string in the [RFC -// 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the -// format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" -// where {year} is always expressed using four digits while {month}, -// {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. -// The fractional seconds, which can go up to 9 digits (i.e. up to 1 -// nanosecond resolution), are optional. The "Z" suffix indicates the -// timezone ("UTC"); the timezone is required, though only UTC (as -// indicated by "Z") is presently supported. -// -// For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past -// 01:30 UTC on January 15, 2017. -// -// In JavaScript, one can convert a Date object to this format using the -// standard -// [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScrip -// t/Reference/Global_Objects/Date/toISOString] method. In Python, a -// standard `datetime.datetime` object can be converted to this format -// using -// [`strftime`](https://docs.python.org/2/library/time.html#time.strftime -// ) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in -// Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( -// http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime()) to obtain a formatter capable of generating timestamps in this -// format. -type Timestamp struct { - // Nanos: Non-negative fractions of a second at nanosecond resolution. - // Negative second values with fractions must still have non-negative - // nanos values that count forward in time. Must be from 0 to - // 999,999,999 inclusive. - Nanos int64 `json:"nanos,omitempty"` - - // Seconds: Represents seconds of UTC time since Unix epoch - // 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - // 9999-12-31T23:59:59Z inclusive. - Seconds int64 `json:"seconds,omitempty,string"` - - // ForceSendFields is a list of field names (e.g. "Nanos") 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. "Nanos") 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 *Timestamp) MarshalJSON() ([]byte, error) { - type NoMethod Timestamp - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// ToolExecution: An execution of an arbitrary tool. It could be a test -// runner or a tool copying artifacts or deploying code. -type ToolExecution struct { - // CommandLineArguments: The full tokenized command line including the - // program name (equivalent to argv in a C program). - // - // - In response: present if set by create request - In create request: - // optional - In update request: never set - CommandLineArguments []string `json:"commandLineArguments,omitempty"` - - // ExitCode: Tool execution exit code. This field will be set once the - // tool has exited. - // - // - In response: present if set by create/update request - In create - // request: optional - In update request: optional, a - // FAILED_PRECONDITION error will be returned if an exit_code is already - // set. - ExitCode *ToolExitCode `json:"exitCode,omitempty"` - - // ToolLogs: References to any plain text logs output the tool - // execution. - // - // This field can be set before the tool has exited in order to be able - // to have access to a live view of the logs while the tool is - // running. - // - // The maximum allowed number of tool logs per step is 1000. - // - // - In response: present if set by create/update request - In create - // request: optional - In update request: optional, any value provided - // will be appended to the existing list - ToolLogs []*FileReference `json:"toolLogs,omitempty"` - - // ToolOutputs: References to opaque files of any format output by the - // tool execution. - // - // The maximum allowed number of tool outputs per step is 1000. - // - // - In response: present if set by create/update request - In create - // request: optional - In update request: optional, any value provided - // will be appended to the existing list - ToolOutputs []*ToolOutputReference `json:"toolOutputs,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "CommandLineArguments") 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. "CommandLineArguments") 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 *ToolExecution) MarshalJSON() ([]byte, error) { - type NoMethod ToolExecution - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// ToolExecutionStep: Generic tool step to be used for binaries we do -// not explicitly support. For example: running cp to copy artifacts -// from one location to another. -type ToolExecutionStep struct { - // ToolExecution: A Tool execution. - // - // - In response: present if set by create/update request - In - // create/update request: optional - ToolExecution *ToolExecution `json:"toolExecution,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ToolExecution") 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. "ToolExecution") 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 *ToolExecutionStep) MarshalJSON() ([]byte, error) { - type NoMethod ToolExecutionStep - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// ToolExitCode: Exit code from a tool execution. -type ToolExitCode struct { - // Number: Tool execution exit code. A value of 0 means that the - // execution was successful. - // - // - In response: always set - In create/update request: always set - Number int64 `json:"number,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Number") 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. "Number") 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 *ToolExitCode) MarshalJSON() ([]byte, error) { - type NoMethod ToolExitCode - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// ToolOutputReference: A reference to a ToolExecution output file. -type ToolOutputReference struct { - // CreationTime: The creation time of the file. - // - // - In response: present if set by create/update request - In - // create/update request: optional - CreationTime *Timestamp `json:"creationTime,omitempty"` - - // Output: A FileReference to an output file. - // - // - In response: always set - In create/update request: always set - Output *FileReference `json:"output,omitempty"` - - // TestCase: The test case to which this output file belongs. - // - // - In response: present if set by create/update request - In - // create/update request: optional - TestCase *TestCaseReference `json:"testCase,omitempty"` - - // ForceSendFields is a list of field names (e.g. "CreationTime") 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. "CreationTime") 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 *ToolOutputReference) MarshalJSON() ([]byte, error) { - type NoMethod ToolOutputReference - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// method id "toolresults.projects.getSettings": - -type ProjectsGetSettingsCall struct { - s *Service - projectId string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetSettings: Gets the Tool Results settings for a project. -// -// May return any of the following canonical error codes: -// -// - PERMISSION_DENIED - if the user is not authorized to read from -// project -func (r *ProjectsService) GetSettings(projectId string) *ProjectsGetSettingsCall { - c := &ProjectsGetSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.projectId = projectId - 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 *ProjectsGetSettingsCall) Fields(s ...googleapi.Field) *ProjectsGetSettingsCall { - 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 *ProjectsGetSettingsCall) IfNoneMatch(entityTag string) *ProjectsGetSettingsCall { - 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 *ProjectsGetSettingsCall) Context(ctx context.Context) *ProjectsGetSettingsCall { - 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 *ProjectsGetSettingsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsGetSettingsCall) 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, "{projectId}/settings") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "projectId": c.projectId, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "toolresults.projects.getSettings" call. -// Exactly one of *ProjectSettings or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *ProjectSettings.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 *ProjectsGetSettingsCall) Do(opts ...googleapi.CallOption) (*ProjectSettings, 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 := &ProjectSettings{ - 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": "Gets the Tool Results settings for a project.\n\nMay return any of the following canonical error codes:\n\n- PERMISSION_DENIED - if the user is not authorized to read from project", - // "httpMethod": "GET", - // "id": "toolresults.projects.getSettings", - // "parameterOrder": [ - // "projectId" - // ], - // "parameters": { - // "projectId": { - // "description": "A Project id.\n\nRequired.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{projectId}/settings", - // "response": { - // "$ref": "ProjectSettings" - // } - // } - -} - -// method id "toolresults.projects.initializeSettings": - -type ProjectsInitializeSettingsCall struct { - s *Service - projectId string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// InitializeSettings: Creates resources for settings which have not yet -// been set. -// -// Currently, this creates a single resource: a Google Cloud Storage -// bucket, to be used as the default bucket for this project. The bucket -// is created in an FTL-own storage project. Except for in rare cases, -// calling this method in parallel from multiple clients will only -// create a single bucket. In order to avoid unnecessary storage -// charges, the bucket is configured to automatically delete objects -// older than 90 days. -// -// The bucket is created with the following permissions: - Owner access -// for owners of central storage project (FTL-owned) - Writer access for -// owners/editors of customer project - Reader access for viewers of -// customer project The default ACL on objects created in the bucket is: -// - Owner access for owners of central storage project - Reader access -// for owners/editors/viewers of customer project See Google Cloud -// Storage documentation for more details. -// -// If there is already a default bucket set and the project can access -// the bucket, this call does nothing. However, if the project doesn't -// have the permission to access the bucket or the bucket is deleted, a -// new bucket will be created. -// -// May return any canonical error codes, including the following: -// -// - PERMISSION_DENIED - if the user is not authorized to write to -// project - Any error code raised by Google Cloud Storage -func (r *ProjectsService) InitializeSettings(projectId string) *ProjectsInitializeSettingsCall { - c := &ProjectsInitializeSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.projectId = projectId - 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 *ProjectsInitializeSettingsCall) Fields(s ...googleapi.Field) *ProjectsInitializeSettingsCall { - 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 *ProjectsInitializeSettingsCall) Context(ctx context.Context) *ProjectsInitializeSettingsCall { - 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 *ProjectsInitializeSettingsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsInitializeSettingsCall) 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 - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{projectId}:initializeSettings") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "projectId": c.projectId, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "toolresults.projects.initializeSettings" call. -// Exactly one of *ProjectSettings or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *ProjectSettings.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 *ProjectsInitializeSettingsCall) Do(opts ...googleapi.CallOption) (*ProjectSettings, 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 := &ProjectSettings{ - 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": "Creates resources for settings which have not yet been set.\n\nCurrently, this creates a single resource: a Google Cloud Storage bucket, to be used as the default bucket for this project. The bucket is created in an FTL-own storage project. Except for in rare cases, calling this method in parallel from multiple clients will only create a single bucket. In order to avoid unnecessary storage charges, the bucket is configured to automatically delete objects older than 90 days.\n\nThe bucket is created with the following permissions: - Owner access for owners of central storage project (FTL-owned) - Writer access for owners/editors of customer project - Reader access for viewers of customer project The default ACL on objects created in the bucket is: - Owner access for owners of central storage project - Reader access for owners/editors/viewers of customer project See Google Cloud Storage documentation for more details.\n\nIf there is already a default bucket set and the project can access the bucket, this call does nothing. However, if the project doesn't have the permission to access the bucket or the bucket is deleted, a new bucket will be created.\n\nMay return any canonical error codes, including the following:\n\n- PERMISSION_DENIED - if the user is not authorized to write to project - Any error code raised by Google Cloud Storage", - // "httpMethod": "POST", - // "id": "toolresults.projects.initializeSettings", - // "parameterOrder": [ - // "projectId" - // ], - // "parameters": { - // "projectId": { - // "description": "A Project id.\n\nRequired.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{projectId}:initializeSettings", - // "response": { - // "$ref": "ProjectSettings" - // } - // } - -} - -// method id "toolresults.projects.histories.create": - -type ProjectsHistoriesCreateCall struct { - s *Service - projectId string - history *History - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Create: Creates a History. -// -// The returned History will have the id set. -// -// May return any of the following canonical error codes: -// -// - PERMISSION_DENIED - if the user is not authorized to write to -// project - INVALID_ARGUMENT - if the request is malformed - NOT_FOUND -// - if the containing project does not exist -func (r *ProjectsHistoriesService) Create(projectId string, history *History) *ProjectsHistoriesCreateCall { - c := &ProjectsHistoriesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.projectId = projectId - c.history = history - return c -} - -// RequestId sets the optional parameter "requestId": A unique request -// ID for server to detect duplicated requests. For example, a -// UUID. -// -// Optional, but strongly recommended. -func (c *ProjectsHistoriesCreateCall) RequestId(requestId string) *ProjectsHistoriesCreateCall { - c.urlParams_.Set("requestId", requestId) - 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 *ProjectsHistoriesCreateCall) Fields(s ...googleapi.Field) *ProjectsHistoriesCreateCall { - 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 *ProjectsHistoriesCreateCall) Context(ctx context.Context) *ProjectsHistoriesCreateCall { - 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 *ProjectsHistoriesCreateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsHistoriesCreateCall) 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.history) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{projectId}/histories") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "projectId": c.projectId, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "toolresults.projects.histories.create" call. -// Exactly one of *History or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *History.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 *ProjectsHistoriesCreateCall) Do(opts ...googleapi.CallOption) (*History, 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 := &History{ - 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": "Creates a History.\n\nThe returned History will have the id set.\n\nMay return any of the following canonical error codes:\n\n- PERMISSION_DENIED - if the user is not authorized to write to project - INVALID_ARGUMENT - if the request is malformed - NOT_FOUND - if the containing project does not exist", - // "httpMethod": "POST", - // "id": "toolresults.projects.histories.create", - // "parameterOrder": [ - // "projectId" - // ], - // "parameters": { - // "projectId": { - // "description": "A Project id.\n\nRequired.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "A unique request ID for server to detect duplicated requests. For example, a UUID.\n\nOptional, but strongly recommended.", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{projectId}/histories", - // "request": { - // "$ref": "History" - // }, - // "response": { - // "$ref": "History" - // } - // } - -} - -// method id "toolresults.projects.histories.get": - -type ProjectsHistoriesGetCall struct { - s *Service - projectId string - historyId string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Gets a History. -// -// May return any of the following canonical error codes: -// -// - PERMISSION_DENIED - if the user is not authorized to read project - -// INVALID_ARGUMENT - if the request is malformed - NOT_FOUND - if the -// History does not exist -func (r *ProjectsHistoriesService) Get(projectId string, historyId string) *ProjectsHistoriesGetCall { - c := &ProjectsHistoriesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.projectId = projectId - c.historyId = historyId - 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 *ProjectsHistoriesGetCall) Fields(s ...googleapi.Field) *ProjectsHistoriesGetCall { - 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 *ProjectsHistoriesGetCall) IfNoneMatch(entityTag string) *ProjectsHistoriesGetCall { - 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 *ProjectsHistoriesGetCall) Context(ctx context.Context) *ProjectsHistoriesGetCall { - 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 *ProjectsHistoriesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsHistoriesGetCall) 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, "{projectId}/histories/{historyId}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "projectId": c.projectId, - "historyId": c.historyId, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "toolresults.projects.histories.get" call. -// Exactly one of *History or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *History.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 *ProjectsHistoriesGetCall) Do(opts ...googleapi.CallOption) (*History, 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 := &History{ - 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": "Gets a History.\n\nMay return any of the following canonical error codes:\n\n- PERMISSION_DENIED - if the user is not authorized to read project - INVALID_ARGUMENT - if the request is malformed - NOT_FOUND - if the History does not exist", - // "httpMethod": "GET", - // "id": "toolresults.projects.histories.get", - // "parameterOrder": [ - // "projectId", - // "historyId" - // ], - // "parameters": { - // "historyId": { - // "description": "A History id.\n\nRequired.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "projectId": { - // "description": "A Project id.\n\nRequired.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{projectId}/histories/{historyId}", - // "response": { - // "$ref": "History" - // } - // } - -} - -// method id "toolresults.projects.histories.list": - -type ProjectsHistoriesListCall struct { - s *Service - projectId string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists Histories for a given Project. -// -// The histories are sorted by modification time in descending order. -// The history_id key will be used to order the history with the same -// modification time. -// -// May return any of the following canonical error codes: -// -// - PERMISSION_DENIED - if the user is not authorized to read project - -// INVALID_ARGUMENT - if the request is malformed - NOT_FOUND - if the -// History does not exist -func (r *ProjectsHistoriesService) List(projectId string) *ProjectsHistoriesListCall { - c := &ProjectsHistoriesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.projectId = projectId - return c -} - -// FilterByName sets the optional parameter "filterByName": If set, only -// return histories with the given name. -func (c *ProjectsHistoriesListCall) FilterByName(filterByName string) *ProjectsHistoriesListCall { - c.urlParams_.Set("filterByName", filterByName) - return c -} - -// PageSize sets the optional parameter "pageSize": The maximum number -// of Histories to fetch. -// -// Default value: 20. The server will use this default if the field is -// not set or has a value of 0. Any value greater than 100 will be -// treated as 100. -func (c *ProjectsHistoriesListCall) PageSize(pageSize int64) *ProjectsHistoriesListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": A continuation -// token to resume the query at the next item. -func (c *ProjectsHistoriesListCall) PageToken(pageToken string) *ProjectsHistoriesListCall { - 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 *ProjectsHistoriesListCall) Fields(s ...googleapi.Field) *ProjectsHistoriesListCall { - 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 *ProjectsHistoriesListCall) IfNoneMatch(entityTag string) *ProjectsHistoriesListCall { - 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 *ProjectsHistoriesListCall) Context(ctx context.Context) *ProjectsHistoriesListCall { - 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 *ProjectsHistoriesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsHistoriesListCall) 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, "{projectId}/histories") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "projectId": c.projectId, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "toolresults.projects.histories.list" call. -// Exactly one of *ListHistoriesResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *ListHistoriesResponse.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 *ProjectsHistoriesListCall) Do(opts ...googleapi.CallOption) (*ListHistoriesResponse, 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 := &ListHistoriesResponse{ - 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": "Lists Histories for a given Project.\n\nThe histories are sorted by modification time in descending order. The history_id key will be used to order the history with the same modification time.\n\nMay return any of the following canonical error codes:\n\n- PERMISSION_DENIED - if the user is not authorized to read project - INVALID_ARGUMENT - if the request is malformed - NOT_FOUND - if the History does not exist", - // "httpMethod": "GET", - // "id": "toolresults.projects.histories.list", - // "parameterOrder": [ - // "projectId" - // ], - // "parameters": { - // "filterByName": { - // "description": "If set, only return histories with the given name.\n\nOptional.", - // "location": "query", - // "type": "string" - // }, - // "pageSize": { - // "description": "The maximum number of Histories to fetch.\n\nDefault value: 20. The server will use this default if the field is not set or has a value of 0. Any value greater than 100 will be treated as 100.\n\nOptional.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "A continuation token to resume the query at the next item.\n\nOptional.", - // "location": "query", - // "type": "string" - // }, - // "projectId": { - // "description": "A Project id.\n\nRequired.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{projectId}/histories", - // "response": { - // "$ref": "ListHistoriesResponse" - // } - // } - -} - -// 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 *ProjectsHistoriesListCall) Pages(ctx context.Context, f func(*ListHistoriesResponse) 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 "toolresults.projects.histories.executions.create": - -type ProjectsHistoriesExecutionsCreateCall struct { - s *Service - projectId string - historyId string - execution *Execution - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Create: Creates an Execution. -// -// The returned Execution will have the id set. -// -// May return any of the following canonical error codes: -// -// - PERMISSION_DENIED - if the user is not authorized to write to -// project - INVALID_ARGUMENT - if the request is malformed - NOT_FOUND -// - if the containing History does not exist -func (r *ProjectsHistoriesExecutionsService) Create(projectId string, historyId string, execution *Execution) *ProjectsHistoriesExecutionsCreateCall { - c := &ProjectsHistoriesExecutionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.projectId = projectId - c.historyId = historyId - c.execution = execution - return c -} - -// RequestId sets the optional parameter "requestId": A unique request -// ID for server to detect duplicated requests. For example, a -// UUID. -// -// Optional, but strongly recommended. -func (c *ProjectsHistoriesExecutionsCreateCall) RequestId(requestId string) *ProjectsHistoriesExecutionsCreateCall { - c.urlParams_.Set("requestId", requestId) - 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 *ProjectsHistoriesExecutionsCreateCall) Fields(s ...googleapi.Field) *ProjectsHistoriesExecutionsCreateCall { - 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 *ProjectsHistoriesExecutionsCreateCall) Context(ctx context.Context) *ProjectsHistoriesExecutionsCreateCall { - 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 *ProjectsHistoriesExecutionsCreateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsHistoriesExecutionsCreateCall) 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.execution) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{projectId}/histories/{historyId}/executions") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "projectId": c.projectId, - "historyId": c.historyId, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "toolresults.projects.histories.executions.create" call. -// Exactly one of *Execution or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Execution.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 *ProjectsHistoriesExecutionsCreateCall) Do(opts ...googleapi.CallOption) (*Execution, 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 := &Execution{ - 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": "Creates an Execution.\n\nThe returned Execution will have the id set.\n\nMay return any of the following canonical error codes:\n\n- PERMISSION_DENIED - if the user is not authorized to write to project - INVALID_ARGUMENT - if the request is malformed - NOT_FOUND - if the containing History does not exist", - // "httpMethod": "POST", - // "id": "toolresults.projects.histories.executions.create", - // "parameterOrder": [ - // "projectId", - // "historyId" - // ], - // "parameters": { - // "historyId": { - // "description": "A History id.\n\nRequired.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "projectId": { - // "description": "A Project id.\n\nRequired.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "A unique request ID for server to detect duplicated requests. For example, a UUID.\n\nOptional, but strongly recommended.", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{projectId}/histories/{historyId}/executions", - // "request": { - // "$ref": "Execution" - // }, - // "response": { - // "$ref": "Execution" - // } - // } - -} - -// method id "toolresults.projects.histories.executions.get": - -type ProjectsHistoriesExecutionsGetCall struct { - s *Service - projectId string - historyId string - executionId string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Gets an Execution. -// -// May return any of the following canonical error codes: -// -// - PERMISSION_DENIED - if the user is not authorized to write to -// project - INVALID_ARGUMENT - if the request is malformed - NOT_FOUND -// - if the Execution does not exist -func (r *ProjectsHistoriesExecutionsService) Get(projectId string, historyId string, executionId string) *ProjectsHistoriesExecutionsGetCall { - c := &ProjectsHistoriesExecutionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.projectId = projectId - c.historyId = historyId - c.executionId = executionId - 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 *ProjectsHistoriesExecutionsGetCall) Fields(s ...googleapi.Field) *ProjectsHistoriesExecutionsGetCall { - 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 *ProjectsHistoriesExecutionsGetCall) IfNoneMatch(entityTag string) *ProjectsHistoriesExecutionsGetCall { - 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 *ProjectsHistoriesExecutionsGetCall) Context(ctx context.Context) *ProjectsHistoriesExecutionsGetCall { - 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 *ProjectsHistoriesExecutionsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsHistoriesExecutionsGetCall) 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, "{projectId}/histories/{historyId}/executions/{executionId}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "projectId": c.projectId, - "historyId": c.historyId, - "executionId": c.executionId, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "toolresults.projects.histories.executions.get" call. -// Exactly one of *Execution or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Execution.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 *ProjectsHistoriesExecutionsGetCall) Do(opts ...googleapi.CallOption) (*Execution, 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 := &Execution{ - 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": "Gets an Execution.\n\nMay return any of the following canonical error codes:\n\n- PERMISSION_DENIED - if the user is not authorized to write to project - INVALID_ARGUMENT - if the request is malformed - NOT_FOUND - if the Execution does not exist", - // "httpMethod": "GET", - // "id": "toolresults.projects.histories.executions.get", - // "parameterOrder": [ - // "projectId", - // "historyId", - // "executionId" - // ], - // "parameters": { - // "executionId": { - // "description": "An Execution id.\n\nRequired.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "historyId": { - // "description": "A History id.\n\nRequired.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "projectId": { - // "description": "A Project id.\n\nRequired.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{projectId}/histories/{historyId}/executions/{executionId}", - // "response": { - // "$ref": "Execution" - // } - // } - -} - -// method id "toolresults.projects.histories.executions.list": - -type ProjectsHistoriesExecutionsListCall struct { - s *Service - projectId string - historyId string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists Histories for a given Project. -// -// The executions are sorted by creation_time in descending order. The -// execution_id key will be used to order the executions with the same -// creation_time. -// -// May return any of the following canonical error codes: -// -// - PERMISSION_DENIED - if the user is not authorized to read project - -// INVALID_ARGUMENT - if the request is malformed - NOT_FOUND - if the -// containing History does not exist -func (r *ProjectsHistoriesExecutionsService) List(projectId string, historyId string) *ProjectsHistoriesExecutionsListCall { - c := &ProjectsHistoriesExecutionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.projectId = projectId - c.historyId = historyId - return c -} - -// PageSize sets the optional parameter "pageSize": The maximum number -// of Executions to fetch. -// -// Default value: 25. The server will use this default if the field is -// not set or has a value of 0. -func (c *ProjectsHistoriesExecutionsListCall) PageSize(pageSize int64) *ProjectsHistoriesExecutionsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": A continuation -// token to resume the query at the next item. -func (c *ProjectsHistoriesExecutionsListCall) PageToken(pageToken string) *ProjectsHistoriesExecutionsListCall { - 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 *ProjectsHistoriesExecutionsListCall) Fields(s ...googleapi.Field) *ProjectsHistoriesExecutionsListCall { - 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 *ProjectsHistoriesExecutionsListCall) IfNoneMatch(entityTag string) *ProjectsHistoriesExecutionsListCall { - 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 *ProjectsHistoriesExecutionsListCall) Context(ctx context.Context) *ProjectsHistoriesExecutionsListCall { - 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 *ProjectsHistoriesExecutionsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsHistoriesExecutionsListCall) 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, "{projectId}/histories/{historyId}/executions") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "projectId": c.projectId, - "historyId": c.historyId, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "toolresults.projects.histories.executions.list" call. -// Exactly one of *ListExecutionsResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *ListExecutionsResponse.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 *ProjectsHistoriesExecutionsListCall) Do(opts ...googleapi.CallOption) (*ListExecutionsResponse, 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 := &ListExecutionsResponse{ - 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": "Lists Histories for a given Project.\n\nThe executions are sorted by creation_time in descending order. The execution_id key will be used to order the executions with the same creation_time.\n\nMay return any of the following canonical error codes:\n\n- PERMISSION_DENIED - if the user is not authorized to read project - INVALID_ARGUMENT - if the request is malformed - NOT_FOUND - if the containing History does not exist", - // "httpMethod": "GET", - // "id": "toolresults.projects.histories.executions.list", - // "parameterOrder": [ - // "projectId", - // "historyId" - // ], - // "parameters": { - // "historyId": { - // "description": "A History id.\n\nRequired.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "pageSize": { - // "description": "The maximum number of Executions to fetch.\n\nDefault value: 25. The server will use this default if the field is not set or has a value of 0.\n\nOptional.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "A continuation token to resume the query at the next item.\n\nOptional.", - // "location": "query", - // "type": "string" - // }, - // "projectId": { - // "description": "A Project id.\n\nRequired.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{projectId}/histories/{historyId}/executions", - // "response": { - // "$ref": "ListExecutionsResponse" - // } - // } - -} - -// 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 *ProjectsHistoriesExecutionsListCall) Pages(ctx context.Context, f func(*ListExecutionsResponse) 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 "toolresults.projects.histories.executions.patch": - -type ProjectsHistoriesExecutionsPatchCall struct { - s *Service - projectId string - historyId string - executionId string - execution *Execution - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Updates an existing Execution with the supplied partial -// entity. -// -// May return any of the following canonical error codes: -// -// - PERMISSION_DENIED - if the user is not authorized to write to -// project - INVALID_ARGUMENT - if the request is malformed - -// FAILED_PRECONDITION - if the requested state transition is illegal - -// NOT_FOUND - if the containing History does not exist -func (r *ProjectsHistoriesExecutionsService) Patch(projectId string, historyId string, executionId string, execution *Execution) *ProjectsHistoriesExecutionsPatchCall { - c := &ProjectsHistoriesExecutionsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.projectId = projectId - c.historyId = historyId - c.executionId = executionId - c.execution = execution - return c -} - -// RequestId sets the optional parameter "requestId": A unique request -// ID for server to detect duplicated requests. For example, a -// UUID. -// -// Optional, but strongly recommended. -func (c *ProjectsHistoriesExecutionsPatchCall) RequestId(requestId string) *ProjectsHistoriesExecutionsPatchCall { - c.urlParams_.Set("requestId", requestId) - 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 *ProjectsHistoriesExecutionsPatchCall) Fields(s ...googleapi.Field) *ProjectsHistoriesExecutionsPatchCall { - 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 *ProjectsHistoriesExecutionsPatchCall) Context(ctx context.Context) *ProjectsHistoriesExecutionsPatchCall { - 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 *ProjectsHistoriesExecutionsPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsHistoriesExecutionsPatchCall) 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.execution) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{projectId}/histories/{historyId}/executions/{executionId}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("PATCH", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "projectId": c.projectId, - "historyId": c.historyId, - "executionId": c.executionId, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "toolresults.projects.histories.executions.patch" call. -// Exactly one of *Execution or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Execution.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 *ProjectsHistoriesExecutionsPatchCall) Do(opts ...googleapi.CallOption) (*Execution, 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 := &Execution{ - 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": "Updates an existing Execution with the supplied partial entity.\n\nMay return any of the following canonical error codes:\n\n- PERMISSION_DENIED - if the user is not authorized to write to project - INVALID_ARGUMENT - if the request is malformed - FAILED_PRECONDITION - if the requested state transition is illegal - NOT_FOUND - if the containing History does not exist", - // "httpMethod": "PATCH", - // "id": "toolresults.projects.histories.executions.patch", - // "parameterOrder": [ - // "projectId", - // "historyId", - // "executionId" - // ], - // "parameters": { - // "executionId": { - // "description": "Required.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "historyId": { - // "description": "Required.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "projectId": { - // "description": "A Project id. Required.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "A unique request ID for server to detect duplicated requests. For example, a UUID.\n\nOptional, but strongly recommended.", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{projectId}/histories/{historyId}/executions/{executionId}", - // "request": { - // "$ref": "Execution" - // }, - // "response": { - // "$ref": "Execution" - // } - // } - -} - -// method id "toolresults.projects.histories.executions.clusters.get": - -type ProjectsHistoriesExecutionsClustersGetCall struct { - s *Service - projectId string - historyId string - executionId string - clusterId string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Retrieves a single screenshot cluster by its ID -func (r *ProjectsHistoriesExecutionsClustersService) Get(projectId string, historyId string, executionId string, clusterId string) *ProjectsHistoriesExecutionsClustersGetCall { - c := &ProjectsHistoriesExecutionsClustersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.projectId = projectId - c.historyId = historyId - c.executionId = executionId - c.clusterId = clusterId - 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 *ProjectsHistoriesExecutionsClustersGetCall) Fields(s ...googleapi.Field) *ProjectsHistoriesExecutionsClustersGetCall { - 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 *ProjectsHistoriesExecutionsClustersGetCall) IfNoneMatch(entityTag string) *ProjectsHistoriesExecutionsClustersGetCall { - 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 *ProjectsHistoriesExecutionsClustersGetCall) Context(ctx context.Context) *ProjectsHistoriesExecutionsClustersGetCall { - 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 *ProjectsHistoriesExecutionsClustersGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsHistoriesExecutionsClustersGetCall) 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, "{projectId}/histories/{historyId}/executions/{executionId}/clusters/{clusterId}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "projectId": c.projectId, - "historyId": c.historyId, - "executionId": c.executionId, - "clusterId": c.clusterId, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "toolresults.projects.histories.executions.clusters.get" call. -// Exactly one of *ScreenshotCluster or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *ScreenshotCluster.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 *ProjectsHistoriesExecutionsClustersGetCall) Do(opts ...googleapi.CallOption) (*ScreenshotCluster, 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 := &ScreenshotCluster{ - 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": "Retrieves a single screenshot cluster by its ID", - // "httpMethod": "GET", - // "id": "toolresults.projects.histories.executions.clusters.get", - // "parameterOrder": [ - // "projectId", - // "historyId", - // "executionId", - // "clusterId" - // ], - // "parameters": { - // "clusterId": { - // "description": "A Cluster id\n\nRequired.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "executionId": { - // "description": "An Execution id.\n\nRequired.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "historyId": { - // "description": "A History id.\n\nRequired.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "projectId": { - // "description": "A Project id.\n\nRequired.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{projectId}/histories/{historyId}/executions/{executionId}/clusters/{clusterId}", - // "response": { - // "$ref": "ScreenshotCluster" - // } - // } - -} - -// method id "toolresults.projects.histories.executions.clusters.list": - -type ProjectsHistoriesExecutionsClustersListCall struct { - s *Service - projectId string - historyId string - executionId string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists Screenshot Clusters -// -// Returns the list of screenshot clusters corresponding to an -// execution. Screenshot clusters are created after the execution is -// finished. Clusters are created from a set of screenshots. Between any -// two screenshots, a matching score is calculated based off their -// metadata that determines how similar they are. Screenshots are placed -// in the cluster that has screens which have the highest matching -// scores. -func (r *ProjectsHistoriesExecutionsClustersService) List(projectId string, historyId string, executionId string) *ProjectsHistoriesExecutionsClustersListCall { - c := &ProjectsHistoriesExecutionsClustersListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.projectId = projectId - c.historyId = historyId - c.executionId = executionId - 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 *ProjectsHistoriesExecutionsClustersListCall) Fields(s ...googleapi.Field) *ProjectsHistoriesExecutionsClustersListCall { - 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 *ProjectsHistoriesExecutionsClustersListCall) IfNoneMatch(entityTag string) *ProjectsHistoriesExecutionsClustersListCall { - 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 *ProjectsHistoriesExecutionsClustersListCall) Context(ctx context.Context) *ProjectsHistoriesExecutionsClustersListCall { - 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 *ProjectsHistoriesExecutionsClustersListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsHistoriesExecutionsClustersListCall) 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, "{projectId}/histories/{historyId}/executions/{executionId}/clusters") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "projectId": c.projectId, - "historyId": c.historyId, - "executionId": c.executionId, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "toolresults.projects.histories.executions.clusters.list" call. -// Exactly one of *ListScreenshotClustersResponse or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *ListScreenshotClustersResponse.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 *ProjectsHistoriesExecutionsClustersListCall) Do(opts ...googleapi.CallOption) (*ListScreenshotClustersResponse, 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 := &ListScreenshotClustersResponse{ - 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": "Lists Screenshot Clusters\n\nReturns the list of screenshot clusters corresponding to an execution. Screenshot clusters are created after the execution is finished. Clusters are created from a set of screenshots. Between any two screenshots, a matching score is calculated based off their metadata that determines how similar they are. Screenshots are placed in the cluster that has screens which have the highest matching scores.", - // "httpMethod": "GET", - // "id": "toolresults.projects.histories.executions.clusters.list", - // "parameterOrder": [ - // "projectId", - // "historyId", - // "executionId" - // ], - // "parameters": { - // "executionId": { - // "description": "An Execution id.\n\nRequired.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "historyId": { - // "description": "A History id.\n\nRequired.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "projectId": { - // "description": "A Project id.\n\nRequired.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{projectId}/histories/{historyId}/executions/{executionId}/clusters", - // "response": { - // "$ref": "ListScreenshotClustersResponse" - // } - // } - -} - -// method id "toolresults.projects.histories.executions.steps.create": - -type ProjectsHistoriesExecutionsStepsCreateCall struct { - s *Service - projectId string - historyId string - executionId string - step *Step - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Create: Creates a Step. -// -// The returned Step will have the id set. -// -// May return any of the following canonical error codes: -// -// - PERMISSION_DENIED - if the user is not authorized to write to -// project - INVALID_ARGUMENT - if the request is malformed - -// FAILED_PRECONDITION - if the step is too large (more than 10Mib) - -// NOT_FOUND - if the containing Execution does not exist -func (r *ProjectsHistoriesExecutionsStepsService) Create(projectId string, historyId string, executionId string, step *Step) *ProjectsHistoriesExecutionsStepsCreateCall { - c := &ProjectsHistoriesExecutionsStepsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.projectId = projectId - c.historyId = historyId - c.executionId = executionId - c.step = step - return c -} - -// RequestId sets the optional parameter "requestId": A unique request -// ID for server to detect duplicated requests. For example, a -// UUID. -// -// Optional, but strongly recommended. -func (c *ProjectsHistoriesExecutionsStepsCreateCall) RequestId(requestId string) *ProjectsHistoriesExecutionsStepsCreateCall { - c.urlParams_.Set("requestId", requestId) - 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 *ProjectsHistoriesExecutionsStepsCreateCall) Fields(s ...googleapi.Field) *ProjectsHistoriesExecutionsStepsCreateCall { - 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 *ProjectsHistoriesExecutionsStepsCreateCall) Context(ctx context.Context) *ProjectsHistoriesExecutionsStepsCreateCall { - 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 *ProjectsHistoriesExecutionsStepsCreateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsHistoriesExecutionsStepsCreateCall) 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.step) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{projectId}/histories/{historyId}/executions/{executionId}/steps") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "projectId": c.projectId, - "historyId": c.historyId, - "executionId": c.executionId, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "toolresults.projects.histories.executions.steps.create" call. -// Exactly one of *Step or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Step.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 *ProjectsHistoriesExecutionsStepsCreateCall) Do(opts ...googleapi.CallOption) (*Step, 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 := &Step{ - 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": "Creates a Step.\n\nThe returned Step will have the id set.\n\nMay return any of the following canonical error codes:\n\n- PERMISSION_DENIED - if the user is not authorized to write to project - INVALID_ARGUMENT - if the request is malformed - FAILED_PRECONDITION - if the step is too large (more than 10Mib) - NOT_FOUND - if the containing Execution does not exist", - // "httpMethod": "POST", - // "id": "toolresults.projects.histories.executions.steps.create", - // "parameterOrder": [ - // "projectId", - // "historyId", - // "executionId" - // ], - // "parameters": { - // "executionId": { - // "description": "A Execution id.\n\nRequired.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "historyId": { - // "description": "A History id.\n\nRequired.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "projectId": { - // "description": "A Project id.\n\nRequired.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "A unique request ID for server to detect duplicated requests. For example, a UUID.\n\nOptional, but strongly recommended.", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{projectId}/histories/{historyId}/executions/{executionId}/steps", - // "request": { - // "$ref": "Step" - // }, - // "response": { - // "$ref": "Step" - // } - // } - -} - -// method id "toolresults.projects.histories.executions.steps.get": - -type ProjectsHistoriesExecutionsStepsGetCall struct { - s *Service - projectId string - historyId string - executionId string - stepId string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Gets a Step. -// -// May return any of the following canonical error codes: -// -// - PERMISSION_DENIED - if the user is not authorized to read project - -// INVALID_ARGUMENT - if the request is malformed - NOT_FOUND - if the -// Step does not exist -func (r *ProjectsHistoriesExecutionsStepsService) Get(projectId string, historyId string, executionId string, stepId string) *ProjectsHistoriesExecutionsStepsGetCall { - c := &ProjectsHistoriesExecutionsStepsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.projectId = projectId - c.historyId = historyId - c.executionId = executionId - c.stepId = stepId - 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 *ProjectsHistoriesExecutionsStepsGetCall) Fields(s ...googleapi.Field) *ProjectsHistoriesExecutionsStepsGetCall { - 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 *ProjectsHistoriesExecutionsStepsGetCall) IfNoneMatch(entityTag string) *ProjectsHistoriesExecutionsStepsGetCall { - 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 *ProjectsHistoriesExecutionsStepsGetCall) Context(ctx context.Context) *ProjectsHistoriesExecutionsStepsGetCall { - 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 *ProjectsHistoriesExecutionsStepsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsHistoriesExecutionsStepsGetCall) 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, "{projectId}/histories/{historyId}/executions/{executionId}/steps/{stepId}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "projectId": c.projectId, - "historyId": c.historyId, - "executionId": c.executionId, - "stepId": c.stepId, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "toolresults.projects.histories.executions.steps.get" call. -// Exactly one of *Step or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Step.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 *ProjectsHistoriesExecutionsStepsGetCall) Do(opts ...googleapi.CallOption) (*Step, 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 := &Step{ - 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": "Gets a Step.\n\nMay return any of the following canonical error codes:\n\n- PERMISSION_DENIED - if the user is not authorized to read project - INVALID_ARGUMENT - if the request is malformed - NOT_FOUND - if the Step does not exist", - // "httpMethod": "GET", - // "id": "toolresults.projects.histories.executions.steps.get", - // "parameterOrder": [ - // "projectId", - // "historyId", - // "executionId", - // "stepId" - // ], - // "parameters": { - // "executionId": { - // "description": "A Execution id.\n\nRequired.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "historyId": { - // "description": "A History id.\n\nRequired.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "projectId": { - // "description": "A Project id.\n\nRequired.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "stepId": { - // "description": "A Step id.\n\nRequired.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{projectId}/histories/{historyId}/executions/{executionId}/steps/{stepId}", - // "response": { - // "$ref": "Step" - // } - // } - -} - -// method id "toolresults.projects.histories.executions.steps.getPerfMetricsSummary": - -type ProjectsHistoriesExecutionsStepsGetPerfMetricsSummaryCall struct { - s *Service - projectId string - historyId string - executionId string - stepId string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetPerfMetricsSummary: Retrieves a PerfMetricsSummary. -// -// May return any of the following error code(s): - NOT_FOUND - The -// specified PerfMetricsSummary does not exist -func (r *ProjectsHistoriesExecutionsStepsService) GetPerfMetricsSummary(projectId string, historyId string, executionId string, stepId string) *ProjectsHistoriesExecutionsStepsGetPerfMetricsSummaryCall { - c := &ProjectsHistoriesExecutionsStepsGetPerfMetricsSummaryCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.projectId = projectId - c.historyId = historyId - c.executionId = executionId - c.stepId = stepId - 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 *ProjectsHistoriesExecutionsStepsGetPerfMetricsSummaryCall) Fields(s ...googleapi.Field) *ProjectsHistoriesExecutionsStepsGetPerfMetricsSummaryCall { - 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 *ProjectsHistoriesExecutionsStepsGetPerfMetricsSummaryCall) IfNoneMatch(entityTag string) *ProjectsHistoriesExecutionsStepsGetPerfMetricsSummaryCall { - 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 *ProjectsHistoriesExecutionsStepsGetPerfMetricsSummaryCall) Context(ctx context.Context) *ProjectsHistoriesExecutionsStepsGetPerfMetricsSummaryCall { - 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 *ProjectsHistoriesExecutionsStepsGetPerfMetricsSummaryCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsHistoriesExecutionsStepsGetPerfMetricsSummaryCall) 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, "{projectId}/histories/{historyId}/executions/{executionId}/steps/{stepId}/perfMetricsSummary") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "projectId": c.projectId, - "historyId": c.historyId, - "executionId": c.executionId, - "stepId": c.stepId, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "toolresults.projects.histories.executions.steps.getPerfMetricsSummary" call. -// Exactly one of *PerfMetricsSummary or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *PerfMetricsSummary.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 *ProjectsHistoriesExecutionsStepsGetPerfMetricsSummaryCall) Do(opts ...googleapi.CallOption) (*PerfMetricsSummary, 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 := &PerfMetricsSummary{ - 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": "Retrieves a PerfMetricsSummary.\n\nMay return any of the following error code(s): - NOT_FOUND - The specified PerfMetricsSummary does not exist", - // "httpMethod": "GET", - // "id": "toolresults.projects.histories.executions.steps.getPerfMetricsSummary", - // "parameterOrder": [ - // "projectId", - // "historyId", - // "executionId", - // "stepId" - // ], - // "parameters": { - // "executionId": { - // "description": "A tool results execution ID.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "historyId": { - // "description": "A tool results history ID.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "projectId": { - // "description": "The cloud project", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "stepId": { - // "description": "A tool results step ID.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{projectId}/histories/{historyId}/executions/{executionId}/steps/{stepId}/perfMetricsSummary", - // "response": { - // "$ref": "PerfMetricsSummary" - // } - // } - -} - -// method id "toolresults.projects.histories.executions.steps.list": - -type ProjectsHistoriesExecutionsStepsListCall struct { - s *Service - projectId string - historyId string - executionId string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists Steps for a given Execution. -// -// The steps are sorted by creation_time in descending order. The -// step_id key will be used to order the steps with the same -// creation_time. -// -// May return any of the following canonical error codes: -// -// - PERMISSION_DENIED - if the user is not authorized to read project - -// INVALID_ARGUMENT - if the request is malformed - FAILED_PRECONDITION -// - if an argument in the request happens to be invalid; e.g. if an -// attempt is made to list the children of a nonexistent Step - -// NOT_FOUND - if the containing Execution does not exist -func (r *ProjectsHistoriesExecutionsStepsService) List(projectId string, historyId string, executionId string) *ProjectsHistoriesExecutionsStepsListCall { - c := &ProjectsHistoriesExecutionsStepsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.projectId = projectId - c.historyId = historyId - c.executionId = executionId - return c -} - -// PageSize sets the optional parameter "pageSize": The maximum number -// of Steps to fetch. -// -// Default value: 25. The server will use this default if the field is -// not set or has a value of 0. -func (c *ProjectsHistoriesExecutionsStepsListCall) PageSize(pageSize int64) *ProjectsHistoriesExecutionsStepsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": A continuation -// token to resume the query at the next item. -func (c *ProjectsHistoriesExecutionsStepsListCall) PageToken(pageToken string) *ProjectsHistoriesExecutionsStepsListCall { - 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 *ProjectsHistoriesExecutionsStepsListCall) Fields(s ...googleapi.Field) *ProjectsHistoriesExecutionsStepsListCall { - 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 *ProjectsHistoriesExecutionsStepsListCall) IfNoneMatch(entityTag string) *ProjectsHistoriesExecutionsStepsListCall { - 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 *ProjectsHistoriesExecutionsStepsListCall) Context(ctx context.Context) *ProjectsHistoriesExecutionsStepsListCall { - 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 *ProjectsHistoriesExecutionsStepsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsHistoriesExecutionsStepsListCall) 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, "{projectId}/histories/{historyId}/executions/{executionId}/steps") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "projectId": c.projectId, - "historyId": c.historyId, - "executionId": c.executionId, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "toolresults.projects.histories.executions.steps.list" call. -// Exactly one of *ListStepsResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *ListStepsResponse.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 *ProjectsHistoriesExecutionsStepsListCall) Do(opts ...googleapi.CallOption) (*ListStepsResponse, 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 := &ListStepsResponse{ - 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": "Lists Steps for a given Execution.\n\nThe steps are sorted by creation_time in descending order. The step_id key will be used to order the steps with the same creation_time.\n\nMay return any of the following canonical error codes:\n\n- PERMISSION_DENIED - if the user is not authorized to read project - INVALID_ARGUMENT - if the request is malformed - FAILED_PRECONDITION - if an argument in the request happens to be invalid; e.g. if an attempt is made to list the children of a nonexistent Step - NOT_FOUND - if the containing Execution does not exist", - // "httpMethod": "GET", - // "id": "toolresults.projects.histories.executions.steps.list", - // "parameterOrder": [ - // "projectId", - // "historyId", - // "executionId" - // ], - // "parameters": { - // "executionId": { - // "description": "A Execution id.\n\nRequired.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "historyId": { - // "description": "A History id.\n\nRequired.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "pageSize": { - // "description": "The maximum number of Steps to fetch.\n\nDefault value: 25. The server will use this default if the field is not set or has a value of 0.\n\nOptional.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "A continuation token to resume the query at the next item.\n\nOptional.", - // "location": "query", - // "type": "string" - // }, - // "projectId": { - // "description": "A Project id.\n\nRequired.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{projectId}/histories/{historyId}/executions/{executionId}/steps", - // "response": { - // "$ref": "ListStepsResponse" - // } - // } - -} - -// 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 *ProjectsHistoriesExecutionsStepsListCall) Pages(ctx context.Context, f func(*ListStepsResponse) 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 "toolresults.projects.histories.executions.steps.patch": - -type ProjectsHistoriesExecutionsStepsPatchCall struct { - s *Service - projectId string - historyId string - executionId string - stepId string - step *Step - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Updates an existing Step with the supplied partial -// entity. -// -// May return any of the following canonical error codes: -// -// - PERMISSION_DENIED - if the user is not authorized to write project -// - INVALID_ARGUMENT - if the request is malformed - -// FAILED_PRECONDITION - if the requested state transition is illegal -// (e.g try to upload a duplicate xml file), if the updated step is too -// large (more than 10Mib) - NOT_FOUND - if the containing Execution -// does not exist -func (r *ProjectsHistoriesExecutionsStepsService) Patch(projectId string, historyId string, executionId string, stepId string, step *Step) *ProjectsHistoriesExecutionsStepsPatchCall { - c := &ProjectsHistoriesExecutionsStepsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.projectId = projectId - c.historyId = historyId - c.executionId = executionId - c.stepId = stepId - c.step = step - return c -} - -// RequestId sets the optional parameter "requestId": A unique request -// ID for server to detect duplicated requests. For example, a -// UUID. -// -// Optional, but strongly recommended. -func (c *ProjectsHistoriesExecutionsStepsPatchCall) RequestId(requestId string) *ProjectsHistoriesExecutionsStepsPatchCall { - c.urlParams_.Set("requestId", requestId) - 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 *ProjectsHistoriesExecutionsStepsPatchCall) Fields(s ...googleapi.Field) *ProjectsHistoriesExecutionsStepsPatchCall { - 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 *ProjectsHistoriesExecutionsStepsPatchCall) Context(ctx context.Context) *ProjectsHistoriesExecutionsStepsPatchCall { - 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 *ProjectsHistoriesExecutionsStepsPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsHistoriesExecutionsStepsPatchCall) 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.step) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{projectId}/histories/{historyId}/executions/{executionId}/steps/{stepId}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("PATCH", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "projectId": c.projectId, - "historyId": c.historyId, - "executionId": c.executionId, - "stepId": c.stepId, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "toolresults.projects.histories.executions.steps.patch" call. -// Exactly one of *Step or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Step.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 *ProjectsHistoriesExecutionsStepsPatchCall) Do(opts ...googleapi.CallOption) (*Step, 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 := &Step{ - 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": "Updates an existing Step with the supplied partial entity.\n\nMay return any of the following canonical error codes:\n\n- PERMISSION_DENIED - if the user is not authorized to write project - INVALID_ARGUMENT - if the request is malformed - FAILED_PRECONDITION - if the requested state transition is illegal (e.g try to upload a duplicate xml file), if the updated step is too large (more than 10Mib) - NOT_FOUND - if the containing Execution does not exist", - // "httpMethod": "PATCH", - // "id": "toolresults.projects.histories.executions.steps.patch", - // "parameterOrder": [ - // "projectId", - // "historyId", - // "executionId", - // "stepId" - // ], - // "parameters": { - // "executionId": { - // "description": "A Execution id.\n\nRequired.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "historyId": { - // "description": "A History id.\n\nRequired.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "projectId": { - // "description": "A Project id.\n\nRequired.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "A unique request ID for server to detect duplicated requests. For example, a UUID.\n\nOptional, but strongly recommended.", - // "location": "query", - // "type": "string" - // }, - // "stepId": { - // "description": "A Step id.\n\nRequired.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{projectId}/histories/{historyId}/executions/{executionId}/steps/{stepId}", - // "request": { - // "$ref": "Step" - // }, - // "response": { - // "$ref": "Step" - // } - // } - -} - -// method id "toolresults.projects.histories.executions.steps.publishXunitXmlFiles": - -type ProjectsHistoriesExecutionsStepsPublishXunitXmlFilesCall struct { - s *Service - projectId string - historyId string - executionId string - stepId string - publishxunitxmlfilesrequest *PublishXunitXmlFilesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// PublishXunitXmlFiles: Publish xml files to an existing Step. -// -// May return any of the following canonical error codes: -// -// - PERMISSION_DENIED - if the user is not authorized to write project -// - INVALID_ARGUMENT - if the request is malformed - -// FAILED_PRECONDITION - if the requested state transition is illegal, -// e.g try to upload a duplicate xml file or a file too large. - -// NOT_FOUND - if the containing Execution does not exist -func (r *ProjectsHistoriesExecutionsStepsService) PublishXunitXmlFiles(projectId string, historyId string, executionId string, stepId string, publishxunitxmlfilesrequest *PublishXunitXmlFilesRequest) *ProjectsHistoriesExecutionsStepsPublishXunitXmlFilesCall { - c := &ProjectsHistoriesExecutionsStepsPublishXunitXmlFilesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.projectId = projectId - c.historyId = historyId - c.executionId = executionId - c.stepId = stepId - c.publishxunitxmlfilesrequest = publishxunitxmlfilesrequest - 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 *ProjectsHistoriesExecutionsStepsPublishXunitXmlFilesCall) Fields(s ...googleapi.Field) *ProjectsHistoriesExecutionsStepsPublishXunitXmlFilesCall { - 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 *ProjectsHistoriesExecutionsStepsPublishXunitXmlFilesCall) Context(ctx context.Context) *ProjectsHistoriesExecutionsStepsPublishXunitXmlFilesCall { - 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 *ProjectsHistoriesExecutionsStepsPublishXunitXmlFilesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsHistoriesExecutionsStepsPublishXunitXmlFilesCall) 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.publishxunitxmlfilesrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{projectId}/histories/{historyId}/executions/{executionId}/steps/{stepId}:publishXunitXmlFiles") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "projectId": c.projectId, - "historyId": c.historyId, - "executionId": c.executionId, - "stepId": c.stepId, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "toolresults.projects.histories.executions.steps.publishXunitXmlFiles" call. -// Exactly one of *Step or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Step.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 *ProjectsHistoriesExecutionsStepsPublishXunitXmlFilesCall) Do(opts ...googleapi.CallOption) (*Step, 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 := &Step{ - 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": "Publish xml files to an existing Step.\n\nMay return any of the following canonical error codes:\n\n- PERMISSION_DENIED - if the user is not authorized to write project - INVALID_ARGUMENT - if the request is malformed - FAILED_PRECONDITION - if the requested state transition is illegal, e.g try to upload a duplicate xml file or a file too large. - NOT_FOUND - if the containing Execution does not exist", - // "httpMethod": "POST", - // "id": "toolresults.projects.histories.executions.steps.publishXunitXmlFiles", - // "parameterOrder": [ - // "projectId", - // "historyId", - // "executionId", - // "stepId" - // ], - // "parameters": { - // "executionId": { - // "description": "A Execution id.\n\nRequired.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "historyId": { - // "description": "A History id.\n\nRequired.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "projectId": { - // "description": "A Project id.\n\nRequired.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "stepId": { - // "description": "A Step id. Note: This step must include a TestExecutionStep.\n\nRequired.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{projectId}/histories/{historyId}/executions/{executionId}/steps/{stepId}:publishXunitXmlFiles", - // "request": { - // "$ref": "PublishXunitXmlFilesRequest" - // }, - // "response": { - // "$ref": "Step" - // } - // } - -} - -// method id "toolresults.projects.histories.executions.steps.perfMetricsSummary.create": - -type ProjectsHistoriesExecutionsStepsPerfMetricsSummaryCreateCall struct { - s *Service - projectId string - historyId string - executionId string - stepId string - perfmetricssummary *PerfMetricsSummary - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Create: Creates a PerfMetricsSummary resource. Returns the existing -// one if it has already been created. -// -// May return any of the following error code(s): - NOT_FOUND - The -// containing Step does not exist -func (r *ProjectsHistoriesExecutionsStepsPerfMetricsSummaryService) Create(projectId string, historyId string, executionId string, stepId string, perfmetricssummary *PerfMetricsSummary) *ProjectsHistoriesExecutionsStepsPerfMetricsSummaryCreateCall { - c := &ProjectsHistoriesExecutionsStepsPerfMetricsSummaryCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.projectId = projectId - c.historyId = historyId - c.executionId = executionId - c.stepId = stepId - c.perfmetricssummary = perfmetricssummary - 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 *ProjectsHistoriesExecutionsStepsPerfMetricsSummaryCreateCall) Fields(s ...googleapi.Field) *ProjectsHistoriesExecutionsStepsPerfMetricsSummaryCreateCall { - 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 *ProjectsHistoriesExecutionsStepsPerfMetricsSummaryCreateCall) Context(ctx context.Context) *ProjectsHistoriesExecutionsStepsPerfMetricsSummaryCreateCall { - 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 *ProjectsHistoriesExecutionsStepsPerfMetricsSummaryCreateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsHistoriesExecutionsStepsPerfMetricsSummaryCreateCall) 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.perfmetricssummary) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{projectId}/histories/{historyId}/executions/{executionId}/steps/{stepId}/perfMetricsSummary") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "projectId": c.projectId, - "historyId": c.historyId, - "executionId": c.executionId, - "stepId": c.stepId, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "toolresults.projects.histories.executions.steps.perfMetricsSummary.create" call. -// Exactly one of *PerfMetricsSummary or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *PerfMetricsSummary.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 *ProjectsHistoriesExecutionsStepsPerfMetricsSummaryCreateCall) Do(opts ...googleapi.CallOption) (*PerfMetricsSummary, 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 := &PerfMetricsSummary{ - 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": "Creates a PerfMetricsSummary resource. Returns the existing one if it has already been created.\n\nMay return any of the following error code(s): - NOT_FOUND - The containing Step does not exist", - // "httpMethod": "POST", - // "id": "toolresults.projects.histories.executions.steps.perfMetricsSummary.create", - // "parameterOrder": [ - // "projectId", - // "historyId", - // "executionId", - // "stepId" - // ], - // "parameters": { - // "executionId": { - // "description": "A tool results execution ID.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "historyId": { - // "description": "A tool results history ID.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "projectId": { - // "description": "The cloud project", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "stepId": { - // "description": "A tool results step ID.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{projectId}/histories/{historyId}/executions/{executionId}/steps/{stepId}/perfMetricsSummary", - // "request": { - // "$ref": "PerfMetricsSummary" - // }, - // "response": { - // "$ref": "PerfMetricsSummary" - // } - // } - -} - -// method id "toolresults.projects.histories.executions.steps.perfSampleSeries.create": - -type ProjectsHistoriesExecutionsStepsPerfSampleSeriesCreateCall struct { - s *Service - projectId string - historyId string - executionId string - stepId string - perfsampleseries *PerfSampleSeries - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Create: Creates a PerfSampleSeries. -// -// May return any of the following error code(s): - ALREADY_EXISTS - -// PerfMetricSummary already exists for the given Step - NOT_FOUND - The -// containing Step does not exist -func (r *ProjectsHistoriesExecutionsStepsPerfSampleSeriesService) Create(projectId string, historyId string, executionId string, stepId string, perfsampleseries *PerfSampleSeries) *ProjectsHistoriesExecutionsStepsPerfSampleSeriesCreateCall { - c := &ProjectsHistoriesExecutionsStepsPerfSampleSeriesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.projectId = projectId - c.historyId = historyId - c.executionId = executionId - c.stepId = stepId - c.perfsampleseries = perfsampleseries - 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 *ProjectsHistoriesExecutionsStepsPerfSampleSeriesCreateCall) Fields(s ...googleapi.Field) *ProjectsHistoriesExecutionsStepsPerfSampleSeriesCreateCall { - 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 *ProjectsHistoriesExecutionsStepsPerfSampleSeriesCreateCall) Context(ctx context.Context) *ProjectsHistoriesExecutionsStepsPerfSampleSeriesCreateCall { - 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 *ProjectsHistoriesExecutionsStepsPerfSampleSeriesCreateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsHistoriesExecutionsStepsPerfSampleSeriesCreateCall) 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.perfsampleseries) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{projectId}/histories/{historyId}/executions/{executionId}/steps/{stepId}/perfSampleSeries") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "projectId": c.projectId, - "historyId": c.historyId, - "executionId": c.executionId, - "stepId": c.stepId, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "toolresults.projects.histories.executions.steps.perfSampleSeries.create" call. -// Exactly one of *PerfSampleSeries or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *PerfSampleSeries.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 *ProjectsHistoriesExecutionsStepsPerfSampleSeriesCreateCall) Do(opts ...googleapi.CallOption) (*PerfSampleSeries, 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 := &PerfSampleSeries{ - 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": "Creates a PerfSampleSeries.\n\nMay return any of the following error code(s): - ALREADY_EXISTS - PerfMetricSummary already exists for the given Step - NOT_FOUND - The containing Step does not exist", - // "httpMethod": "POST", - // "id": "toolresults.projects.histories.executions.steps.perfSampleSeries.create", - // "parameterOrder": [ - // "projectId", - // "historyId", - // "executionId", - // "stepId" - // ], - // "parameters": { - // "executionId": { - // "description": "A tool results execution ID.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "historyId": { - // "description": "A tool results history ID.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "projectId": { - // "description": "The cloud project", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "stepId": { - // "description": "A tool results step ID.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{projectId}/histories/{historyId}/executions/{executionId}/steps/{stepId}/perfSampleSeries", - // "request": { - // "$ref": "PerfSampleSeries" - // }, - // "response": { - // "$ref": "PerfSampleSeries" - // } - // } - -} - -// method id "toolresults.projects.histories.executions.steps.perfSampleSeries.get": - -type ProjectsHistoriesExecutionsStepsPerfSampleSeriesGetCall struct { - s *Service - projectId string - historyId string - executionId string - stepId string - sampleSeriesId string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Gets a PerfSampleSeries. -// -// May return any of the following error code(s): - NOT_FOUND - The -// specified PerfSampleSeries does not exist -func (r *ProjectsHistoriesExecutionsStepsPerfSampleSeriesService) Get(projectId string, historyId string, executionId string, stepId string, sampleSeriesId string) *ProjectsHistoriesExecutionsStepsPerfSampleSeriesGetCall { - c := &ProjectsHistoriesExecutionsStepsPerfSampleSeriesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.projectId = projectId - c.historyId = historyId - c.executionId = executionId - c.stepId = stepId - c.sampleSeriesId = sampleSeriesId - 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 *ProjectsHistoriesExecutionsStepsPerfSampleSeriesGetCall) Fields(s ...googleapi.Field) *ProjectsHistoriesExecutionsStepsPerfSampleSeriesGetCall { - 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 *ProjectsHistoriesExecutionsStepsPerfSampleSeriesGetCall) IfNoneMatch(entityTag string) *ProjectsHistoriesExecutionsStepsPerfSampleSeriesGetCall { - 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 *ProjectsHistoriesExecutionsStepsPerfSampleSeriesGetCall) Context(ctx context.Context) *ProjectsHistoriesExecutionsStepsPerfSampleSeriesGetCall { - 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 *ProjectsHistoriesExecutionsStepsPerfSampleSeriesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsHistoriesExecutionsStepsPerfSampleSeriesGetCall) 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, "{projectId}/histories/{historyId}/executions/{executionId}/steps/{stepId}/perfSampleSeries/{sampleSeriesId}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "projectId": c.projectId, - "historyId": c.historyId, - "executionId": c.executionId, - "stepId": c.stepId, - "sampleSeriesId": c.sampleSeriesId, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "toolresults.projects.histories.executions.steps.perfSampleSeries.get" call. -// Exactly one of *PerfSampleSeries or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *PerfSampleSeries.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 *ProjectsHistoriesExecutionsStepsPerfSampleSeriesGetCall) Do(opts ...googleapi.CallOption) (*PerfSampleSeries, 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 := &PerfSampleSeries{ - 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": "Gets a PerfSampleSeries.\n\nMay return any of the following error code(s): - NOT_FOUND - The specified PerfSampleSeries does not exist", - // "httpMethod": "GET", - // "id": "toolresults.projects.histories.executions.steps.perfSampleSeries.get", - // "parameterOrder": [ - // "projectId", - // "historyId", - // "executionId", - // "stepId", - // "sampleSeriesId" - // ], - // "parameters": { - // "executionId": { - // "description": "A tool results execution ID.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "historyId": { - // "description": "A tool results history ID.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "projectId": { - // "description": "The cloud project", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "sampleSeriesId": { - // "description": "A sample series id", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "stepId": { - // "description": "A tool results step ID.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{projectId}/histories/{historyId}/executions/{executionId}/steps/{stepId}/perfSampleSeries/{sampleSeriesId}", - // "response": { - // "$ref": "PerfSampleSeries" - // } - // } - -} - -// method id "toolresults.projects.histories.executions.steps.perfSampleSeries.list": - -type ProjectsHistoriesExecutionsStepsPerfSampleSeriesListCall struct { - s *Service - projectId string - historyId string - executionId string - stepId string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists PerfSampleSeries for a given Step. -// -// The request provides an optional filter which specifies one or more -// PerfMetricsType to include in the result; if none returns all. The -// resulting PerfSampleSeries are sorted by ids. -// -// May return any of the following canonical error codes: - NOT_FOUND - -// The containing Step does not exist -func (r *ProjectsHistoriesExecutionsStepsPerfSampleSeriesService) List(projectId string, historyId string, executionId string, stepId string) *ProjectsHistoriesExecutionsStepsPerfSampleSeriesListCall { - c := &ProjectsHistoriesExecutionsStepsPerfSampleSeriesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.projectId = projectId - c.historyId = historyId - c.executionId = executionId - c.stepId = stepId - return c -} - -// Filter sets the optional parameter "filter": Specify one or more -// PerfMetricType values such as CPU to filter the result -// -// Possible values: -// "cpu" -// "graphics" -// "memory" -// "network" -// "perfMetricTypeUnspecified" -func (c *ProjectsHistoriesExecutionsStepsPerfSampleSeriesListCall) Filter(filter ...string) *ProjectsHistoriesExecutionsStepsPerfSampleSeriesListCall { - c.urlParams_.SetMulti("filter", append([]string{}, filter...)) - 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 *ProjectsHistoriesExecutionsStepsPerfSampleSeriesListCall) Fields(s ...googleapi.Field) *ProjectsHistoriesExecutionsStepsPerfSampleSeriesListCall { - 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 *ProjectsHistoriesExecutionsStepsPerfSampleSeriesListCall) IfNoneMatch(entityTag string) *ProjectsHistoriesExecutionsStepsPerfSampleSeriesListCall { - 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 *ProjectsHistoriesExecutionsStepsPerfSampleSeriesListCall) Context(ctx context.Context) *ProjectsHistoriesExecutionsStepsPerfSampleSeriesListCall { - 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 *ProjectsHistoriesExecutionsStepsPerfSampleSeriesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsHistoriesExecutionsStepsPerfSampleSeriesListCall) 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, "{projectId}/histories/{historyId}/executions/{executionId}/steps/{stepId}/perfSampleSeries") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "projectId": c.projectId, - "historyId": c.historyId, - "executionId": c.executionId, - "stepId": c.stepId, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "toolresults.projects.histories.executions.steps.perfSampleSeries.list" call. -// Exactly one of *ListPerfSampleSeriesResponse or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *ListPerfSampleSeriesResponse.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 *ProjectsHistoriesExecutionsStepsPerfSampleSeriesListCall) Do(opts ...googleapi.CallOption) (*ListPerfSampleSeriesResponse, 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 := &ListPerfSampleSeriesResponse{ - 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": "Lists PerfSampleSeries for a given Step.\n\nThe request provides an optional filter which specifies one or more PerfMetricsType to include in the result; if none returns all. The resulting PerfSampleSeries are sorted by ids.\n\nMay return any of the following canonical error codes: - NOT_FOUND - The containing Step does not exist", - // "httpMethod": "GET", - // "id": "toolresults.projects.histories.executions.steps.perfSampleSeries.list", - // "parameterOrder": [ - // "projectId", - // "historyId", - // "executionId", - // "stepId" - // ], - // "parameters": { - // "executionId": { - // "description": "A tool results execution ID.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "filter": { - // "description": "Specify one or more PerfMetricType values such as CPU to filter the result", - // "enum": [ - // "cpu", - // "graphics", - // "memory", - // "network", - // "perfMetricTypeUnspecified" - // ], - // "enumDescriptions": [ - // "", - // "", - // "", - // "", - // "" - // ], - // "location": "query", - // "repeated": true, - // "type": "string" - // }, - // "historyId": { - // "description": "A tool results history ID.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "projectId": { - // "description": "The cloud project", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "stepId": { - // "description": "A tool results step ID.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{projectId}/histories/{historyId}/executions/{executionId}/steps/{stepId}/perfSampleSeries", - // "response": { - // "$ref": "ListPerfSampleSeriesResponse" - // } - // } - -} - -// method id "toolresults.projects.histories.executions.steps.perfSampleSeries.samples.batchCreate": - -type ProjectsHistoriesExecutionsStepsPerfSampleSeriesSamplesBatchCreateCall struct { - s *Service - projectId string - historyId string - executionId string - stepId string - sampleSeriesId string - batchcreateperfsamplesrequest *BatchCreatePerfSamplesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// BatchCreate: Creates a batch of PerfSamples - a client can submit -// multiple batches of Perf Samples through repeated calls to this -// method in order to split up a large request payload - duplicates and -// existing timestamp entries will be ignored. - the batch operation may -// partially succeed - the set of elements successfully inserted is -// returned in the response (omits items which already existed in the -// database). -// -// May return any of the following canonical error codes: - NOT_FOUND - -// The containing PerfSampleSeries does not exist -func (r *ProjectsHistoriesExecutionsStepsPerfSampleSeriesSamplesService) BatchCreate(projectId string, historyId string, executionId string, stepId string, sampleSeriesId string, batchcreateperfsamplesrequest *BatchCreatePerfSamplesRequest) *ProjectsHistoriesExecutionsStepsPerfSampleSeriesSamplesBatchCreateCall { - c := &ProjectsHistoriesExecutionsStepsPerfSampleSeriesSamplesBatchCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.projectId = projectId - c.historyId = historyId - c.executionId = executionId - c.stepId = stepId - c.sampleSeriesId = sampleSeriesId - c.batchcreateperfsamplesrequest = batchcreateperfsamplesrequest - 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 *ProjectsHistoriesExecutionsStepsPerfSampleSeriesSamplesBatchCreateCall) Fields(s ...googleapi.Field) *ProjectsHistoriesExecutionsStepsPerfSampleSeriesSamplesBatchCreateCall { - 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 *ProjectsHistoriesExecutionsStepsPerfSampleSeriesSamplesBatchCreateCall) Context(ctx context.Context) *ProjectsHistoriesExecutionsStepsPerfSampleSeriesSamplesBatchCreateCall { - 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 *ProjectsHistoriesExecutionsStepsPerfSampleSeriesSamplesBatchCreateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsHistoriesExecutionsStepsPerfSampleSeriesSamplesBatchCreateCall) 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.batchcreateperfsamplesrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{projectId}/histories/{historyId}/executions/{executionId}/steps/{stepId}/perfSampleSeries/{sampleSeriesId}/samples:batchCreate") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "projectId": c.projectId, - "historyId": c.historyId, - "executionId": c.executionId, - "stepId": c.stepId, - "sampleSeriesId": c.sampleSeriesId, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "toolresults.projects.histories.executions.steps.perfSampleSeries.samples.batchCreate" call. -// Exactly one of *BatchCreatePerfSamplesResponse or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *BatchCreatePerfSamplesResponse.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 *ProjectsHistoriesExecutionsStepsPerfSampleSeriesSamplesBatchCreateCall) Do(opts ...googleapi.CallOption) (*BatchCreatePerfSamplesResponse, 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 := &BatchCreatePerfSamplesResponse{ - 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": "Creates a batch of PerfSamples - a client can submit multiple batches of Perf Samples through repeated calls to this method in order to split up a large request payload - duplicates and existing timestamp entries will be ignored. - the batch operation may partially succeed - the set of elements successfully inserted is returned in the response (omits items which already existed in the database).\n\nMay return any of the following canonical error codes: - NOT_FOUND - The containing PerfSampleSeries does not exist", - // "httpMethod": "POST", - // "id": "toolresults.projects.histories.executions.steps.perfSampleSeries.samples.batchCreate", - // "parameterOrder": [ - // "projectId", - // "historyId", - // "executionId", - // "stepId", - // "sampleSeriesId" - // ], - // "parameters": { - // "executionId": { - // "description": "A tool results execution ID.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "historyId": { - // "description": "A tool results history ID.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "projectId": { - // "description": "The cloud project", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "sampleSeriesId": { - // "description": "A sample series id", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "stepId": { - // "description": "A tool results step ID.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{projectId}/histories/{historyId}/executions/{executionId}/steps/{stepId}/perfSampleSeries/{sampleSeriesId}/samples:batchCreate", - // "request": { - // "$ref": "BatchCreatePerfSamplesRequest" - // }, - // "response": { - // "$ref": "BatchCreatePerfSamplesResponse" - // } - // } - -} - -// method id "toolresults.projects.histories.executions.steps.perfSampleSeries.samples.list": - -type ProjectsHistoriesExecutionsStepsPerfSampleSeriesSamplesListCall struct { - s *Service - projectId string - historyId string - executionId string - stepId string - sampleSeriesId string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists the Performance Samples of a given Sample Series - The -// list results are sorted by timestamps ascending - The default page -// size is 500 samples; and maximum size allowed 5000 - The response -// token indicates the last returned PerfSample timestamp - When the -// results size exceeds the page size, submit a subsequent request -// including the page token to return the rest of the samples up to the -// page limit -// -// May return any of the following canonical error codes: - OUT_OF_RANGE -// - The specified request page_token is out of valid range - NOT_FOUND -// - The containing PerfSampleSeries does not exist -func (r *ProjectsHistoriesExecutionsStepsPerfSampleSeriesSamplesService) List(projectId string, historyId string, executionId string, stepId string, sampleSeriesId string) *ProjectsHistoriesExecutionsStepsPerfSampleSeriesSamplesListCall { - c := &ProjectsHistoriesExecutionsStepsPerfSampleSeriesSamplesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.projectId = projectId - c.historyId = historyId - c.executionId = executionId - c.stepId = stepId - c.sampleSeriesId = sampleSeriesId - return c -} - -// PageSize sets the optional parameter "pageSize": The default page -// size is 500 samples, and the maximum size is 5000. If the page_size -// is greater than 5000, the effective page size will be 5000 -func (c *ProjectsHistoriesExecutionsStepsPerfSampleSeriesSamplesListCall) PageSize(pageSize int64) *ProjectsHistoriesExecutionsStepsPerfSampleSeriesSamplesListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": Optional, the -// next_page_token returned in the previous response -func (c *ProjectsHistoriesExecutionsStepsPerfSampleSeriesSamplesListCall) PageToken(pageToken string) *ProjectsHistoriesExecutionsStepsPerfSampleSeriesSamplesListCall { - 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 *ProjectsHistoriesExecutionsStepsPerfSampleSeriesSamplesListCall) Fields(s ...googleapi.Field) *ProjectsHistoriesExecutionsStepsPerfSampleSeriesSamplesListCall { - 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 *ProjectsHistoriesExecutionsStepsPerfSampleSeriesSamplesListCall) IfNoneMatch(entityTag string) *ProjectsHistoriesExecutionsStepsPerfSampleSeriesSamplesListCall { - 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 *ProjectsHistoriesExecutionsStepsPerfSampleSeriesSamplesListCall) Context(ctx context.Context) *ProjectsHistoriesExecutionsStepsPerfSampleSeriesSamplesListCall { - 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 *ProjectsHistoriesExecutionsStepsPerfSampleSeriesSamplesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsHistoriesExecutionsStepsPerfSampleSeriesSamplesListCall) 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, "{projectId}/histories/{historyId}/executions/{executionId}/steps/{stepId}/perfSampleSeries/{sampleSeriesId}/samples") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "projectId": c.projectId, - "historyId": c.historyId, - "executionId": c.executionId, - "stepId": c.stepId, - "sampleSeriesId": c.sampleSeriesId, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "toolresults.projects.histories.executions.steps.perfSampleSeries.samples.list" call. -// Exactly one of *ListPerfSamplesResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *ListPerfSamplesResponse.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 *ProjectsHistoriesExecutionsStepsPerfSampleSeriesSamplesListCall) Do(opts ...googleapi.CallOption) (*ListPerfSamplesResponse, 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 := &ListPerfSamplesResponse{ - 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": "Lists the Performance Samples of a given Sample Series - The list results are sorted by timestamps ascending - The default page size is 500 samples; and maximum size allowed 5000 - The response token indicates the last returned PerfSample timestamp - When the results size exceeds the page size, submit a subsequent request including the page token to return the rest of the samples up to the page limit\n\nMay return any of the following canonical error codes: - OUT_OF_RANGE - The specified request page_token is out of valid range - NOT_FOUND - The containing PerfSampleSeries does not exist", - // "httpMethod": "GET", - // "id": "toolresults.projects.histories.executions.steps.perfSampleSeries.samples.list", - // "parameterOrder": [ - // "projectId", - // "historyId", - // "executionId", - // "stepId", - // "sampleSeriesId" - // ], - // "parameters": { - // "executionId": { - // "description": "A tool results execution ID.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "historyId": { - // "description": "A tool results history ID.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "pageSize": { - // "description": "The default page size is 500 samples, and the maximum size is 5000. If the page_size is greater than 5000, the effective page size will be 5000", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "Optional, the next_page_token returned in the previous response", - // "location": "query", - // "type": "string" - // }, - // "projectId": { - // "description": "The cloud project", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "sampleSeriesId": { - // "description": "A sample series id", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "stepId": { - // "description": "A tool results step ID.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{projectId}/histories/{historyId}/executions/{executionId}/steps/{stepId}/perfSampleSeries/{sampleSeriesId}/samples", - // "response": { - // "$ref": "ListPerfSamplesResponse" - // } - // } - -} - -// 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 *ProjectsHistoriesExecutionsStepsPerfSampleSeriesSamplesListCall) Pages(ctx context.Context, f func(*ListPerfSamplesResponse) 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 "toolresults.projects.histories.executions.steps.thumbnails.list": - -type ProjectsHistoriesExecutionsStepsThumbnailsListCall struct { - s *Service - projectId string - historyId string - executionId string - stepId string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists thumbnails of images attached to a step. -// -// May return any of the following canonical error codes: - -// PERMISSION_DENIED - if the user is not authorized to read from the -// project, or from any of the images - INVALID_ARGUMENT - if the -// request is malformed - NOT_FOUND - if the step does not exist, or if -// any of the images do not exist -func (r *ProjectsHistoriesExecutionsStepsThumbnailsService) List(projectId string, historyId string, executionId string, stepId string) *ProjectsHistoriesExecutionsStepsThumbnailsListCall { - c := &ProjectsHistoriesExecutionsStepsThumbnailsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.projectId = projectId - c.historyId = historyId - c.executionId = executionId - c.stepId = stepId - return c -} - -// PageSize sets the optional parameter "pageSize": The maximum number -// of thumbnails to fetch. -// -// Default value: 50. The server will use this default if the field is -// not set or has a value of 0. -func (c *ProjectsHistoriesExecutionsStepsThumbnailsListCall) PageSize(pageSize int64) *ProjectsHistoriesExecutionsStepsThumbnailsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": A continuation -// token to resume the query at the next item. -func (c *ProjectsHistoriesExecutionsStepsThumbnailsListCall) PageToken(pageToken string) *ProjectsHistoriesExecutionsStepsThumbnailsListCall { - 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 *ProjectsHistoriesExecutionsStepsThumbnailsListCall) Fields(s ...googleapi.Field) *ProjectsHistoriesExecutionsStepsThumbnailsListCall { - 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 *ProjectsHistoriesExecutionsStepsThumbnailsListCall) IfNoneMatch(entityTag string) *ProjectsHistoriesExecutionsStepsThumbnailsListCall { - 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 *ProjectsHistoriesExecutionsStepsThumbnailsListCall) Context(ctx context.Context) *ProjectsHistoriesExecutionsStepsThumbnailsListCall { - 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 *ProjectsHistoriesExecutionsStepsThumbnailsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsHistoriesExecutionsStepsThumbnailsListCall) 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, "{projectId}/histories/{historyId}/executions/{executionId}/steps/{stepId}/thumbnails") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "projectId": c.projectId, - "historyId": c.historyId, - "executionId": c.executionId, - "stepId": c.stepId, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "toolresults.projects.histories.executions.steps.thumbnails.list" call. -// Exactly one of *ListStepThumbnailsResponse or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *ListStepThumbnailsResponse.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 *ProjectsHistoriesExecutionsStepsThumbnailsListCall) Do(opts ...googleapi.CallOption) (*ListStepThumbnailsResponse, 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 := &ListStepThumbnailsResponse{ - 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": "Lists thumbnails of images attached to a step.\n\nMay return any of the following canonical error codes: - PERMISSION_DENIED - if the user is not authorized to read from the project, or from any of the images - INVALID_ARGUMENT - if the request is malformed - NOT_FOUND - if the step does not exist, or if any of the images do not exist", - // "httpMethod": "GET", - // "id": "toolresults.projects.histories.executions.steps.thumbnails.list", - // "parameterOrder": [ - // "projectId", - // "historyId", - // "executionId", - // "stepId" - // ], - // "parameters": { - // "executionId": { - // "description": "An Execution id.\n\nRequired.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "historyId": { - // "description": "A History id.\n\nRequired.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "pageSize": { - // "description": "The maximum number of thumbnails to fetch.\n\nDefault value: 50. The server will use this default if the field is not set or has a value of 0.\n\nOptional.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "A continuation token to resume the query at the next item.\n\nOptional.", - // "location": "query", - // "type": "string" - // }, - // "projectId": { - // "description": "A Project id.\n\nRequired.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "stepId": { - // "description": "A Step id.\n\nRequired.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{projectId}/histories/{historyId}/executions/{executionId}/steps/{stepId}/thumbnails", - // "response": { - // "$ref": "ListStepThumbnailsResponse" - // } - // } - -} - -// 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 *ProjectsHistoriesExecutionsStepsThumbnailsListCall) Pages(ctx context.Context, f func(*ListStepThumbnailsResponse) 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) - } -}
diff --git a/videointelligence/v1beta1/videointelligence-api.json b/videointelligence/v1beta1/videointelligence-api.json deleted file mode 100644 index 3119540..0000000 --- a/videointelligence/v1beta1/videointelligence-api.json +++ /dev/null
@@ -1,1538 +0,0 @@ -{ - "auth": { - "oauth2": { - "scopes": { - "https://www.googleapis.com/auth/cloud-platform": { - "description": "View and manage your data across Google Cloud Platform services" - } - } - } - }, - "basePath": "", - "baseUrl": "https://videointelligence.googleapis.com/", - "batchPath": "batch", - "canonicalName": "Cloud Video Intelligence", - "description": "Cloud Video Intelligence API.", - "discoveryVersion": "v1", - "documentationLink": "https://cloud.google.com/video-intelligence/docs/", - "fullyEncodeReservedExpansion": true, - "icons": { - "x16": "http://www.google.com/images/icons/product/search-16.gif", - "x32": "http://www.google.com/images/icons/product/search-32.gif" - }, - "id": "videointelligence:v1beta1", - "kind": "discovery#restDescription", - "name": "videointelligence", - "ownerDomain": "google.com", - "ownerName": "Google", - "parameters": { - "$.xgafv": { - "description": "V1 error format.", - "enum": [ - "1", - "2" - ], - "enumDescriptions": [ - "v1 error format", - "v2 error format" - ], - "location": "query", - "type": "string" - }, - "access_token": { - "description": "OAuth access token.", - "location": "query", - "type": "string" - }, - "alt": { - "default": "json", - "description": "Data format for response.", - "enum": [ - "json", - "media", - "proto" - ], - "enumDescriptions": [ - "Responses with Content-Type of application/json", - "Media download with context-dependent Content-Type", - "Responses with Content-Type of application/x-protobuf" - ], - "location": "query", - "type": "string" - }, - "bearer_token": { - "description": "OAuth bearer token.", - "location": "query", - "type": "string" - }, - "callback": { - "description": "JSONP", - "location": "query", - "type": "string" - }, - "fields": { - "description": "Selector specifying which fields to include in a partial response.", - "location": "query", - "type": "string" - }, - "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" - }, - "oauth_token": { - "description": "OAuth 2.0 token for the current user.", - "location": "query", - "type": "string" - }, - "pp": { - "default": "true", - "description": "Pretty-print response.", - "location": "query", - "type": "boolean" - }, - "prettyPrint": { - "default": "true", - "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.", - "location": "query", - "type": "string" - }, - "uploadType": { - "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", - "location": "query", - "type": "string" - }, - "upload_protocol": { - "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", - "location": "query", - "type": "string" - } - }, - "protocol": "rest", - "resources": { - "videos": { - "methods": { - "annotate": { - "description": "Performs asynchronous video annotation. Progress and results can be\nretrieved through the `google.longrunning.Operations` interface.\n`Operation.metadata` contains `AnnotateVideoProgress` (progress).\n`Operation.response` contains `AnnotateVideoResponse` (results).", - "flatPath": "v1beta1/videos:annotate", - "httpMethod": "POST", - "id": "videointelligence.videos.annotate", - "parameterOrder": [], - "parameters": {}, - "path": "v1beta1/videos:annotate", - "request": { - "$ref": "GoogleCloudVideointelligenceV1beta1_AnnotateVideoRequest" - }, - "response": { - "$ref": "GoogleLongrunning_Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - } - } - }, - "revision": "20180502", - "rootUrl": "https://videointelligence.googleapis.com/", - "schemas": { - "GoogleCloudVideointelligenceV1_AnnotateVideoProgress": { - "description": "Video annotation progress. Included in the `metadata`\nfield of the `Operation` returned by the `GetOperation`\ncall of the `google::longrunning::Operations` service.", - "id": "GoogleCloudVideointelligenceV1_AnnotateVideoProgress", - "properties": { - "annotationProgress": { - "description": "Progress metadata for all videos specified in `AnnotateVideoRequest`.", - "items": { - "$ref": "GoogleCloudVideointelligenceV1_VideoAnnotationProgress" - }, - "type": "array" - } - }, - "type": "object" - }, - "GoogleCloudVideointelligenceV1_AnnotateVideoResponse": { - "description": "Video annotation response. Included in the `response`\nfield of the `Operation` returned by the `GetOperation`\ncall of the `google::longrunning::Operations` service.", - "id": "GoogleCloudVideointelligenceV1_AnnotateVideoResponse", - "properties": { - "annotationResults": { - "description": "Annotation results for all videos specified in `AnnotateVideoRequest`.", - "items": { - "$ref": "GoogleCloudVideointelligenceV1_VideoAnnotationResults" - }, - "type": "array" - } - }, - "type": "object" - }, - "GoogleCloudVideointelligenceV1_Entity": { - "description": "Detected entity from video analysis.", - "id": "GoogleCloudVideointelligenceV1_Entity", - "properties": { - "description": { - "description": "Textual description, e.g. `Fixed-gear bicycle`.", - "type": "string" - }, - "entityId": { - "description": "Opaque entity ID. Some IDs may be available in\n[Google Knowledge Graph Search\nAPI](https://developers.google.com/knowledge-graph/).", - "type": "string" - }, - "languageCode": { - "description": "Language code for `description` in BCP-47 format.", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudVideointelligenceV1_ExplicitContentAnnotation": { - "description": "Explicit content annotation (based on per-frame visual signals only).\nIf no explicit content has been detected in a frame, no annotations are\npresent for that frame.", - "id": "GoogleCloudVideointelligenceV1_ExplicitContentAnnotation", - "properties": { - "frames": { - "description": "All video frames where explicit content was detected.", - "items": { - "$ref": "GoogleCloudVideointelligenceV1_ExplicitContentFrame" - }, - "type": "array" - } - }, - "type": "object" - }, - "GoogleCloudVideointelligenceV1_ExplicitContentFrame": { - "description": "Video frame level annotation results for explicit content.", - "id": "GoogleCloudVideointelligenceV1_ExplicitContentFrame", - "properties": { - "pornographyLikelihood": { - "description": "Likelihood of the pornography content..", - "enum": [ - "LIKELIHOOD_UNSPECIFIED", - "VERY_UNLIKELY", - "UNLIKELY", - "POSSIBLE", - "LIKELY", - "VERY_LIKELY" - ], - "enumDescriptions": [ - "Unspecified likelihood.", - "Very unlikely.", - "Unlikely.", - "Possible.", - "Likely.", - "Very likely." - ], - "type": "string" - }, - "timeOffset": { - "description": "Time-offset, relative to the beginning of the video, corresponding to the\nvideo frame for this location.", - "format": "google-duration", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudVideointelligenceV1_LabelAnnotation": { - "description": "Label annotation.", - "id": "GoogleCloudVideointelligenceV1_LabelAnnotation", - "properties": { - "categoryEntities": { - "description": "Common categories for the detected entity.\nE.g. when the label is `Terrier` the category is likely `dog`. And in some\ncases there might be more than one categories e.g. `Terrier` could also be\na `pet`.", - "items": { - "$ref": "GoogleCloudVideointelligenceV1_Entity" - }, - "type": "array" - }, - "entity": { - "$ref": "GoogleCloudVideointelligenceV1_Entity", - "description": "Detected entity." - }, - "frames": { - "description": "All video frames where a label was detected.", - "items": { - "$ref": "GoogleCloudVideointelligenceV1_LabelFrame" - }, - "type": "array" - }, - "segments": { - "description": "All video segments where a label was detected.", - "items": { - "$ref": "GoogleCloudVideointelligenceV1_LabelSegment" - }, - "type": "array" - } - }, - "type": "object" - }, - "GoogleCloudVideointelligenceV1_LabelFrame": { - "description": "Video frame level annotation results for label detection.", - "id": "GoogleCloudVideointelligenceV1_LabelFrame", - "properties": { - "confidence": { - "description": "Confidence that the label is accurate. Range: [0, 1].", - "format": "float", - "type": "number" - }, - "timeOffset": { - "description": "Time-offset, relative to the beginning of the video, corresponding to the\nvideo frame for this location.", - "format": "google-duration", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudVideointelligenceV1_LabelSegment": { - "description": "Video segment level annotation results for label detection.", - "id": "GoogleCloudVideointelligenceV1_LabelSegment", - "properties": { - "confidence": { - "description": "Confidence that the label is accurate. Range: [0, 1].", - "format": "float", - "type": "number" - }, - "segment": { - "$ref": "GoogleCloudVideointelligenceV1_VideoSegment", - "description": "Video segment where a label was detected." - } - }, - "type": "object" - }, - "GoogleCloudVideointelligenceV1_VideoAnnotationProgress": { - "description": "Annotation progress for a single video.", - "id": "GoogleCloudVideointelligenceV1_VideoAnnotationProgress", - "properties": { - "inputUri": { - "description": "Output only. Video file location in\n[Google Cloud Storage](https://cloud.google.com/storage/).", - "type": "string" - }, - "progressPercent": { - "description": "Output only. Approximate percentage processed thus far. Guaranteed to be\n100 when fully processed.", - "format": "int32", - "type": "integer" - }, - "startTime": { - "description": "Output only. Time when the request was received.", - "format": "google-datetime", - "type": "string" - }, - "updateTime": { - "description": "Output only. Time of the most recent update.", - "format": "google-datetime", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudVideointelligenceV1_VideoAnnotationResults": { - "description": "Annotation results for a single video.", - "id": "GoogleCloudVideointelligenceV1_VideoAnnotationResults", - "properties": { - "error": { - "$ref": "GoogleRpc_Status", - "description": "Output only. Non-streaming error only. If set, indicates an error. Note\nthat for a single `AnnotateVideoRequest` some videos may succeed and some\nmay fail." - }, - "explicitAnnotation": { - "$ref": "GoogleCloudVideointelligenceV1_ExplicitContentAnnotation", - "description": "Explicit content annotation." - }, - "frameLabelAnnotations": { - "description": "Label annotations on frame level.\nThere is exactly one element for each unique label.", - "items": { - "$ref": "GoogleCloudVideointelligenceV1_LabelAnnotation" - }, - "type": "array" - }, - "inputUri": { - "description": "Output only. Video file location in\n[Google Cloud Storage](https://cloud.google.com/storage/).", - "type": "string" - }, - "segmentLabelAnnotations": { - "description": "Label annotations on video level or user specified segment level.\nThere is exactly one element for each unique label.", - "items": { - "$ref": "GoogleCloudVideointelligenceV1_LabelAnnotation" - }, - "type": "array" - }, - "shotAnnotations": { - "description": "Shot annotations. Each shot is represented as a video segment.", - "items": { - "$ref": "GoogleCloudVideointelligenceV1_VideoSegment" - }, - "type": "array" - }, - "shotLabelAnnotations": { - "description": "Label annotations on shot level.\nThere is exactly one element for each unique label.", - "items": { - "$ref": "GoogleCloudVideointelligenceV1_LabelAnnotation" - }, - "type": "array" - } - }, - "type": "object" - }, - "GoogleCloudVideointelligenceV1_VideoSegment": { - "description": "Video segment.", - "id": "GoogleCloudVideointelligenceV1_VideoSegment", - "properties": { - "endTimeOffset": { - "description": "Time-offset, relative to the beginning of the video,\ncorresponding to the end of the segment (inclusive).", - "format": "google-duration", - "type": "string" - }, - "startTimeOffset": { - "description": "Time-offset, relative to the beginning of the video,\ncorresponding to the start of the segment (inclusive).", - "format": "google-duration", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudVideointelligenceV1beta1_AnnotateVideoProgress": { - "description": "Video annotation progress. Included in the `metadata`\nfield of the `Operation` returned by the `GetOperation`\ncall of the `google::longrunning::Operations` service.", - "id": "GoogleCloudVideointelligenceV1beta1_AnnotateVideoProgress", - "properties": { - "annotationProgress": { - "description": "Progress metadata for all videos specified in `AnnotateVideoRequest`.", - "items": { - "$ref": "GoogleCloudVideointelligenceV1beta1_VideoAnnotationProgress" - }, - "type": "array" - } - }, - "type": "object" - }, - "GoogleCloudVideointelligenceV1beta1_AnnotateVideoRequest": { - "description": "Video annotation request.", - "id": "GoogleCloudVideointelligenceV1beta1_AnnotateVideoRequest", - "properties": { - "features": { - "description": "Requested video annotation features.", - "enumDescriptions": [ - "Unspecified.", - "Label detection. Detect objects, such as dog or flower.", - "Shot change detection.", - "Safe search detection." - ], - "items": { - "enum": [ - "FEATURE_UNSPECIFIED", - "LABEL_DETECTION", - "SHOT_CHANGE_DETECTION", - "SAFE_SEARCH_DETECTION" - ], - "type": "string" - }, - "type": "array" - }, - "inputContent": { - "description": "The video data bytes. Encoding: base64. If unset, the input video(s)\nshould be specified via `input_uri`. If set, `input_uri` should be unset.", - "type": "string" - }, - "inputUri": { - "description": "Input video location. Currently, only\n[Google Cloud Storage](https://cloud.google.com/storage/) URIs are\nsupported, which must be specified in the following format:\n`gs://bucket-id/object-id` (other URI formats return\ngoogle.rpc.Code.INVALID_ARGUMENT). For more information, see\n[Request URIs](/storage/docs/reference-uris).\nA video URI may include wildcards in `object-id`, and thus identify\nmultiple videos. Supported wildcards: '*' to match 0 or more characters;\n'?' to match 1 character. If unset, the input video should be embedded\nin the request as `input_content`. If set, `input_content` should be unset.", - "type": "string" - }, - "locationId": { - "description": "Optional cloud region where annotation should take place. Supported cloud\nregions: `us-east1`, `us-west1`, `europe-west1`, `asia-east1`. If no region\nis specified, a region will be determined based on video file location.", - "type": "string" - }, - "outputUri": { - "description": "Optional location where the output (in JSON format) should be stored.\nCurrently, only [Google Cloud Storage](https://cloud.google.com/storage/)\nURIs are supported, which must be specified in the following format:\n`gs://bucket-id/object-id` (other URI formats return\ngoogle.rpc.Code.INVALID_ARGUMENT). For more information, see\n[Request URIs](/storage/docs/reference-uris).", - "type": "string" - }, - "videoContext": { - "$ref": "GoogleCloudVideointelligenceV1beta1_VideoContext", - "description": "Additional video context and/or feature-specific parameters." - } - }, - "type": "object" - }, - "GoogleCloudVideointelligenceV1beta1_AnnotateVideoResponse": { - "description": "Video annotation response. Included in the `response`\nfield of the `Operation` returned by the `GetOperation`\ncall of the `google::longrunning::Operations` service.", - "id": "GoogleCloudVideointelligenceV1beta1_AnnotateVideoResponse", - "properties": { - "annotationResults": { - "description": "Annotation results for all videos specified in `AnnotateVideoRequest`.", - "items": { - "$ref": "GoogleCloudVideointelligenceV1beta1_VideoAnnotationResults" - }, - "type": "array" - } - }, - "type": "object" - }, - "GoogleCloudVideointelligenceV1beta1_LabelAnnotation": { - "description": "Label annotation.", - "id": "GoogleCloudVideointelligenceV1beta1_LabelAnnotation", - "properties": { - "description": { - "description": "Textual description, e.g. `Fixed-gear bicycle`.", - "type": "string" - }, - "languageCode": { - "description": "Language code for `description` in BCP-47 format.", - "type": "string" - }, - "locations": { - "description": "Where the label was detected and with what confidence.", - "items": { - "$ref": "GoogleCloudVideointelligenceV1beta1_LabelLocation" - }, - "type": "array" - } - }, - "type": "object" - }, - "GoogleCloudVideointelligenceV1beta1_LabelLocation": { - "description": "Label location.", - "id": "GoogleCloudVideointelligenceV1beta1_LabelLocation", - "properties": { - "confidence": { - "description": "Confidence that the label is accurate. Range: [0, 1].", - "format": "float", - "type": "number" - }, - "level": { - "description": "Label level.", - "enum": [ - "LABEL_LEVEL_UNSPECIFIED", - "VIDEO_LEVEL", - "SEGMENT_LEVEL", - "SHOT_LEVEL", - "FRAME_LEVEL" - ], - "enumDescriptions": [ - "Unspecified.", - "Video-level. Corresponds to the whole video.", - "Segment-level. Corresponds to one of `AnnotateSpec.segments`.", - "Shot-level. Corresponds to a single shot (i.e. a series of frames\nwithout a major camera position or background change).", - "Frame-level. Corresponds to a single video frame." - ], - "type": "string" - }, - "segment": { - "$ref": "GoogleCloudVideointelligenceV1beta1_VideoSegment", - "description": "Video segment. Set to [-1, -1] for video-level labels.\nSet to [timestamp, timestamp] for frame-level labels.\nOtherwise, corresponds to one of `AnnotateSpec.segments`\n(if specified) or to shot boundaries (if requested)." - } - }, - "type": "object" - }, - "GoogleCloudVideointelligenceV1beta1_SafeSearchAnnotation": { - "description": "Safe search annotation (based on per-frame visual signals only).\nIf no unsafe content has been detected in a frame, no annotations\nare present for that frame. If only some types of unsafe content\nhave been detected in a frame, the likelihood is set to `UNKNOWN`\nfor all other types of unsafe content.", - "id": "GoogleCloudVideointelligenceV1beta1_SafeSearchAnnotation", - "properties": { - "adult": { - "description": "Likelihood of adult content.", - "enum": [ - "UNKNOWN", - "VERY_UNLIKELY", - "UNLIKELY", - "POSSIBLE", - "LIKELY", - "VERY_LIKELY" - ], - "enumDescriptions": [ - "Unknown likelihood.", - "Very unlikely.", - "Unlikely.", - "Possible.", - "Likely.", - "Very likely." - ], - "type": "string" - }, - "medical": { - "description": "Likelihood of medical content.", - "enum": [ - "UNKNOWN", - "VERY_UNLIKELY", - "UNLIKELY", - "POSSIBLE", - "LIKELY", - "VERY_LIKELY" - ], - "enumDescriptions": [ - "Unknown likelihood.", - "Very unlikely.", - "Unlikely.", - "Possible.", - "Likely.", - "Very likely." - ], - "type": "string" - }, - "racy": { - "description": "Likelihood of racy content.", - "enum": [ - "UNKNOWN", - "VERY_UNLIKELY", - "UNLIKELY", - "POSSIBLE", - "LIKELY", - "VERY_LIKELY" - ], - "enumDescriptions": [ - "Unknown likelihood.", - "Very unlikely.", - "Unlikely.", - "Possible.", - "Likely.", - "Very likely." - ], - "type": "string" - }, - "spoof": { - "description": "Likelihood that an obvious modification was made to the original\nversion to make it appear funny or offensive.", - "enum": [ - "UNKNOWN", - "VERY_UNLIKELY", - "UNLIKELY", - "POSSIBLE", - "LIKELY", - "VERY_LIKELY" - ], - "enumDescriptions": [ - "Unknown likelihood.", - "Very unlikely.", - "Unlikely.", - "Possible.", - "Likely.", - "Very likely." - ], - "type": "string" - }, - "timeOffset": { - "description": "Video time offset in microseconds.", - "format": "int64", - "type": "string" - }, - "violent": { - "description": "Likelihood of violent content.", - "enum": [ - "UNKNOWN", - "VERY_UNLIKELY", - "UNLIKELY", - "POSSIBLE", - "LIKELY", - "VERY_LIKELY" - ], - "enumDescriptions": [ - "Unknown likelihood.", - "Very unlikely.", - "Unlikely.", - "Possible.", - "Likely.", - "Very likely." - ], - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudVideointelligenceV1beta1_VideoAnnotationProgress": { - "description": "Annotation progress for a single video.", - "id": "GoogleCloudVideointelligenceV1beta1_VideoAnnotationProgress", - "properties": { - "inputUri": { - "description": "Video file location in\n[Google Cloud Storage](https://cloud.google.com/storage/).", - "type": "string" - }, - "progressPercent": { - "description": "Approximate percentage processed thus far.\nGuaranteed to be 100 when fully processed.", - "format": "int32", - "type": "integer" - }, - "startTime": { - "description": "Time when the request was received.", - "format": "google-datetime", - "type": "string" - }, - "updateTime": { - "description": "Time of the most recent update.", - "format": "google-datetime", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudVideointelligenceV1beta1_VideoAnnotationResults": { - "description": "Annotation results for a single video.", - "id": "GoogleCloudVideointelligenceV1beta1_VideoAnnotationResults", - "properties": { - "error": { - "$ref": "GoogleRpc_Status", - "description": "If set, indicates an error. Note that for a single `AnnotateVideoRequest`\nsome videos may succeed and some may fail." - }, - "inputUri": { - "description": "Video file location in\n[Google Cloud Storage](https://cloud.google.com/storage/).", - "type": "string" - }, - "labelAnnotations": { - "description": "Label annotations. There is exactly one element for each unique label.", - "items": { - "$ref": "GoogleCloudVideointelligenceV1beta1_LabelAnnotation" - }, - "type": "array" - }, - "safeSearchAnnotations": { - "description": "Safe search annotations.", - "items": { - "$ref": "GoogleCloudVideointelligenceV1beta1_SafeSearchAnnotation" - }, - "type": "array" - }, - "shotAnnotations": { - "description": "Shot annotations. Each shot is represented as a video segment.", - "items": { - "$ref": "GoogleCloudVideointelligenceV1beta1_VideoSegment" - }, - "type": "array" - } - }, - "type": "object" - }, - "GoogleCloudVideointelligenceV1beta1_VideoContext": { - "description": "Video context and/or feature-specific parameters.", - "id": "GoogleCloudVideointelligenceV1beta1_VideoContext", - "properties": { - "labelDetectionMode": { - "description": "If label detection has been requested, what labels should be detected\nin addition to video-level labels or segment-level labels. If unspecified,\ndefaults to `SHOT_MODE`.", - "enum": [ - "LABEL_DETECTION_MODE_UNSPECIFIED", - "SHOT_MODE", - "FRAME_MODE", - "SHOT_AND_FRAME_MODE" - ], - "enumDescriptions": [ - "Unspecified.", - "Detect shot-level labels.", - "Detect frame-level labels.", - "Detect both shot-level and frame-level labels." - ], - "type": "string" - }, - "labelDetectionModel": { - "description": "Model to use for label detection.\nSupported values: \"latest\" and \"stable\" (the default).", - "type": "string" - }, - "safeSearchDetectionModel": { - "description": "Model to use for safe search detection.\nSupported values: \"latest\" and \"stable\" (the default).", - "type": "string" - }, - "segments": { - "description": "Video segments to annotate. The segments may overlap and are not required\nto be contiguous or span the whole video. If unspecified, each video\nis treated as a single segment.", - "items": { - "$ref": "GoogleCloudVideointelligenceV1beta1_VideoSegment" - }, - "type": "array" - }, - "shotChangeDetectionModel": { - "description": "Model to use for shot change detection.\nSupported values: \"latest\" and \"stable\" (the default).", - "type": "string" - }, - "stationaryCamera": { - "description": "Whether the video has been shot from a stationary (i.e. non-moving) camera.\nWhen set to true, might improve detection accuracy for moving objects.", - "type": "boolean" - } - }, - "type": "object" - }, - "GoogleCloudVideointelligenceV1beta1_VideoSegment": { - "description": "Video segment.", - "id": "GoogleCloudVideointelligenceV1beta1_VideoSegment", - "properties": { - "endTimeOffset": { - "description": "End offset in microseconds (inclusive). Unset means 0.", - "format": "int64", - "type": "string" - }, - "startTimeOffset": { - "description": "Start offset in microseconds (inclusive). Unset means 0.", - "format": "int64", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudVideointelligenceV1beta2_AnnotateVideoProgress": { - "description": "Video annotation progress. Included in the `metadata`\nfield of the `Operation` returned by the `GetOperation`\ncall of the `google::longrunning::Operations` service.", - "id": "GoogleCloudVideointelligenceV1beta2_AnnotateVideoProgress", - "properties": { - "annotationProgress": { - "description": "Progress metadata for all videos specified in `AnnotateVideoRequest`.", - "items": { - "$ref": "GoogleCloudVideointelligenceV1beta2_VideoAnnotationProgress" - }, - "type": "array" - } - }, - "type": "object" - }, - "GoogleCloudVideointelligenceV1beta2_AnnotateVideoResponse": { - "description": "Video annotation response. Included in the `response`\nfield of the `Operation` returned by the `GetOperation`\ncall of the `google::longrunning::Operations` service.", - "id": "GoogleCloudVideointelligenceV1beta2_AnnotateVideoResponse", - "properties": { - "annotationResults": { - "description": "Annotation results for all videos specified in `AnnotateVideoRequest`.", - "items": { - "$ref": "GoogleCloudVideointelligenceV1beta2_VideoAnnotationResults" - }, - "type": "array" - } - }, - "type": "object" - }, - "GoogleCloudVideointelligenceV1beta2_Entity": { - "description": "Detected entity from video analysis.", - "id": "GoogleCloudVideointelligenceV1beta2_Entity", - "properties": { - "description": { - "description": "Textual description, e.g. `Fixed-gear bicycle`.", - "type": "string" - }, - "entityId": { - "description": "Opaque entity ID. Some IDs may be available in\n[Google Knowledge Graph Search\nAPI](https://developers.google.com/knowledge-graph/).", - "type": "string" - }, - "languageCode": { - "description": "Language code for `description` in BCP-47 format.", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudVideointelligenceV1beta2_ExplicitContentAnnotation": { - "description": "Explicit content annotation (based on per-frame visual signals only).\nIf no explicit content has been detected in a frame, no annotations are\npresent for that frame.", - "id": "GoogleCloudVideointelligenceV1beta2_ExplicitContentAnnotation", - "properties": { - "frames": { - "description": "All video frames where explicit content was detected.", - "items": { - "$ref": "GoogleCloudVideointelligenceV1beta2_ExplicitContentFrame" - }, - "type": "array" - } - }, - "type": "object" - }, - "GoogleCloudVideointelligenceV1beta2_ExplicitContentFrame": { - "description": "Video frame level annotation results for explicit content.", - "id": "GoogleCloudVideointelligenceV1beta2_ExplicitContentFrame", - "properties": { - "pornographyLikelihood": { - "description": "Likelihood of the pornography content..", - "enum": [ - "LIKELIHOOD_UNSPECIFIED", - "VERY_UNLIKELY", - "UNLIKELY", - "POSSIBLE", - "LIKELY", - "VERY_LIKELY" - ], - "enumDescriptions": [ - "Unspecified likelihood.", - "Very unlikely.", - "Unlikely.", - "Possible.", - "Likely.", - "Very likely." - ], - "type": "string" - }, - "timeOffset": { - "description": "Time-offset, relative to the beginning of the video, corresponding to the\nvideo frame for this location.", - "format": "google-duration", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudVideointelligenceV1beta2_LabelAnnotation": { - "description": "Label annotation.", - "id": "GoogleCloudVideointelligenceV1beta2_LabelAnnotation", - "properties": { - "categoryEntities": { - "description": "Common categories for the detected entity.\nE.g. when the label is `Terrier` the category is likely `dog`. And in some\ncases there might be more than one categories e.g. `Terrier` could also be\na `pet`.", - "items": { - "$ref": "GoogleCloudVideointelligenceV1beta2_Entity" - }, - "type": "array" - }, - "entity": { - "$ref": "GoogleCloudVideointelligenceV1beta2_Entity", - "description": "Detected entity." - }, - "frames": { - "description": "All video frames where a label was detected.", - "items": { - "$ref": "GoogleCloudVideointelligenceV1beta2_LabelFrame" - }, - "type": "array" - }, - "segments": { - "description": "All video segments where a label was detected.", - "items": { - "$ref": "GoogleCloudVideointelligenceV1beta2_LabelSegment" - }, - "type": "array" - } - }, - "type": "object" - }, - "GoogleCloudVideointelligenceV1beta2_LabelFrame": { - "description": "Video frame level annotation results for label detection.", - "id": "GoogleCloudVideointelligenceV1beta2_LabelFrame", - "properties": { - "confidence": { - "description": "Confidence that the label is accurate. Range: [0, 1].", - "format": "float", - "type": "number" - }, - "timeOffset": { - "description": "Time-offset, relative to the beginning of the video, corresponding to the\nvideo frame for this location.", - "format": "google-duration", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudVideointelligenceV1beta2_LabelSegment": { - "description": "Video segment level annotation results for label detection.", - "id": "GoogleCloudVideointelligenceV1beta2_LabelSegment", - "properties": { - "confidence": { - "description": "Confidence that the label is accurate. Range: [0, 1].", - "format": "float", - "type": "number" - }, - "segment": { - "$ref": "GoogleCloudVideointelligenceV1beta2_VideoSegment", - "description": "Video segment where a label was detected." - } - }, - "type": "object" - }, - "GoogleCloudVideointelligenceV1beta2_VideoAnnotationProgress": { - "description": "Annotation progress for a single video.", - "id": "GoogleCloudVideointelligenceV1beta2_VideoAnnotationProgress", - "properties": { - "inputUri": { - "description": "Output only. Video file location in\n[Google Cloud Storage](https://cloud.google.com/storage/).", - "type": "string" - }, - "progressPercent": { - "description": "Output only. Approximate percentage processed thus far. Guaranteed to be\n100 when fully processed.", - "format": "int32", - "type": "integer" - }, - "startTime": { - "description": "Output only. Time when the request was received.", - "format": "google-datetime", - "type": "string" - }, - "updateTime": { - "description": "Output only. Time of the most recent update.", - "format": "google-datetime", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudVideointelligenceV1beta2_VideoAnnotationResults": { - "description": "Annotation results for a single video.", - "id": "GoogleCloudVideointelligenceV1beta2_VideoAnnotationResults", - "properties": { - "error": { - "$ref": "GoogleRpc_Status", - "description": "Output only. Non-streaming error only. If set, indicates an error. Note\nthat for a single `AnnotateVideoRequest` some videos may succeed and some\nmay fail." - }, - "explicitAnnotation": { - "$ref": "GoogleCloudVideointelligenceV1beta2_ExplicitContentAnnotation", - "description": "Explicit content annotation." - }, - "frameLabelAnnotations": { - "description": "Label annotations on frame level.\nThere is exactly one element for each unique label.", - "items": { - "$ref": "GoogleCloudVideointelligenceV1beta2_LabelAnnotation" - }, - "type": "array" - }, - "inputUri": { - "description": "Output only. Video file location in\n[Google Cloud Storage](https://cloud.google.com/storage/).", - "type": "string" - }, - "segmentLabelAnnotations": { - "description": "Label annotations on video level or user specified segment level.\nThere is exactly one element for each unique label.", - "items": { - "$ref": "GoogleCloudVideointelligenceV1beta2_LabelAnnotation" - }, - "type": "array" - }, - "shotAnnotations": { - "description": "Shot annotations. Each shot is represented as a video segment.", - "items": { - "$ref": "GoogleCloudVideointelligenceV1beta2_VideoSegment" - }, - "type": "array" - }, - "shotLabelAnnotations": { - "description": "Label annotations on shot level.\nThere is exactly one element for each unique label.", - "items": { - "$ref": "GoogleCloudVideointelligenceV1beta2_LabelAnnotation" - }, - "type": "array" - } - }, - "type": "object" - }, - "GoogleCloudVideointelligenceV1beta2_VideoSegment": { - "description": "Video segment.", - "id": "GoogleCloudVideointelligenceV1beta2_VideoSegment", - "properties": { - "endTimeOffset": { - "description": "Time-offset, relative to the beginning of the video,\ncorresponding to the end of the segment (inclusive).", - "format": "google-duration", - "type": "string" - }, - "startTimeOffset": { - "description": "Time-offset, relative to the beginning of the video,\ncorresponding to the start of the segment (inclusive).", - "format": "google-duration", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudVideointelligenceV1p1beta1_AnnotateVideoProgress": { - "description": "Video annotation progress. Included in the `metadata`\nfield of the `Operation` returned by the `GetOperation`\ncall of the `google::longrunning::Operations` service.", - "id": "GoogleCloudVideointelligenceV1p1beta1_AnnotateVideoProgress", - "properties": { - "annotationProgress": { - "description": "Progress metadata for all videos specified in `AnnotateVideoRequest`.", - "items": { - "$ref": "GoogleCloudVideointelligenceV1p1beta1_VideoAnnotationProgress" - }, - "type": "array" - } - }, - "type": "object" - }, - "GoogleCloudVideointelligenceV1p1beta1_AnnotateVideoResponse": { - "description": "Video annotation response. Included in the `response`\nfield of the `Operation` returned by the `GetOperation`\ncall of the `google::longrunning::Operations` service.", - "id": "GoogleCloudVideointelligenceV1p1beta1_AnnotateVideoResponse", - "properties": { - "annotationResults": { - "description": "Annotation results for all videos specified in `AnnotateVideoRequest`.", - "items": { - "$ref": "GoogleCloudVideointelligenceV1p1beta1_VideoAnnotationResults" - }, - "type": "array" - } - }, - "type": "object" - }, - "GoogleCloudVideointelligenceV1p1beta1_EmotionAttribute": { - "description": "Emotion attribute.", - "id": "GoogleCloudVideointelligenceV1p1beta1_EmotionAttribute", - "properties": { - "emotion": { - "description": "Emotion entry.", - "enum": [ - "EMOTION_UNSPECIFIED", - "AMUSEMENT", - "ANGER", - "CONCENTRATION", - "CONTENTMENT", - "DESIRE", - "DISAPPOINTMENT", - "DISGUST", - "ELATION", - "EMBARRASSMENT", - "INTEREST", - "PRIDE", - "SADNESS", - "SURPRISE" - ], - "enumDescriptions": [ - "Unspecified emotion.", - "Amusement.", - "Anger.", - "Concentration.", - "Contentment.", - "Desire.", - "Disappointment.", - "Disgust.", - "Elation.", - "Embarrassment.", - "Interest.", - "Pride.", - "Sadness.", - "Surprise." - ], - "type": "string" - }, - "score": { - "description": "Confidence score.", - "format": "float", - "type": "number" - } - }, - "type": "object" - }, - "GoogleCloudVideointelligenceV1p1beta1_Entity": { - "description": "Detected entity from video analysis.", - "id": "GoogleCloudVideointelligenceV1p1beta1_Entity", - "properties": { - "description": { - "description": "Textual description, e.g. `Fixed-gear bicycle`.", - "type": "string" - }, - "entityId": { - "description": "Opaque entity ID. Some IDs may be available in\n[Google Knowledge Graph Search\nAPI](https://developers.google.com/knowledge-graph/).", - "type": "string" - }, - "languageCode": { - "description": "Language code for `description` in BCP-47 format.", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudVideointelligenceV1p1beta1_ExplicitContentAnnotation": { - "description": "Explicit content annotation (based on per-frame visual signals only).\nIf no explicit content has been detected in a frame, no annotations are\npresent for that frame.", - "id": "GoogleCloudVideointelligenceV1p1beta1_ExplicitContentAnnotation", - "properties": { - "frames": { - "description": "All video frames where explicit content was detected.", - "items": { - "$ref": "GoogleCloudVideointelligenceV1p1beta1_ExplicitContentFrame" - }, - "type": "array" - } - }, - "type": "object" - }, - "GoogleCloudVideointelligenceV1p1beta1_ExplicitContentFrame": { - "description": "Video frame level annotation results for explicit content.", - "id": "GoogleCloudVideointelligenceV1p1beta1_ExplicitContentFrame", - "properties": { - "pornographyLikelihood": { - "description": "Likelihood of the pornography content..", - "enum": [ - "LIKELIHOOD_UNSPECIFIED", - "VERY_UNLIKELY", - "UNLIKELY", - "POSSIBLE", - "LIKELY", - "VERY_LIKELY" - ], - "enumDescriptions": [ - "Unspecified likelihood.", - "Very unlikely.", - "Unlikely.", - "Possible.", - "Likely.", - "Very likely." - ], - "type": "string" - }, - "timeOffset": { - "description": "Time-offset, relative to the beginning of the video, corresponding to the\nvideo frame for this location.", - "format": "google-duration", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudVideointelligenceV1p1beta1_FaceDetectionAnnotation": { - "description": "Face detection annotation.", - "id": "GoogleCloudVideointelligenceV1p1beta1_FaceDetectionAnnotation", - "properties": { - "frames": { - "description": "All video frames where a face was detected.", - "items": { - "$ref": "GoogleCloudVideointelligenceV1p1beta1_FaceDetectionFrame" - }, - "type": "array" - }, - "segments": { - "description": "All video segments where a face was detected.", - "items": { - "$ref": "GoogleCloudVideointelligenceV1p1beta1_FaceSegment" - }, - "type": "array" - } - }, - "type": "object" - }, - "GoogleCloudVideointelligenceV1p1beta1_FaceDetectionAttribute": { - "description": "Face detection attribute.", - "id": "GoogleCloudVideointelligenceV1p1beta1_FaceDetectionAttribute", - "properties": { - "emotions": { - "description": "Emotion attributes.", - "items": { - "$ref": "GoogleCloudVideointelligenceV1p1beta1_EmotionAttribute" - }, - "type": "array" - }, - "normalizedBoundingBox": { - "$ref": "GoogleCloudVideointelligenceV1p1beta1_NormalizedBoundingBox", - "description": "Normalized Bounding box." - } - }, - "type": "object" - }, - "GoogleCloudVideointelligenceV1p1beta1_FaceDetectionFrame": { - "description": "Video frame level annotation results for face detection.", - "id": "GoogleCloudVideointelligenceV1p1beta1_FaceDetectionFrame", - "properties": { - "attributes": { - "description": "Face attributes in a frame.\nThere can be more than one attributes if the same face is detected in\nmultiple locations within the current frame.", - "items": { - "$ref": "GoogleCloudVideointelligenceV1p1beta1_FaceDetectionAttribute" - }, - "type": "array" - }, - "timeOffset": { - "description": "Time-offset, relative to the beginning of the video,\ncorresponding to the video frame for this location.", - "format": "google-duration", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudVideointelligenceV1p1beta1_FaceSegment": { - "description": "Video segment level annotation results for face detection.", - "id": "GoogleCloudVideointelligenceV1p1beta1_FaceSegment", - "properties": { - "segment": { - "$ref": "GoogleCloudVideointelligenceV1p1beta1_VideoSegment", - "description": "Video segment where a face was detected." - } - }, - "type": "object" - }, - "GoogleCloudVideointelligenceV1p1beta1_LabelAnnotation": { - "description": "Label annotation.", - "id": "GoogleCloudVideointelligenceV1p1beta1_LabelAnnotation", - "properties": { - "categoryEntities": { - "description": "Common categories for the detected entity.\nE.g. when the label is `Terrier` the category is likely `dog`. And in some\ncases there might be more than one categories e.g. `Terrier` could also be\na `pet`.", - "items": { - "$ref": "GoogleCloudVideointelligenceV1p1beta1_Entity" - }, - "type": "array" - }, - "entity": { - "$ref": "GoogleCloudVideointelligenceV1p1beta1_Entity", - "description": "Detected entity." - }, - "frames": { - "description": "All video frames where a label was detected.", - "items": { - "$ref": "GoogleCloudVideointelligenceV1p1beta1_LabelFrame" - }, - "type": "array" - }, - "segments": { - "description": "All video segments where a label was detected.", - "items": { - "$ref": "GoogleCloudVideointelligenceV1p1beta1_LabelSegment" - }, - "type": "array" - } - }, - "type": "object" - }, - "GoogleCloudVideointelligenceV1p1beta1_LabelFrame": { - "description": "Video frame level annotation results for label detection.", - "id": "GoogleCloudVideointelligenceV1p1beta1_LabelFrame", - "properties": { - "confidence": { - "description": "Confidence that the label is accurate. Range: [0, 1].", - "format": "float", - "type": "number" - }, - "timeOffset": { - "description": "Time-offset, relative to the beginning of the video, corresponding to the\nvideo frame for this location.", - "format": "google-duration", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudVideointelligenceV1p1beta1_LabelSegment": { - "description": "Video segment level annotation results for label detection.", - "id": "GoogleCloudVideointelligenceV1p1beta1_LabelSegment", - "properties": { - "confidence": { - "description": "Confidence that the label is accurate. Range: [0, 1].", - "format": "float", - "type": "number" - }, - "segment": { - "$ref": "GoogleCloudVideointelligenceV1p1beta1_VideoSegment", - "description": "Video segment where a label was detected." - } - }, - "type": "object" - }, - "GoogleCloudVideointelligenceV1p1beta1_NormalizedBoundingBox": { - "description": "Normalized bounding box.\nThe normalized vertex coordinates are relative to the original image.\nRange: [0, 1].", - "id": "GoogleCloudVideointelligenceV1p1beta1_NormalizedBoundingBox", - "properties": { - "bottom": { - "description": "Bottom Y coordinate.", - "format": "float", - "type": "number" - }, - "left": { - "description": "Left X coordinate.", - "format": "float", - "type": "number" - }, - "right": { - "description": "Right X coordinate.", - "format": "float", - "type": "number" - }, - "top": { - "description": "Top Y coordinate.", - "format": "float", - "type": "number" - } - }, - "type": "object" - }, - "GoogleCloudVideointelligenceV1p1beta1_SpeechRecognitionAlternative": { - "description": "Alternative hypotheses (a.k.a. n-best list).", - "id": "GoogleCloudVideointelligenceV1p1beta1_SpeechRecognitionAlternative", - "properties": { - "confidence": { - "description": "Output only. The confidence estimate between 0.0 and 1.0. A higher number\nindicates an estimated greater likelihood that the recognized words are\ncorrect. This field is typically provided only for the top hypothesis, and\nonly for `is_final=true` results. Clients should not rely on the\n`confidence` field as it is not guaranteed to be accurate or consistent.\nThe default of 0.0 is a sentinel value indicating `confidence` was not set.", - "format": "float", - "type": "number" - }, - "transcript": { - "description": "Output only. Transcript text representing the words that the user spoke.", - "type": "string" - }, - "words": { - "description": "Output only. A list of word-specific information for each recognized word.", - "items": { - "$ref": "GoogleCloudVideointelligenceV1p1beta1_WordInfo" - }, - "type": "array" - } - }, - "type": "object" - }, - "GoogleCloudVideointelligenceV1p1beta1_SpeechTranscription": { - "description": "A speech recognition result corresponding to a portion of the audio.", - "id": "GoogleCloudVideointelligenceV1p1beta1_SpeechTranscription", - "properties": { - "alternatives": { - "description": "Output only. May contain one or more recognition hypotheses (up to the\nmaximum specified in `max_alternatives`).\nThese alternatives are ordered in terms of accuracy, with the top (first)\nalternative being the most probable, as ranked by the recognizer.", - "items": { - "$ref": "GoogleCloudVideointelligenceV1p1beta1_SpeechRecognitionAlternative" - }, - "type": "array" - } - }, - "type": "object" - }, - "GoogleCloudVideointelligenceV1p1beta1_VideoAnnotationProgress": { - "description": "Annotation progress for a single video.", - "id": "GoogleCloudVideointelligenceV1p1beta1_VideoAnnotationProgress", - "properties": { - "inputUri": { - "description": "Output only. Video file location in\n[Google Cloud Storage](https://cloud.google.com/storage/).", - "type": "string" - }, - "progressPercent": { - "description": "Output only. Approximate percentage processed thus far. Guaranteed to be\n100 when fully processed.", - "format": "int32", - "type": "integer" - }, - "startTime": { - "description": "Output only. Time when the request was received.", - "format": "google-datetime", - "type": "string" - }, - "updateTime": { - "description": "Output only. Time of the most recent update.", - "format": "google-datetime", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudVideointelligenceV1p1beta1_VideoAnnotationResults": { - "description": "Annotation results for a single video.", - "id": "GoogleCloudVideointelligenceV1p1beta1_VideoAnnotationResults", - "properties": { - "error": { - "$ref": "GoogleRpc_Status", - "description": "Output only. Non-streaming error only. If set, indicates an error. Note\nthat for a single `AnnotateVideoRequest` some videos may succeed and some\nmay fail." - }, - "explicitAnnotation": { - "$ref": "GoogleCloudVideointelligenceV1p1beta1_ExplicitContentAnnotation", - "description": "Explicit content annotation." - }, - "faceDetectionAnnotations": { - "description": "Face detection annotations.", - "items": { - "$ref": "GoogleCloudVideointelligenceV1p1beta1_FaceDetectionAnnotation" - }, - "type": "array" - }, - "frameLabelAnnotations": { - "description": "Label annotations on frame level.\nThere is exactly one element for each unique label.", - "items": { - "$ref": "GoogleCloudVideointelligenceV1p1beta1_LabelAnnotation" - }, - "type": "array" - }, - "inputUri": { - "description": "Output only. Video file location in\n[Google Cloud Storage](https://cloud.google.com/storage/).", - "type": "string" - }, - "segmentLabelAnnotations": { - "description": "Label annotations on video level or user specified segment level.\nThere is exactly one element for each unique label.", - "items": { - "$ref": "GoogleCloudVideointelligenceV1p1beta1_LabelAnnotation" - }, - "type": "array" - }, - "shotAnnotations": { - "description": "Shot annotations. Each shot is represented as a video segment.", - "items": { - "$ref": "GoogleCloudVideointelligenceV1p1beta1_VideoSegment" - }, - "type": "array" - }, - "shotLabelAnnotations": { - "description": "Label annotations on shot level.\nThere is exactly one element for each unique label.", - "items": { - "$ref": "GoogleCloudVideointelligenceV1p1beta1_LabelAnnotation" - }, - "type": "array" - }, - "speechTranscriptions": { - "description": "Speech transcription.", - "items": { - "$ref": "GoogleCloudVideointelligenceV1p1beta1_SpeechTranscription" - }, - "type": "array" - } - }, - "type": "object" - }, - "GoogleCloudVideointelligenceV1p1beta1_VideoSegment": { - "description": "Video segment.", - "id": "GoogleCloudVideointelligenceV1p1beta1_VideoSegment", - "properties": { - "endTimeOffset": { - "description": "Time-offset, relative to the beginning of the video,\ncorresponding to the end of the segment (inclusive).", - "format": "google-duration", - "type": "string" - }, - "startTimeOffset": { - "description": "Time-offset, relative to the beginning of the video,\ncorresponding to the start of the segment (inclusive).", - "format": "google-duration", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudVideointelligenceV1p1beta1_WordInfo": { - "description": "Word-specific information for recognized words. Word information is only\nincluded in the response when certain request parameters are set, such\nas `enable_word_time_offsets`.", - "id": "GoogleCloudVideointelligenceV1p1beta1_WordInfo", - "properties": { - "endTime": { - "description": "Output only. Time offset relative to the beginning of the audio, and\ncorresponding to the end of the spoken word. This field is only set if\n`enable_word_time_offsets=true` and only in the top hypothesis. This is an\nexperimental feature and the accuracy of the time offset can vary.", - "format": "google-duration", - "type": "string" - }, - "startTime": { - "description": "Output only. Time offset relative to the beginning of the audio, and\ncorresponding to the start of the spoken word. This field is only set if\n`enable_word_time_offsets=true` and only in the top hypothesis. This is an\nexperimental feature and the accuracy of the time offset can vary.", - "format": "google-duration", - "type": "string" - }, - "word": { - "description": "Output only. The word corresponding to this set of information.", - "type": "string" - } - }, - "type": "object" - }, - "GoogleLongrunning_Operation": { - "description": "This resource represents a long-running operation that is the result of a\nnetwork API call.", - "id": "GoogleLongrunning_Operation", - "properties": { - "done": { - "description": "If the value is `false`, it means the operation is still in progress.\nIf `true`, the operation is completed, and either `error` or `response` is\navailable.", - "type": "boolean" - }, - "error": { - "$ref": "GoogleRpc_Status", - "description": "The error result of the operation in case of failure or cancellation." - }, - "metadata": { - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - }, - "description": "Service-specific metadata associated with the operation. It typically\ncontains progress information and common metadata such as create time.\nSome services might not provide such metadata. Any method that returns a\nlong-running operation should document the metadata type, if any.", - "type": "object" - }, - "name": { - "description": "The server-assigned name, which is only unique within the same service that\noriginally returns it. If you use the default HTTP mapping, the\n`name` should have the format of `operations/some/unique/name`.", - "type": "string" - }, - "response": { - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - }, - "description": "The normal response of the operation in case of success. If the original\nmethod returns no data on success, such as `Delete`, the response is\n`google.protobuf.Empty`. If the original method is standard\n`Get`/`Create`/`Update`, the response should be the resource. For other\nmethods, the response should have the type `XxxResponse`, where `Xxx`\nis the original method name. For example, if the original method name\nis `TakeSnapshot()`, the inferred response type is\n`TakeSnapshotResponse`.", - "type": "object" - } - }, - "type": "object" - }, - "GoogleRpc_Status": { - "description": "The `Status` type defines a logical error model that is suitable for different\nprogramming environments, including REST APIs and RPC APIs. It is used by\n[gRPC](https://github.com/grpc). The error model is designed to be:\n\n- Simple to use and understand for most users\n- Flexible enough to meet unexpected needs\n\n# Overview\n\nThe `Status` message contains three pieces of data: error code, error message,\nand error details. The error code should be an enum value of\ngoogle.rpc.Code, but it may accept additional error codes if needed. The\nerror message should be a developer-facing English message that helps\ndevelopers *understand* and *resolve* the error. If a localized user-facing\nerror message is needed, put the localized message in the error details or\nlocalize it in the client. The optional error details may contain arbitrary\ninformation about the error. There is a predefined set of error detail types\nin the package `google.rpc` that can be used for common error conditions.\n\n# Language mapping\n\nThe `Status` message is the logical representation of the error model, but it\nis not necessarily the actual wire format. When the `Status` message is\nexposed in different client libraries and different wire protocols, it can be\nmapped differently. For example, it will likely be mapped to some exceptions\nin Java, but more likely mapped to some error codes in C.\n\n# Other uses\n\nThe error model and the `Status` message can be used in a variety of\nenvironments, either with or without APIs, to provide a\nconsistent developer experience across different environments.\n\nExample uses of this error model include:\n\n- Partial errors. If a service needs to return partial errors to the client,\n it may embed the `Status` in the normal response to indicate the partial\n errors.\n\n- Workflow errors. A typical workflow has multiple steps. Each step may\n have a `Status` message for error reporting.\n\n- Batch operations. If a client uses batch request and batch response, the\n `Status` message should be used directly inside batch response, one for\n each error sub-response.\n\n- Asynchronous operations. If an API call embeds asynchronous operation\n results in its response, the status of those operations should be\n represented directly using the `Status` message.\n\n- Logging. If some API errors are stored in logs, the message `Status` could\n be used directly after any stripping needed for security/privacy reasons.", - "id": "GoogleRpc_Status", - "properties": { - "code": { - "description": "The status code, which should be an enum value of google.rpc.Code.", - "format": "int32", - "type": "integer" - }, - "details": { - "description": "A list of messages that carry the error details. There is a common set of\nmessage types for APIs to use.", - "items": { - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "A developer-facing error message, which should be in English. Any\nuser-facing error message should be localized and sent in the\ngoogle.rpc.Status.details field, or localized by the client.", - "type": "string" - } - }, - "type": "object" - } - }, - "servicePath": "", - "title": "Cloud Video Intelligence API", - "version": "v1beta1", - "version_module": true -} \ No newline at end of file
diff --git a/videointelligence/v1beta1/videointelligence-gen.go b/videointelligence/v1beta1/videointelligence-gen.go deleted file mode 100644 index fdc95bd..0000000 --- a/videointelligence/v1beta1/videointelligence-gen.go +++ /dev/null
@@ -1,2688 +0,0 @@ -// Package videointelligence provides access to the Cloud Video Intelligence API. -// -// This package is DEPRECATED. Use package cloud.google.com/go/videointelligence/apiv1 instead. -// -// See https://cloud.google.com/video-intelligence/docs/ -// -// Usage example: -// -// import "google.golang.org/api/videointelligence/v1beta1" -// ... -// videointelligenceService, err := videointelligence.New(oauthHttpClient) -package videointelligence // import "google.golang.org/api/videointelligence/v1beta1" - -import ( - "bytes" - "context" - "encoding/json" - "errors" - "fmt" - "io" - "net/http" - "net/url" - "strconv" - "strings" - - gensupport "google.golang.org/api/gensupport" - googleapi "google.golang.org/api/googleapi" -) - -// Always reference these packages, just in case the auto-generated code -// below doesn't. -var _ = bytes.NewBuffer -var _ = strconv.Itoa -var _ = fmt.Sprintf -var _ = json.NewDecoder -var _ = io.Copy -var _ = url.Parse -var _ = gensupport.MarshalJSON -var _ = googleapi.Version -var _ = errors.New -var _ = strings.Replace -var _ = context.Canceled - -const apiId = "videointelligence:v1beta1" -const apiName = "videointelligence" -const apiVersion = "v1beta1" -const basePath = "https://videointelligence.googleapis.com/" - -// OAuth2 scopes used by this API. -const ( - // View and manage your data across Google Cloud Platform services - CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform" -) - -func New(client *http.Client) (*Service, error) { - if client == nil { - return nil, errors.New("client is nil") - } - s := &Service{client: client, BasePath: basePath} - s.Videos = NewVideosService(s) - return s, nil -} - -type Service struct { - client *http.Client - BasePath string // API endpoint base URL - UserAgent string // optional additional User-Agent fragment - - Videos *VideosService -} - -func (s *Service) userAgent() string { - if s.UserAgent == "" { - return googleapi.UserAgent - } - return googleapi.UserAgent + " " + s.UserAgent -} - -func NewVideosService(s *Service) *VideosService { - rs := &VideosService{s: s} - return rs -} - -type VideosService struct { - s *Service -} - -// GoogleCloudVideointelligenceV1AnnotateVideoProgress: Video annotation -// progress. Included in the `metadata` -// field of the `Operation` returned by the `GetOperation` -// call of the `google::longrunning::Operations` service. -type GoogleCloudVideointelligenceV1AnnotateVideoProgress struct { - // AnnotationProgress: Progress metadata for all videos specified in - // `AnnotateVideoRequest`. - AnnotationProgress []*GoogleCloudVideointelligenceV1VideoAnnotationProgress `json:"annotationProgress,omitempty"` - - // ForceSendFields is a list of field names (e.g. "AnnotationProgress") - // 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. "AnnotationProgress") 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 *GoogleCloudVideointelligenceV1AnnotateVideoProgress) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudVideointelligenceV1AnnotateVideoProgress - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GoogleCloudVideointelligenceV1AnnotateVideoResponse: Video annotation -// response. Included in the `response` -// field of the `Operation` returned by the `GetOperation` -// call of the `google::longrunning::Operations` service. -type GoogleCloudVideointelligenceV1AnnotateVideoResponse struct { - // AnnotationResults: Annotation results for all videos specified in - // `AnnotateVideoRequest`. - AnnotationResults []*GoogleCloudVideointelligenceV1VideoAnnotationResults `json:"annotationResults,omitempty"` - - // ForceSendFields is a list of field names (e.g. "AnnotationResults") - // 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. "AnnotationResults") 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 *GoogleCloudVideointelligenceV1AnnotateVideoResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudVideointelligenceV1AnnotateVideoResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GoogleCloudVideointelligenceV1Entity: Detected entity from video -// analysis. -type GoogleCloudVideointelligenceV1Entity struct { - // Description: Textual description, e.g. `Fixed-gear bicycle`. - Description string `json:"description,omitempty"` - - // EntityId: Opaque entity ID. Some IDs may be available in - // [Google Knowledge Graph - // Search - // API](https://developers.google.com/knowledge-graph/). - EntityId string `json:"entityId,omitempty"` - - // LanguageCode: Language code for `description` in BCP-47 format. - LanguageCode string `json:"languageCode,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Description") 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. "Description") 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 *GoogleCloudVideointelligenceV1Entity) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudVideointelligenceV1Entity - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GoogleCloudVideointelligenceV1ExplicitContentAnnotation: Explicit -// content annotation (based on per-frame visual signals only). -// If no explicit content has been detected in a frame, no annotations -// are -// present for that frame. -type GoogleCloudVideointelligenceV1ExplicitContentAnnotation struct { - // Frames: All video frames where explicit content was detected. - Frames []*GoogleCloudVideointelligenceV1ExplicitContentFrame `json:"frames,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Frames") 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. "Frames") 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 *GoogleCloudVideointelligenceV1ExplicitContentAnnotation) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudVideointelligenceV1ExplicitContentAnnotation - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GoogleCloudVideointelligenceV1ExplicitContentFrame: Video frame level -// annotation results for explicit content. -type GoogleCloudVideointelligenceV1ExplicitContentFrame struct { - // PornographyLikelihood: Likelihood of the pornography content.. - // - // Possible values: - // "LIKELIHOOD_UNSPECIFIED" - Unspecified likelihood. - // "VERY_UNLIKELY" - Very unlikely. - // "UNLIKELY" - Unlikely. - // "POSSIBLE" - Possible. - // "LIKELY" - Likely. - // "VERY_LIKELY" - Very likely. - PornographyLikelihood string `json:"pornographyLikelihood,omitempty"` - - // TimeOffset: Time-offset, relative to the beginning of the video, - // corresponding to the - // video frame for this location. - TimeOffset string `json:"timeOffset,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "PornographyLikelihood") 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. "PornographyLikelihood") 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 *GoogleCloudVideointelligenceV1ExplicitContentFrame) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudVideointelligenceV1ExplicitContentFrame - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GoogleCloudVideointelligenceV1LabelAnnotation: Label annotation. -type GoogleCloudVideointelligenceV1LabelAnnotation struct { - // CategoryEntities: Common categories for the detected entity. - // E.g. when the label is `Terrier` the category is likely `dog`. And in - // some - // cases there might be more than one categories e.g. `Terrier` could - // also be - // a `pet`. - CategoryEntities []*GoogleCloudVideointelligenceV1Entity `json:"categoryEntities,omitempty"` - - // Entity: Detected entity. - Entity *GoogleCloudVideointelligenceV1Entity `json:"entity,omitempty"` - - // Frames: All video frames where a label was detected. - Frames []*GoogleCloudVideointelligenceV1LabelFrame `json:"frames,omitempty"` - - // Segments: All video segments where a label was detected. - Segments []*GoogleCloudVideointelligenceV1LabelSegment `json:"segments,omitempty"` - - // ForceSendFields is a list of field names (e.g. "CategoryEntities") 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. "CategoryEntities") 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 *GoogleCloudVideointelligenceV1LabelAnnotation) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudVideointelligenceV1LabelAnnotation - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GoogleCloudVideointelligenceV1LabelFrame: Video frame level -// annotation results for label detection. -type GoogleCloudVideointelligenceV1LabelFrame struct { - // Confidence: Confidence that the label is accurate. Range: [0, 1]. - Confidence float64 `json:"confidence,omitempty"` - - // TimeOffset: Time-offset, relative to the beginning of the video, - // corresponding to the - // video frame for this location. - TimeOffset string `json:"timeOffset,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Confidence") 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. "Confidence") 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 *GoogleCloudVideointelligenceV1LabelFrame) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudVideointelligenceV1LabelFrame - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *GoogleCloudVideointelligenceV1LabelFrame) UnmarshalJSON(data []byte) error { - type NoMethod GoogleCloudVideointelligenceV1LabelFrame - var s1 struct { - Confidence gensupport.JSONFloat64 `json:"confidence"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.Confidence = float64(s1.Confidence) - return nil -} - -// GoogleCloudVideointelligenceV1LabelSegment: Video segment level -// annotation results for label detection. -type GoogleCloudVideointelligenceV1LabelSegment struct { - // Confidence: Confidence that the label is accurate. Range: [0, 1]. - Confidence float64 `json:"confidence,omitempty"` - - // Segment: Video segment where a label was detected. - Segment *GoogleCloudVideointelligenceV1VideoSegment `json:"segment,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Confidence") 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. "Confidence") 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 *GoogleCloudVideointelligenceV1LabelSegment) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudVideointelligenceV1LabelSegment - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *GoogleCloudVideointelligenceV1LabelSegment) UnmarshalJSON(data []byte) error { - type NoMethod GoogleCloudVideointelligenceV1LabelSegment - var s1 struct { - Confidence gensupport.JSONFloat64 `json:"confidence"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.Confidence = float64(s1.Confidence) - return nil -} - -// GoogleCloudVideointelligenceV1VideoAnnotationProgress: Annotation -// progress for a single video. -type GoogleCloudVideointelligenceV1VideoAnnotationProgress struct { - // InputUri: Output only. Video file location in - // [Google Cloud Storage](https://cloud.google.com/storage/). - InputUri string `json:"inputUri,omitempty"` - - // ProgressPercent: Output only. Approximate percentage processed thus - // far. Guaranteed to be - // 100 when fully processed. - ProgressPercent int64 `json:"progressPercent,omitempty"` - - // StartTime: Output only. Time when the request was received. - StartTime string `json:"startTime,omitempty"` - - // UpdateTime: Output only. Time of the most recent update. - UpdateTime string `json:"updateTime,omitempty"` - - // ForceSendFields is a list of field names (e.g. "InputUri") 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. "InputUri") 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 *GoogleCloudVideointelligenceV1VideoAnnotationProgress) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudVideointelligenceV1VideoAnnotationProgress - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GoogleCloudVideointelligenceV1VideoAnnotationResults: Annotation -// results for a single video. -type GoogleCloudVideointelligenceV1VideoAnnotationResults struct { - // Error: Output only. Non-streaming error only. If set, indicates an - // error. Note - // that for a single `AnnotateVideoRequest` some videos may succeed and - // some - // may fail. - Error *GoogleRpcStatus `json:"error,omitempty"` - - // ExplicitAnnotation: Explicit content annotation. - ExplicitAnnotation *GoogleCloudVideointelligenceV1ExplicitContentAnnotation `json:"explicitAnnotation,omitempty"` - - // FrameLabelAnnotations: Label annotations on frame level. - // There is exactly one element for each unique label. - FrameLabelAnnotations []*GoogleCloudVideointelligenceV1LabelAnnotation `json:"frameLabelAnnotations,omitempty"` - - // InputUri: Output only. Video file location in - // [Google Cloud Storage](https://cloud.google.com/storage/). - InputUri string `json:"inputUri,omitempty"` - - // SegmentLabelAnnotations: Label annotations on video level or user - // specified segment level. - // There is exactly one element for each unique label. - SegmentLabelAnnotations []*GoogleCloudVideointelligenceV1LabelAnnotation `json:"segmentLabelAnnotations,omitempty"` - - // ShotAnnotations: Shot annotations. Each shot is represented as a - // video segment. - ShotAnnotations []*GoogleCloudVideointelligenceV1VideoSegment `json:"shotAnnotations,omitempty"` - - // ShotLabelAnnotations: Label annotations on shot level. - // There is exactly one element for each unique label. - ShotLabelAnnotations []*GoogleCloudVideointelligenceV1LabelAnnotation `json:"shotLabelAnnotations,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Error") 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. "Error") 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 *GoogleCloudVideointelligenceV1VideoAnnotationResults) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudVideointelligenceV1VideoAnnotationResults - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GoogleCloudVideointelligenceV1VideoSegment: Video segment. -type GoogleCloudVideointelligenceV1VideoSegment struct { - // EndTimeOffset: Time-offset, relative to the beginning of the - // video, - // corresponding to the end of the segment (inclusive). - EndTimeOffset string `json:"endTimeOffset,omitempty"` - - // StartTimeOffset: Time-offset, relative to the beginning of the - // video, - // corresponding to the start of the segment (inclusive). - StartTimeOffset string `json:"startTimeOffset,omitempty"` - - // ForceSendFields is a list of field names (e.g. "EndTimeOffset") 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. "EndTimeOffset") 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 *GoogleCloudVideointelligenceV1VideoSegment) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudVideointelligenceV1VideoSegment - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GoogleCloudVideointelligenceV1beta1AnnotateVideoProgress: Video -// annotation progress. Included in the `metadata` -// field of the `Operation` returned by the `GetOperation` -// call of the `google::longrunning::Operations` service. -type GoogleCloudVideointelligenceV1beta1AnnotateVideoProgress struct { - // AnnotationProgress: Progress metadata for all videos specified in - // `AnnotateVideoRequest`. - AnnotationProgress []*GoogleCloudVideointelligenceV1beta1VideoAnnotationProgress `json:"annotationProgress,omitempty"` - - // ForceSendFields is a list of field names (e.g. "AnnotationProgress") - // 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. "AnnotationProgress") 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 *GoogleCloudVideointelligenceV1beta1AnnotateVideoProgress) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudVideointelligenceV1beta1AnnotateVideoProgress - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GoogleCloudVideointelligenceV1beta1AnnotateVideoRequest: Video -// annotation request. -type GoogleCloudVideointelligenceV1beta1AnnotateVideoRequest struct { - // Features: Requested video annotation features. - // - // Possible values: - // "FEATURE_UNSPECIFIED" - Unspecified. - // "LABEL_DETECTION" - Label detection. Detect objects, such as dog or - // flower. - // "SHOT_CHANGE_DETECTION" - Shot change detection. - // "SAFE_SEARCH_DETECTION" - Safe search detection. - Features []string `json:"features,omitempty"` - - // InputContent: The video data bytes. Encoding: base64. If unset, the - // input video(s) - // should be specified via `input_uri`. If set, `input_uri` should be - // unset. - InputContent string `json:"inputContent,omitempty"` - - // InputUri: Input video location. Currently, only - // [Google Cloud Storage](https://cloud.google.com/storage/) URIs - // are - // supported, which must be specified in the following - // format: - // `gs://bucket-id/object-id` (other URI formats - // return - // google.rpc.Code.INVALID_ARGUMENT). For more information, see - // [Request URIs](/storage/docs/reference-uris). - // A video URI may include wildcards in `object-id`, and thus - // identify - // multiple videos. Supported wildcards: '*' to match 0 or more - // characters; - // '?' to match 1 character. If unset, the input video should be - // embedded - // in the request as `input_content`. If set, `input_content` should be - // unset. - InputUri string `json:"inputUri,omitempty"` - - // LocationId: Optional cloud region where annotation should take place. - // Supported cloud - // regions: `us-east1`, `us-west1`, `europe-west1`, `asia-east1`. If no - // region - // is specified, a region will be determined based on video file - // location. - LocationId string `json:"locationId,omitempty"` - - // OutputUri: Optional location where the output (in JSON format) should - // be stored. - // Currently, only [Google Cloud - // Storage](https://cloud.google.com/storage/) - // URIs are supported, which must be specified in the following - // format: - // `gs://bucket-id/object-id` (other URI formats - // return - // google.rpc.Code.INVALID_ARGUMENT). For more information, see - // [Request URIs](/storage/docs/reference-uris). - OutputUri string `json:"outputUri,omitempty"` - - // VideoContext: Additional video context and/or feature-specific - // parameters. - VideoContext *GoogleCloudVideointelligenceV1beta1VideoContext `json:"videoContext,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Features") 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. "Features") 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 *GoogleCloudVideointelligenceV1beta1AnnotateVideoRequest) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudVideointelligenceV1beta1AnnotateVideoRequest - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GoogleCloudVideointelligenceV1beta1AnnotateVideoResponse: Video -// annotation response. Included in the `response` -// field of the `Operation` returned by the `GetOperation` -// call of the `google::longrunning::Operations` service. -type GoogleCloudVideointelligenceV1beta1AnnotateVideoResponse struct { - // AnnotationResults: Annotation results for all videos specified in - // `AnnotateVideoRequest`. - AnnotationResults []*GoogleCloudVideointelligenceV1beta1VideoAnnotationResults `json:"annotationResults,omitempty"` - - // ForceSendFields is a list of field names (e.g. "AnnotationResults") - // 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. "AnnotationResults") 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 *GoogleCloudVideointelligenceV1beta1AnnotateVideoResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudVideointelligenceV1beta1AnnotateVideoResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GoogleCloudVideointelligenceV1beta1LabelAnnotation: Label annotation. -type GoogleCloudVideointelligenceV1beta1LabelAnnotation struct { - // Description: Textual description, e.g. `Fixed-gear bicycle`. - Description string `json:"description,omitempty"` - - // LanguageCode: Language code for `description` in BCP-47 format. - LanguageCode string `json:"languageCode,omitempty"` - - // Locations: Where the label was detected and with what confidence. - Locations []*GoogleCloudVideointelligenceV1beta1LabelLocation `json:"locations,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Description") 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. "Description") 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 *GoogleCloudVideointelligenceV1beta1LabelAnnotation) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudVideointelligenceV1beta1LabelAnnotation - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GoogleCloudVideointelligenceV1beta1LabelLocation: Label location. -type GoogleCloudVideointelligenceV1beta1LabelLocation struct { - // Confidence: Confidence that the label is accurate. Range: [0, 1]. - Confidence float64 `json:"confidence,omitempty"` - - // Level: Label level. - // - // Possible values: - // "LABEL_LEVEL_UNSPECIFIED" - Unspecified. - // "VIDEO_LEVEL" - Video-level. Corresponds to the whole video. - // "SEGMENT_LEVEL" - Segment-level. Corresponds to one of - // `AnnotateSpec.segments`. - // "SHOT_LEVEL" - Shot-level. Corresponds to a single shot (i.e. a - // series of frames - // without a major camera position or background change). - // "FRAME_LEVEL" - Frame-level. Corresponds to a single video frame. - Level string `json:"level,omitempty"` - - // Segment: Video segment. Set to [-1, -1] for video-level labels. - // Set to [timestamp, timestamp] for frame-level labels. - // Otherwise, corresponds to one of `AnnotateSpec.segments` - // (if specified) or to shot boundaries (if requested). - Segment *GoogleCloudVideointelligenceV1beta1VideoSegment `json:"segment,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Confidence") 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. "Confidence") 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 *GoogleCloudVideointelligenceV1beta1LabelLocation) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudVideointelligenceV1beta1LabelLocation - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *GoogleCloudVideointelligenceV1beta1LabelLocation) UnmarshalJSON(data []byte) error { - type NoMethod GoogleCloudVideointelligenceV1beta1LabelLocation - var s1 struct { - Confidence gensupport.JSONFloat64 `json:"confidence"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.Confidence = float64(s1.Confidence) - return nil -} - -// GoogleCloudVideointelligenceV1beta1SafeSearchAnnotation: Safe search -// annotation (based on per-frame visual signals only). -// If no unsafe content has been detected in a frame, no annotations -// are present for that frame. If only some types of unsafe content -// have been detected in a frame, the likelihood is set to `UNKNOWN` -// for all other types of unsafe content. -type GoogleCloudVideointelligenceV1beta1SafeSearchAnnotation struct { - // Adult: Likelihood of adult content. - // - // Possible values: - // "UNKNOWN" - Unknown likelihood. - // "VERY_UNLIKELY" - Very unlikely. - // "UNLIKELY" - Unlikely. - // "POSSIBLE" - Possible. - // "LIKELY" - Likely. - // "VERY_LIKELY" - Very likely. - Adult string `json:"adult,omitempty"` - - // Medical: Likelihood of medical content. - // - // Possible values: - // "UNKNOWN" - Unknown likelihood. - // "VERY_UNLIKELY" - Very unlikely. - // "UNLIKELY" - Unlikely. - // "POSSIBLE" - Possible. - // "LIKELY" - Likely. - // "VERY_LIKELY" - Very likely. - Medical string `json:"medical,omitempty"` - - // Racy: Likelihood of racy content. - // - // Possible values: - // "UNKNOWN" - Unknown likelihood. - // "VERY_UNLIKELY" - Very unlikely. - // "UNLIKELY" - Unlikely. - // "POSSIBLE" - Possible. - // "LIKELY" - Likely. - // "VERY_LIKELY" - Very likely. - Racy string `json:"racy,omitempty"` - - // Spoof: Likelihood that an obvious modification was made to the - // original - // version to make it appear funny or offensive. - // - // Possible values: - // "UNKNOWN" - Unknown likelihood. - // "VERY_UNLIKELY" - Very unlikely. - // "UNLIKELY" - Unlikely. - // "POSSIBLE" - Possible. - // "LIKELY" - Likely. - // "VERY_LIKELY" - Very likely. - Spoof string `json:"spoof,omitempty"` - - // TimeOffset: Video time offset in microseconds. - TimeOffset int64 `json:"timeOffset,omitempty,string"` - - // Violent: Likelihood of violent content. - // - // Possible values: - // "UNKNOWN" - Unknown likelihood. - // "VERY_UNLIKELY" - Very unlikely. - // "UNLIKELY" - Unlikely. - // "POSSIBLE" - Possible. - // "LIKELY" - Likely. - // "VERY_LIKELY" - Very likely. - Violent string `json:"violent,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Adult") 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. "Adult") 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 *GoogleCloudVideointelligenceV1beta1SafeSearchAnnotation) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudVideointelligenceV1beta1SafeSearchAnnotation - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GoogleCloudVideointelligenceV1beta1VideoAnnotationProgress: -// Annotation progress for a single video. -type GoogleCloudVideointelligenceV1beta1VideoAnnotationProgress struct { - // InputUri: Video file location in - // [Google Cloud Storage](https://cloud.google.com/storage/). - InputUri string `json:"inputUri,omitempty"` - - // ProgressPercent: Approximate percentage processed thus - // far. - // Guaranteed to be 100 when fully processed. - ProgressPercent int64 `json:"progressPercent,omitempty"` - - // StartTime: Time when the request was received. - StartTime string `json:"startTime,omitempty"` - - // UpdateTime: Time of the most recent update. - UpdateTime string `json:"updateTime,omitempty"` - - // ForceSendFields is a list of field names (e.g. "InputUri") 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. "InputUri") 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 *GoogleCloudVideointelligenceV1beta1VideoAnnotationProgress) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudVideointelligenceV1beta1VideoAnnotationProgress - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GoogleCloudVideointelligenceV1beta1VideoAnnotationResults: Annotation -// results for a single video. -type GoogleCloudVideointelligenceV1beta1VideoAnnotationResults struct { - // Error: If set, indicates an error. Note that for a single - // `AnnotateVideoRequest` - // some videos may succeed and some may fail. - Error *GoogleRpcStatus `json:"error,omitempty"` - - // InputUri: Video file location in - // [Google Cloud Storage](https://cloud.google.com/storage/). - InputUri string `json:"inputUri,omitempty"` - - // LabelAnnotations: Label annotations. There is exactly one element for - // each unique label. - LabelAnnotations []*GoogleCloudVideointelligenceV1beta1LabelAnnotation `json:"labelAnnotations,omitempty"` - - // SafeSearchAnnotations: Safe search annotations. - SafeSearchAnnotations []*GoogleCloudVideointelligenceV1beta1SafeSearchAnnotation `json:"safeSearchAnnotations,omitempty"` - - // ShotAnnotations: Shot annotations. Each shot is represented as a - // video segment. - ShotAnnotations []*GoogleCloudVideointelligenceV1beta1VideoSegment `json:"shotAnnotations,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Error") 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. "Error") 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 *GoogleCloudVideointelligenceV1beta1VideoAnnotationResults) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudVideointelligenceV1beta1VideoAnnotationResults - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GoogleCloudVideointelligenceV1beta1VideoContext: Video context and/or -// feature-specific parameters. -type GoogleCloudVideointelligenceV1beta1VideoContext struct { - // LabelDetectionMode: If label detection has been requested, what - // labels should be detected - // in addition to video-level labels or segment-level labels. If - // unspecified, - // defaults to `SHOT_MODE`. - // - // Possible values: - // "LABEL_DETECTION_MODE_UNSPECIFIED" - Unspecified. - // "SHOT_MODE" - Detect shot-level labels. - // "FRAME_MODE" - Detect frame-level labels. - // "SHOT_AND_FRAME_MODE" - Detect both shot-level and frame-level - // labels. - LabelDetectionMode string `json:"labelDetectionMode,omitempty"` - - // LabelDetectionModel: Model to use for label detection. - // Supported values: "latest" and "stable" (the default). - LabelDetectionModel string `json:"labelDetectionModel,omitempty"` - - // SafeSearchDetectionModel: Model to use for safe search - // detection. - // Supported values: "latest" and "stable" (the default). - SafeSearchDetectionModel string `json:"safeSearchDetectionModel,omitempty"` - - // Segments: Video segments to annotate. The segments may overlap and - // are not required - // to be contiguous or span the whole video. If unspecified, each - // video - // is treated as a single segment. - Segments []*GoogleCloudVideointelligenceV1beta1VideoSegment `json:"segments,omitempty"` - - // ShotChangeDetectionModel: Model to use for shot change - // detection. - // Supported values: "latest" and "stable" (the default). - ShotChangeDetectionModel string `json:"shotChangeDetectionModel,omitempty"` - - // StationaryCamera: Whether the video has been shot from a stationary - // (i.e. non-moving) camera. - // When set to true, might improve detection accuracy for moving - // objects. - StationaryCamera bool `json:"stationaryCamera,omitempty"` - - // ForceSendFields is a list of field names (e.g. "LabelDetectionMode") - // 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. "LabelDetectionMode") 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 *GoogleCloudVideointelligenceV1beta1VideoContext) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudVideointelligenceV1beta1VideoContext - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GoogleCloudVideointelligenceV1beta1VideoSegment: Video segment. -type GoogleCloudVideointelligenceV1beta1VideoSegment struct { - // EndTimeOffset: End offset in microseconds (inclusive). Unset means 0. - EndTimeOffset int64 `json:"endTimeOffset,omitempty,string"` - - // StartTimeOffset: Start offset in microseconds (inclusive). Unset - // means 0. - StartTimeOffset int64 `json:"startTimeOffset,omitempty,string"` - - // ForceSendFields is a list of field names (e.g. "EndTimeOffset") 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. "EndTimeOffset") 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 *GoogleCloudVideointelligenceV1beta1VideoSegment) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudVideointelligenceV1beta1VideoSegment - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GoogleCloudVideointelligenceV1beta2AnnotateVideoProgress: Video -// annotation progress. Included in the `metadata` -// field of the `Operation` returned by the `GetOperation` -// call of the `google::longrunning::Operations` service. -type GoogleCloudVideointelligenceV1beta2AnnotateVideoProgress struct { - // AnnotationProgress: Progress metadata for all videos specified in - // `AnnotateVideoRequest`. - AnnotationProgress []*GoogleCloudVideointelligenceV1beta2VideoAnnotationProgress `json:"annotationProgress,omitempty"` - - // ForceSendFields is a list of field names (e.g. "AnnotationProgress") - // 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. "AnnotationProgress") 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 *GoogleCloudVideointelligenceV1beta2AnnotateVideoProgress) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudVideointelligenceV1beta2AnnotateVideoProgress - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GoogleCloudVideointelligenceV1beta2AnnotateVideoResponse: Video -// annotation response. Included in the `response` -// field of the `Operation` returned by the `GetOperation` -// call of the `google::longrunning::Operations` service. -type GoogleCloudVideointelligenceV1beta2AnnotateVideoResponse struct { - // AnnotationResults: Annotation results for all videos specified in - // `AnnotateVideoRequest`. - AnnotationResults []*GoogleCloudVideointelligenceV1beta2VideoAnnotationResults `json:"annotationResults,omitempty"` - - // ForceSendFields is a list of field names (e.g. "AnnotationResults") - // 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. "AnnotationResults") 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 *GoogleCloudVideointelligenceV1beta2AnnotateVideoResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudVideointelligenceV1beta2AnnotateVideoResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GoogleCloudVideointelligenceV1beta2Entity: Detected entity from video -// analysis. -type GoogleCloudVideointelligenceV1beta2Entity struct { - // Description: Textual description, e.g. `Fixed-gear bicycle`. - Description string `json:"description,omitempty"` - - // EntityId: Opaque entity ID. Some IDs may be available in - // [Google Knowledge Graph - // Search - // API](https://developers.google.com/knowledge-graph/). - EntityId string `json:"entityId,omitempty"` - - // LanguageCode: Language code for `description` in BCP-47 format. - LanguageCode string `json:"languageCode,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Description") 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. "Description") 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 *GoogleCloudVideointelligenceV1beta2Entity) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudVideointelligenceV1beta2Entity - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GoogleCloudVideointelligenceV1beta2ExplicitContentAnnotation: -// Explicit content annotation (based on per-frame visual signals -// only). -// If no explicit content has been detected in a frame, no annotations -// are -// present for that frame. -type GoogleCloudVideointelligenceV1beta2ExplicitContentAnnotation struct { - // Frames: All video frames where explicit content was detected. - Frames []*GoogleCloudVideointelligenceV1beta2ExplicitContentFrame `json:"frames,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Frames") 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. "Frames") 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 *GoogleCloudVideointelligenceV1beta2ExplicitContentAnnotation) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudVideointelligenceV1beta2ExplicitContentAnnotation - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GoogleCloudVideointelligenceV1beta2ExplicitContentFrame: Video frame -// level annotation results for explicit content. -type GoogleCloudVideointelligenceV1beta2ExplicitContentFrame struct { - // PornographyLikelihood: Likelihood of the pornography content.. - // - // Possible values: - // "LIKELIHOOD_UNSPECIFIED" - Unspecified likelihood. - // "VERY_UNLIKELY" - Very unlikely. - // "UNLIKELY" - Unlikely. - // "POSSIBLE" - Possible. - // "LIKELY" - Likely. - // "VERY_LIKELY" - Very likely. - PornographyLikelihood string `json:"pornographyLikelihood,omitempty"` - - // TimeOffset: Time-offset, relative to the beginning of the video, - // corresponding to the - // video frame for this location. - TimeOffset string `json:"timeOffset,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "PornographyLikelihood") 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. "PornographyLikelihood") 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 *GoogleCloudVideointelligenceV1beta2ExplicitContentFrame) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudVideointelligenceV1beta2ExplicitContentFrame - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GoogleCloudVideointelligenceV1beta2LabelAnnotation: Label annotation. -type GoogleCloudVideointelligenceV1beta2LabelAnnotation struct { - // CategoryEntities: Common categories for the detected entity. - // E.g. when the label is `Terrier` the category is likely `dog`. And in - // some - // cases there might be more than one categories e.g. `Terrier` could - // also be - // a `pet`. - CategoryEntities []*GoogleCloudVideointelligenceV1beta2Entity `json:"categoryEntities,omitempty"` - - // Entity: Detected entity. - Entity *GoogleCloudVideointelligenceV1beta2Entity `json:"entity,omitempty"` - - // Frames: All video frames where a label was detected. - Frames []*GoogleCloudVideointelligenceV1beta2LabelFrame `json:"frames,omitempty"` - - // Segments: All video segments where a label was detected. - Segments []*GoogleCloudVideointelligenceV1beta2LabelSegment `json:"segments,omitempty"` - - // ForceSendFields is a list of field names (e.g. "CategoryEntities") 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. "CategoryEntities") 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 *GoogleCloudVideointelligenceV1beta2LabelAnnotation) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudVideointelligenceV1beta2LabelAnnotation - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GoogleCloudVideointelligenceV1beta2LabelFrame: Video frame level -// annotation results for label detection. -type GoogleCloudVideointelligenceV1beta2LabelFrame struct { - // Confidence: Confidence that the label is accurate. Range: [0, 1]. - Confidence float64 `json:"confidence,omitempty"` - - // TimeOffset: Time-offset, relative to the beginning of the video, - // corresponding to the - // video frame for this location. - TimeOffset string `json:"timeOffset,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Confidence") 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. "Confidence") 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 *GoogleCloudVideointelligenceV1beta2LabelFrame) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudVideointelligenceV1beta2LabelFrame - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *GoogleCloudVideointelligenceV1beta2LabelFrame) UnmarshalJSON(data []byte) error { - type NoMethod GoogleCloudVideointelligenceV1beta2LabelFrame - var s1 struct { - Confidence gensupport.JSONFloat64 `json:"confidence"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.Confidence = float64(s1.Confidence) - return nil -} - -// GoogleCloudVideointelligenceV1beta2LabelSegment: Video segment level -// annotation results for label detection. -type GoogleCloudVideointelligenceV1beta2LabelSegment struct { - // Confidence: Confidence that the label is accurate. Range: [0, 1]. - Confidence float64 `json:"confidence,omitempty"` - - // Segment: Video segment where a label was detected. - Segment *GoogleCloudVideointelligenceV1beta2VideoSegment `json:"segment,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Confidence") 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. "Confidence") 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 *GoogleCloudVideointelligenceV1beta2LabelSegment) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudVideointelligenceV1beta2LabelSegment - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *GoogleCloudVideointelligenceV1beta2LabelSegment) UnmarshalJSON(data []byte) error { - type NoMethod GoogleCloudVideointelligenceV1beta2LabelSegment - var s1 struct { - Confidence gensupport.JSONFloat64 `json:"confidence"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.Confidence = float64(s1.Confidence) - return nil -} - -// GoogleCloudVideointelligenceV1beta2VideoAnnotationProgress: -// Annotation progress for a single video. -type GoogleCloudVideointelligenceV1beta2VideoAnnotationProgress struct { - // InputUri: Output only. Video file location in - // [Google Cloud Storage](https://cloud.google.com/storage/). - InputUri string `json:"inputUri,omitempty"` - - // ProgressPercent: Output only. Approximate percentage processed thus - // far. Guaranteed to be - // 100 when fully processed. - ProgressPercent int64 `json:"progressPercent,omitempty"` - - // StartTime: Output only. Time when the request was received. - StartTime string `json:"startTime,omitempty"` - - // UpdateTime: Output only. Time of the most recent update. - UpdateTime string `json:"updateTime,omitempty"` - - // ForceSendFields is a list of field names (e.g. "InputUri") 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. "InputUri") 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 *GoogleCloudVideointelligenceV1beta2VideoAnnotationProgress) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudVideointelligenceV1beta2VideoAnnotationProgress - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GoogleCloudVideointelligenceV1beta2VideoAnnotationResults: Annotation -// results for a single video. -type GoogleCloudVideointelligenceV1beta2VideoAnnotationResults struct { - // Error: Output only. Non-streaming error only. If set, indicates an - // error. Note - // that for a single `AnnotateVideoRequest` some videos may succeed and - // some - // may fail. - Error *GoogleRpcStatus `json:"error,omitempty"` - - // ExplicitAnnotation: Explicit content annotation. - ExplicitAnnotation *GoogleCloudVideointelligenceV1beta2ExplicitContentAnnotation `json:"explicitAnnotation,omitempty"` - - // FrameLabelAnnotations: Label annotations on frame level. - // There is exactly one element for each unique label. - FrameLabelAnnotations []*GoogleCloudVideointelligenceV1beta2LabelAnnotation `json:"frameLabelAnnotations,omitempty"` - - // InputUri: Output only. Video file location in - // [Google Cloud Storage](https://cloud.google.com/storage/). - InputUri string `json:"inputUri,omitempty"` - - // SegmentLabelAnnotations: Label annotations on video level or user - // specified segment level. - // There is exactly one element for each unique label. - SegmentLabelAnnotations []*GoogleCloudVideointelligenceV1beta2LabelAnnotation `json:"segmentLabelAnnotations,omitempty"` - - // ShotAnnotations: Shot annotations. Each shot is represented as a - // video segment. - ShotAnnotations []*GoogleCloudVideointelligenceV1beta2VideoSegment `json:"shotAnnotations,omitempty"` - - // ShotLabelAnnotations: Label annotations on shot level. - // There is exactly one element for each unique label. - ShotLabelAnnotations []*GoogleCloudVideointelligenceV1beta2LabelAnnotation `json:"shotLabelAnnotations,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Error") 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. "Error") 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 *GoogleCloudVideointelligenceV1beta2VideoAnnotationResults) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudVideointelligenceV1beta2VideoAnnotationResults - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GoogleCloudVideointelligenceV1beta2VideoSegment: Video segment. -type GoogleCloudVideointelligenceV1beta2VideoSegment struct { - // EndTimeOffset: Time-offset, relative to the beginning of the - // video, - // corresponding to the end of the segment (inclusive). - EndTimeOffset string `json:"endTimeOffset,omitempty"` - - // StartTimeOffset: Time-offset, relative to the beginning of the - // video, - // corresponding to the start of the segment (inclusive). - StartTimeOffset string `json:"startTimeOffset,omitempty"` - - // ForceSendFields is a list of field names (e.g. "EndTimeOffset") 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. "EndTimeOffset") 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 *GoogleCloudVideointelligenceV1beta2VideoSegment) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudVideointelligenceV1beta2VideoSegment - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GoogleCloudVideointelligenceV1p1beta1AnnotateVideoProgress: Video -// annotation progress. Included in the `metadata` -// field of the `Operation` returned by the `GetOperation` -// call of the `google::longrunning::Operations` service. -type GoogleCloudVideointelligenceV1p1beta1AnnotateVideoProgress struct { - // AnnotationProgress: Progress metadata for all videos specified in - // `AnnotateVideoRequest`. - AnnotationProgress []*GoogleCloudVideointelligenceV1p1beta1VideoAnnotationProgress `json:"annotationProgress,omitempty"` - - // ForceSendFields is a list of field names (e.g. "AnnotationProgress") - // 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. "AnnotationProgress") 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 *GoogleCloudVideointelligenceV1p1beta1AnnotateVideoProgress) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudVideointelligenceV1p1beta1AnnotateVideoProgress - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GoogleCloudVideointelligenceV1p1beta1AnnotateVideoResponse: Video -// annotation response. Included in the `response` -// field of the `Operation` returned by the `GetOperation` -// call of the `google::longrunning::Operations` service. -type GoogleCloudVideointelligenceV1p1beta1AnnotateVideoResponse struct { - // AnnotationResults: Annotation results for all videos specified in - // `AnnotateVideoRequest`. - AnnotationResults []*GoogleCloudVideointelligenceV1p1beta1VideoAnnotationResults `json:"annotationResults,omitempty"` - - // ForceSendFields is a list of field names (e.g. "AnnotationResults") - // 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. "AnnotationResults") 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 *GoogleCloudVideointelligenceV1p1beta1AnnotateVideoResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudVideointelligenceV1p1beta1AnnotateVideoResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GoogleCloudVideointelligenceV1p1beta1EmotionAttribute: Emotion -// attribute. -type GoogleCloudVideointelligenceV1p1beta1EmotionAttribute struct { - // Emotion: Emotion entry. - // - // Possible values: - // "EMOTION_UNSPECIFIED" - Unspecified emotion. - // "AMUSEMENT" - Amusement. - // "ANGER" - Anger. - // "CONCENTRATION" - Concentration. - // "CONTENTMENT" - Contentment. - // "DESIRE" - Desire. - // "DISAPPOINTMENT" - Disappointment. - // "DISGUST" - Disgust. - // "ELATION" - Elation. - // "EMBARRASSMENT" - Embarrassment. - // "INTEREST" - Interest. - // "PRIDE" - Pride. - // "SADNESS" - Sadness. - // "SURPRISE" - Surprise. - Emotion string `json:"emotion,omitempty"` - - // Score: Confidence score. - Score float64 `json:"score,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Emotion") 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. "Emotion") 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 *GoogleCloudVideointelligenceV1p1beta1EmotionAttribute) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudVideointelligenceV1p1beta1EmotionAttribute - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *GoogleCloudVideointelligenceV1p1beta1EmotionAttribute) UnmarshalJSON(data []byte) error { - type NoMethod GoogleCloudVideointelligenceV1p1beta1EmotionAttribute - var s1 struct { - Score gensupport.JSONFloat64 `json:"score"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.Score = float64(s1.Score) - return nil -} - -// GoogleCloudVideointelligenceV1p1beta1Entity: Detected entity from -// video analysis. -type GoogleCloudVideointelligenceV1p1beta1Entity struct { - // Description: Textual description, e.g. `Fixed-gear bicycle`. - Description string `json:"description,omitempty"` - - // EntityId: Opaque entity ID. Some IDs may be available in - // [Google Knowledge Graph - // Search - // API](https://developers.google.com/knowledge-graph/). - EntityId string `json:"entityId,omitempty"` - - // LanguageCode: Language code for `description` in BCP-47 format. - LanguageCode string `json:"languageCode,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Description") 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. "Description") 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 *GoogleCloudVideointelligenceV1p1beta1Entity) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudVideointelligenceV1p1beta1Entity - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GoogleCloudVideointelligenceV1p1beta1ExplicitContentAnnotation: -// Explicit content annotation (based on per-frame visual signals -// only). -// If no explicit content has been detected in a frame, no annotations -// are -// present for that frame. -type GoogleCloudVideointelligenceV1p1beta1ExplicitContentAnnotation struct { - // Frames: All video frames where explicit content was detected. - Frames []*GoogleCloudVideointelligenceV1p1beta1ExplicitContentFrame `json:"frames,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Frames") 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. "Frames") 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 *GoogleCloudVideointelligenceV1p1beta1ExplicitContentAnnotation) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudVideointelligenceV1p1beta1ExplicitContentAnnotation - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GoogleCloudVideointelligenceV1p1beta1ExplicitContentFrame: Video -// frame level annotation results for explicit content. -type GoogleCloudVideointelligenceV1p1beta1ExplicitContentFrame struct { - // PornographyLikelihood: Likelihood of the pornography content.. - // - // Possible values: - // "LIKELIHOOD_UNSPECIFIED" - Unspecified likelihood. - // "VERY_UNLIKELY" - Very unlikely. - // "UNLIKELY" - Unlikely. - // "POSSIBLE" - Possible. - // "LIKELY" - Likely. - // "VERY_LIKELY" - Very likely. - PornographyLikelihood string `json:"pornographyLikelihood,omitempty"` - - // TimeOffset: Time-offset, relative to the beginning of the video, - // corresponding to the - // video frame for this location. - TimeOffset string `json:"timeOffset,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "PornographyLikelihood") 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. "PornographyLikelihood") 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 *GoogleCloudVideointelligenceV1p1beta1ExplicitContentFrame) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudVideointelligenceV1p1beta1ExplicitContentFrame - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GoogleCloudVideointelligenceV1p1beta1FaceDetectionAnnotation: Face -// detection annotation. -type GoogleCloudVideointelligenceV1p1beta1FaceDetectionAnnotation struct { - // Frames: All video frames where a face was detected. - Frames []*GoogleCloudVideointelligenceV1p1beta1FaceDetectionFrame `json:"frames,omitempty"` - - // Segments: All video segments where a face was detected. - Segments []*GoogleCloudVideointelligenceV1p1beta1FaceSegment `json:"segments,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Frames") 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. "Frames") 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 *GoogleCloudVideointelligenceV1p1beta1FaceDetectionAnnotation) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudVideointelligenceV1p1beta1FaceDetectionAnnotation - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GoogleCloudVideointelligenceV1p1beta1FaceDetectionAttribute: Face -// detection attribute. -type GoogleCloudVideointelligenceV1p1beta1FaceDetectionAttribute struct { - // Emotions: Emotion attributes. - Emotions []*GoogleCloudVideointelligenceV1p1beta1EmotionAttribute `json:"emotions,omitempty"` - - // NormalizedBoundingBox: Normalized Bounding box. - NormalizedBoundingBox *GoogleCloudVideointelligenceV1p1beta1NormalizedBoundingBox `json:"normalizedBoundingBox,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Emotions") 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. "Emotions") 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 *GoogleCloudVideointelligenceV1p1beta1FaceDetectionAttribute) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudVideointelligenceV1p1beta1FaceDetectionAttribute - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GoogleCloudVideointelligenceV1p1beta1FaceDetectionFrame: Video frame -// level annotation results for face detection. -type GoogleCloudVideointelligenceV1p1beta1FaceDetectionFrame struct { - // Attributes: Face attributes in a frame. - // There can be more than one attributes if the same face is detected - // in - // multiple locations within the current frame. - Attributes []*GoogleCloudVideointelligenceV1p1beta1FaceDetectionAttribute `json:"attributes,omitempty"` - - // TimeOffset: Time-offset, relative to the beginning of the - // video, - // corresponding to the video frame for this location. - TimeOffset string `json:"timeOffset,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Attributes") 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. "Attributes") 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 *GoogleCloudVideointelligenceV1p1beta1FaceDetectionFrame) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudVideointelligenceV1p1beta1FaceDetectionFrame - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GoogleCloudVideointelligenceV1p1beta1FaceSegment: Video segment level -// annotation results for face detection. -type GoogleCloudVideointelligenceV1p1beta1FaceSegment struct { - // Segment: Video segment where a face was detected. - Segment *GoogleCloudVideointelligenceV1p1beta1VideoSegment `json:"segment,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Segment") 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. "Segment") 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 *GoogleCloudVideointelligenceV1p1beta1FaceSegment) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudVideointelligenceV1p1beta1FaceSegment - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GoogleCloudVideointelligenceV1p1beta1LabelAnnotation: Label -// annotation. -type GoogleCloudVideointelligenceV1p1beta1LabelAnnotation struct { - // CategoryEntities: Common categories for the detected entity. - // E.g. when the label is `Terrier` the category is likely `dog`. And in - // some - // cases there might be more than one categories e.g. `Terrier` could - // also be - // a `pet`. - CategoryEntities []*GoogleCloudVideointelligenceV1p1beta1Entity `json:"categoryEntities,omitempty"` - - // Entity: Detected entity. - Entity *GoogleCloudVideointelligenceV1p1beta1Entity `json:"entity,omitempty"` - - // Frames: All video frames where a label was detected. - Frames []*GoogleCloudVideointelligenceV1p1beta1LabelFrame `json:"frames,omitempty"` - - // Segments: All video segments where a label was detected. - Segments []*GoogleCloudVideointelligenceV1p1beta1LabelSegment `json:"segments,omitempty"` - - // ForceSendFields is a list of field names (e.g. "CategoryEntities") 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. "CategoryEntities") 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 *GoogleCloudVideointelligenceV1p1beta1LabelAnnotation) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudVideointelligenceV1p1beta1LabelAnnotation - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GoogleCloudVideointelligenceV1p1beta1LabelFrame: Video frame level -// annotation results for label detection. -type GoogleCloudVideointelligenceV1p1beta1LabelFrame struct { - // Confidence: Confidence that the label is accurate. Range: [0, 1]. - Confidence float64 `json:"confidence,omitempty"` - - // TimeOffset: Time-offset, relative to the beginning of the video, - // corresponding to the - // video frame for this location. - TimeOffset string `json:"timeOffset,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Confidence") 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. "Confidence") 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 *GoogleCloudVideointelligenceV1p1beta1LabelFrame) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudVideointelligenceV1p1beta1LabelFrame - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *GoogleCloudVideointelligenceV1p1beta1LabelFrame) UnmarshalJSON(data []byte) error { - type NoMethod GoogleCloudVideointelligenceV1p1beta1LabelFrame - var s1 struct { - Confidence gensupport.JSONFloat64 `json:"confidence"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.Confidence = float64(s1.Confidence) - return nil -} - -// GoogleCloudVideointelligenceV1p1beta1LabelSegment: Video segment -// level annotation results for label detection. -type GoogleCloudVideointelligenceV1p1beta1LabelSegment struct { - // Confidence: Confidence that the label is accurate. Range: [0, 1]. - Confidence float64 `json:"confidence,omitempty"` - - // Segment: Video segment where a label was detected. - Segment *GoogleCloudVideointelligenceV1p1beta1VideoSegment `json:"segment,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Confidence") 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. "Confidence") 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 *GoogleCloudVideointelligenceV1p1beta1LabelSegment) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudVideointelligenceV1p1beta1LabelSegment - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *GoogleCloudVideointelligenceV1p1beta1LabelSegment) UnmarshalJSON(data []byte) error { - type NoMethod GoogleCloudVideointelligenceV1p1beta1LabelSegment - var s1 struct { - Confidence gensupport.JSONFloat64 `json:"confidence"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.Confidence = float64(s1.Confidence) - return nil -} - -// GoogleCloudVideointelligenceV1p1beta1NormalizedBoundingBox: -// Normalized bounding box. -// The normalized vertex coordinates are relative to the original -// image. -// Range: [0, 1]. -type GoogleCloudVideointelligenceV1p1beta1NormalizedBoundingBox struct { - // Bottom: Bottom Y coordinate. - Bottom float64 `json:"bottom,omitempty"` - - // Left: Left X coordinate. - Left float64 `json:"left,omitempty"` - - // Right: Right X coordinate. - Right float64 `json:"right,omitempty"` - - // Top: Top Y coordinate. - Top float64 `json:"top,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Bottom") 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. "Bottom") 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 *GoogleCloudVideointelligenceV1p1beta1NormalizedBoundingBox) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudVideointelligenceV1p1beta1NormalizedBoundingBox - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *GoogleCloudVideointelligenceV1p1beta1NormalizedBoundingBox) UnmarshalJSON(data []byte) error { - type NoMethod GoogleCloudVideointelligenceV1p1beta1NormalizedBoundingBox - var s1 struct { - Bottom gensupport.JSONFloat64 `json:"bottom"` - Left gensupport.JSONFloat64 `json:"left"` - Right gensupport.JSONFloat64 `json:"right"` - Top gensupport.JSONFloat64 `json:"top"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.Bottom = float64(s1.Bottom) - s.Left = float64(s1.Left) - s.Right = float64(s1.Right) - s.Top = float64(s1.Top) - return nil -} - -// GoogleCloudVideointelligenceV1p1beta1SpeechRecognitionAlternative: -// Alternative hypotheses (a.k.a. n-best list). -type GoogleCloudVideointelligenceV1p1beta1SpeechRecognitionAlternative struct { - // Confidence: Output only. The confidence estimate between 0.0 and 1.0. - // A higher number - // indicates an estimated greater likelihood that the recognized words - // are - // correct. This field is typically provided only for the top - // hypothesis, and - // only for `is_final=true` results. Clients should not rely on - // the - // `confidence` field as it is not guaranteed to be accurate or - // consistent. - // The default of 0.0 is a sentinel value indicating `confidence` was - // not set. - Confidence float64 `json:"confidence,omitempty"` - - // Transcript: Output only. Transcript text representing the words that - // the user spoke. - Transcript string `json:"transcript,omitempty"` - - // Words: Output only. A list of word-specific information for each - // recognized word. - Words []*GoogleCloudVideointelligenceV1p1beta1WordInfo `json:"words,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Confidence") 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. "Confidence") 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 *GoogleCloudVideointelligenceV1p1beta1SpeechRecognitionAlternative) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudVideointelligenceV1p1beta1SpeechRecognitionAlternative - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *GoogleCloudVideointelligenceV1p1beta1SpeechRecognitionAlternative) UnmarshalJSON(data []byte) error { - type NoMethod GoogleCloudVideointelligenceV1p1beta1SpeechRecognitionAlternative - var s1 struct { - Confidence gensupport.JSONFloat64 `json:"confidence"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.Confidence = float64(s1.Confidence) - return nil -} - -// GoogleCloudVideointelligenceV1p1beta1SpeechTranscription: A speech -// recognition result corresponding to a portion of the audio. -type GoogleCloudVideointelligenceV1p1beta1SpeechTranscription struct { - // Alternatives: Output only. May contain one or more recognition - // hypotheses (up to the - // maximum specified in `max_alternatives`). - // These alternatives are ordered in terms of accuracy, with the top - // (first) - // alternative being the most probable, as ranked by the recognizer. - Alternatives []*GoogleCloudVideointelligenceV1p1beta1SpeechRecognitionAlternative `json:"alternatives,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Alternatives") 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. "Alternatives") 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 *GoogleCloudVideointelligenceV1p1beta1SpeechTranscription) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudVideointelligenceV1p1beta1SpeechTranscription - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GoogleCloudVideointelligenceV1p1beta1VideoAnnotationProgress: -// Annotation progress for a single video. -type GoogleCloudVideointelligenceV1p1beta1VideoAnnotationProgress struct { - // InputUri: Output only. Video file location in - // [Google Cloud Storage](https://cloud.google.com/storage/). - InputUri string `json:"inputUri,omitempty"` - - // ProgressPercent: Output only. Approximate percentage processed thus - // far. Guaranteed to be - // 100 when fully processed. - ProgressPercent int64 `json:"progressPercent,omitempty"` - - // StartTime: Output only. Time when the request was received. - StartTime string `json:"startTime,omitempty"` - - // UpdateTime: Output only. Time of the most recent update. - UpdateTime string `json:"updateTime,omitempty"` - - // ForceSendFields is a list of field names (e.g. "InputUri") 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. "InputUri") 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 *GoogleCloudVideointelligenceV1p1beta1VideoAnnotationProgress) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudVideointelligenceV1p1beta1VideoAnnotationProgress - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GoogleCloudVideointelligenceV1p1beta1VideoAnnotationResults: -// Annotation results for a single video. -type GoogleCloudVideointelligenceV1p1beta1VideoAnnotationResults struct { - // Error: Output only. Non-streaming error only. If set, indicates an - // error. Note - // that for a single `AnnotateVideoRequest` some videos may succeed and - // some - // may fail. - Error *GoogleRpcStatus `json:"error,omitempty"` - - // ExplicitAnnotation: Explicit content annotation. - ExplicitAnnotation *GoogleCloudVideointelligenceV1p1beta1ExplicitContentAnnotation `json:"explicitAnnotation,omitempty"` - - // FaceDetectionAnnotations: Face detection annotations. - FaceDetectionAnnotations []*GoogleCloudVideointelligenceV1p1beta1FaceDetectionAnnotation `json:"faceDetectionAnnotations,omitempty"` - - // FrameLabelAnnotations: Label annotations on frame level. - // There is exactly one element for each unique label. - FrameLabelAnnotations []*GoogleCloudVideointelligenceV1p1beta1LabelAnnotation `json:"frameLabelAnnotations,omitempty"` - - // InputUri: Output only. Video file location in - // [Google Cloud Storage](https://cloud.google.com/storage/). - InputUri string `json:"inputUri,omitempty"` - - // SegmentLabelAnnotations: Label annotations on video level or user - // specified segment level. - // There is exactly one element for each unique label. - SegmentLabelAnnotations []*GoogleCloudVideointelligenceV1p1beta1LabelAnnotation `json:"segmentLabelAnnotations,omitempty"` - - // ShotAnnotations: Shot annotations. Each shot is represented as a - // video segment. - ShotAnnotations []*GoogleCloudVideointelligenceV1p1beta1VideoSegment `json:"shotAnnotations,omitempty"` - - // ShotLabelAnnotations: Label annotations on shot level. - // There is exactly one element for each unique label. - ShotLabelAnnotations []*GoogleCloudVideointelligenceV1p1beta1LabelAnnotation `json:"shotLabelAnnotations,omitempty"` - - // SpeechTranscriptions: Speech transcription. - SpeechTranscriptions []*GoogleCloudVideointelligenceV1p1beta1SpeechTranscription `json:"speechTranscriptions,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Error") 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. "Error") 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 *GoogleCloudVideointelligenceV1p1beta1VideoAnnotationResults) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudVideointelligenceV1p1beta1VideoAnnotationResults - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GoogleCloudVideointelligenceV1p1beta1VideoSegment: Video segment. -type GoogleCloudVideointelligenceV1p1beta1VideoSegment struct { - // EndTimeOffset: Time-offset, relative to the beginning of the - // video, - // corresponding to the end of the segment (inclusive). - EndTimeOffset string `json:"endTimeOffset,omitempty"` - - // StartTimeOffset: Time-offset, relative to the beginning of the - // video, - // corresponding to the start of the segment (inclusive). - StartTimeOffset string `json:"startTimeOffset,omitempty"` - - // ForceSendFields is a list of field names (e.g. "EndTimeOffset") 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. "EndTimeOffset") 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 *GoogleCloudVideointelligenceV1p1beta1VideoSegment) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudVideointelligenceV1p1beta1VideoSegment - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GoogleCloudVideointelligenceV1p1beta1WordInfo: Word-specific -// information for recognized words. Word information is only -// included in the response when certain request parameters are set, -// such -// as `enable_word_time_offsets`. -type GoogleCloudVideointelligenceV1p1beta1WordInfo struct { - // EndTime: Output only. Time offset relative to the beginning of the - // audio, and - // corresponding to the end of the spoken word. This field is only set - // if - // `enable_word_time_offsets=true` and only in the top hypothesis. This - // is an - // experimental feature and the accuracy of the time offset can vary. - EndTime string `json:"endTime,omitempty"` - - // StartTime: Output only. Time offset relative to the beginning of the - // audio, and - // corresponding to the start of the spoken word. This field is only set - // if - // `enable_word_time_offsets=true` and only in the top hypothesis. This - // is an - // experimental feature and the accuracy of the time offset can vary. - StartTime string `json:"startTime,omitempty"` - - // Word: Output only. The word corresponding to this set of information. - Word string `json:"word,omitempty"` - - // ForceSendFields is a list of field names (e.g. "EndTime") 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. "EndTime") 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 *GoogleCloudVideointelligenceV1p1beta1WordInfo) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudVideointelligenceV1p1beta1WordInfo - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GoogleLongrunningOperation: This resource represents a long-running -// operation that is the result of a -// network API call. -type GoogleLongrunningOperation struct { - // Done: If the value is `false`, it means the operation is still in - // progress. - // If `true`, the operation is completed, and either `error` or - // `response` is - // available. - Done bool `json:"done,omitempty"` - - // Error: The error result of the operation in case of failure or - // cancellation. - Error *GoogleRpcStatus `json:"error,omitempty"` - - // Metadata: Service-specific metadata associated with the operation. - // It typically - // contains progress information and common metadata such as create - // time. - // Some services might not provide such metadata. Any method that - // returns a - // long-running operation should document the metadata type, if any. - Metadata googleapi.RawMessage `json:"metadata,omitempty"` - - // Name: The server-assigned name, which is only unique within the same - // service that - // originally returns it. If you use the default HTTP mapping, - // the - // `name` should have the format of `operations/some/unique/name`. - Name string `json:"name,omitempty"` - - // Response: The normal response of the operation in case of success. - // If the original - // method returns no data on success, such as `Delete`, the response - // is - // `google.protobuf.Empty`. If the original method is - // standard - // `Get`/`Create`/`Update`, the response should be the resource. For - // other - // methods, the response should have the type `XxxResponse`, where - // `Xxx` - // is the original method name. For example, if the original method - // name - // is `TakeSnapshot()`, the inferred response type - // is - // `TakeSnapshotResponse`. - Response googleapi.RawMessage `json:"response,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Done") 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. "Done") 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 *GoogleLongrunningOperation) MarshalJSON() ([]byte, error) { - type NoMethod GoogleLongrunningOperation - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GoogleRpcStatus: The `Status` type defines a logical error model that -// is suitable for different -// programming environments, including REST APIs and RPC APIs. It is -// used by -// [gRPC](https://github.com/grpc). The error model is designed to -// be: -// -// - Simple to use and understand for most users -// - Flexible enough to meet unexpected needs -// -// # Overview -// -// The `Status` message contains three pieces of data: error code, error -// message, -// and error details. The error code should be an enum value -// of -// google.rpc.Code, but it may accept additional error codes if needed. -// The -// error message should be a developer-facing English message that -// helps -// developers *understand* and *resolve* the error. If a localized -// user-facing -// error message is needed, put the localized message in the error -// details or -// localize it in the client. The optional error details may contain -// arbitrary -// information about the error. There is a predefined set of error -// detail types -// in the package `google.rpc` that can be used for common error -// conditions. -// -// # Language mapping -// -// The `Status` message is the logical representation of the error -// model, but it -// is not necessarily the actual wire format. When the `Status` message -// is -// exposed in different client libraries and different wire protocols, -// it can be -// mapped differently. For example, it will likely be mapped to some -// exceptions -// in Java, but more likely mapped to some error codes in C. -// -// # Other uses -// -// The error model and the `Status` message can be used in a variety -// of -// environments, either with or without APIs, to provide a -// consistent developer experience across different -// environments. -// -// Example uses of this error model include: -// -// - Partial errors. If a service needs to return partial errors to the -// client, -// it may embed the `Status` in the normal response to indicate the -// partial -// errors. -// -// - Workflow errors. A typical workflow has multiple steps. Each step -// may -// have a `Status` message for error reporting. -// -// - Batch operations. If a client uses batch request and batch -// response, the -// `Status` message should be used directly inside batch response, -// one for -// each error sub-response. -// -// - Asynchronous operations. If an API call embeds asynchronous -// operation -// results in its response, the status of those operations should -// be -// represented directly using the `Status` message. -// -// - Logging. If some API errors are stored in logs, the message -// `Status` could -// be used directly after any stripping needed for security/privacy -// reasons. -type GoogleRpcStatus struct { - // Code: The status code, which should be an enum value of - // google.rpc.Code. - Code int64 `json:"code,omitempty"` - - // Details: A list of messages that carry the error details. There is a - // common set of - // message types for APIs to use. - Details []googleapi.RawMessage `json:"details,omitempty"` - - // Message: A developer-facing error message, which should be in - // English. Any - // user-facing error message should be localized and sent in - // the - // google.rpc.Status.details field, or localized by the client. - Message string `json:"message,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Code") 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. "Code") 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 *GoogleRpcStatus) MarshalJSON() ([]byte, error) { - type NoMethod GoogleRpcStatus - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// method id "videointelligence.videos.annotate": - -type VideosAnnotateCall struct { - s *Service - googlecloudvideointelligencev1beta1Annotatevideorequest *GoogleCloudVideointelligenceV1beta1AnnotateVideoRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Annotate: Performs asynchronous video annotation. Progress and -// results can be -// retrieved through the `google.longrunning.Operations` -// interface. -// `Operation.metadata` contains `AnnotateVideoProgress` -// (progress). -// `Operation.response` contains `AnnotateVideoResponse` (results). -func (r *VideosService) Annotate(googlecloudvideointelligencev1beta1Annotatevideorequest *GoogleCloudVideointelligenceV1beta1AnnotateVideoRequest) *VideosAnnotateCall { - c := &VideosAnnotateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.googlecloudvideointelligencev1beta1Annotatevideorequest = googlecloudvideointelligencev1beta1Annotatevideorequest - 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 *VideosAnnotateCall) Fields(s ...googleapi.Field) *VideosAnnotateCall { - 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 *VideosAnnotateCall) Context(ctx context.Context) *VideosAnnotateCall { - 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 *VideosAnnotateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *VideosAnnotateCall) 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.googlecloudvideointelligencev1beta1Annotatevideorequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/videos:annotate") - 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 "videointelligence.videos.annotate" call. -// Exactly one of *GoogleLongrunningOperation or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.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 *VideosAnnotateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, 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 := &GoogleLongrunningOperation{ - 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": "Performs asynchronous video annotation. Progress and results can be\nretrieved through the `google.longrunning.Operations` interface.\n`Operation.metadata` contains `AnnotateVideoProgress` (progress).\n`Operation.response` contains `AnnotateVideoResponse` (results).", - // "flatPath": "v1beta1/videos:annotate", - // "httpMethod": "POST", - // "id": "videointelligence.videos.annotate", - // "parameterOrder": [], - // "parameters": {}, - // "path": "v1beta1/videos:annotate", - // "request": { - // "$ref": "GoogleCloudVideointelligenceV1beta1_AnnotateVideoRequest" - // }, - // "response": { - // "$ref": "GoogleLongrunning_Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -}